@traefik-labs/faency 13.4.0 → 13.6.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.
- package/dist/components/AriaTable/AriaTable.cjs +13 -5
- package/dist/components/AriaTable/AriaTable.cjs.map +1 -1
- package/dist/components/AriaTable/AriaTable.constants.cjs +5 -0
- package/dist/components/AriaTable/AriaTable.constants.cjs.map +1 -0
- package/dist/components/AriaTable/AriaTable.constants.js +5 -0
- package/dist/components/AriaTable/AriaTable.constants.js.map +1 -0
- package/dist/components/AriaTable/AriaTable.js +13 -5
- package/dist/components/AriaTable/AriaTable.js.map +1 -1
- package/dist/components/AriaTable/AriaTable.vanilla.cjs +194 -0
- package/dist/components/AriaTable/AriaTable.vanilla.cjs.map +1 -0
- package/dist/components/AriaTable/AriaTable.vanilla.css.cjs +28 -0
- package/dist/components/AriaTable/AriaTable.vanilla.css.cjs.map +1 -0
- package/dist/components/AriaTable/AriaTable.vanilla.css.js +17 -0
- package/dist/components/AriaTable/AriaTable.vanilla.css.js.map +1 -0
- package/dist/components/AriaTable/AriaTable.vanilla.js +185 -0
- package/dist/components/AriaTable/AriaTable.vanilla.js.map +1 -0
- package/dist/components/Badge/Badge.vanilla.cjs +2 -1
- package/dist/components/Badge/Badge.vanilla.cjs.map +1 -1
- package/dist/components/Badge/Badge.vanilla.js +2 -1
- package/dist/components/Badge/Badge.vanilla.js.map +1 -1
- package/dist/components/Blockquote/Blockquote.vanilla.cjs +2 -1
- package/dist/components/Blockquote/Blockquote.vanilla.cjs.map +1 -1
- package/dist/components/Blockquote/Blockquote.vanilla.js +2 -1
- package/dist/components/Blockquote/Blockquote.vanilla.js.map +1 -1
- package/dist/components/Box/Box.vanilla.cjs +2 -1
- package/dist/components/Box/Box.vanilla.cjs.map +1 -1
- package/dist/components/Box/Box.vanilla.js +2 -1
- package/dist/components/Box/Box.vanilla.js.map +1 -1
- package/dist/components/Bubble/Bubble.vanilla.cjs +2 -1
- package/dist/components/Bubble/Bubble.vanilla.cjs.map +1 -1
- package/dist/components/Bubble/Bubble.vanilla.js +2 -1
- package/dist/components/Bubble/Bubble.vanilla.js.map +1 -1
- package/dist/components/Button/Button.vanilla.cjs +2 -1
- package/dist/components/Button/Button.vanilla.cjs.map +1 -1
- package/dist/components/Button/Button.vanilla.js +2 -1
- package/dist/components/Button/Button.vanilla.js.map +1 -1
- package/dist/components/ButtonSwitch/ButtonSwitch.vanilla.cjs +5 -4
- package/dist/components/ButtonSwitch/ButtonSwitch.vanilla.cjs.map +1 -1
- package/dist/components/ButtonSwitch/ButtonSwitch.vanilla.js +5 -4
- package/dist/components/ButtonSwitch/ButtonSwitch.vanilla.js.map +1 -1
- package/dist/components/Card/Card.vanilla.cjs +2 -1
- package/dist/components/Card/Card.vanilla.cjs.map +1 -1
- package/dist/components/Card/Card.vanilla.js +2 -1
- package/dist/components/Card/Card.vanilla.js.map +1 -1
- package/dist/components/CodeBlock/CodeBlock.cjs +2 -2
- package/dist/components/CodeBlock/CodeBlock.js +2 -2
- package/dist/components/CodeBlock/CodeBlock.vanilla.cjs +6 -14
- package/dist/components/CodeBlock/CodeBlock.vanilla.cjs.map +1 -1
- package/dist/components/CodeBlock/CodeBlock.vanilla.js +6 -14
- package/dist/components/CodeBlock/CodeBlock.vanilla.js.map +1 -1
- package/dist/components/Combobox/Combobox.vanilla.cjs +2 -2
- package/dist/components/Combobox/Combobox.vanilla.cjs.map +1 -1
- package/dist/components/Combobox/Combobox.vanilla.js +2 -2
- package/dist/components/Combobox/Combobox.vanilla.js.map +1 -1
- package/dist/components/Container/Container.vanilla.cjs +2 -1
- package/dist/components/Container/Container.vanilla.cjs.map +1 -1
- package/dist/components/Container/Container.vanilla.js +2 -1
- package/dist/components/Container/Container.vanilla.js.map +1 -1
- package/dist/components/DateTimePicker/DateTimePicker.cjs +1 -1
- package/dist/components/DateTimePicker/DateTimePicker.js +1 -1
- package/dist/components/Dialog/Dialog.cjs +1 -1
- package/dist/components/Dialog/Dialog.js +1 -1
- package/dist/components/Elevation/Elevation.vanilla.cjs +2 -1
- package/dist/components/Elevation/Elevation.vanilla.cjs.map +1 -1
- package/dist/components/Elevation/Elevation.vanilla.css.cjs.map +1 -1
- package/dist/components/Elevation/Elevation.vanilla.css.js.map +1 -1
- package/dist/components/Elevation/Elevation.vanilla.js +2 -1
- package/dist/components/Elevation/Elevation.vanilla.js.map +1 -1
- package/dist/components/Field/Field.cjs +80 -33
- package/dist/components/Field/Field.cjs.map +1 -1
- package/dist/components/Field/Field.js +80 -33
- package/dist/components/Field/Field.js.map +1 -1
- package/dist/components/Field/Field.vanilla.cjs +62 -32
- package/dist/components/Field/Field.vanilla.cjs.map +1 -1
- package/dist/components/Field/Field.vanilla.css.cjs +6 -0
- package/dist/components/Field/Field.vanilla.css.cjs.map +1 -1
- package/dist/components/Field/Field.vanilla.css.js +4 -1
- package/dist/components/Field/Field.vanilla.css.js.map +1 -1
- package/dist/components/Field/Field.vanilla.js +63 -33
- package/dist/components/Field/Field.vanilla.js.map +1 -1
- package/dist/components/Field/FieldContext.cjs +48 -10
- package/dist/components/Field/FieldContext.cjs.map +1 -1
- package/dist/components/Field/FieldContext.js +48 -10
- package/dist/components/Field/FieldContext.js.map +1 -1
- package/dist/components/Flex/Flex.vanilla.cjs +2 -1
- package/dist/components/Flex/Flex.vanilla.cjs.map +1 -1
- package/dist/components/Flex/Flex.vanilla.js +2 -1
- package/dist/components/Flex/Flex.vanilla.js.map +1 -1
- package/dist/components/Grid/Grid.vanilla.cjs +2 -1
- package/dist/components/Grid/Grid.vanilla.cjs.map +1 -1
- package/dist/components/Grid/Grid.vanilla.js +2 -1
- package/dist/components/Grid/Grid.vanilla.js.map +1 -1
- package/dist/components/IconButton/IconButton.vanilla.cjs +2 -1
- package/dist/components/IconButton/IconButton.vanilla.cjs.map +1 -1
- package/dist/components/IconButton/IconButton.vanilla.js +2 -1
- package/dist/components/IconButton/IconButton.vanilla.js.map +1 -1
- package/dist/components/Image/Image.vanilla.cjs +2 -1
- package/dist/components/Image/Image.vanilla.cjs.map +1 -1
- package/dist/components/Image/Image.vanilla.js +2 -1
- package/dist/components/Image/Image.vanilla.js.map +1 -1
- package/dist/components/Input/Input.vanilla.cjs +2 -1
- package/dist/components/Input/Input.vanilla.cjs.map +1 -1
- package/dist/components/Input/Input.vanilla.js +2 -1
- package/dist/components/Input/Input.vanilla.js.map +1 -1
- package/dist/components/Label/Label.vanilla.cjs +2 -1
- package/dist/components/Label/Label.vanilla.cjs.map +1 -1
- package/dist/components/Label/Label.vanilla.js +2 -1
- package/dist/components/Label/Label.vanilla.js.map +1 -1
- package/dist/components/List/List.cjs +1 -1
- package/dist/components/List/List.js +1 -1
- package/dist/components/Meter/Meter.vanilla.cjs +3 -2
- package/dist/components/Meter/Meter.vanilla.cjs.map +1 -1
- package/dist/components/Meter/Meter.vanilla.js +3 -2
- package/dist/components/Meter/Meter.vanilla.js.map +1 -1
- package/dist/components/NavigationTree/NavigationTreeItem.cjs +2 -2
- package/dist/components/NavigationTree/NavigationTreeItem.js +2 -2
- package/dist/components/Panel/Panel.vanilla.cjs +2 -1
- package/dist/components/Panel/Panel.vanilla.cjs.map +1 -1
- package/dist/components/Panel/Panel.vanilla.js +2 -1
- package/dist/components/Panel/Panel.vanilla.js.map +1 -1
- package/dist/components/Paragraph/Paragraph.vanilla.cjs +2 -1
- package/dist/components/Paragraph/Paragraph.vanilla.cjs.map +1 -1
- package/dist/components/Paragraph/Paragraph.vanilla.js +2 -1
- package/dist/components/Paragraph/Paragraph.vanilla.js.map +1 -1
- package/dist/components/RowLink/RowLink.cjs +18 -46
- package/dist/components/RowLink/RowLink.cjs.map +1 -1
- package/dist/components/RowLink/RowLink.constants.cjs +7 -0
- package/dist/components/RowLink/RowLink.constants.cjs.map +1 -0
- package/dist/components/RowLink/RowLink.constants.js +6 -0
- package/dist/components/RowLink/RowLink.constants.js.map +1 -0
- package/dist/components/RowLink/RowLink.js +15 -45
- package/dist/components/RowLink/RowLink.js.map +1 -1
- package/dist/components/RowLink/RowLink.utils.cjs +87 -0
- package/dist/components/RowLink/RowLink.utils.cjs.map +1 -0
- package/dist/components/RowLink/RowLink.utils.js +83 -0
- package/dist/components/RowLink/RowLink.utils.js.map +1 -0
- package/dist/components/RowLink/RowLink.vanilla.cjs +21 -0
- package/dist/components/RowLink/RowLink.vanilla.cjs.map +1 -0
- package/dist/components/RowLink/RowLink.vanilla.css.cjs +10 -0
- package/dist/components/RowLink/RowLink.vanilla.css.cjs.map +1 -0
- package/dist/components/RowLink/RowLink.vanilla.css.js +8 -0
- package/dist/components/RowLink/RowLink.vanilla.css.js.map +1 -0
- package/dist/components/RowLink/RowLink.vanilla.js +19 -0
- package/dist/components/RowLink/RowLink.vanilla.js.map +1 -0
- package/dist/components/SegmentedControl/SegmentedControl.vanilla.cjs +3 -3
- package/dist/components/SegmentedControl/SegmentedControl.vanilla.cjs.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.vanilla.js +3 -3
- package/dist/components/SegmentedControl/SegmentedControl.vanilla.js.map +1 -1
- package/dist/components/Select/Select.cjs +1 -1
- package/dist/components/Select/Select.js +1 -1
- package/dist/components/Skeleton/Skeleton.vanilla.cjs +2 -1
- package/dist/components/Skeleton/Skeleton.vanilla.cjs.map +1 -1
- package/dist/components/Skeleton/Skeleton.vanilla.js +2 -1
- package/dist/components/Skeleton/Skeleton.vanilla.js.map +1 -1
- package/dist/components/Spinner/Spinner.vanilla.cjs +3 -2
- package/dist/components/Spinner/Spinner.vanilla.cjs.map +1 -1
- package/dist/components/Spinner/Spinner.vanilla.js +3 -2
- package/dist/components/Spinner/Spinner.vanilla.js.map +1 -1
- package/dist/components/SplitLayout/SplitLayout.vanilla.cjs +4 -3
- package/dist/components/SplitLayout/SplitLayout.vanilla.cjs.map +1 -1
- package/dist/components/SplitLayout/SplitLayout.vanilla.js +4 -3
- package/dist/components/SplitLayout/SplitLayout.vanilla.js.map +1 -1
- package/dist/components/Table/ExpandToggle.vanilla.cjs +30 -0
- package/dist/components/Table/ExpandToggle.vanilla.cjs.map +1 -0
- package/dist/components/Table/ExpandToggle.vanilla.js +27 -0
- package/dist/components/Table/ExpandToggle.vanilla.js.map +1 -0
- package/dist/components/Table/SortButton.vanilla.cjs +38 -0
- package/dist/components/Table/SortButton.vanilla.cjs.map +1 -0
- package/dist/components/Table/SortButton.vanilla.js +35 -0
- package/dist/components/Table/SortButton.vanilla.js.map +1 -0
- package/dist/components/Table/Table.cjs +11 -4
- package/dist/components/Table/Table.cjs.map +1 -1
- package/dist/components/Table/Table.js +11 -4
- package/dist/components/Table/Table.js.map +1 -1
- package/dist/components/Table/Table.vanilla.cjs +142 -0
- package/dist/components/Table/Table.vanilla.cjs.map +1 -0
- package/dist/components/Table/Table.vanilla.css.cjs +178 -0
- package/dist/components/Table/Table.vanilla.css.cjs.map +1 -0
- package/dist/components/Table/Table.vanilla.css.js +161 -0
- package/dist/components/Table/Table.vanilla.css.js.map +1 -0
- package/dist/components/Table/Table.vanilla.js +133 -0
- package/dist/components/Table/Table.vanilla.js.map +1 -0
- package/dist/components/Table/useTableSort.cjs +60 -0
- package/dist/components/Table/useTableSort.cjs.map +1 -0
- package/dist/components/Table/useTableSort.js +59 -0
- package/dist/components/Table/useTableSort.js.map +1 -0
- package/dist/components/Text/Text.vanilla.cjs +2 -1
- package/dist/components/Text/Text.vanilla.cjs.map +1 -1
- package/dist/components/Text/Text.vanilla.js +2 -1
- package/dist/components/Text/Text.vanilla.js.map +1 -1
- package/dist/components/TextField/TextField.cjs +1 -1
- package/dist/components/TextField/TextField.js +1 -1
- package/dist/components/TextField/TextField.vanilla.cjs +1 -1
- package/dist/components/TextField/TextField.vanilla.js +1 -1
- package/dist/components/Textarea/Textarea.cjs +2 -2
- package/dist/components/Textarea/Textarea.js +2 -2
- package/dist/components/Textarea/Textarea.vanilla.cjs +4 -3
- package/dist/components/Textarea/Textarea.vanilla.cjs.map +1 -1
- package/dist/components/Textarea/Textarea.vanilla.js +4 -3
- package/dist/components/Textarea/Textarea.vanilla.js.map +1 -1
- package/dist/components/Toast/Toast.vanilla.cjs +5 -5
- package/dist/components/Toast/Toast.vanilla.cjs.map +1 -1
- package/dist/components/Toast/Toast.vanilla.js +5 -5
- package/dist/components/Toast/Toast.vanilla.js.map +1 -1
- package/dist/components/Toast/ToastProvider.vanilla.cjs +1 -1
- package/dist/components/Toast/ToastProvider.vanilla.js +1 -1
- package/dist/faency.css +3001 -2303
- package/dist/index.cjs +50 -29
- package/dist/index.d.ts +570 -24
- package/dist/index.js +33 -30
- package/dist/styles/cx.cjs +5 -0
- package/dist/styles/cx.cjs.map +1 -0
- package/dist/styles/cx.js +5 -0
- package/dist/styles/cx.js.map +1 -0
- package/dist/styles/themes.css.cjs.map +1 -1
- package/dist/styles/themes.css.js.map +1 -1
- package/dist/styles/tokens.css.cjs +55 -44
- package/dist/styles/tokens.css.cjs.map +1 -1
- package/dist/styles/tokens.css.js +55 -44
- package/dist/styles/tokens.css.js.map +1 -1
- package/dist/styles/useInlineStyle.cjs +16 -0
- package/dist/styles/useInlineStyle.cjs.map +1 -0
- package/dist/styles/useInlineStyle.js +16 -0
- package/dist/styles/useInlineStyle.js.map +1 -0
- package/dist/utils/warnOnce.cjs +13 -0
- package/dist/utils/warnOnce.cjs.map +1 -0
- package/dist/utils/warnOnce.js +13 -0
- package/dist/utils/warnOnce.js.map +1 -0
- package/package.json +10 -17
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { cx } from "../../styles/cx.js";
|
|
2
|
+
import { useInlineStyle } from "../../styles/useInlineStyle.js";
|
|
3
|
+
import { useIsomorphicLayoutEffect } from "../../utils/useIsomorphicLayoutEffect.js";
|
|
4
|
+
import { handleRowClick, mapRowLink, openRowLink } from "../RowLink/RowLink.utils.js";
|
|
5
|
+
import { RowLinkVanilla } from "../RowLink/RowLink.vanilla.js";
|
|
6
|
+
import { rowLinkRow, rowLinkTable } from "../RowLink/RowLink.vanilla.css.js";
|
|
7
|
+
import { ExpandToggleVanilla, stopEvent } from "../Table/ExpandToggle.vanilla.js";
|
|
8
|
+
import { ARIA_SORT, SortButtonVanilla } from "../Table/SortButton.vanilla.js";
|
|
9
|
+
import { captionRecipe, tableRecipe, tbody, tdRecipe, tfoot, thRecipe, thead, trRecipe } from "../Table/Table.vanilla.css.js";
|
|
10
|
+
import { FULL_COL_SPAN_ATTRIBUTE } from "./AriaTable.constants.js";
|
|
11
|
+
import { ariaCell, ariaTable, ariaTbody, ariaTfoot, ariaThead, ariaTr, fillerCell, fullColSpanCell } from "./AriaTable.vanilla.css.js";
|
|
12
|
+
import { Children, forwardRef, isValidElement, useCallback, useId, useRef, useState } from "react";
|
|
13
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
+
// components/AriaTable/AriaTable.vanilla.tsx
|
|
15
|
+
var AriaTableVanilla = forwardRef(({ elevation, hasCollapsibleChildren = false, className, css, style, ...props }, ref) => /* @__PURE__ */ jsx("div", {
|
|
16
|
+
ref,
|
|
17
|
+
role: "table",
|
|
18
|
+
className: cx(tableRecipe({ elevation }), ariaTable, hasCollapsibleChildren && "jrlof91", rowLinkTable, className),
|
|
19
|
+
style: useInlineStyle(css, style),
|
|
20
|
+
...props
|
|
21
|
+
}));
|
|
22
|
+
AriaTableVanilla.displayName = "AriaTableVanilla";
|
|
23
|
+
var AriaCaptionVanilla = forwardRef(({ size, weight, variant, gradient, transform, noWrap, className, css, style, ...props }, ref) => /* @__PURE__ */ jsx("div", {
|
|
24
|
+
ref,
|
|
25
|
+
className: cx(captionRecipe({
|
|
26
|
+
size,
|
|
27
|
+
weight,
|
|
28
|
+
variant,
|
|
29
|
+
gradient,
|
|
30
|
+
transform,
|
|
31
|
+
noWrap
|
|
32
|
+
}), className),
|
|
33
|
+
style: useInlineStyle(css, style),
|
|
34
|
+
...props
|
|
35
|
+
}));
|
|
36
|
+
AriaCaptionVanilla.displayName = "AriaCaptionVanilla";
|
|
37
|
+
var section = (sectionClass, displayName) => {
|
|
38
|
+
const Section = forwardRef(({ className, css, style, ...props }, ref) => /* @__PURE__ */ jsx("div", {
|
|
39
|
+
ref,
|
|
40
|
+
role: "rowgroup",
|
|
41
|
+
className: cx(sectionClass, className),
|
|
42
|
+
style: useInlineStyle(css, style),
|
|
43
|
+
...props
|
|
44
|
+
}));
|
|
45
|
+
Section.displayName = displayName;
|
|
46
|
+
return Section;
|
|
47
|
+
};
|
|
48
|
+
var AriaTheadVanilla = section(cx(thead, ariaThead), "AriaTheadVanilla");
|
|
49
|
+
var AriaTbodyVanilla = section(cx(tbody, ariaTbody), "AriaTbodyVanilla");
|
|
50
|
+
var AriaTfootVanilla = section(cx(tfoot, ariaTfoot), "AriaTfootVanilla");
|
|
51
|
+
var AriaThVanilla = forwardRef(({ size, weight, variant, gradient, transform, noWrap, align, sort, onSort, className, css, style, children, ...props }, ref) => /* @__PURE__ */ jsx("span", {
|
|
52
|
+
ref,
|
|
53
|
+
role: "columnheader",
|
|
54
|
+
"aria-sort": sort && ARIA_SORT[sort],
|
|
55
|
+
className: cx(thRecipe({
|
|
56
|
+
size,
|
|
57
|
+
weight,
|
|
58
|
+
variant,
|
|
59
|
+
gradient,
|
|
60
|
+
transform,
|
|
61
|
+
noWrap,
|
|
62
|
+
align
|
|
63
|
+
}), ariaCell, className),
|
|
64
|
+
style: useInlineStyle(css, style),
|
|
65
|
+
...props,
|
|
66
|
+
children: onSort ? /* @__PURE__ */ jsx(SortButtonVanilla, {
|
|
67
|
+
sort,
|
|
68
|
+
onSort,
|
|
69
|
+
children
|
|
70
|
+
}) : children
|
|
71
|
+
}));
|
|
72
|
+
AriaThVanilla.displayName = "AriaThVanilla";
|
|
73
|
+
var FullColSpanCell = forwardRef(({ className, ...props }, forwardedRef) => {
|
|
74
|
+
const cellRef = useRef(null);
|
|
75
|
+
const [height, setHeight] = useState(0);
|
|
76
|
+
useIsomorphicLayoutEffect(() => {
|
|
77
|
+
const cell = cellRef.current;
|
|
78
|
+
if (!cell || typeof ResizeObserver === "undefined") return;
|
|
79
|
+
const update = () => setHeight(cell.offsetHeight);
|
|
80
|
+
update();
|
|
81
|
+
const observer = new ResizeObserver(update);
|
|
82
|
+
observer.observe(cell);
|
|
83
|
+
return () => observer.disconnect();
|
|
84
|
+
}, []);
|
|
85
|
+
const setRefs = useCallback((node) => {
|
|
86
|
+
cellRef.current = node;
|
|
87
|
+
if (typeof forwardedRef === "function") forwardedRef(node);
|
|
88
|
+
else if (forwardedRef) forwardedRef.current = node;
|
|
89
|
+
}, [forwardedRef]);
|
|
90
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
91
|
+
"aria-hidden": true,
|
|
92
|
+
className: cx(ariaCell, fillerCell),
|
|
93
|
+
style: { height }
|
|
94
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
95
|
+
ref: setRefs,
|
|
96
|
+
role: "cell",
|
|
97
|
+
[FULL_COL_SPAN_ATTRIBUTE]: "",
|
|
98
|
+
className: cx(className, fullColSpanCell),
|
|
99
|
+
...props
|
|
100
|
+
})] });
|
|
101
|
+
});
|
|
102
|
+
FullColSpanCell.displayName = "FullColSpanCell";
|
|
103
|
+
var AriaTdVanilla = forwardRef(({ fullColSpan = false, subtle, align, className, css, style, ...props }, ref) => {
|
|
104
|
+
return /* @__PURE__ */ jsx(fullColSpan ? FullColSpanCell : "span", {
|
|
105
|
+
ref,
|
|
106
|
+
role: "cell",
|
|
107
|
+
className: cx(tdRecipe({
|
|
108
|
+
subtle,
|
|
109
|
+
align
|
|
110
|
+
}), ariaCell, className),
|
|
111
|
+
style: useInlineStyle(css, style),
|
|
112
|
+
...props
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
AriaTdVanilla.displayName = "AriaTdVanilla";
|
|
116
|
+
var assertFullColSpanAlone = (children, addedCells) => {
|
|
117
|
+
const cells = Children.toArray(children);
|
|
118
|
+
if (cells.some((child) => isValidElement(child) && !!child.props.fullColSpan) && cells.length + addedCells > 1) throw new Error("AriaTrVanilla: a fullColSpan AriaTdVanilla must be the only cell of its row, without emptyFirstColumn or collapsedContent.");
|
|
119
|
+
};
|
|
120
|
+
var AriaTrVanilla = forwardRef(({ collapsedContent: collapsedContent$1, expandLabel = "Expand row", emptyFirstColumn = false, tableHead = false, href, linkAs, linkCell, linkProps, linkOverlay, interactive, active, className, css, style, children, onClick, onAuxClick, ...props }, ref) => {
|
|
121
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
122
|
+
const contentId = useId();
|
|
123
|
+
const inlineStyle = useInlineStyle(css, style);
|
|
124
|
+
const collapsible = !!collapsedContent$1;
|
|
125
|
+
assertFullColSpanAlone(children, Number(emptyFirstColumn) + Number(collapsible));
|
|
126
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("div", {
|
|
127
|
+
ref,
|
|
128
|
+
role: "row",
|
|
129
|
+
className: cx(trRecipe({
|
|
130
|
+
interactive: interactive ?? (href !== void 0 || void 0),
|
|
131
|
+
active
|
|
132
|
+
}), ariaTr, rowLinkRow, className),
|
|
133
|
+
"data-collapsed": collapsible && !isOpen ? "" : void 0,
|
|
134
|
+
style: inlineStyle,
|
|
135
|
+
onClick: (event) => handleRowClick(event, onClick),
|
|
136
|
+
onAuxClick: (event) => {
|
|
137
|
+
onAuxClick?.(event);
|
|
138
|
+
openRowLink(event);
|
|
139
|
+
},
|
|
140
|
+
...props,
|
|
141
|
+
children: [
|
|
142
|
+
emptyFirstColumn && (tableHead ? /* @__PURE__ */ jsx("span", {
|
|
143
|
+
role: "cell",
|
|
144
|
+
className: cx(thRecipe(), "jrlof96", "_1aa2xbm2e")
|
|
145
|
+
}) : /* @__PURE__ */ jsx(AriaTdVanilla, {})),
|
|
146
|
+
collapsible && /* @__PURE__ */ jsx(AriaTdVanilla, {
|
|
147
|
+
className: "_1aa2xbm2l",
|
|
148
|
+
onClick: stopEvent,
|
|
149
|
+
children: /* @__PURE__ */ jsx(ExpandToggleVanilla, {
|
|
150
|
+
label: expandLabel,
|
|
151
|
+
isOpen,
|
|
152
|
+
controls: contentId,
|
|
153
|
+
onToggle: () => setIsOpen((open) => !open)
|
|
154
|
+
})
|
|
155
|
+
}),
|
|
156
|
+
mapRowLink(children, {
|
|
157
|
+
href,
|
|
158
|
+
linkAs,
|
|
159
|
+
linkCell,
|
|
160
|
+
linkProps,
|
|
161
|
+
linkOverlay
|
|
162
|
+
}, AriaTdVanilla, RowLinkVanilla, {
|
|
163
|
+
row: "AriaTrVanilla",
|
|
164
|
+
cell: "AriaTdVanilla"
|
|
165
|
+
})
|
|
166
|
+
]
|
|
167
|
+
}), collapsible && /* @__PURE__ */ jsx(AriaTrVanilla, {
|
|
168
|
+
className: "jrlof99",
|
|
169
|
+
"data-open": isOpen ? "" : void 0,
|
|
170
|
+
children: /* @__PURE__ */ jsx(AriaTdVanilla, {
|
|
171
|
+
id: contentId,
|
|
172
|
+
fullColSpan: true,
|
|
173
|
+
className: "jrlof9a",
|
|
174
|
+
"data-closed": isOpen ? void 0 : "",
|
|
175
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
176
|
+
className: "jrlof9b",
|
|
177
|
+
children: collapsedContent$1
|
|
178
|
+
})
|
|
179
|
+
})
|
|
180
|
+
})] });
|
|
181
|
+
});
|
|
182
|
+
AriaTrVanilla.displayName = "AriaTrVanilla";
|
|
183
|
+
export { AriaCaptionVanilla, AriaTableVanilla, AriaTbodyVanilla, AriaTdVanilla, AriaTfootVanilla, AriaThVanilla, AriaTheadVanilla, AriaTrVanilla };
|
|
184
|
+
|
|
185
|
+
//# sourceMappingURL=AriaTable.vanilla.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AriaTable.vanilla.js","names":["_Fragment","collapsedContent"],"sources":["../../../components/AriaTable/AriaTable.vanilla.tsx"],"sourcesContent":["import { RecipeVariants } from '@vanilla-extract/recipes';\nimport React, {\n Children,\n forwardRef,\n isValidElement,\n ReactNode,\n useCallback,\n useId,\n useRef,\n useState,\n} from 'react';\n\nimport { CSSProps } from '../../styles/cssProps';\nimport { cx } from '../../styles/cx';\nimport { useInlineStyle } from '../../styles/useInlineStyle';\nimport { useIsomorphicLayoutEffect } from '../../utils/useIsomorphicLayoutEffect';\nimport {\n handleRowClick,\n mapRowLink,\n openRowLink,\n RowLinkShortcutProps,\n} from '../RowLink/RowLink.utils';\nimport { RowLinkVanilla } from '../RowLink/RowLink.vanilla';\nimport { rowLinkRow, rowLinkTable } from '../RowLink/RowLink.vanilla.css';\nimport { ExpandToggleVanilla, stopEvent } from '../Table/ExpandToggle.vanilla';\nimport { ARIA_SORT, SortButtonVanilla } from '../Table/SortButton.vanilla';\nimport {\n captionRecipe,\n emptyHeaderCell,\n tableRecipe,\n tbody,\n tdRecipe,\n tfoot,\n thead,\n thRecipe,\n toggleCell,\n trRecipe,\n} from '../Table/Table.vanilla.css';\nimport { TableSortProps } from '../Table/useTableSort';\nimport { FULL_COL_SPAN_ATTRIBUTE } from './AriaTable.constants';\nimport {\n ariaCell,\n ariaTable,\n ariaTbody,\n ariaTfoot,\n ariaThead,\n ariaTr,\n collapsedCell,\n collapsedContent as collapsedContentClass,\n collapsedRow,\n collapsibleTable,\n fillerCell,\n fullColSpanCell,\n} from './AriaTable.vanilla.css';\n\ntype TableRecipeVariants = NonNullable<RecipeVariants<typeof tableRecipe>>;\ntype CaptionRecipeVariants = NonNullable<RecipeVariants<typeof captionRecipe>>;\ntype TrRecipeVariants = NonNullable<RecipeVariants<typeof trRecipe>>;\ntype ThRecipeVariants = NonNullable<RecipeVariants<typeof thRecipe>>;\ntype TdRecipeVariants = NonNullable<RecipeVariants<typeof tdRecipe>>;\n\nexport type AriaTableVanillaProps = React.HTMLAttributes<HTMLDivElement> &\n CSSProps &\n TableRecipeVariants & {\n /** Collapses the borders, for a table with collapsible rows. */\n hasCollapsibleChildren?: boolean;\n };\n\nexport const AriaTableVanilla = forwardRef<HTMLDivElement, AriaTableVanillaProps>(\n ({ elevation, hasCollapsibleChildren = false, className, css, style, ...props }, ref) => (\n <div\n ref={ref}\n role=\"table\"\n className={cx(\n tableRecipe({ elevation }),\n ariaTable,\n hasCollapsibleChildren && collapsibleTable,\n rowLinkTable,\n className,\n )}\n style={useInlineStyle(css, style)}\n {...props}\n />\n ),\n);\n\nAriaTableVanilla.displayName = 'AriaTableVanilla';\n\nexport type AriaCaptionVanillaProps = React.HTMLAttributes<HTMLDivElement> &\n CSSProps &\n CaptionRecipeVariants;\n\nexport const AriaCaptionVanilla = forwardRef<HTMLDivElement, AriaCaptionVanillaProps>(\n (\n { size, weight, variant, gradient, transform, noWrap, className, css, style, ...props },\n ref,\n ) => (\n <div\n ref={ref}\n className={cx(\n captionRecipe({ size, weight, variant, gradient, transform, noWrap }),\n className,\n )}\n style={useInlineStyle(css, style)}\n {...props}\n />\n ),\n);\n\nAriaCaptionVanilla.displayName = 'AriaCaptionVanilla';\n\nexport type AriaTableSectionVanillaProps = React.HTMLAttributes<HTMLDivElement> & CSSProps;\n\nconst section = (sectionClass: string, displayName: string) => {\n const Section = forwardRef<HTMLDivElement, AriaTableSectionVanillaProps>(\n ({ className, css, style, ...props }, ref) => (\n <div\n ref={ref}\n role=\"rowgroup\"\n className={cx(sectionClass, className)}\n style={useInlineStyle(css, style)}\n {...props}\n />\n ),\n );\n Section.displayName = displayName;\n return Section;\n};\n\nexport const AriaTheadVanilla = section(cx(thead, ariaThead), 'AriaTheadVanilla');\nexport const AriaTbodyVanilla = section(cx(tbody, ariaTbody), 'AriaTbodyVanilla');\nexport const AriaTfootVanilla = section(cx(tfoot, ariaTfoot), 'AriaTfootVanilla');\n\nexport type AriaThVanillaProps = React.HTMLAttributes<HTMLSpanElement> &\n CSSProps &\n ThRecipeVariants &\n TableSortProps;\n\nexport const AriaThVanilla = forwardRef<HTMLSpanElement, AriaThVanillaProps>(\n (\n {\n size,\n weight,\n variant,\n gradient,\n transform,\n noWrap,\n align,\n sort,\n onSort,\n className,\n css,\n style,\n children,\n ...props\n },\n ref,\n ) => (\n <span\n ref={ref}\n role=\"columnheader\"\n aria-sort={sort && ARIA_SORT[sort]}\n className={cx(\n thRecipe({ size, weight, variant, gradient, transform, noWrap, align }),\n ariaCell,\n className,\n )}\n style={useInlineStyle(css, style)}\n {...props}\n >\n {onSort ? (\n <SortButtonVanilla sort={sort} onSort={onSort}>\n {children}\n </SortButtonVanilla>\n ) : (\n children\n )}\n </span>\n ),\n);\n\nAriaThVanilla.displayName = 'AriaThVanilla';\n\nexport type AriaTdVanillaProps = React.HTMLAttributes<HTMLSpanElement> &\n CSSProps &\n TdRecipeVariants & {\n /** Spans the whole row. It must be the only cell of its row. */\n fullColSpan?: boolean;\n };\n\n// The cell is taken out of the row to span it, so an empty filler as tall as the cell holds the row open.\nconst FullColSpanCell = forwardRef<HTMLSpanElement, React.HTMLAttributes<HTMLSpanElement>>(\n ({ className, ...props }, forwardedRef) => {\n const cellRef = useRef<HTMLSpanElement | null>(null);\n const [height, setHeight] = useState(0);\n\n useIsomorphicLayoutEffect(() => {\n const cell = cellRef.current;\n if (!cell || typeof ResizeObserver === 'undefined') {\n return undefined;\n }\n const update = () => setHeight(cell.offsetHeight);\n update();\n const observer = new ResizeObserver(update);\n observer.observe(cell);\n return () => observer.disconnect();\n }, []);\n\n const setRefs = useCallback(\n (node: HTMLSpanElement | null) => {\n cellRef.current = node;\n if (typeof forwardedRef === 'function') {\n forwardedRef(node);\n } else if (forwardedRef) {\n forwardedRef.current = node;\n }\n },\n [forwardedRef],\n );\n\n return (\n <>\n <span aria-hidden className={cx(ariaCell, fillerCell)} style={{ height }} />\n <span\n ref={setRefs}\n role=\"cell\"\n {...{ [FULL_COL_SPAN_ATTRIBUTE]: '' }}\n className={cx(className, fullColSpanCell)}\n {...props}\n />\n </>\n );\n },\n);\n\nFullColSpanCell.displayName = 'FullColSpanCell';\n\nexport const AriaTdVanilla = forwardRef<HTMLSpanElement, AriaTdVanillaProps>(\n ({ fullColSpan = false, subtle, align, className, css, style, ...props }, ref) => {\n const Cell = fullColSpan ? FullColSpanCell : 'span';\n\n return (\n <Cell\n ref={ref}\n role=\"cell\"\n className={cx(tdRecipe({ subtle, align }), ariaCell, className)}\n style={useInlineStyle(css, style)}\n {...props}\n />\n );\n },\n);\n\nAriaTdVanilla.displayName = 'AriaTdVanilla';\n\nconst assertFullColSpanAlone = (children: ReactNode, addedCells: number) => {\n // eslint-disable-next-line @eslint-react/no-children-to-array\n const cells = Children.toArray(children);\n const hasFullColSpan = cells.some(\n (child) => isValidElement<AriaTdVanillaProps>(child) && !!child.props.fullColSpan,\n );\n if (hasFullColSpan && cells.length + addedCells > 1) {\n throw new Error(\n 'AriaTrVanilla: a fullColSpan AriaTdVanilla must be the only cell of its row, without emptyFirstColumn or collapsedContent.',\n );\n }\n};\n\nexport type AriaTrVanillaProps = React.HTMLAttributes<HTMLDivElement> &\n CSSProps &\n TrRecipeVariants &\n RowLinkShortcutProps & {\n /** Content shown in a full-width row below, toggled by a button in a new first cell. */\n collapsedContent?: ReactNode;\n /** Accessible name of the expand button. */\n expandLabel?: string;\n /** Adds an empty first cell, to line up with rows that have an expand button. */\n emptyFirstColumn?: boolean;\n /** Styles the empty first cell as a header, for a row in `AriaTheadVanilla`. */\n tableHead?: boolean;\n };\n\nexport const AriaTrVanilla = forwardRef<HTMLDivElement, AriaTrVanillaProps>(\n (\n {\n collapsedContent,\n expandLabel = 'Expand row',\n emptyFirstColumn = false,\n tableHead = false,\n href,\n linkAs,\n linkCell,\n linkProps,\n linkOverlay,\n interactive,\n active,\n className,\n css,\n style,\n children,\n onClick,\n onAuxClick,\n ...props\n },\n ref,\n ) => {\n const [isOpen, setIsOpen] = useState(false);\n const contentId = useId();\n const inlineStyle = useInlineStyle(css, style);\n const collapsible = !!collapsedContent;\n\n assertFullColSpanAlone(children, Number(emptyFirstColumn) + Number(collapsible));\n\n return (\n <>\n <div\n ref={ref}\n role=\"row\"\n className={cx(\n trRecipe({ interactive: interactive ?? (href !== undefined || undefined), active }),\n ariaTr,\n rowLinkRow,\n className,\n )}\n data-collapsed={collapsible && !isOpen ? '' : undefined}\n style={inlineStyle}\n onClick={(event) => handleRowClick(event, onClick)}\n onAuxClick={(event) => {\n onAuxClick?.(event);\n openRowLink(event);\n }}\n {...props}\n >\n {emptyFirstColumn &&\n (tableHead ? (\n <span role=\"cell\" className={cx(thRecipe(), ariaCell, emptyHeaderCell)} />\n ) : (\n <AriaTdVanilla />\n ))}\n {collapsible && (\n <AriaTdVanilla className={toggleCell} onClick={stopEvent}>\n <ExpandToggleVanilla\n label={expandLabel}\n isOpen={isOpen}\n controls={contentId}\n onToggle={() => setIsOpen((open) => !open)}\n />\n </AriaTdVanilla>\n )}\n {mapRowLink(\n children,\n { href, linkAs, linkCell, linkProps, linkOverlay },\n AriaTdVanilla,\n RowLinkVanilla,\n { row: 'AriaTrVanilla', cell: 'AriaTdVanilla' },\n )}\n </div>\n {collapsible && (\n <AriaTrVanilla className={collapsedRow} data-open={isOpen ? '' : undefined}>\n <AriaTdVanilla\n id={contentId}\n fullColSpan\n className={collapsedCell}\n data-closed={isOpen ? undefined : ''}\n >\n <div className={collapsedContentClass}>{collapsedContent}</div>\n </AriaTdVanilla>\n </AriaTrVanilla>\n )}\n </>\n );\n },\n);\n\nAriaTrVanilla.displayName = 'AriaTrVanilla';\n"],"mappings":"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"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const require_cssProps = require("../../styles/cssProps.cjs");
|
|
2
|
+
const require_cx = require("../../styles/cx.cjs");
|
|
2
3
|
const require_themeContext = require("../../styles/themeContext.cjs");
|
|
3
4
|
const require_Badge_vanilla_css = require("./Badge.vanilla.css.cjs");
|
|
4
5
|
let react = require("react");
|
|
@@ -31,7 +32,7 @@ var BadgeVanillaComponentImpl = (0, react.forwardRef)(({ as, interactive, classN
|
|
|
31
32
|
});
|
|
32
33
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Component, {
|
|
33
34
|
ref,
|
|
34
|
-
className:
|
|
35
|
+
className: require_cx.cx(recipeClass, className),
|
|
35
36
|
style: mergedStyles,
|
|
36
37
|
...props
|
|
37
38
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.vanilla.cjs","names":["forwardRef","useVanillaExtractTheme","processCSSProp","assignInlineVars","interactiveBadgeRecipe","badgeRecipe"],"sources":["../../../components/Badge/Badge.vanilla.tsx"],"sourcesContent":["import { assignInlineVars } from '@vanilla-extract/dynamic';\nimport { RecipeVariants } from '@vanilla-extract/recipes';\nimport { ElementType, forwardRef } from 'react';\n\nimport { CSSProps, processCSSProp } from '../../styles/cssProps';\nimport {\n PolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef,\n} from '../../styles/polymorphic';\nimport { useVanillaExtractTheme } from '../../styles/themeContext';\nimport { badgeRecipe, interactiveBadgeRecipe } from './Badge.vanilla.css';\n\nexport const COLORS = ['gray', 'red', 'blue', 'green', 'neon', 'orange', 'purple'] as const;\n\ntype BadgeRecipeVariants = RecipeVariants<typeof badgeRecipe>;\n\ninterface BadgeOwnProps extends Omit<BadgeRecipeVariants, 'color'>, CSSProps {\n interactive?: boolean;\n}\n\nexport type BadgeVanillaProps<C extends ElementType = 'span'> = PolymorphicComponentProps<\n C,\n BadgeOwnProps\n>;\n\ntype BadgeVanillaComponent = PolymorphicComponent<'span', BadgeVanillaProps<ElementType>>;\n\nconst BadgeVanillaComponentImpl = forwardRef(\n <C extends ElementType = 'span'>(\n {\n as,\n interactive,\n className,\n css,\n style,\n size,\n variant,\n alphaBg,\n borderless,\n ...props\n }: BadgeVanillaProps<C>,\n ref?: PolymorphicRef<C>,\n ) => {\n const Component = as || (interactive ? 'button' : 'span');\n\n const { colors } = useVanillaExtractTheme();\n\n const { style: cssStyles, vars } = processCSSProp(css, colors);\n\n const mergedStyles = {\n ...cssStyles,\n ...style,\n ...assignInlineVars(vars),\n };\n\n const recipe = interactive ? interactiveBadgeRecipe : badgeRecipe;\n const recipeClass = recipe({ size, variant, alphaBg, borderless });\n\n return (\n <Component
|
|
1
|
+
{"version":3,"file":"Badge.vanilla.cjs","names":["forwardRef","useVanillaExtractTheme","processCSSProp","assignInlineVars","interactiveBadgeRecipe","badgeRecipe","cx"],"sources":["../../../components/Badge/Badge.vanilla.tsx"],"sourcesContent":["import { assignInlineVars } from '@vanilla-extract/dynamic';\nimport { RecipeVariants } from '@vanilla-extract/recipes';\nimport { ElementType, forwardRef } from 'react';\n\nimport { CSSProps, processCSSProp } from '../../styles/cssProps';\nimport { cx } from '../../styles/cx';\nimport {\n PolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef,\n} from '../../styles/polymorphic';\nimport { useVanillaExtractTheme } from '../../styles/themeContext';\nimport { badgeRecipe, interactiveBadgeRecipe } from './Badge.vanilla.css';\n\nexport const COLORS = ['gray', 'red', 'blue', 'green', 'neon', 'orange', 'purple'] as const;\n\ntype BadgeRecipeVariants = RecipeVariants<typeof badgeRecipe>;\n\ninterface BadgeOwnProps extends Omit<BadgeRecipeVariants, 'color'>, CSSProps {\n interactive?: boolean;\n}\n\nexport type BadgeVanillaProps<C extends ElementType = 'span'> = PolymorphicComponentProps<\n C,\n BadgeOwnProps\n>;\n\ntype BadgeVanillaComponent = PolymorphicComponent<'span', BadgeVanillaProps<ElementType>>;\n\nconst BadgeVanillaComponentImpl = forwardRef(\n <C extends ElementType = 'span'>(\n {\n as,\n interactive,\n className,\n css,\n style,\n size,\n variant,\n alphaBg,\n borderless,\n ...props\n }: BadgeVanillaProps<C>,\n ref?: PolymorphicRef<C>,\n ) => {\n const Component = as || (interactive ? 'button' : 'span');\n\n const { colors } = useVanillaExtractTheme();\n\n const { style: cssStyles, vars } = processCSSProp(css, colors);\n\n const mergedStyles = {\n ...cssStyles,\n ...style,\n ...assignInlineVars(vars),\n };\n\n const recipe = interactive ? interactiveBadgeRecipe : badgeRecipe;\n const recipeClass = recipe({ size, variant, alphaBg, borderless });\n\n return (\n <Component ref={ref} className={cx(recipeClass, className)} style={mergedStyles} {...props} />\n );\n },\n);\n\nBadgeVanillaComponentImpl.displayName = 'BadgeVanilla';\n\nexport const BadgeVanilla = BadgeVanillaComponentImpl as BadgeVanillaComponent;\n"],"mappings":";;;;;;;;AAcA,IAAa,SAAS;CAAC;CAAQ;CAAO;CAAQ;CAAS;CAAQ;CAAU;AAAQ;AAejF,IAAM,6BAAA,GAA4BA,MAAAA,WAAAA,EAE9B,EACE,IACA,aACA,WACA,KACA,OACA,MACA,SACA,SACA,YACA,GAAG,SAEL,QACG;CACH,MAAM,YAAY,OAAO,cAAc,WAAW;CAElD,MAAM,EAAE,WAAWC,qBAAAA,uBAAuB;CAE1C,MAAM,EAAE,OAAO,WAAW,SAASC,iBAAAA,eAAe,KAAK,MAAM;CAE7D,MAAM,eAAe;EACnB,GAAG;EACH,GAAG;EACH,IAAA,GAAGC,yBAAAA,iBAAAA,CAAiB,IAAI;CAC1B;CAGA,MAAM,eADS,cAAcC,0BAAAA,yBAAyBC,0BAAAA,YAAAA,CAC3B;EAAE;EAAM;EAAS;EAAS;CAAW,CAAC;CAEjE,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,WAAD;EAAgB;EAAK,WAAWC,WAAAA,GAAG,aAAa,SAAS;EAAG,OAAO;EAAc,GAAI;CAAQ,CAAA;AAEjG,CACF;AAEA,0BAA0B,cAAc;AAExC,IAAa,eAAe"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { processCSSProp } from "../../styles/cssProps.js";
|
|
2
|
+
import { cx } from "../../styles/cx.js";
|
|
2
3
|
import { useVanillaExtractTheme } from "../../styles/themeContext.js";
|
|
3
4
|
import { badgeRecipe, interactiveBadgeRecipe } from "./Badge.vanilla.css.js";
|
|
4
5
|
import { forwardRef } from "react";
|
|
@@ -31,7 +32,7 @@ var BadgeVanillaComponentImpl = forwardRef(({ as, interactive, className, css, s
|
|
|
31
32
|
});
|
|
32
33
|
return /* @__PURE__ */ jsx(Component, {
|
|
33
34
|
ref,
|
|
34
|
-
className:
|
|
35
|
+
className: cx(recipeClass, className),
|
|
35
36
|
style: mergedStyles,
|
|
36
37
|
...props
|
|
37
38
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.vanilla.js","names":[],"sources":["../../../components/Badge/Badge.vanilla.tsx"],"sourcesContent":["import { assignInlineVars } from '@vanilla-extract/dynamic';\nimport { RecipeVariants } from '@vanilla-extract/recipes';\nimport { ElementType, forwardRef } from 'react';\n\nimport { CSSProps, processCSSProp } from '../../styles/cssProps';\nimport {\n PolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef,\n} from '../../styles/polymorphic';\nimport { useVanillaExtractTheme } from '../../styles/themeContext';\nimport { badgeRecipe, interactiveBadgeRecipe } from './Badge.vanilla.css';\n\nexport const COLORS = ['gray', 'red', 'blue', 'green', 'neon', 'orange', 'purple'] as const;\n\ntype BadgeRecipeVariants = RecipeVariants<typeof badgeRecipe>;\n\ninterface BadgeOwnProps extends Omit<BadgeRecipeVariants, 'color'>, CSSProps {\n interactive?: boolean;\n}\n\nexport type BadgeVanillaProps<C extends ElementType = 'span'> = PolymorphicComponentProps<\n C,\n BadgeOwnProps\n>;\n\ntype BadgeVanillaComponent = PolymorphicComponent<'span', BadgeVanillaProps<ElementType>>;\n\nconst BadgeVanillaComponentImpl = forwardRef(\n <C extends ElementType = 'span'>(\n {\n as,\n interactive,\n className,\n css,\n style,\n size,\n variant,\n alphaBg,\n borderless,\n ...props\n }: BadgeVanillaProps<C>,\n ref?: PolymorphicRef<C>,\n ) => {\n const Component = as || (interactive ? 'button' : 'span');\n\n const { colors } = useVanillaExtractTheme();\n\n const { style: cssStyles, vars } = processCSSProp(css, colors);\n\n const mergedStyles = {\n ...cssStyles,\n ...style,\n ...assignInlineVars(vars),\n };\n\n const recipe = interactive ? interactiveBadgeRecipe : badgeRecipe;\n const recipeClass = recipe({ size, variant, alphaBg, borderless });\n\n return (\n <Component
|
|
1
|
+
{"version":3,"file":"Badge.vanilla.js","names":[],"sources":["../../../components/Badge/Badge.vanilla.tsx"],"sourcesContent":["import { assignInlineVars } from '@vanilla-extract/dynamic';\nimport { RecipeVariants } from '@vanilla-extract/recipes';\nimport { ElementType, forwardRef } from 'react';\n\nimport { CSSProps, processCSSProp } from '../../styles/cssProps';\nimport { cx } from '../../styles/cx';\nimport {\n PolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef,\n} from '../../styles/polymorphic';\nimport { useVanillaExtractTheme } from '../../styles/themeContext';\nimport { badgeRecipe, interactiveBadgeRecipe } from './Badge.vanilla.css';\n\nexport const COLORS = ['gray', 'red', 'blue', 'green', 'neon', 'orange', 'purple'] as const;\n\ntype BadgeRecipeVariants = RecipeVariants<typeof badgeRecipe>;\n\ninterface BadgeOwnProps extends Omit<BadgeRecipeVariants, 'color'>, CSSProps {\n interactive?: boolean;\n}\n\nexport type BadgeVanillaProps<C extends ElementType = 'span'> = PolymorphicComponentProps<\n C,\n BadgeOwnProps\n>;\n\ntype BadgeVanillaComponent = PolymorphicComponent<'span', BadgeVanillaProps<ElementType>>;\n\nconst BadgeVanillaComponentImpl = forwardRef(\n <C extends ElementType = 'span'>(\n {\n as,\n interactive,\n className,\n css,\n style,\n size,\n variant,\n alphaBg,\n borderless,\n ...props\n }: BadgeVanillaProps<C>,\n ref?: PolymorphicRef<C>,\n ) => {\n const Component = as || (interactive ? 'button' : 'span');\n\n const { colors } = useVanillaExtractTheme();\n\n const { style: cssStyles, vars } = processCSSProp(css, colors);\n\n const mergedStyles = {\n ...cssStyles,\n ...style,\n ...assignInlineVars(vars),\n };\n\n const recipe = interactive ? interactiveBadgeRecipe : badgeRecipe;\n const recipeClass = recipe({ size, variant, alphaBg, borderless });\n\n return (\n <Component ref={ref} className={cx(recipeClass, className)} style={mergedStyles} {...props} />\n );\n },\n);\n\nBadgeVanillaComponentImpl.displayName = 'BadgeVanilla';\n\nexport const BadgeVanilla = BadgeVanillaComponentImpl as BadgeVanillaComponent;\n"],"mappings":";;;;;;;;AAcA,IAAa,SAAS;CAAC;CAAQ;CAAO;CAAQ;CAAS;CAAQ;CAAU;AAAQ;AAejF,IAAM,4BAA4B,YAE9B,EACE,IACA,aACA,WACA,KACA,OACA,MACA,SACA,SACA,YACA,GAAG,SAEL,QACG;CACH,MAAM,YAAY,OAAO,cAAc,WAAW;CAElD,MAAM,EAAE,WAAW,uBAAuB;CAE1C,MAAM,EAAE,OAAO,WAAW,SAAS,eAAe,KAAK,MAAM;CAE7D,MAAM,eAAe;EACnB,GAAG;EACH,GAAG;EACH,GAAG,iBAAiB,IAAI;CAC1B;CAGA,MAAM,eADS,cAAc,yBAAyB,YAAA,CAC3B;EAAE;EAAM;EAAS;EAAS;CAAW,CAAC;CAEjE,OACE,oBAAC,WAAD;EAAgB;EAAK,WAAW,GAAG,aAAa,SAAS;EAAG,OAAO;EAAc,GAAI;CAAQ,CAAA;AAEjG,CACF;AAEA,0BAA0B,cAAc;AAExC,IAAa,eAAe"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const require_cssProps = require("../../styles/cssProps.cjs");
|
|
2
|
+
const require_cx = require("../../styles/cx.cjs");
|
|
2
3
|
const require_themeContext = require("../../styles/themeContext.cjs");
|
|
3
4
|
const require_Blockquote_vanilla_css = require("./Blockquote.vanilla.css.cjs");
|
|
4
5
|
let react = require("react");
|
|
@@ -24,7 +25,7 @@ var BlockquoteVanillaComponentImpl = (0, react.forwardRef)(({ as, className, css
|
|
|
24
25
|
});
|
|
25
26
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Component, {
|
|
26
27
|
ref,
|
|
27
|
-
className:
|
|
28
|
+
className: require_cx.cx(recipeClass, className),
|
|
28
29
|
style: mergedStyles,
|
|
29
30
|
...props
|
|
30
31
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Blockquote.vanilla.cjs","names":["forwardRef","useVanillaExtractTheme","processCSSProp","assignInlineVars","blockquoteRecipe"],"sources":["../../../components/Blockquote/Blockquote.vanilla.tsx"],"sourcesContent":["import { assignInlineVars } from '@vanilla-extract/dynamic';\nimport { RecipeVariants } from '@vanilla-extract/recipes';\nimport { ElementType, forwardRef } from 'react';\n\nimport { CSSProps, processCSSProp } from '../../styles/cssProps';\nimport {\n PolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef,\n} from '../../styles/polymorphic';\nimport { useVanillaExtractTheme } from '../../styles/themeContext';\nimport { blockquoteRecipe } from './Blockquote.vanilla.css';\n\ntype BlockquoteRecipeVariants = RecipeVariants<typeof blockquoteRecipe>;\n\ninterface BlockquoteOwnProps extends Omit<BlockquoteRecipeVariants, never>, CSSProps {}\n\nexport type BlockquoteVanillaProps<C extends ElementType = 'blockquote'> =\n PolymorphicComponentProps<C, BlockquoteOwnProps>;\n\ntype BlockquoteComponent = PolymorphicComponent<'blockquote', BlockquoteVanillaProps<ElementType>>;\n\nconst BlockquoteVanillaComponentImpl = forwardRef(\n <C extends ElementType = 'blockquote'>(\n {\n as,\n className,\n css,\n style,\n size,\n weight,\n variant,\n gradient,\n transform,\n noWrap,\n ...props\n }: BlockquoteVanillaProps<C>,\n ref?: PolymorphicRef<C>,\n ) => {\n const Component = (as || 'blockquote') as ElementType;\n const { colors } = useVanillaExtractTheme();\n\n const { style: cssStyles, vars } = processCSSProp(css, colors);\n\n const mergedStyles = {\n ...cssStyles,\n ...style,\n ...assignInlineVars(vars),\n };\n\n const recipeClass = blockquoteRecipe({ size, weight, variant, gradient, transform, noWrap });\n\n return (\n <Component
|
|
1
|
+
{"version":3,"file":"Blockquote.vanilla.cjs","names":["forwardRef","useVanillaExtractTheme","processCSSProp","assignInlineVars","blockquoteRecipe","cx"],"sources":["../../../components/Blockquote/Blockquote.vanilla.tsx"],"sourcesContent":["import { assignInlineVars } from '@vanilla-extract/dynamic';\nimport { RecipeVariants } from '@vanilla-extract/recipes';\nimport { ElementType, forwardRef } from 'react';\n\nimport { CSSProps, processCSSProp } from '../../styles/cssProps';\nimport { cx } from '../../styles/cx';\nimport {\n PolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef,\n} from '../../styles/polymorphic';\nimport { useVanillaExtractTheme } from '../../styles/themeContext';\nimport { blockquoteRecipe } from './Blockquote.vanilla.css';\n\ntype BlockquoteRecipeVariants = RecipeVariants<typeof blockquoteRecipe>;\n\ninterface BlockquoteOwnProps extends Omit<BlockquoteRecipeVariants, never>, CSSProps {}\n\nexport type BlockquoteVanillaProps<C extends ElementType = 'blockquote'> =\n PolymorphicComponentProps<C, BlockquoteOwnProps>;\n\ntype BlockquoteComponent = PolymorphicComponent<'blockquote', BlockquoteVanillaProps<ElementType>>;\n\nconst BlockquoteVanillaComponentImpl = forwardRef(\n <C extends ElementType = 'blockquote'>(\n {\n as,\n className,\n css,\n style,\n size,\n weight,\n variant,\n gradient,\n transform,\n noWrap,\n ...props\n }: BlockquoteVanillaProps<C>,\n ref?: PolymorphicRef<C>,\n ) => {\n const Component = (as || 'blockquote') as ElementType;\n const { colors } = useVanillaExtractTheme();\n\n const { style: cssStyles, vars } = processCSSProp(css, colors);\n\n const mergedStyles = {\n ...cssStyles,\n ...style,\n ...assignInlineVars(vars),\n };\n\n const recipeClass = blockquoteRecipe({ size, weight, variant, gradient, transform, noWrap });\n\n return (\n <Component ref={ref} className={cx(recipeClass, className)} style={mergedStyles} {...props} />\n );\n },\n);\n\nBlockquoteVanillaComponentImpl.displayName = 'BlockquoteVanilla';\n\nexport const BlockquoteVanilla = BlockquoteVanillaComponentImpl as BlockquoteComponent;\n"],"mappings":";;;;;;;;AAuBA,IAAM,kCAAA,GAAiCA,MAAAA,WAAAA,EAEnC,EACE,IACA,WACA,KACA,OACA,MACA,QACA,SACA,UACA,WACA,QACA,GAAG,SAEL,QACG;CACH,MAAM,YAAa,MAAM;CACzB,MAAM,EAAE,WAAWC,qBAAAA,uBAAuB;CAE1C,MAAM,EAAE,OAAO,WAAW,SAASC,iBAAAA,eAAe,KAAK,MAAM;CAE7D,MAAM,eAAe;EACnB,GAAG;EACH,GAAG;EACH,IAAA,GAAGC,yBAAAA,iBAAAA,CAAiB,IAAI;CAC1B;CAEA,MAAM,cAAcC,+BAAAA,iBAAiB;EAAE;EAAM;EAAQ;EAAS;EAAU;EAAW;CAAO,CAAC;CAE3F,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,WAAD;EAAgB;EAAK,WAAWC,WAAAA,GAAG,aAAa,SAAS;EAAG,OAAO;EAAc,GAAI;CAAQ,CAAA;AAEjG,CACF;AAEA,+BAA+B,cAAc;AAE7C,IAAa,oBAAoB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { processCSSProp } from "../../styles/cssProps.js";
|
|
2
|
+
import { cx } from "../../styles/cx.js";
|
|
2
3
|
import { useVanillaExtractTheme } from "../../styles/themeContext.js";
|
|
3
4
|
import { blockquoteRecipe } from "./Blockquote.vanilla.css.js";
|
|
4
5
|
import { forwardRef } from "react";
|
|
@@ -24,7 +25,7 @@ var BlockquoteVanillaComponentImpl = forwardRef(({ as, className, css, style, si
|
|
|
24
25
|
});
|
|
25
26
|
return /* @__PURE__ */ jsx(Component, {
|
|
26
27
|
ref,
|
|
27
|
-
className:
|
|
28
|
+
className: cx(recipeClass, className),
|
|
28
29
|
style: mergedStyles,
|
|
29
30
|
...props
|
|
30
31
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Blockquote.vanilla.js","names":[],"sources":["../../../components/Blockquote/Blockquote.vanilla.tsx"],"sourcesContent":["import { assignInlineVars } from '@vanilla-extract/dynamic';\nimport { RecipeVariants } from '@vanilla-extract/recipes';\nimport { ElementType, forwardRef } from 'react';\n\nimport { CSSProps, processCSSProp } from '../../styles/cssProps';\nimport {\n PolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef,\n} from '../../styles/polymorphic';\nimport { useVanillaExtractTheme } from '../../styles/themeContext';\nimport { blockquoteRecipe } from './Blockquote.vanilla.css';\n\ntype BlockquoteRecipeVariants = RecipeVariants<typeof blockquoteRecipe>;\n\ninterface BlockquoteOwnProps extends Omit<BlockquoteRecipeVariants, never>, CSSProps {}\n\nexport type BlockquoteVanillaProps<C extends ElementType = 'blockquote'> =\n PolymorphicComponentProps<C, BlockquoteOwnProps>;\n\ntype BlockquoteComponent = PolymorphicComponent<'blockquote', BlockquoteVanillaProps<ElementType>>;\n\nconst BlockquoteVanillaComponentImpl = forwardRef(\n <C extends ElementType = 'blockquote'>(\n {\n as,\n className,\n css,\n style,\n size,\n weight,\n variant,\n gradient,\n transform,\n noWrap,\n ...props\n }: BlockquoteVanillaProps<C>,\n ref?: PolymorphicRef<C>,\n ) => {\n const Component = (as || 'blockquote') as ElementType;\n const { colors } = useVanillaExtractTheme();\n\n const { style: cssStyles, vars } = processCSSProp(css, colors);\n\n const mergedStyles = {\n ...cssStyles,\n ...style,\n ...assignInlineVars(vars),\n };\n\n const recipeClass = blockquoteRecipe({ size, weight, variant, gradient, transform, noWrap });\n\n return (\n <Component
|
|
1
|
+
{"version":3,"file":"Blockquote.vanilla.js","names":[],"sources":["../../../components/Blockquote/Blockquote.vanilla.tsx"],"sourcesContent":["import { assignInlineVars } from '@vanilla-extract/dynamic';\nimport { RecipeVariants } from '@vanilla-extract/recipes';\nimport { ElementType, forwardRef } from 'react';\n\nimport { CSSProps, processCSSProp } from '../../styles/cssProps';\nimport { cx } from '../../styles/cx';\nimport {\n PolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef,\n} from '../../styles/polymorphic';\nimport { useVanillaExtractTheme } from '../../styles/themeContext';\nimport { blockquoteRecipe } from './Blockquote.vanilla.css';\n\ntype BlockquoteRecipeVariants = RecipeVariants<typeof blockquoteRecipe>;\n\ninterface BlockquoteOwnProps extends Omit<BlockquoteRecipeVariants, never>, CSSProps {}\n\nexport type BlockquoteVanillaProps<C extends ElementType = 'blockquote'> =\n PolymorphicComponentProps<C, BlockquoteOwnProps>;\n\ntype BlockquoteComponent = PolymorphicComponent<'blockquote', BlockquoteVanillaProps<ElementType>>;\n\nconst BlockquoteVanillaComponentImpl = forwardRef(\n <C extends ElementType = 'blockquote'>(\n {\n as,\n className,\n css,\n style,\n size,\n weight,\n variant,\n gradient,\n transform,\n noWrap,\n ...props\n }: BlockquoteVanillaProps<C>,\n ref?: PolymorphicRef<C>,\n ) => {\n const Component = (as || 'blockquote') as ElementType;\n const { colors } = useVanillaExtractTheme();\n\n const { style: cssStyles, vars } = processCSSProp(css, colors);\n\n const mergedStyles = {\n ...cssStyles,\n ...style,\n ...assignInlineVars(vars),\n };\n\n const recipeClass = blockquoteRecipe({ size, weight, variant, gradient, transform, noWrap });\n\n return (\n <Component ref={ref} className={cx(recipeClass, className)} style={mergedStyles} {...props} />\n );\n },\n);\n\nBlockquoteVanillaComponentImpl.displayName = 'BlockquoteVanilla';\n\nexport const BlockquoteVanilla = BlockquoteVanillaComponentImpl as BlockquoteComponent;\n"],"mappings":";;;;;;;;AAuBA,IAAM,iCAAiC,YAEnC,EACE,IACA,WACA,KACA,OACA,MACA,QACA,SACA,UACA,WACA,QACA,GAAG,SAEL,QACG;CACH,MAAM,YAAa,MAAM;CACzB,MAAM,EAAE,WAAW,uBAAuB;CAE1C,MAAM,EAAE,OAAO,WAAW,SAAS,eAAe,KAAK,MAAM;CAE7D,MAAM,eAAe;EACnB,GAAG;EACH,GAAG;EACH,GAAG,iBAAiB,IAAI;CAC1B;CAEA,MAAM,cAAc,iBAAiB;EAAE;EAAM;EAAQ;EAAS;EAAU;EAAW;CAAO,CAAC;CAE3F,OACE,oBAAC,WAAD;EAAgB;EAAK,WAAW,GAAG,aAAa,SAAS;EAAG,OAAO;EAAc,GAAI;CAAQ,CAAA;AAEjG,CACF;AAEA,+BAA+B,cAAc;AAE7C,IAAa,oBAAoB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const require_cssProps = require("../../styles/cssProps.cjs");
|
|
2
|
+
const require_cx = require("../../styles/cx.cjs");
|
|
2
3
|
const require_themeContext = require("../../styles/themeContext.cjs");
|
|
3
4
|
const require_Box_vanilla_css = require("./Box.vanilla.css.cjs");
|
|
4
5
|
let react = require("react");
|
|
@@ -16,7 +17,7 @@ var BoxVanillaComponent = (0, react.forwardRef)(({ as, className, css, style, ..
|
|
|
16
17
|
};
|
|
17
18
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Component, {
|
|
18
19
|
ref,
|
|
19
|
-
className:
|
|
20
|
+
className: require_cx.cx(require_Box_vanilla_css.box, className),
|
|
20
21
|
style: mergedStyles,
|
|
21
22
|
...props
|
|
22
23
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box.vanilla.cjs","names":["forwardRef","useVanillaExtractTheme","processCSSProp","assignInlineVars","box"],"sources":["../../../components/Box/Box.vanilla.tsx"],"sourcesContent":["import { assignInlineVars } from '@vanilla-extract/dynamic';\nimport { ElementType, forwardRef } from 'react';\n\nimport { CSSProps, processCSSProp } from '../../styles/cssProps';\nimport {\n PolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef,\n} from '../../styles/polymorphic';\nimport { useVanillaExtractTheme } from '../../styles/themeContext';\nimport { box } from './Box.vanilla.css';\n\nexport type BoxProps<C extends ElementType = 'div'> = PolymorphicComponentProps<C, CSSProps>;\n\ntype BoxComponent = PolymorphicComponent<'div', BoxProps<ElementType>>;\n\nconst BoxVanillaComponent = forwardRef(\n <C extends ElementType = 'div'>(\n { as, className, css, style, ...props }: BoxProps<C>,\n ref?: PolymorphicRef<C>,\n ) => {\n const Component = as || 'div';\n\n const { colors } = useVanillaExtractTheme();\n\n const { style: cssStyles, vars } = processCSSProp(css, colors);\n\n const mergedStyles = {\n ...cssStyles,\n ...style,\n ...assignInlineVars(vars),\n };\n\n return
|
|
1
|
+
{"version":3,"file":"Box.vanilla.cjs","names":["forwardRef","useVanillaExtractTheme","processCSSProp","assignInlineVars","cx","box"],"sources":["../../../components/Box/Box.vanilla.tsx"],"sourcesContent":["import { assignInlineVars } from '@vanilla-extract/dynamic';\nimport { ElementType, forwardRef } from 'react';\n\nimport { CSSProps, processCSSProp } from '../../styles/cssProps';\nimport { cx } from '../../styles/cx';\nimport {\n PolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef,\n} from '../../styles/polymorphic';\nimport { useVanillaExtractTheme } from '../../styles/themeContext';\nimport { box } from './Box.vanilla.css';\n\nexport type BoxProps<C extends ElementType = 'div'> = PolymorphicComponentProps<C, CSSProps>;\n\ntype BoxComponent = PolymorphicComponent<'div', BoxProps<ElementType>>;\n\nconst BoxVanillaComponent = forwardRef(\n <C extends ElementType = 'div'>(\n { as, className, css, style, ...props }: BoxProps<C>,\n ref?: PolymorphicRef<C>,\n ) => {\n const Component = as || 'div';\n\n const { colors } = useVanillaExtractTheme();\n\n const { style: cssStyles, vars } = processCSSProp(css, colors);\n\n const mergedStyles = {\n ...cssStyles,\n ...style,\n ...assignInlineVars(vars),\n };\n\n return <Component ref={ref} className={cx(box, className)} style={mergedStyles} {...props} />;\n },\n);\n\nBoxVanillaComponent.displayName = 'BoxVanilla';\n\nexport const BoxVanilla = BoxVanillaComponent as BoxComponent;\n"],"mappings":";;;;;;;;AAiBA,IAAM,uBAAA,GAAsBA,MAAAA,WAAAA,EAExB,EAAE,IAAI,WAAW,KAAK,OAAO,GAAG,SAChC,QACG;CACH,MAAM,YAAY,MAAM;CAExB,MAAM,EAAE,WAAWC,qBAAAA,uBAAuB;CAE1C,MAAM,EAAE,OAAO,WAAW,SAASC,iBAAAA,eAAe,KAAK,MAAM;CAE7D,MAAM,eAAe;EACnB,GAAG;EACH,GAAG;EACH,IAAA,GAAGC,yBAAAA,iBAAAA,CAAiB,IAAI;CAC1B;CAEA,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAAC,WAAD;EAAgB;EAAK,WAAWC,WAAAA,GAAGC,wBAAAA,KAAK,SAAS;EAAG,OAAO;EAAc,GAAI;CAAQ,CAAA;AAC9F,CACF;AAEA,oBAAoB,cAAc;AAElC,IAAa,aAAa"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { processCSSProp } from "../../styles/cssProps.js";
|
|
2
|
+
import { cx } from "../../styles/cx.js";
|
|
2
3
|
import { useVanillaExtractTheme } from "../../styles/themeContext.js";
|
|
3
4
|
import { box } from "./Box.vanilla.css.js";
|
|
4
5
|
import { forwardRef } from "react";
|
|
@@ -16,7 +17,7 @@ var BoxVanillaComponent = forwardRef(({ as, className, css, style, ...props }, r
|
|
|
16
17
|
};
|
|
17
18
|
return /* @__PURE__ */ jsx(Component, {
|
|
18
19
|
ref,
|
|
19
|
-
className:
|
|
20
|
+
className: cx(box, className),
|
|
20
21
|
style: mergedStyles,
|
|
21
22
|
...props
|
|
22
23
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box.vanilla.js","names":[],"sources":["../../../components/Box/Box.vanilla.tsx"],"sourcesContent":["import { assignInlineVars } from '@vanilla-extract/dynamic';\nimport { ElementType, forwardRef } from 'react';\n\nimport { CSSProps, processCSSProp } from '../../styles/cssProps';\nimport {\n PolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef,\n} from '../../styles/polymorphic';\nimport { useVanillaExtractTheme } from '../../styles/themeContext';\nimport { box } from './Box.vanilla.css';\n\nexport type BoxProps<C extends ElementType = 'div'> = PolymorphicComponentProps<C, CSSProps>;\n\ntype BoxComponent = PolymorphicComponent<'div', BoxProps<ElementType>>;\n\nconst BoxVanillaComponent = forwardRef(\n <C extends ElementType = 'div'>(\n { as, className, css, style, ...props }: BoxProps<C>,\n ref?: PolymorphicRef<C>,\n ) => {\n const Component = as || 'div';\n\n const { colors } = useVanillaExtractTheme();\n\n const { style: cssStyles, vars } = processCSSProp(css, colors);\n\n const mergedStyles = {\n ...cssStyles,\n ...style,\n ...assignInlineVars(vars),\n };\n\n return
|
|
1
|
+
{"version":3,"file":"Box.vanilla.js","names":[],"sources":["../../../components/Box/Box.vanilla.tsx"],"sourcesContent":["import { assignInlineVars } from '@vanilla-extract/dynamic';\nimport { ElementType, forwardRef } from 'react';\n\nimport { CSSProps, processCSSProp } from '../../styles/cssProps';\nimport { cx } from '../../styles/cx';\nimport {\n PolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef,\n} from '../../styles/polymorphic';\nimport { useVanillaExtractTheme } from '../../styles/themeContext';\nimport { box } from './Box.vanilla.css';\n\nexport type BoxProps<C extends ElementType = 'div'> = PolymorphicComponentProps<C, CSSProps>;\n\ntype BoxComponent = PolymorphicComponent<'div', BoxProps<ElementType>>;\n\nconst BoxVanillaComponent = forwardRef(\n <C extends ElementType = 'div'>(\n { as, className, css, style, ...props }: BoxProps<C>,\n ref?: PolymorphicRef<C>,\n ) => {\n const Component = as || 'div';\n\n const { colors } = useVanillaExtractTheme();\n\n const { style: cssStyles, vars } = processCSSProp(css, colors);\n\n const mergedStyles = {\n ...cssStyles,\n ...style,\n ...assignInlineVars(vars),\n };\n\n return <Component ref={ref} className={cx(box, className)} style={mergedStyles} {...props} />;\n },\n);\n\nBoxVanillaComponent.displayName = 'BoxVanilla';\n\nexport const BoxVanilla = BoxVanillaComponent as BoxComponent;\n"],"mappings":";;;;;;;;AAiBA,IAAM,sBAAsB,YAExB,EAAE,IAAI,WAAW,KAAK,OAAO,GAAG,SAChC,QACG;CACH,MAAM,YAAY,MAAM;CAExB,MAAM,EAAE,WAAW,uBAAuB;CAE1C,MAAM,EAAE,OAAO,WAAW,SAAS,eAAe,KAAK,MAAM;CAE7D,MAAM,eAAe;EACnB,GAAG;EACH,GAAG;EACH,GAAG,iBAAiB,IAAI;CAC1B;CAEA,OAAO,oBAAC,WAAD;EAAgB;EAAK,WAAW,GAAG,KAAK,SAAS;EAAG,OAAO;EAAc,GAAI;CAAQ,CAAA;AAC9F,CACF;AAEA,oBAAoB,cAAc;AAElC,IAAa,aAAa"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const require_cssProps = require("../../styles/cssProps.cjs");
|
|
2
|
+
const require_cx = require("../../styles/cx.cjs");
|
|
2
3
|
const require_themeContext = require("../../styles/themeContext.cjs");
|
|
3
4
|
const require_Bubble_vanilla_css = require("./Bubble.vanilla.css.cjs");
|
|
4
5
|
let react = require("react");
|
|
@@ -21,7 +22,7 @@ var BubbleVanillaComponentImpl = (0, react.forwardRef)(({ as, className, css, st
|
|
|
21
22
|
});
|
|
22
23
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Component, {
|
|
23
24
|
ref,
|
|
24
|
-
className:
|
|
25
|
+
className: require_cx.cx(recipeClass, className),
|
|
25
26
|
style: mergedStyles,
|
|
26
27
|
...props
|
|
27
28
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Bubble.vanilla.cjs","names":["forwardRef","useVanillaExtractTheme","processCSSProp","assignInlineVars","bubbleRecipe"],"sources":["../../../components/Bubble/Bubble.vanilla.tsx"],"sourcesContent":["import { assignInlineVars } from '@vanilla-extract/dynamic';\nimport { RecipeVariants } from '@vanilla-extract/recipes';\nimport { ElementType, forwardRef } from 'react';\n\nimport { CSSProps, processCSSProp } from '../../styles/cssProps';\nimport {\n PolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef,\n} from '../../styles/polymorphic';\nimport { useVanillaExtractTheme } from '../../styles/themeContext';\nimport { bubbleRecipe } from './Bubble.vanilla.css';\n\ntype BubbleRecipeVariants = NonNullable<RecipeVariants<typeof bubbleRecipe>>;\n\ninterface BubbleOwnProps extends BubbleRecipeVariants, CSSProps {}\n\nexport type BubbleVanillaProps<C extends ElementType = 'div'> = PolymorphicComponentProps<\n C,\n BubbleOwnProps\n>;\n\ntype BubbleVanillaComponent = PolymorphicComponent<'div', BubbleVanillaProps<ElementType>>;\n\nconst BubbleVanillaComponentImpl = forwardRef(\n <C extends ElementType = 'div'>(\n { as, className, css, style, size, variant, noAnimation, ...props }: BubbleVanillaProps<C>,\n ref?: PolymorphicRef<C>,\n ) => {\n const Component = as || 'div';\n\n const { colors } = useVanillaExtractTheme();\n\n const { style: cssStyles, vars } = processCSSProp(css, colors);\n\n const mergedStyles = {\n ...cssStyles,\n ...style,\n ...assignInlineVars(vars),\n };\n\n const recipeClass = bubbleRecipe({ size, variant, noAnimation });\n\n return (\n <Component
|
|
1
|
+
{"version":3,"file":"Bubble.vanilla.cjs","names":["forwardRef","useVanillaExtractTheme","processCSSProp","assignInlineVars","bubbleRecipe","cx"],"sources":["../../../components/Bubble/Bubble.vanilla.tsx"],"sourcesContent":["import { assignInlineVars } from '@vanilla-extract/dynamic';\nimport { RecipeVariants } from '@vanilla-extract/recipes';\nimport { ElementType, forwardRef } from 'react';\n\nimport { CSSProps, processCSSProp } from '../../styles/cssProps';\nimport { cx } from '../../styles/cx';\nimport {\n PolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef,\n} from '../../styles/polymorphic';\nimport { useVanillaExtractTheme } from '../../styles/themeContext';\nimport { bubbleRecipe } from './Bubble.vanilla.css';\n\ntype BubbleRecipeVariants = NonNullable<RecipeVariants<typeof bubbleRecipe>>;\n\ninterface BubbleOwnProps extends BubbleRecipeVariants, CSSProps {}\n\nexport type BubbleVanillaProps<C extends ElementType = 'div'> = PolymorphicComponentProps<\n C,\n BubbleOwnProps\n>;\n\ntype BubbleVanillaComponent = PolymorphicComponent<'div', BubbleVanillaProps<ElementType>>;\n\nconst BubbleVanillaComponentImpl = forwardRef(\n <C extends ElementType = 'div'>(\n { as, className, css, style, size, variant, noAnimation, ...props }: BubbleVanillaProps<C>,\n ref?: PolymorphicRef<C>,\n ) => {\n const Component = as || 'div';\n\n const { colors } = useVanillaExtractTheme();\n\n const { style: cssStyles, vars } = processCSSProp(css, colors);\n\n const mergedStyles = {\n ...cssStyles,\n ...style,\n ...assignInlineVars(vars),\n };\n\n const recipeClass = bubbleRecipe({ size, variant, noAnimation });\n\n return (\n <Component ref={ref} className={cx(recipeClass, className)} style={mergedStyles} {...props} />\n );\n },\n);\n\nBubbleVanillaComponentImpl.displayName = 'BubbleVanilla';\n\nexport const BubbleVanilla = BubbleVanillaComponentImpl as BubbleVanillaComponent;\n"],"mappings":";;;;;;;;AAyBA,IAAM,8BAAA,GAA6BA,MAAAA,WAAAA,EAE/B,EAAE,IAAI,WAAW,KAAK,OAAO,MAAM,SAAS,aAAa,GAAG,SAC5D,QACG;CACH,MAAM,YAAY,MAAM;CAExB,MAAM,EAAE,WAAWC,qBAAAA,uBAAuB;CAE1C,MAAM,EAAE,OAAO,WAAW,SAASC,iBAAAA,eAAe,KAAK,MAAM;CAE7D,MAAM,eAAe;EACnB,GAAG;EACH,GAAG;EACH,IAAA,GAAGC,yBAAAA,iBAAAA,CAAiB,IAAI;CAC1B;CAEA,MAAM,cAAcC,2BAAAA,aAAa;EAAE;EAAM;EAAS;CAAY,CAAC;CAE/D,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,WAAD;EAAgB;EAAK,WAAWC,WAAAA,GAAG,aAAa,SAAS;EAAG,OAAO;EAAc,GAAI;CAAQ,CAAA;AAEjG,CACF;AAEA,2BAA2B,cAAc;AAEzC,IAAa,gBAAgB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { processCSSProp } from "../../styles/cssProps.js";
|
|
2
|
+
import { cx } from "../../styles/cx.js";
|
|
2
3
|
import { useVanillaExtractTheme } from "../../styles/themeContext.js";
|
|
3
4
|
import { bubbleRecipe } from "./Bubble.vanilla.css.js";
|
|
4
5
|
import { forwardRef } from "react";
|
|
@@ -21,7 +22,7 @@ var BubbleVanillaComponentImpl = forwardRef(({ as, className, css, style, size,
|
|
|
21
22
|
});
|
|
22
23
|
return /* @__PURE__ */ jsx(Component, {
|
|
23
24
|
ref,
|
|
24
|
-
className:
|
|
25
|
+
className: cx(recipeClass, className),
|
|
25
26
|
style: mergedStyles,
|
|
26
27
|
...props
|
|
27
28
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Bubble.vanilla.js","names":[],"sources":["../../../components/Bubble/Bubble.vanilla.tsx"],"sourcesContent":["import { assignInlineVars } from '@vanilla-extract/dynamic';\nimport { RecipeVariants } from '@vanilla-extract/recipes';\nimport { ElementType, forwardRef } from 'react';\n\nimport { CSSProps, processCSSProp } from '../../styles/cssProps';\nimport {\n PolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef,\n} from '../../styles/polymorphic';\nimport { useVanillaExtractTheme } from '../../styles/themeContext';\nimport { bubbleRecipe } from './Bubble.vanilla.css';\n\ntype BubbleRecipeVariants = NonNullable<RecipeVariants<typeof bubbleRecipe>>;\n\ninterface BubbleOwnProps extends BubbleRecipeVariants, CSSProps {}\n\nexport type BubbleVanillaProps<C extends ElementType = 'div'> = PolymorphicComponentProps<\n C,\n BubbleOwnProps\n>;\n\ntype BubbleVanillaComponent = PolymorphicComponent<'div', BubbleVanillaProps<ElementType>>;\n\nconst BubbleVanillaComponentImpl = forwardRef(\n <C extends ElementType = 'div'>(\n { as, className, css, style, size, variant, noAnimation, ...props }: BubbleVanillaProps<C>,\n ref?: PolymorphicRef<C>,\n ) => {\n const Component = as || 'div';\n\n const { colors } = useVanillaExtractTheme();\n\n const { style: cssStyles, vars } = processCSSProp(css, colors);\n\n const mergedStyles = {\n ...cssStyles,\n ...style,\n ...assignInlineVars(vars),\n };\n\n const recipeClass = bubbleRecipe({ size, variant, noAnimation });\n\n return (\n <Component
|
|
1
|
+
{"version":3,"file":"Bubble.vanilla.js","names":[],"sources":["../../../components/Bubble/Bubble.vanilla.tsx"],"sourcesContent":["import { assignInlineVars } from '@vanilla-extract/dynamic';\nimport { RecipeVariants } from '@vanilla-extract/recipes';\nimport { ElementType, forwardRef } from 'react';\n\nimport { CSSProps, processCSSProp } from '../../styles/cssProps';\nimport { cx } from '../../styles/cx';\nimport {\n PolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef,\n} from '../../styles/polymorphic';\nimport { useVanillaExtractTheme } from '../../styles/themeContext';\nimport { bubbleRecipe } from './Bubble.vanilla.css';\n\ntype BubbleRecipeVariants = NonNullable<RecipeVariants<typeof bubbleRecipe>>;\n\ninterface BubbleOwnProps extends BubbleRecipeVariants, CSSProps {}\n\nexport type BubbleVanillaProps<C extends ElementType = 'div'> = PolymorphicComponentProps<\n C,\n BubbleOwnProps\n>;\n\ntype BubbleVanillaComponent = PolymorphicComponent<'div', BubbleVanillaProps<ElementType>>;\n\nconst BubbleVanillaComponentImpl = forwardRef(\n <C extends ElementType = 'div'>(\n { as, className, css, style, size, variant, noAnimation, ...props }: BubbleVanillaProps<C>,\n ref?: PolymorphicRef<C>,\n ) => {\n const Component = as || 'div';\n\n const { colors } = useVanillaExtractTheme();\n\n const { style: cssStyles, vars } = processCSSProp(css, colors);\n\n const mergedStyles = {\n ...cssStyles,\n ...style,\n ...assignInlineVars(vars),\n };\n\n const recipeClass = bubbleRecipe({ size, variant, noAnimation });\n\n return (\n <Component ref={ref} className={cx(recipeClass, className)} style={mergedStyles} {...props} />\n );\n },\n);\n\nBubbleVanillaComponentImpl.displayName = 'BubbleVanilla';\n\nexport const BubbleVanilla = BubbleVanillaComponentImpl as BubbleVanillaComponent;\n"],"mappings":";;;;;;;;AAyBA,IAAM,6BAA6B,YAE/B,EAAE,IAAI,WAAW,KAAK,OAAO,MAAM,SAAS,aAAa,GAAG,SAC5D,QACG;CACH,MAAM,YAAY,MAAM;CAExB,MAAM,EAAE,WAAW,uBAAuB;CAE1C,MAAM,EAAE,OAAO,WAAW,SAAS,eAAe,KAAK,MAAM;CAE7D,MAAM,eAAe;EACnB,GAAG;EACH,GAAG;EACH,GAAG,iBAAiB,IAAI;CAC1B;CAEA,MAAM,cAAc,aAAa;EAAE;EAAM;EAAS;CAAY,CAAC;CAE/D,OACE,oBAAC,WAAD;EAAgB;EAAK,WAAW,GAAG,aAAa,SAAS;EAAG,OAAO;EAAc,GAAI;CAAQ,CAAA;AAEjG,CACF;AAEA,2BAA2B,cAAc;AAEzC,IAAa,gBAAgB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const require_cssProps = require("../../styles/cssProps.cjs");
|
|
2
|
+
const require_cx = require("../../styles/cx.cjs");
|
|
2
3
|
const require_themeContext = require("../../styles/themeContext.cjs");
|
|
3
4
|
const require_Button_vanilla_css = require("./Button.vanilla.css.cjs");
|
|
4
5
|
let react = require("react");
|
|
@@ -23,7 +24,7 @@ var ButtonVanillaComponentImpl = (0, react.forwardRef)(({ as, className, css, st
|
|
|
23
24
|
});
|
|
24
25
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Component, {
|
|
25
26
|
ref,
|
|
26
|
-
className:
|
|
27
|
+
className: require_cx.cx(recipeClass, className),
|
|
27
28
|
style: mergedStyles,
|
|
28
29
|
...props
|
|
29
30
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.vanilla.cjs","names":["forwardRef","useVanillaExtractTheme","processCSSProp","assignInlineVars","buttonRecipe"],"sources":["../../../components/Button/Button.vanilla.tsx"],"sourcesContent":["import { assignInlineVars } from '@vanilla-extract/dynamic';\nimport { RecipeVariants } from '@vanilla-extract/recipes';\nimport { ElementType, forwardRef } from 'react';\n\nimport { CSSProps, processCSSProp } from '../../styles/cssProps';\nimport {\n PolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef,\n} from '../../styles/polymorphic';\nimport { useVanillaExtractTheme } from '../../styles/themeContext';\nimport { buttonRecipe } from './Button.vanilla.css';\n\ntype ButtonRecipeVariants = RecipeVariants<typeof buttonRecipe>;\n\ninterface ButtonOwnProps extends Omit<ButtonRecipeVariants, never>, CSSProps {}\n\nexport type ButtonVanillaProps<C extends ElementType = 'button'> = PolymorphicComponentProps<\n C,\n ButtonOwnProps\n>;\n\ntype ButtonVanillaComponent = PolymorphicComponent<'button', ButtonVanillaProps<ElementType>>;\n\nconst ButtonVanillaComponentImpl = forwardRef(\n <C extends ElementType = 'button'>(\n {\n as,\n className,\n css,\n style,\n size,\n variant,\n state,\n ghost,\n rounded,\n ...props\n }: ButtonVanillaProps<C>,\n ref?: PolymorphicRef<C>,\n ) => {\n const Component = as || 'button';\n\n const { colors } = useVanillaExtractTheme();\n\n const { style: cssStyles, vars } = processCSSProp(css, colors);\n\n const mergedStyles = {\n ...cssStyles,\n ...style,\n ...assignInlineVars(vars),\n };\n\n const recipeClass = buttonRecipe({ size, variant, state, ghost, rounded });\n\n return (\n <Component
|
|
1
|
+
{"version":3,"file":"Button.vanilla.cjs","names":["forwardRef","useVanillaExtractTheme","processCSSProp","assignInlineVars","buttonRecipe","cx"],"sources":["../../../components/Button/Button.vanilla.tsx"],"sourcesContent":["import { assignInlineVars } from '@vanilla-extract/dynamic';\nimport { RecipeVariants } from '@vanilla-extract/recipes';\nimport { ElementType, forwardRef } from 'react';\n\nimport { CSSProps, processCSSProp } from '../../styles/cssProps';\nimport { cx } from '../../styles/cx';\nimport {\n PolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef,\n} from '../../styles/polymorphic';\nimport { useVanillaExtractTheme } from '../../styles/themeContext';\nimport { buttonRecipe } from './Button.vanilla.css';\n\ntype ButtonRecipeVariants = RecipeVariants<typeof buttonRecipe>;\n\ninterface ButtonOwnProps extends Omit<ButtonRecipeVariants, never>, CSSProps {}\n\nexport type ButtonVanillaProps<C extends ElementType = 'button'> = PolymorphicComponentProps<\n C,\n ButtonOwnProps\n>;\n\ntype ButtonVanillaComponent = PolymorphicComponent<'button', ButtonVanillaProps<ElementType>>;\n\nconst ButtonVanillaComponentImpl = forwardRef(\n <C extends ElementType = 'button'>(\n {\n as,\n className,\n css,\n style,\n size,\n variant,\n state,\n ghost,\n rounded,\n ...props\n }: ButtonVanillaProps<C>,\n ref?: PolymorphicRef<C>,\n ) => {\n const Component = as || 'button';\n\n const { colors } = useVanillaExtractTheme();\n\n const { style: cssStyles, vars } = processCSSProp(css, colors);\n\n const mergedStyles = {\n ...cssStyles,\n ...style,\n ...assignInlineVars(vars),\n };\n\n const recipeClass = buttonRecipe({ size, variant, state, ghost, rounded });\n\n return (\n <Component ref={ref} className={cx(recipeClass, className)} style={mergedStyles} {...props} />\n );\n },\n);\n\nButtonVanillaComponentImpl.displayName = 'ButtonVanilla';\n\nexport const ButtonVanilla = ButtonVanillaComponentImpl as ButtonVanillaComponent;\n"],"mappings":";;;;;;;;AAyBA,IAAM,8BAAA,GAA6BA,MAAAA,WAAAA,EAE/B,EACE,IACA,WACA,KACA,OACA,MACA,SACA,OACA,OACA,SACA,GAAG,SAEL,QACG;CACH,MAAM,YAAY,MAAM;CAExB,MAAM,EAAE,WAAWC,qBAAAA,uBAAuB;CAE1C,MAAM,EAAE,OAAO,WAAW,SAASC,iBAAAA,eAAe,KAAK,MAAM;CAE7D,MAAM,eAAe;EACnB,GAAG;EACH,GAAG;EACH,IAAA,GAAGC,yBAAAA,iBAAAA,CAAiB,IAAI;CAC1B;CAEA,MAAM,cAAcC,2BAAAA,aAAa;EAAE;EAAM;EAAS;EAAO;EAAO;CAAQ,CAAC;CAEzE,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,WAAD;EAAgB;EAAK,WAAWC,WAAAA,GAAG,aAAa,SAAS;EAAG,OAAO;EAAc,GAAI;CAAQ,CAAA;AAEjG,CACF;AAEA,2BAA2B,cAAc;AAEzC,IAAa,gBAAgB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { processCSSProp } from "../../styles/cssProps.js";
|
|
2
|
+
import { cx } from "../../styles/cx.js";
|
|
2
3
|
import { useVanillaExtractTheme } from "../../styles/themeContext.js";
|
|
3
4
|
import { buttonRecipe } from "./Button.vanilla.css.js";
|
|
4
5
|
import { forwardRef } from "react";
|
|
@@ -23,7 +24,7 @@ var ButtonVanillaComponentImpl = forwardRef(({ as, className, css, style, size,
|
|
|
23
24
|
});
|
|
24
25
|
return /* @__PURE__ */ jsx(Component, {
|
|
25
26
|
ref,
|
|
26
|
-
className:
|
|
27
|
+
className: cx(recipeClass, className),
|
|
27
28
|
style: mergedStyles,
|
|
28
29
|
...props
|
|
29
30
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.vanilla.js","names":[],"sources":["../../../components/Button/Button.vanilla.tsx"],"sourcesContent":["import { assignInlineVars } from '@vanilla-extract/dynamic';\nimport { RecipeVariants } from '@vanilla-extract/recipes';\nimport { ElementType, forwardRef } from 'react';\n\nimport { CSSProps, processCSSProp } from '../../styles/cssProps';\nimport {\n PolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef,\n} from '../../styles/polymorphic';\nimport { useVanillaExtractTheme } from '../../styles/themeContext';\nimport { buttonRecipe } from './Button.vanilla.css';\n\ntype ButtonRecipeVariants = RecipeVariants<typeof buttonRecipe>;\n\ninterface ButtonOwnProps extends Omit<ButtonRecipeVariants, never>, CSSProps {}\n\nexport type ButtonVanillaProps<C extends ElementType = 'button'> = PolymorphicComponentProps<\n C,\n ButtonOwnProps\n>;\n\ntype ButtonVanillaComponent = PolymorphicComponent<'button', ButtonVanillaProps<ElementType>>;\n\nconst ButtonVanillaComponentImpl = forwardRef(\n <C extends ElementType = 'button'>(\n {\n as,\n className,\n css,\n style,\n size,\n variant,\n state,\n ghost,\n rounded,\n ...props\n }: ButtonVanillaProps<C>,\n ref?: PolymorphicRef<C>,\n ) => {\n const Component = as || 'button';\n\n const { colors } = useVanillaExtractTheme();\n\n const { style: cssStyles, vars } = processCSSProp(css, colors);\n\n const mergedStyles = {\n ...cssStyles,\n ...style,\n ...assignInlineVars(vars),\n };\n\n const recipeClass = buttonRecipe({ size, variant, state, ghost, rounded });\n\n return (\n <Component
|
|
1
|
+
{"version":3,"file":"Button.vanilla.js","names":[],"sources":["../../../components/Button/Button.vanilla.tsx"],"sourcesContent":["import { assignInlineVars } from '@vanilla-extract/dynamic';\nimport { RecipeVariants } from '@vanilla-extract/recipes';\nimport { ElementType, forwardRef } from 'react';\n\nimport { CSSProps, processCSSProp } from '../../styles/cssProps';\nimport { cx } from '../../styles/cx';\nimport {\n PolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef,\n} from '../../styles/polymorphic';\nimport { useVanillaExtractTheme } from '../../styles/themeContext';\nimport { buttonRecipe } from './Button.vanilla.css';\n\ntype ButtonRecipeVariants = RecipeVariants<typeof buttonRecipe>;\n\ninterface ButtonOwnProps extends Omit<ButtonRecipeVariants, never>, CSSProps {}\n\nexport type ButtonVanillaProps<C extends ElementType = 'button'> = PolymorphicComponentProps<\n C,\n ButtonOwnProps\n>;\n\ntype ButtonVanillaComponent = PolymorphicComponent<'button', ButtonVanillaProps<ElementType>>;\n\nconst ButtonVanillaComponentImpl = forwardRef(\n <C extends ElementType = 'button'>(\n {\n as,\n className,\n css,\n style,\n size,\n variant,\n state,\n ghost,\n rounded,\n ...props\n }: ButtonVanillaProps<C>,\n ref?: PolymorphicRef<C>,\n ) => {\n const Component = as || 'button';\n\n const { colors } = useVanillaExtractTheme();\n\n const { style: cssStyles, vars } = processCSSProp(css, colors);\n\n const mergedStyles = {\n ...cssStyles,\n ...style,\n ...assignInlineVars(vars),\n };\n\n const recipeClass = buttonRecipe({ size, variant, state, ghost, rounded });\n\n return (\n <Component ref={ref} className={cx(recipeClass, className)} style={mergedStyles} {...props} />\n );\n },\n);\n\nButtonVanillaComponentImpl.displayName = 'ButtonVanilla';\n\nexport const ButtonVanilla = ButtonVanillaComponentImpl as ButtonVanillaComponent;\n"],"mappings":";;;;;;;;AAyBA,IAAM,6BAA6B,YAE/B,EACE,IACA,WACA,KACA,OACA,MACA,SACA,OACA,OACA,SACA,GAAG,SAEL,QACG;CACH,MAAM,YAAY,MAAM;CAExB,MAAM,EAAE,WAAW,uBAAuB;CAE1C,MAAM,EAAE,OAAO,WAAW,SAAS,eAAe,KAAK,MAAM;CAE7D,MAAM,eAAe;EACnB,GAAG;EACH,GAAG;EACH,GAAG,iBAAiB,IAAI;CAC1B;CAEA,MAAM,cAAc,aAAa;EAAE;EAAM;EAAS;EAAO;EAAO;CAAQ,CAAC;CAEzE,OACE,oBAAC,WAAD;EAAgB;EAAK,WAAW,GAAG,aAAa,SAAS;EAAG,OAAO;EAAc,GAAI;CAAQ,CAAA;AAEjG,CACF;AAEA,2BAA2B,cAAc;AAEzC,IAAa,gBAAgB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
|
|
2
2
|
const require_cssProps = require("../../styles/cssProps.cjs");
|
|
3
|
+
const require_cx = require("../../styles/cx.cjs");
|
|
3
4
|
const require_themeContext = require("../../styles/themeContext.cjs");
|
|
4
5
|
const require_ButtonSwitch_vanilla_css = require("./ButtonSwitch.vanilla.css.cjs");
|
|
5
6
|
let react = require("react");
|
|
@@ -19,7 +20,7 @@ var ButtonSwitchContainerVanillaImpl = (0, react.forwardRef)(({ as, className, c
|
|
|
19
20
|
};
|
|
20
21
|
if (as) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Component, {
|
|
21
22
|
ref,
|
|
22
|
-
className:
|
|
23
|
+
className: require_cx.cx(require_ButtonSwitch_vanilla_css.buttonSwitchContainer, className),
|
|
23
24
|
style: mergedStyles,
|
|
24
25
|
role: "group",
|
|
25
26
|
...props,
|
|
@@ -27,7 +28,7 @@ var ButtonSwitchContainerVanillaImpl = (0, react.forwardRef)(({ as, className, c
|
|
|
27
28
|
});
|
|
28
29
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_toggle_group.Root, {
|
|
29
30
|
ref,
|
|
30
|
-
className:
|
|
31
|
+
className: require_cx.cx(require_ButtonSwitch_vanilla_css.buttonSwitchContainer, className),
|
|
31
32
|
style: mergedStyles,
|
|
32
33
|
...props,
|
|
33
34
|
children
|
|
@@ -46,7 +47,7 @@ var ButtonSwitchItemVanillaImpl = (0, react.forwardRef)(({ as, className, css, s
|
|
|
46
47
|
};
|
|
47
48
|
if (as) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Component, {
|
|
48
49
|
ref,
|
|
49
|
-
className:
|
|
50
|
+
className: require_cx.cx(require_ButtonSwitch_vanilla_css.buttonSwitchItem, className),
|
|
50
51
|
style: mergedStyles,
|
|
51
52
|
role: "radio",
|
|
52
53
|
...props,
|
|
@@ -54,7 +55,7 @@ var ButtonSwitchItemVanillaImpl = (0, react.forwardRef)(({ as, className, css, s
|
|
|
54
55
|
});
|
|
55
56
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_toggle_group.Item, {
|
|
56
57
|
ref,
|
|
57
|
-
className:
|
|
58
|
+
className: require_cx.cx(require_ButtonSwitch_vanilla_css.buttonSwitchItem, className),
|
|
58
59
|
style: mergedStyles,
|
|
59
60
|
...props,
|
|
60
61
|
children
|