@epilot/volt-ui-experimental-griffel 0.2.3 → 0.3.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/ADOPTING.md +416 -0
- package/README.md +32 -31
- package/dist/_virtual/jsx-dev-runtime.js +5 -0
- package/dist/_virtual/jsx-dev-runtime.js.map +1 -0
- package/dist/_virtual/react-jsx-dev-runtime.development.js +5 -0
- package/dist/_virtual/react-jsx-dev-runtime.development.js.map +1 -0
- package/dist/_virtual/react-jsx-dev-runtime.production.js +5 -0
- package/dist/_virtual/react-jsx-dev-runtime.production.js.map +1 -0
- package/dist/components/accordion/accordion.js +126 -66
- package/dist/components/accordion/accordion.js.map +1 -1
- package/dist/components/alert-dialog/alert-dialog.js +239 -137
- package/dist/components/alert-dialog/alert-dialog.js.map +1 -1
- package/dist/components/avatar/avatar-group.js +102 -47
- package/dist/components/avatar/avatar-group.js.map +1 -1
- package/dist/components/avatar/avatar.js +97 -73
- package/dist/components/avatar/avatar.js.map +1 -1
- package/dist/components/badge/badge.js +53 -37
- package/dist/components/badge/badge.js.map +1 -1
- package/dist/components/breadcrumb/breadcrumb.js +97 -49
- package/dist/components/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/components/button/button.js +88 -77
- package/dist/components/button/button.js.map +1 -1
- package/dist/components/button-group/button-group.js +55 -31
- package/dist/components/button-group/button-group.js.map +1 -1
- package/dist/components/callout/callout.js +288 -164
- package/dist/components/callout/callout.js.map +1 -1
- package/dist/components/card/card.js +137 -81
- package/dist/components/card/card.js.map +1 -1
- package/dist/components/checkbox/checkbox.js +100 -49
- package/dist/components/checkbox/checkbox.js.map +1 -1
- package/dist/components/collapsible-sidebar/collapsible-sidebar.js +155 -107
- package/dist/components/collapsible-sidebar/collapsible-sidebar.js.map +1 -1
- package/dist/components/command/command.js +297 -158
- package/dist/components/command/command.js.map +1 -1
- package/dist/components/data-table/data-table-body.js +114 -54
- package/dist/components/data-table/data-table-body.js.map +1 -1
- package/dist/components/data-table/data-table-column-header.js +117 -45
- package/dist/components/data-table/data-table-column-header.js.map +1 -1
- package/dist/components/data-table/data-table-column-visibility.js +98 -39
- package/dist/components/data-table/data-table-column-visibility.js.map +1 -1
- package/dist/components/data-table/data-table-content.js +90 -58
- package/dist/components/data-table/data-table-content.js.map +1 -1
- package/dist/components/data-table/data-table-error.js +83 -39
- package/dist/components/data-table/data-table-error.js.map +1 -1
- package/dist/components/data-table/data-table-header.js +88 -54
- package/dist/components/data-table/data-table-header.js.map +1 -1
- package/dist/components/data-table/data-table-loading.js +27 -15
- package/dist/components/data-table/data-table-loading.js.map +1 -1
- package/dist/components/data-table/data-table-pagination.js +27 -19
- package/dist/components/data-table/data-table-pagination.js.map +1 -1
- package/dist/components/data-table/data-table-row.js +87 -64
- package/dist/components/data-table/data-table-row.js.map +1 -1
- package/dist/components/data-table/data-table-toolbar.js +24 -16
- package/dist/components/data-table/data-table-toolbar.js.map +1 -1
- package/dist/components/data-table/data-table.js +182 -145
- package/dist/components/data-table/data-table.js.map +1 -1
- package/dist/components/date-range-picker/date-range-picker.js +342 -214
- package/dist/components/date-range-picker/date-range-picker.js.map +1 -1
- package/dist/components/date-range-picker/range-calendar.js +132 -92
- package/dist/components/date-range-picker/range-calendar.js.map +1 -1
- package/dist/components/date-time-picker/calendar.js +501 -317
- package/dist/components/date-time-picker/calendar.js.map +1 -1
- package/dist/components/date-time-picker/date-time-picker-context.js +64 -60
- package/dist/components/date-time-picker/date-time-picker-context.js.map +1 -1
- package/dist/components/date-time-picker/date-time-picker-input.js +249 -149
- package/dist/components/date-time-picker/date-time-picker-input.js.map +1 -1
- package/dist/components/date-time-picker/date-time-picker-panel.js +273 -165
- package/dist/components/date-time-picker/date-time-picker-panel.js.map +1 -1
- package/dist/components/date-time-picker/date-time-picker-popover.js +22 -14
- package/dist/components/date-time-picker/date-time-picker-popover.js.map +1 -1
- package/dist/components/date-time-picker/date-time-picker.js +134 -90
- package/dist/components/date-time-picker/date-time-picker.js.map +1 -1
- package/dist/components/date-time-picker/time-picker.js +198 -132
- package/dist/components/date-time-picker/time-picker.js.map +1 -1
- package/dist/components/density-provider/density-provider.js +48 -0
- package/dist/components/density-provider/density-provider.js.map +1 -0
- package/dist/components/dialog/dialog.js +280 -150
- package/dist/components/dialog/dialog.js.map +1 -1
- package/dist/components/drawer/drawer.js +273 -163
- package/dist/components/drawer/drawer.js.map +1 -1
- package/dist/components/dropdown-menu/dropdown-menu.js +378 -195
- package/dist/components/dropdown-menu/dropdown-menu.js.map +1 -1
- package/dist/components/field/field-combobox.js +447 -240
- package/dist/components/field/field-combobox.js.map +1 -1
- package/dist/components/field/field-select.js +23 -19
- package/dist/components/field/field-select.js.map +1 -1
- package/dist/components/field/field.js +318 -209
- package/dist/components/field/field.js.map +1 -1
- package/dist/components/label/label.js +27 -19
- package/dist/components/label/label.js.map +1 -1
- package/dist/components/list/list.js +623 -369
- package/dist/components/list/list.js.map +1 -1
- package/dist/components/option-card/option-card.js +323 -159
- package/dist/components/option-card/option-card.js.map +1 -1
- package/dist/components/pill/pill.js +82 -64
- package/dist/components/pill/pill.js.map +1 -1
- package/dist/components/popover/popover.js +101 -56
- package/dist/components/popover/popover.js.map +1 -1
- package/dist/components/radio/radio.js +94 -51
- package/dist/components/radio/radio.js.map +1 -1
- package/dist/components/scroll-overflow/scroll-overflow.js +350 -198
- package/dist/components/scroll-overflow/scroll-overflow.js.map +1 -1
- package/dist/components/segmented-control/segmented-control.js +141 -97
- package/dist/components/segmented-control/segmented-control.js.map +1 -1
- package/dist/components/select/select.js +452 -227
- package/dist/components/select/select.js.map +1 -1
- package/dist/components/separator/separator.js +24 -16
- package/dist/components/separator/separator.js.map +1 -1
- package/dist/components/skeleton/skeleton.js +83 -43
- package/dist/components/skeleton/skeleton.js.map +1 -1
- package/dist/components/spinner/spinner.js +44 -20
- package/dist/components/spinner/spinner.js.map +1 -1
- package/dist/components/switch/switch.js +163 -86
- package/dist/components/switch/switch.js.map +1 -1
- package/dist/components/table/table-pagination.js +465 -205
- package/dist/components/table/table-pagination.js.map +1 -1
- package/dist/components/table/table.js +212 -144
- package/dist/components/table/table.js.map +1 -1
- package/dist/components/tabs/tabs.js +94 -58
- package/dist/components/tabs/tabs.js.map +1 -1
- package/dist/components/text/text.js +40 -32
- package/dist/components/text/text.js.map +1 -1
- package/dist/components/toast/toast.js +187 -111
- package/dist/components/toast/toast.js.map +1 -1
- package/dist/components/toggle/toggle-group.js +40 -24
- package/dist/components/toggle/toggle-group.js.map +1 -1
- package/dist/components/toggle/toggle.js +48 -40
- package/dist/components/toggle/toggle.js.map +1 -1
- package/dist/components/tooltip/tooltip.js +101 -55
- package/dist/components/tooltip/tooltip.js.map +1 -1
- package/dist/index.d.ts +600 -427
- package/dist/index.js +215 -212
- package/dist/index.js.map +1 -1
- package/dist/lib/clear-button.js +27 -15
- package/dist/lib/clear-button.js.map +1 -1
- package/dist/lib/icons.js +18 -6
- package/dist/lib/icons.js.map +1 -1
- package/dist/packages/volt-runtime/dist/sheet.js +27 -10
- package/dist/packages/volt-runtime/dist/sheet.js.map +1 -1
- package/dist/packages/volt-runtime/dist/styles/recipe.js +76 -0
- package/dist/packages/volt-runtime/dist/styles/recipe.js.map +1 -0
- package/dist/styles/document-context.js +12 -0
- package/dist/styles/document-context.js.map +1 -0
- package/dist/styles/make-styles.js +18 -10
- package/dist/styles/make-styles.js.map +1 -1
- package/dist/tokens/core.generated.js +1238 -1166
- package/dist/tokens/core.generated.js.map +1 -1
- package/dist/tokens/index.d.ts +442 -415
- package/dist/tokens/index.js +1105 -1078
- package/dist/tokens/index.js.map +1 -1
- package/dist/tokens/install.js +9 -5
- package/dist/tokens/install.js.map +1 -1
- package/dist/tokens/use-palette-tokens.js +20 -0
- package/dist/tokens/use-palette-tokens.js.map +1 -0
- package/dist/tokens.json +83 -2
- package/dist/vendor/react/cjs/react-jsx-dev-runtime.development.js +236 -0
- package/dist/vendor/react/cjs/react-jsx-dev-runtime.development.js.map +1 -0
- package/dist/vendor/react/cjs/react-jsx-dev-runtime.production.js +21 -0
- package/dist/vendor/react/cjs/react-jsx-dev-runtime.production.js.map +1 -0
- package/dist/vendor/react/jsx-dev-runtime.js +9 -0
- package/dist/vendor/react/jsx-dev-runtime.js.map +1 -0
- package/package.json +13 -5
- package/scripts/migration-diagnostics-core.mjs +859 -0
- package/scripts/migration-diagnostics.mjs +353 -0
- package/scripts/migration-sweep.mjs +179 -0
- package/AGENTS.md +0 -153
- package/AUTHORING.md +0 -292
- package/dist/packages/volt-runtime/dist/styles/make-styles.js +0 -22
- package/dist/packages/volt-runtime/dist/styles/make-styles.js.map +0 -1
|
@@ -1,90 +1,138 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import * as
|
|
3
|
-
import { Toaster as
|
|
4
|
-
import { toast as
|
|
5
|
-
import { shorthands as
|
|
6
|
-
import { makeVoltStyles as
|
|
7
|
-
import { semErrorUi as
|
|
1
|
+
import { j as r } from "../../vendor/react/jsx-dev-runtime.js";
|
|
2
|
+
import * as x from "react";
|
|
3
|
+
import { Toaster as b } from "../../vendor/sonner/dist/index.js";
|
|
4
|
+
import { toast as a1 } from "../../vendor/sonner/dist/index.js";
|
|
5
|
+
import { shorthands as e } from "../../packages/volt-runtime/dist/vendor/@griffel/core/src/index.js";
|
|
6
|
+
import { makeVoltStyles as h } from "../../styles/make-styles.js";
|
|
7
|
+
import { semErrorUi as v, semWarningUi as w, semInfoUi as N, semSuccessUi as k, radiusMd as y, spacingElement2 as l, grayA6 as c, radiusXl as S, spacingGroup2 as m, spacingElement3 as V, errorA11 as E, errorA12 as j, error4 as U, warningA11 as D, warningA12 as B, warning3 as M, infoA11 as A, infoA12 as W, info3 as Z, successA11 as I, successA12 as L, success4 as R, fontWeightMedium as u, leadingSm as s, textSm as n, semGraySoftHover as H, grayA12 as a, semGraySoft as T, grayA8 as C, gray11 as z, gray12 as G, semAccentContrast as X, leadingXs as Q, textXs as $, fontWeightSemibold as q, body as f } from "../../tokens/index.js";
|
|
8
8
|
import { Spinner as F } from "../spinner/spinner.js";
|
|
9
|
-
const J = (
|
|
9
|
+
const J = (i) => /* @__PURE__ */ r.jsxDEV(
|
|
10
10
|
"svg",
|
|
11
11
|
{
|
|
12
12
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13
13
|
viewBox: "0 0 24 24",
|
|
14
14
|
fill: "currentColor",
|
|
15
|
-
...
|
|
16
|
-
children: /* @__PURE__ */
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
...i,
|
|
16
|
+
children: /* @__PURE__ */ r.jsxDEV("path", { d: "M12.0003 16.75C12.2129 16.75 12.391 16.6781 12.5345 16.5343C12.6782 16.3906 12.75 16.2125 12.75 16V11.75C12.75 11.5375 12.6781 11.3593 12.5343 11.2155C12.3904 11.0718 12.2122 11 11.9997 11C11.7871 11 11.609 11.0718 11.4655 11.2155C11.3218 11.3593 11.25 11.5375 11.25 11.75V16C11.25 16.2125 11.3219 16.3906 11.4658 16.5343C11.6096 16.6781 11.7878 16.75 12.0003 16.75ZM12 9.2885C12.2288 9.2885 12.4207 9.21108 12.5755 9.05625C12.7303 8.90142 12.8077 8.70958 12.8077 8.48075C12.8077 8.25192 12.7303 8.06008 12.5755 7.90525C12.4207 7.75058 12.2288 7.67325 12 7.67325C11.7712 7.67325 11.5793 7.75058 11.4245 7.90525C11.2697 8.06008 11.1923 8.25192 11.1923 8.48075C11.1923 8.70958 11.2697 8.90142 11.4245 9.05625C11.5793 9.21108 11.7712 9.2885 12 9.2885ZM12.0017 21.5C10.6877 21.5 9.45267 21.2507 8.2965 20.752C7.14033 20.2533 6.13467 19.5766 5.2795 18.7218C4.42433 17.8669 3.74725 16.8617 3.24825 15.706C2.74942 14.5503 2.5 13.3156 2.5 12.0017C2.5 10.6877 2.74933 9.45267 3.248 8.2965C3.74667 7.14033 4.42342 6.13467 5.27825 5.2795C6.13308 4.42433 7.13833 3.74725 8.294 3.24825C9.44967 2.74942 10.6844 2.5 11.9982 2.5C13.3122 2.5 14.5473 2.74933 15.7035 3.248C16.8597 3.74667 17.8653 4.42342 18.7205 5.27825C19.5757 6.13308 20.2528 7.13833 20.7518 8.294C21.2506 9.44967 21.5 10.6844 21.5 11.9982C21.5 13.3122 21.2507 14.5473 20.752 15.7035C20.2533 16.8597 19.5766 17.8653 18.7218 18.7205C17.8669 19.5757 16.8617 20.2528 15.706 20.7518C14.5503 21.2506 13.3156 21.5 12.0017 21.5Z" }, void 0, !1, {
|
|
17
|
+
fileName: "/Users/wilianmolinari/repos/volt-ui-rollout/release/packages/experimental-griffel/src/components/toast/toast.tsx",
|
|
18
|
+
lineNumber: 16,
|
|
19
|
+
columnNumber: 5
|
|
20
|
+
}, void 0)
|
|
21
|
+
},
|
|
22
|
+
void 0,
|
|
23
|
+
!1,
|
|
24
|
+
{
|
|
25
|
+
fileName: "/Users/wilianmolinari/repos/volt-ui-rollout/release/packages/experimental-griffel/src/components/toast/toast.tsx",
|
|
26
|
+
lineNumber: 10,
|
|
27
|
+
columnNumber: 3
|
|
28
|
+
},
|
|
29
|
+
void 0
|
|
30
|
+
), K = (i) => /* @__PURE__ */ r.jsxDEV(
|
|
19
31
|
"svg",
|
|
20
32
|
{
|
|
21
33
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22
34
|
viewBox: "0 0 24 24",
|
|
23
35
|
fill: "currentColor",
|
|
24
|
-
...
|
|
25
|
-
children: /* @__PURE__ */
|
|
26
|
-
|
|
27
|
-
|
|
36
|
+
...i,
|
|
37
|
+
children: /* @__PURE__ */ r.jsxDEV("path", { d: "M3.4255 20.5C3.256 20.5 3.10375 20.4586 2.96875 20.3757C2.83375 20.2929 2.72883 20.1837 2.654 20.048C2.576 19.9133 2.53308 19.7675 2.52525 19.6105C2.51742 19.4535 2.55975 19.298 2.65225 19.144L11.213 4.356C11.3057 4.202 11.4215 4.08817 11.5605 4.0145C11.6997 3.94083 11.8462 3.904 12 3.904C12.1538 3.904 12.3003 3.94083 12.4395 4.0145C12.5785 4.08817 12.6943 4.202 12.787 4.356L21.3477 19.144C21.4402 19.298 21.4826 19.4535 21.4747 19.6105C21.4669 19.7675 21.424 19.9133 21.346 20.048C21.2712 20.1837 21.1663 20.2929 21.0313 20.3757C20.8963 20.4586 20.744 20.5 20.5745 20.5H3.4255ZM12 17.8077C12.2288 17.8077 12.4207 17.7303 12.5755 17.5755C12.7303 17.4207 12.8078 17.2288 12.8078 17C12.8078 16.7712 12.7303 16.5793 12.5755 16.4245C12.4207 16.2697 12.2288 16.1923 12 16.1923C11.7712 16.1923 11.5793 16.2697 11.4245 16.4245C11.2697 16.5793 11.1923 16.7712 11.1923 17C11.1923 17.2288 11.2697 17.4207 11.4245 17.5755C11.5793 17.7303 11.7712 17.8077 12 17.8077ZM12.0003 15.1923C12.2129 15.1923 12.391 15.1204 12.5345 14.9768C12.6782 14.8329 12.75 14.6548 12.75 14.4423V10.9423C12.75 10.7298 12.6781 10.5517 12.5342 10.408C12.3904 10.2642 12.2122 10.1923 11.9997 10.1923C11.7871 10.1923 11.609 10.2642 11.4655 10.408C11.3218 10.5517 11.25 10.7298 11.25 10.9423V14.4423C11.25 14.6548 11.3219 14.8329 11.4658 14.9768C11.6096 15.1204 11.7878 15.1923 12.0003 15.1923Z" }, void 0, !1, {
|
|
38
|
+
fileName: "/Users/wilianmolinari/repos/volt-ui-rollout/release/packages/experimental-griffel/src/components/toast/toast.tsx",
|
|
39
|
+
lineNumber: 27,
|
|
40
|
+
columnNumber: 5
|
|
41
|
+
}, void 0)
|
|
42
|
+
},
|
|
43
|
+
void 0,
|
|
44
|
+
!1,
|
|
45
|
+
{
|
|
46
|
+
fileName: "/Users/wilianmolinari/repos/volt-ui-rollout/release/packages/experimental-griffel/src/components/toast/toast.tsx",
|
|
47
|
+
lineNumber: 21,
|
|
48
|
+
columnNumber: 3
|
|
49
|
+
},
|
|
50
|
+
void 0
|
|
51
|
+
), P = (i) => /* @__PURE__ */ r.jsxDEV(
|
|
28
52
|
"svg",
|
|
29
53
|
{
|
|
30
54
|
xmlns: "http://www.w3.org/2000/svg",
|
|
31
55
|
viewBox: "0 0 24 24",
|
|
32
56
|
fill: "currentColor",
|
|
33
|
-
...
|
|
34
|
-
children: /* @__PURE__ */
|
|
35
|
-
|
|
36
|
-
|
|
57
|
+
...i,
|
|
58
|
+
children: /* @__PURE__ */ r.jsxDEV("path", { d: "M10.5808 14.1463L8.25775 11.823C8.11925 11.6847 7.94517 11.6138 7.7355 11.6105C7.526 11.6073 7.34875 11.6782 7.20375 11.823C7.05892 11.968 6.9865 12.1437 6.9865 12.35C6.9865 12.5563 7.05892 12.732 7.20375 12.877L9.948 15.6212C10.1288 15.8019 10.3398 15.8922 10.5808 15.8922C10.8218 15.8922 11.0327 15.8019 11.2135 15.6212L16.777 10.0577C16.9153 9.91925 16.9862 9.74517 16.9895 9.5355C16.9927 9.326 16.9218 9.14875 16.777 9.00375C16.632 8.85892 16.4563 8.7865 16.25 8.7865C16.0437 8.7865 15.868 8.85892 15.723 9.00375L10.5808 14.1463ZM12.0017 21.5C10.6877 21.5 9.45267 21.2507 8.2965 20.752C7.14033 20.2533 6.13467 19.5766 5.2795 18.7218C4.42433 17.8669 3.74725 16.8617 3.24825 15.706C2.74942 14.5503 2.5 13.3156 2.5 12.0017C2.5 10.6877 2.74933 9.45267 3.248 8.2965C3.74667 7.14033 4.42342 6.13467 5.27825 5.2795C6.13308 4.42433 7.13833 3.74725 8.294 3.24825C9.44967 2.74942 10.6844 2.5 11.9982 2.5C13.3122 2.5 14.5473 2.74933 15.7035 3.248C16.8597 3.74667 17.8653 4.42342 18.7205 5.27825C19.5757 6.13308 20.2528 7.13833 20.7518 8.294C21.2506 9.44967 21.5 10.6844 21.5 11.9982C21.5 13.3122 21.2507 14.5473 20.752 15.7035C20.2533 16.8597 19.5766 17.8653 18.7218 18.7205C17.8669 19.5757 16.8617 20.2528 15.706 20.7518C14.5503 21.2506 13.3156 21.5 12.0017 21.5Z" }, void 0, !1, {
|
|
59
|
+
fileName: "/Users/wilianmolinari/repos/volt-ui-rollout/release/packages/experimental-griffel/src/components/toast/toast.tsx",
|
|
60
|
+
lineNumber: 38,
|
|
61
|
+
columnNumber: 5
|
|
62
|
+
}, void 0)
|
|
63
|
+
},
|
|
64
|
+
void 0,
|
|
65
|
+
!1,
|
|
66
|
+
{
|
|
67
|
+
fileName: "/Users/wilianmolinari/repos/volt-ui-rollout/release/packages/experimental-griffel/src/components/toast/toast.tsx",
|
|
68
|
+
lineNumber: 32,
|
|
69
|
+
columnNumber: 3
|
|
70
|
+
},
|
|
71
|
+
void 0
|
|
72
|
+
), Y = (i) => /* @__PURE__ */ r.jsxDEV(
|
|
37
73
|
"svg",
|
|
38
74
|
{
|
|
39
75
|
xmlns: "http://www.w3.org/2000/svg",
|
|
40
76
|
viewBox: "0 0 24 24",
|
|
41
77
|
fill: "currentColor",
|
|
42
|
-
...
|
|
43
|
-
children: /* @__PURE__ */
|
|
44
|
-
|
|
45
|
-
|
|
78
|
+
...i,
|
|
79
|
+
children: /* @__PURE__ */ r.jsxDEV("path", { d: "M12 16.7307C12.2288 16.7307 12.4207 16.6533 12.5755 16.4985C12.7303 16.3437 12.8077 16.1518 12.8077 15.923C12.8077 15.6942 12.7303 15.5023 12.5755 15.3475C12.4207 15.1928 12.2288 15.1155 12 15.1155C11.7712 15.1155 11.5793 15.1928 11.4245 15.3475C11.2697 15.5023 11.1923 15.6942 11.1923 15.923C11.1923 16.1518 11.2697 16.3437 11.4245 16.4985C11.5793 16.6533 11.7712 16.7307 12 16.7307ZM12.0003 13.077C12.2129 13.077 12.391 13.0051 12.5345 12.8613C12.6782 12.7176 12.75 12.5395 12.75 12.327V7.827C12.75 7.6145 12.6781 7.43633 12.5343 7.2925C12.3904 7.14883 12.2122 7.077 11.9997 7.077C11.7871 7.077 11.609 7.14883 11.4655 7.2925C11.3218 7.43633 11.25 7.6145 11.25 7.827V12.327C11.25 12.5395 11.3219 12.7176 11.4658 12.8613C11.6096 13.0051 11.7878 13.077 12.0003 13.077ZM12.0017 21.5C10.6877 21.5 9.45267 21.2507 8.2965 20.752C7.14033 20.2533 6.13467 19.5766 5.2795 18.7218C4.42433 17.8669 3.74725 16.8617 3.24825 15.706C2.74942 14.5503 2.5 13.3156 2.5 12.0017C2.5 10.6877 2.74933 9.45267 3.248 8.2965C3.74667 7.14033 4.42342 6.13467 5.27825 5.2795C6.13308 4.42433 7.13833 3.74725 8.294 3.24825C9.44967 2.74942 10.6844 2.5 11.9982 2.5C13.3122 2.5 14.5473 2.74933 15.7035 3.248C16.8597 3.74667 17.8653 4.42342 18.7205 5.27825C19.5757 6.13308 20.2528 7.13833 20.7518 8.294C21.2506 9.44967 21.5 10.6844 21.5 11.9982C21.5 13.3122 21.2507 14.5473 20.752 15.7035C20.2533 16.8597 19.5766 17.8653 18.7218 18.7205C17.8669 19.5757 16.8617 20.2528 15.706 20.7518C14.5503 21.2506 13.3156 21.5 12.0017 21.5Z" }, void 0, !1, {
|
|
80
|
+
fileName: "/Users/wilianmolinari/repos/volt-ui-rollout/release/packages/experimental-griffel/src/components/toast/toast.tsx",
|
|
81
|
+
lineNumber: 49,
|
|
82
|
+
columnNumber: 5
|
|
83
|
+
}, void 0)
|
|
84
|
+
},
|
|
85
|
+
void 0,
|
|
86
|
+
!1,
|
|
87
|
+
{
|
|
88
|
+
fileName: "/Users/wilianmolinari/repos/volt-ui-rollout/release/packages/experimental-griffel/src/components/toast/toast.tsx",
|
|
89
|
+
lineNumber: 43,
|
|
90
|
+
columnNumber: 3
|
|
91
|
+
},
|
|
92
|
+
void 0
|
|
93
|
+
), _ = h({
|
|
46
94
|
toast: {
|
|
47
95
|
pointerEvents: "auto",
|
|
48
96
|
position: "relative",
|
|
49
97
|
width: "100%",
|
|
50
98
|
display: "flex",
|
|
51
99
|
alignItems: "baseline",
|
|
52
|
-
...
|
|
53
|
-
...
|
|
54
|
-
...
|
|
55
|
-
...
|
|
56
|
-
...
|
|
57
|
-
...
|
|
58
|
-
backgroundColor:
|
|
59
|
-
color:
|
|
100
|
+
...e.gap(l),
|
|
101
|
+
...e.padding(m, V),
|
|
102
|
+
...e.borderRadius(S),
|
|
103
|
+
...e.borderStyle("solid"),
|
|
104
|
+
...e.borderWidth(0),
|
|
105
|
+
...e.borderColor(c),
|
|
106
|
+
backgroundColor: f,
|
|
107
|
+
color: a,
|
|
60
108
|
boxShadow: "0 4px 6px -1px #0000001a, 0 2px 4px -2px #0000001a",
|
|
61
109
|
":focus-visible": {
|
|
62
110
|
outlineWidth: "2px",
|
|
63
111
|
outlineStyle: "solid",
|
|
64
|
-
outlineColor:
|
|
112
|
+
outlineColor: C
|
|
65
113
|
}
|
|
66
114
|
},
|
|
67
115
|
default: {
|
|
68
|
-
backgroundColor:
|
|
69
|
-
...
|
|
70
|
-
...
|
|
71
|
-
color:
|
|
116
|
+
backgroundColor: f,
|
|
117
|
+
...e.borderColor(c),
|
|
118
|
+
...e.gap(l),
|
|
119
|
+
color: a
|
|
72
120
|
},
|
|
73
121
|
content: {
|
|
74
122
|
display: "flex",
|
|
75
123
|
flexDirection: "column",
|
|
76
|
-
...
|
|
124
|
+
...e.gap("0.125rem")
|
|
77
125
|
},
|
|
78
126
|
title: {
|
|
79
|
-
fontSize:
|
|
80
|
-
lineHeight:
|
|
127
|
+
fontSize: n,
|
|
128
|
+
lineHeight: s,
|
|
81
129
|
fontWeight: q,
|
|
82
|
-
...
|
|
130
|
+
...e.margin(0)
|
|
83
131
|
},
|
|
84
132
|
description: {
|
|
85
|
-
fontSize:
|
|
86
|
-
lineHeight:
|
|
87
|
-
...
|
|
133
|
+
fontSize: n,
|
|
134
|
+
lineHeight: s,
|
|
135
|
+
...e.margin(0)
|
|
88
136
|
},
|
|
89
137
|
icon: {
|
|
90
138
|
alignSelf: "flex-start",
|
|
@@ -99,50 +147,50 @@ const J = (t) => /* @__PURE__ */ e(
|
|
|
99
147
|
marginRight: "var(--toast-icon-margin-end)"
|
|
100
148
|
},
|
|
101
149
|
actionButton: {
|
|
102
|
-
...
|
|
150
|
+
...e.borderRadius("9999px"),
|
|
103
151
|
flexShrink: 0,
|
|
104
152
|
alignSelf: "flex-end",
|
|
105
153
|
cursor: "pointer",
|
|
106
154
|
marginLeft: "auto",
|
|
107
|
-
marginTop:
|
|
155
|
+
marginTop: m,
|
|
108
156
|
fontSize: $,
|
|
109
157
|
lineHeight: Q,
|
|
110
|
-
fontWeight:
|
|
111
|
-
...
|
|
112
|
-
color:
|
|
113
|
-
backgroundColor:
|
|
158
|
+
fontWeight: u,
|
|
159
|
+
...e.padding("0.3125rem", l),
|
|
160
|
+
color: X,
|
|
161
|
+
backgroundColor: G,
|
|
114
162
|
":hover": {
|
|
115
|
-
backgroundColor:
|
|
163
|
+
backgroundColor: z
|
|
116
164
|
},
|
|
117
165
|
":focus-visible": {
|
|
118
166
|
outlineWidth: "2px",
|
|
119
167
|
outlineStyle: "solid",
|
|
120
168
|
outlineOffset: "2px",
|
|
121
|
-
outlineColor:
|
|
169
|
+
outlineColor: C
|
|
122
170
|
}
|
|
123
171
|
},
|
|
124
172
|
cancelButton: {
|
|
125
|
-
backgroundColor:
|
|
126
|
-
color:
|
|
173
|
+
backgroundColor: T,
|
|
174
|
+
color: a,
|
|
127
175
|
":hover": {
|
|
128
|
-
backgroundColor:
|
|
176
|
+
backgroundColor: H
|
|
129
177
|
},
|
|
130
|
-
fontSize:
|
|
131
|
-
lineHeight:
|
|
132
|
-
fontWeight:
|
|
133
|
-
...
|
|
134
|
-
...
|
|
178
|
+
fontSize: n,
|
|
179
|
+
lineHeight: s,
|
|
180
|
+
fontWeight: u,
|
|
181
|
+
...e.padding("0.3125rem", l),
|
|
182
|
+
...e.borderRadius(y)
|
|
135
183
|
},
|
|
136
184
|
closeButton: {
|
|
137
185
|
position: "absolute",
|
|
138
186
|
right: "0.625rem",
|
|
139
187
|
top: "0.625rem",
|
|
140
|
-
...
|
|
188
|
+
...e.borderRadius("9999px"),
|
|
141
189
|
color: "currentColor",
|
|
142
190
|
cursor: "pointer",
|
|
143
191
|
backgroundColor: "transparent",
|
|
144
|
-
...
|
|
145
|
-
...
|
|
192
|
+
...e.border("0"),
|
|
193
|
+
...e.padding(0),
|
|
146
194
|
display: "flex",
|
|
147
195
|
alignItems: "center",
|
|
148
196
|
justifyContent: "center",
|
|
@@ -159,35 +207,35 @@ const J = (t) => /* @__PURE__ */ e(
|
|
|
159
207
|
}
|
|
160
208
|
},
|
|
161
209
|
success: {
|
|
162
|
-
...
|
|
163
|
-
backgroundColor:
|
|
164
|
-
color:
|
|
210
|
+
...e.borderColor(k),
|
|
211
|
+
backgroundColor: R,
|
|
212
|
+
color: L,
|
|
165
213
|
"& [data-icon]": {
|
|
166
|
-
color:
|
|
214
|
+
color: I
|
|
167
215
|
}
|
|
168
216
|
},
|
|
169
217
|
info: {
|
|
170
|
-
...
|
|
171
|
-
backgroundColor:
|
|
172
|
-
color:
|
|
218
|
+
...e.borderColor(N),
|
|
219
|
+
backgroundColor: Z,
|
|
220
|
+
color: W,
|
|
173
221
|
"& [data-icon]": {
|
|
174
|
-
color:
|
|
222
|
+
color: A
|
|
175
223
|
}
|
|
176
224
|
},
|
|
177
225
|
warning: {
|
|
178
|
-
...
|
|
179
|
-
backgroundColor:
|
|
180
|
-
color:
|
|
226
|
+
...e.borderColor(w),
|
|
227
|
+
backgroundColor: M,
|
|
228
|
+
color: B,
|
|
181
229
|
"& [data-icon]": {
|
|
182
|
-
color:
|
|
230
|
+
color: D
|
|
183
231
|
}
|
|
184
232
|
},
|
|
185
233
|
error: {
|
|
186
|
-
...
|
|
187
|
-
backgroundColor:
|
|
188
|
-
color:
|
|
234
|
+
...e.borderColor(v),
|
|
235
|
+
backgroundColor: U,
|
|
236
|
+
color: j,
|
|
189
237
|
"& [data-icon]": {
|
|
190
|
-
color:
|
|
238
|
+
color: E
|
|
191
239
|
}
|
|
192
240
|
},
|
|
193
241
|
loading: {},
|
|
@@ -195,50 +243,78 @@ const J = (t) => /* @__PURE__ */ e(
|
|
|
195
243
|
width: "1.125rem",
|
|
196
244
|
height: "1.125rem"
|
|
197
245
|
}
|
|
198
|
-
}),
|
|
199
|
-
function({ theme:
|
|
200
|
-
const
|
|
201
|
-
return /* @__PURE__ */
|
|
202
|
-
|
|
246
|
+
}), l1 = x.forwardRef(
|
|
247
|
+
function({ theme: d, toastOptions: t, ...p }, g) {
|
|
248
|
+
const o = _();
|
|
249
|
+
return /* @__PURE__ */ r.jsxDEV(
|
|
250
|
+
b,
|
|
203
251
|
{
|
|
204
|
-
ref:
|
|
252
|
+
ref: g,
|
|
205
253
|
closeButton: !0,
|
|
206
|
-
theme:
|
|
254
|
+
theme: d,
|
|
207
255
|
toastOptions: {
|
|
208
|
-
...
|
|
256
|
+
...t,
|
|
209
257
|
unstyled: !0,
|
|
210
258
|
classNames: {
|
|
211
|
-
toast:
|
|
212
|
-
default:
|
|
213
|
-
content:
|
|
214
|
-
title:
|
|
215
|
-
description:
|
|
216
|
-
icon:
|
|
217
|
-
actionButton:
|
|
218
|
-
cancelButton:
|
|
219
|
-
closeButton:
|
|
220
|
-
success:
|
|
221
|
-
info:
|
|
222
|
-
warning:
|
|
223
|
-
error:
|
|
224
|
-
loading:
|
|
225
|
-
...
|
|
259
|
+
toast: o.toast,
|
|
260
|
+
default: o.default,
|
|
261
|
+
content: o.content,
|
|
262
|
+
title: o.title,
|
|
263
|
+
description: o.description,
|
|
264
|
+
icon: o.icon,
|
|
265
|
+
actionButton: o.actionButton,
|
|
266
|
+
cancelButton: o.cancelButton,
|
|
267
|
+
closeButton: o.closeButton,
|
|
268
|
+
success: o.success,
|
|
269
|
+
info: o.info,
|
|
270
|
+
warning: o.warning,
|
|
271
|
+
error: o.error,
|
|
272
|
+
loading: o.loading,
|
|
273
|
+
...t == null ? void 0 : t.classNames
|
|
226
274
|
}
|
|
227
275
|
},
|
|
228
276
|
icons: {
|
|
229
|
-
success: /* @__PURE__ */
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
277
|
+
success: /* @__PURE__ */ r.jsxDEV(P, {}, void 0, !1, {
|
|
278
|
+
fileName: "/Users/wilianmolinari/repos/volt-ui-rollout/release/packages/experimental-griffel/src/components/toast/toast.tsx",
|
|
279
|
+
lineNumber: 243,
|
|
280
|
+
columnNumber: 20
|
|
281
|
+
}, this),
|
|
282
|
+
info: /* @__PURE__ */ r.jsxDEV(J, {}, void 0, !1, {
|
|
283
|
+
fileName: "/Users/wilianmolinari/repos/volt-ui-rollout/release/packages/experimental-griffel/src/components/toast/toast.tsx",
|
|
284
|
+
lineNumber: 244,
|
|
285
|
+
columnNumber: 17
|
|
286
|
+
}, this),
|
|
287
|
+
warning: /* @__PURE__ */ r.jsxDEV(K, {}, void 0, !1, {
|
|
288
|
+
fileName: "/Users/wilianmolinari/repos/volt-ui-rollout/release/packages/experimental-griffel/src/components/toast/toast.tsx",
|
|
289
|
+
lineNumber: 245,
|
|
290
|
+
columnNumber: 20
|
|
291
|
+
}, this),
|
|
292
|
+
error: /* @__PURE__ */ r.jsxDEV(Y, {}, void 0, !1, {
|
|
293
|
+
fileName: "/Users/wilianmolinari/repos/volt-ui-rollout/release/packages/experimental-griffel/src/components/toast/toast.tsx",
|
|
294
|
+
lineNumber: 246,
|
|
295
|
+
columnNumber: 18
|
|
296
|
+
}, this),
|
|
297
|
+
loading: /* @__PURE__ */ r.jsxDEV(F, { className: o.spinner }, void 0, !1, {
|
|
298
|
+
fileName: "/Users/wilianmolinari/repos/volt-ui-rollout/release/packages/experimental-griffel/src/components/toast/toast.tsx",
|
|
299
|
+
lineNumber: 247,
|
|
300
|
+
columnNumber: 20
|
|
301
|
+
}, this)
|
|
234
302
|
},
|
|
235
|
-
...
|
|
236
|
-
}
|
|
303
|
+
...p
|
|
304
|
+
},
|
|
305
|
+
void 0,
|
|
306
|
+
!1,
|
|
307
|
+
{
|
|
308
|
+
fileName: "/Users/wilianmolinari/repos/volt-ui-rollout/release/packages/experimental-griffel/src/components/toast/toast.tsx",
|
|
309
|
+
lineNumber: 217,
|
|
310
|
+
columnNumber: 7
|
|
311
|
+
},
|
|
312
|
+
this
|
|
237
313
|
);
|
|
238
314
|
}
|
|
239
315
|
);
|
|
240
316
|
export {
|
|
241
|
-
|
|
242
|
-
|
|
317
|
+
l1 as Toaster,
|
|
318
|
+
a1 as toast
|
|
243
319
|
};
|
|
244
320
|
//# sourceMappingURL=toast.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast.js","sources":["../../../src/components/toast/toast.tsx"],"sourcesContent":["import * as React from \"react\"\nimport * as Sonner from \"sonner\"\nimport { shorthands } from \"@epilot/volt-ui-runtime\"\n\nimport { makeVoltStyles } from \"../../styles/make-styles\"\nimport * as tokens from \"../../tokens\"\nimport { Spinner } from \"../spinner/spinner\"\n\nconst InfoIcon = (props: React.ComponentProps<\"svg\">) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n {...props}\n >\n <path d=\"M12.0003 16.75C12.2129 16.75 12.391 16.6781 12.5345 16.5343C12.6782 16.3906 12.75 16.2125 12.75 16V11.75C12.75 11.5375 12.6781 11.3593 12.5343 11.2155C12.3904 11.0718 12.2122 11 11.9997 11C11.7871 11 11.609 11.0718 11.4655 11.2155C11.3218 11.3593 11.25 11.5375 11.25 11.75V16C11.25 16.2125 11.3219 16.3906 11.4658 16.5343C11.6096 16.6781 11.7878 16.75 12.0003 16.75ZM12 9.2885C12.2288 9.2885 12.4207 9.21108 12.5755 9.05625C12.7303 8.90142 12.8077 8.70958 12.8077 8.48075C12.8077 8.25192 12.7303 8.06008 12.5755 7.90525C12.4207 7.75058 12.2288 7.67325 12 7.67325C11.7712 7.67325 11.5793 7.75058 11.4245 7.90525C11.2697 8.06008 11.1923 8.25192 11.1923 8.48075C11.1923 8.70958 11.2697 8.90142 11.4245 9.05625C11.5793 9.21108 11.7712 9.2885 12 9.2885ZM12.0017 21.5C10.6877 21.5 9.45267 21.2507 8.2965 20.752C7.14033 20.2533 6.13467 19.5766 5.2795 18.7218C4.42433 17.8669 3.74725 16.8617 3.24825 15.706C2.74942 14.5503 2.5 13.3156 2.5 12.0017C2.5 10.6877 2.74933 9.45267 3.248 8.2965C3.74667 7.14033 4.42342 6.13467 5.27825 5.2795C6.13308 4.42433 7.13833 3.74725 8.294 3.24825C9.44967 2.74942 10.6844 2.5 11.9982 2.5C13.3122 2.5 14.5473 2.74933 15.7035 3.248C16.8597 3.74667 17.8653 4.42342 18.7205 5.27825C19.5757 6.13308 20.2528 7.13833 20.7518 8.294C21.2506 9.44967 21.5 10.6844 21.5 11.9982C21.5 13.3122 21.2507 14.5473 20.752 15.7035C20.2533 16.8597 19.5766 17.8653 18.7218 18.7205C17.8669 19.5757 16.8617 20.2528 15.706 20.7518C14.5503 21.2506 13.3156 21.5 12.0017 21.5Z\" />\n </svg>\n)\n\nconst WarningIcon = (props: React.ComponentProps<\"svg\">) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n {...props}\n >\n <path d=\"M3.4255 20.5C3.256 20.5 3.10375 20.4586 2.96875 20.3757C2.83375 20.2929 2.72883 20.1837 2.654 20.048C2.576 19.9133 2.53308 19.7675 2.52525 19.6105C2.51742 19.4535 2.55975 19.298 2.65225 19.144L11.213 4.356C11.3057 4.202 11.4215 4.08817 11.5605 4.0145C11.6997 3.94083 11.8462 3.904 12 3.904C12.1538 3.904 12.3003 3.94083 12.4395 4.0145C12.5785 4.08817 12.6943 4.202 12.787 4.356L21.3477 19.144C21.4402 19.298 21.4826 19.4535 21.4747 19.6105C21.4669 19.7675 21.424 19.9133 21.346 20.048C21.2712 20.1837 21.1663 20.2929 21.0313 20.3757C20.8963 20.4586 20.744 20.5 20.5745 20.5H3.4255ZM12 17.8077C12.2288 17.8077 12.4207 17.7303 12.5755 17.5755C12.7303 17.4207 12.8078 17.2288 12.8078 17C12.8078 16.7712 12.7303 16.5793 12.5755 16.4245C12.4207 16.2697 12.2288 16.1923 12 16.1923C11.7712 16.1923 11.5793 16.2697 11.4245 16.4245C11.2697 16.5793 11.1923 16.7712 11.1923 17C11.1923 17.2288 11.2697 17.4207 11.4245 17.5755C11.5793 17.7303 11.7712 17.8077 12 17.8077ZM12.0003 15.1923C12.2129 15.1923 12.391 15.1204 12.5345 14.9768C12.6782 14.8329 12.75 14.6548 12.75 14.4423V10.9423C12.75 10.7298 12.6781 10.5517 12.5342 10.408C12.3904 10.2642 12.2122 10.1923 11.9997 10.1923C11.7871 10.1923 11.609 10.2642 11.4655 10.408C11.3218 10.5517 11.25 10.7298 11.25 10.9423V14.4423C11.25 14.6548 11.3219 14.8329 11.4658 14.9768C11.6096 15.1204 11.7878 15.1923 12.0003 15.1923Z\" />\n </svg>\n)\n\nconst CheckIcon = (props: React.ComponentProps<\"svg\">) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n {...props}\n >\n <path d=\"M10.5808 14.1463L8.25775 11.823C8.11925 11.6847 7.94517 11.6138 7.7355 11.6105C7.526 11.6073 7.34875 11.6782 7.20375 11.823C7.05892 11.968 6.9865 12.1437 6.9865 12.35C6.9865 12.5563 7.05892 12.732 7.20375 12.877L9.948 15.6212C10.1288 15.8019 10.3398 15.8922 10.5808 15.8922C10.8218 15.8922 11.0327 15.8019 11.2135 15.6212L16.777 10.0577C16.9153 9.91925 16.9862 9.74517 16.9895 9.5355C16.9927 9.326 16.9218 9.14875 16.777 9.00375C16.632 8.85892 16.4563 8.7865 16.25 8.7865C16.0437 8.7865 15.868 8.85892 15.723 9.00375L10.5808 14.1463ZM12.0017 21.5C10.6877 21.5 9.45267 21.2507 8.2965 20.752C7.14033 20.2533 6.13467 19.5766 5.2795 18.7218C4.42433 17.8669 3.74725 16.8617 3.24825 15.706C2.74942 14.5503 2.5 13.3156 2.5 12.0017C2.5 10.6877 2.74933 9.45267 3.248 8.2965C3.74667 7.14033 4.42342 6.13467 5.27825 5.2795C6.13308 4.42433 7.13833 3.74725 8.294 3.24825C9.44967 2.74942 10.6844 2.5 11.9982 2.5C13.3122 2.5 14.5473 2.74933 15.7035 3.248C16.8597 3.74667 17.8653 4.42342 18.7205 5.27825C19.5757 6.13308 20.2528 7.13833 20.7518 8.294C21.2506 9.44967 21.5 10.6844 21.5 11.9982C21.5 13.3122 21.2507 14.5473 20.752 15.7035C20.2533 16.8597 19.5766 17.8653 18.7218 18.7205C17.8669 19.5757 16.8617 20.2528 15.706 20.7518C14.5503 21.2506 13.3156 21.5 12.0017 21.5Z\" />\n </svg>\n)\n\nconst ErrorIcon = (props: React.ComponentProps<\"svg\">) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n {...props}\n >\n <path d=\"M12 16.7307C12.2288 16.7307 12.4207 16.6533 12.5755 16.4985C12.7303 16.3437 12.8077 16.1518 12.8077 15.923C12.8077 15.6942 12.7303 15.5023 12.5755 15.3475C12.4207 15.1928 12.2288 15.1155 12 15.1155C11.7712 15.1155 11.5793 15.1928 11.4245 15.3475C11.2697 15.5023 11.1923 15.6942 11.1923 15.923C11.1923 16.1518 11.2697 16.3437 11.4245 16.4985C11.5793 16.6533 11.7712 16.7307 12 16.7307ZM12.0003 13.077C12.2129 13.077 12.391 13.0051 12.5345 12.8613C12.6782 12.7176 12.75 12.5395 12.75 12.327V7.827C12.75 7.6145 12.6781 7.43633 12.5343 7.2925C12.3904 7.14883 12.2122 7.077 11.9997 7.077C11.7871 7.077 11.609 7.14883 11.4655 7.2925C11.3218 7.43633 11.25 7.6145 11.25 7.827V12.327C11.25 12.5395 11.3219 12.7176 11.4658 12.8613C11.6096 13.0051 11.7878 13.077 12.0003 13.077ZM12.0017 21.5C10.6877 21.5 9.45267 21.2507 8.2965 20.752C7.14033 20.2533 6.13467 19.5766 5.2795 18.7218C4.42433 17.8669 3.74725 16.8617 3.24825 15.706C2.74942 14.5503 2.5 13.3156 2.5 12.0017C2.5 10.6877 2.74933 9.45267 3.248 8.2965C3.74667 7.14033 4.42342 6.13467 5.27825 5.2795C6.13308 4.42433 7.13833 3.74725 8.294 3.24825C9.44967 2.74942 10.6844 2.5 11.9982 2.5C13.3122 2.5 14.5473 2.74933 15.7035 3.248C16.8597 3.74667 17.8653 4.42342 18.7205 5.27825C19.5757 6.13308 20.2528 7.13833 20.7518 8.294C21.2506 9.44967 21.5 10.6844 21.5 11.9982C21.5 13.3122 21.2507 14.5473 20.752 15.7035C20.2533 16.8597 19.5766 17.8653 18.7218 18.7205C17.8669 19.5757 16.8617 20.2528 15.706 20.7518C14.5503 21.2506 13.3156 21.5 12.0017 21.5Z\" />\n </svg>\n)\n\nconst useStyles = makeVoltStyles({\n toast: {\n pointerEvents: \"auto\",\n position: \"relative\",\n width: \"100%\",\n display: \"flex\",\n alignItems: \"baseline\",\n ...shorthands.gap(tokens.spacingElement2),\n ...shorthands.padding(tokens.spacingGroup2, tokens.spacingElement3),\n ...shorthands.borderRadius(tokens.radiusXl),\n ...shorthands.borderStyle(\"solid\"),\n ...shorthands.borderWidth(0),\n ...shorthands.borderColor(tokens.grayA6),\n backgroundColor: tokens.body,\n color: tokens.grayA12,\n boxShadow: \"0 4px 6px -1px #0000001a, 0 2px 4px -2px #0000001a\",\n \":focus-visible\": {\n outlineWidth: \"2px\",\n outlineStyle: \"solid\",\n outlineColor: tokens.grayA8,\n },\n },\n default: {\n backgroundColor: tokens.body,\n ...shorthands.borderColor(tokens.grayA6),\n ...shorthands.gap(tokens.spacingElement2),\n color: tokens.grayA12,\n },\n content: {\n display: \"flex\",\n flexDirection: \"column\",\n ...shorthands.gap(\"0.125rem\"),\n },\n title: {\n fontSize: tokens.textSm,\n lineHeight: tokens.leadingSm,\n fontWeight: tokens.fontWeightSemibold,\n ...shorthands.margin(0),\n },\n description: {\n fontSize: tokens.textSm,\n lineHeight: tokens.leadingSm,\n ...shorthands.margin(0),\n },\n icon: {\n alignSelf: \"flex-start\",\n display: \"flex\",\n width: \"1.25rem\",\n height: \"1.25rem\",\n position: \"relative\",\n justifyContent: \"flex-start\",\n alignItems: \"center\",\n flexShrink: 0,\n marginLeft: \"var(--toast-icon-margin-start)\",\n marginRight: \"var(--toast-icon-margin-end)\",\n },\n actionButton: {\n ...shorthands.borderRadius(\"9999px\"),\n flexShrink: 0,\n alignSelf: \"flex-end\",\n cursor: \"pointer\",\n marginLeft: \"auto\",\n marginTop: tokens.spacingGroup2,\n fontSize: tokens.textXs,\n lineHeight: tokens.leadingXs,\n fontWeight: tokens.fontWeightMedium,\n ...shorthands.padding(\"0.3125rem\", tokens.spacingElement2),\n color: tokens.semAccentContrast,\n backgroundColor: tokens.gray12,\n \":hover\": {\n backgroundColor: tokens.gray11,\n },\n \":focus-visible\": {\n outlineWidth: \"2px\",\n outlineStyle: \"solid\",\n outlineOffset: \"2px\",\n outlineColor: tokens.grayA8,\n },\n },\n cancelButton: {\n backgroundColor: tokens.semGraySoft,\n color: tokens.grayA12,\n \":hover\": {\n backgroundColor: tokens.semGraySoftHover,\n },\n fontSize: tokens.textSm,\n lineHeight: tokens.leadingSm,\n fontWeight: tokens.fontWeightMedium,\n ...shorthands.padding(\"0.3125rem\", tokens.spacingElement2),\n ...shorthands.borderRadius(tokens.radiusMd),\n },\n closeButton: {\n position: \"absolute\",\n right: \"0.625rem\",\n top: \"0.625rem\",\n ...shorthands.borderRadius(\"9999px\"),\n color: \"currentColor\",\n cursor: \"pointer\",\n backgroundColor: \"transparent\",\n ...shorthands.border(\"0\"),\n ...shorthands.padding(0),\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n \":focus-visible\": {\n outlineWidth: \"2px\",\n outlineStyle: \"solid\",\n outlineOffset: \"2px\",\n outlineColor: \"inherit\",\n },\n \"& > svg\": {\n width: \"1rem\",\n height: \"1rem\",\n strokeWidth: \"2px\",\n },\n },\n success: {\n ...shorthands.borderColor(tokens.semSuccessUi),\n backgroundColor: tokens.success4,\n color: tokens.successA12,\n \"& [data-icon]\": {\n color: tokens.successA11,\n },\n },\n info: {\n ...shorthands.borderColor(tokens.semInfoUi),\n backgroundColor: tokens.info3,\n color: tokens.infoA12,\n \"& [data-icon]\": {\n color: tokens.infoA11,\n },\n },\n warning: {\n ...shorthands.borderColor(tokens.semWarningUi),\n backgroundColor: tokens.warning3,\n color: tokens.warningA12,\n \"& [data-icon]\": {\n color: tokens.warningA11,\n },\n },\n error: {\n ...shorthands.borderColor(tokens.semErrorUi),\n backgroundColor: tokens.error4,\n color: tokens.errorA12,\n \"& [data-icon]\": {\n color: tokens.errorA11,\n },\n },\n loading: {},\n spinner: {\n width: \"1.125rem\",\n height: \"1.125rem\",\n },\n})\n\nexport type ToasterProps = Sonner.ToasterProps & {\n theme?: \"light\" | \"dark\"\n}\n\nexport const Toaster = React.forwardRef<HTMLElement, ToasterProps>(\n function Toaster({ theme, toastOptions, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <Sonner.Toaster\n ref={ref}\n closeButton={true}\n theme={theme}\n toastOptions={{\n ...toastOptions,\n unstyled: true,\n classNames: {\n toast: styles.toast,\n default: styles.default,\n content: styles.content,\n title: styles.title,\n description: styles.description,\n icon: styles.icon,\n actionButton: styles.actionButton,\n cancelButton: styles.cancelButton,\n closeButton: styles.closeButton,\n success: styles.success,\n info: styles.info,\n warning: styles.warning,\n error: styles.error,\n loading: styles.loading,\n ...toastOptions?.classNames,\n },\n }}\n icons={{\n success: <CheckIcon />,\n info: <InfoIcon />,\n warning: <WarningIcon />,\n error: <ErrorIcon />,\n loading: <Spinner className={styles.spinner} />,\n }}\n {...props}\n />\n )\n }\n)\n\nexport type ToastOptions = Parameters<typeof Sonner.toast>[1]\n\nexport { toast } from \"sonner\"\n"],"names":["InfoIcon","props","jsx","WarningIcon","CheckIcon","ErrorIcon","useStyles","makeVoltStyles","shorthands","tokens.spacingElement2","tokens.spacingGroup2","tokens.spacingElement3","tokens.radiusXl","tokens.grayA6","tokens.body","tokens.grayA12","tokens.grayA8","tokens.textSm","tokens.leadingSm","tokens.fontWeightSemibold","tokens.textXs","tokens.leadingXs","tokens.fontWeightMedium","tokens.semAccentContrast","tokens.gray12","tokens.gray11","tokens.semGraySoft","tokens.semGraySoftHover","tokens.radiusMd","tokens.semSuccessUi","tokens.success4","tokens.successA12","tokens.successA11","tokens.semInfoUi","tokens.info3","tokens.infoA12","tokens.infoA11","tokens.semWarningUi","tokens.warning3","tokens.warningA12","tokens.warningA11","tokens.semErrorUi","tokens.error4","tokens.errorA12","tokens.errorA11","Toaster","React","theme","toastOptions","ref","styles","Sonner.Toaster","Spinner"],"mappings":";;;;;;;;AAQA,MAAMA,IAAW,CAACC,MAChB,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,OAAM;AAAA,IACN,SAAQ;AAAA,IACR,MAAK;AAAA,IACJ,GAAGD;AAAA,IAEJ,UAAA,gBAAAC,EAAC,QAAA,EAAK,GAAE,m8CAAA,CAAm8C;AAAA,EAAA;AAC78C,GAGIC,IAAc,CAACF,MACnB,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,OAAM;AAAA,IACN,SAAQ;AAAA,IACR,MAAK;AAAA,IACJ,GAAGD;AAAA,IAEJ,UAAA,gBAAAC,EAAC,QAAA,EAAK,GAAE,i1CAAA,CAAi1C;AAAA,EAAA;AAC31C,GAGIE,IAAY,CAACH,MACjB,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,OAAM;AAAA,IACN,SAAQ;AAAA,IACR,MAAK;AAAA,IACJ,GAAGD;AAAA,IAEJ,UAAA,gBAAAC,EAAC,QAAA,EAAK,GAAE,4uCAAA,CAA4uC;AAAA,EAAA;AACtvC,GAGIG,IAAY,CAACJ,MACjB,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,OAAM;AAAA,IACN,SAAQ;AAAA,IACR,MAAK;AAAA,IACJ,GAAGD;AAAA,IAEJ,UAAA,gBAAAC,EAAC,QAAA,EAAK,GAAE,s9CAAA,CAAs9C;AAAA,EAAA;AACh+C,GAGII,IAAYC,EAAe;AAAA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EAAO;AAAA,YACpB,SAASA,EAAO;AAAA,YAChB,MAAMA,EAAO;AAAA,YACb,SAASA,EAAO;AAAA,YAChB,OAAOA,EAAO;AAAA,YACd,SAASA,EAAO;AAAA,YAChB,GAAGF,KAAA,gBAAAA,EAAc;AAAA,UAAA;AAAA,QACnB;AAAA,QAEF,OAAO;AAAA,UACL,2BAAU5C,GAAA,EAAU;AAAA,UACpB,wBAAOJ,GAAA,EAAS;AAAA,UAChB,2BAAUG,GAAA,EAAY;AAAA,UACtB,yBAAQE,GAAA,EAAU;AAAA,UAClB,SAAS,gBAAAH,EAACkD,GAAA,EAAQ,WAAWF,EAAO,QAAA,CAAS;AAAA,QAAA;AAAA,QAE9C,GAAGjD;AAAA,MAAA;AAAA,IAAA;AAAA,EAGV;AACF;"}
|
|
1
|
+
{"version":3,"file":"toast.js","sources":["../../../src/components/toast/toast.tsx"],"sourcesContent":["import * as React from \"react\"\nimport * as Sonner from \"sonner\"\nimport { shorthands } from \"@epilot/volt-ui-runtime\"\n\nimport { makeVoltStyles } from \"../../styles/make-styles\"\nimport * as tokens from \"../../tokens\"\nimport { Spinner } from \"../spinner/spinner\"\n\nconst InfoIcon = (props: React.ComponentProps<\"svg\">) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n {...props}\n >\n <path d=\"M12.0003 16.75C12.2129 16.75 12.391 16.6781 12.5345 16.5343C12.6782 16.3906 12.75 16.2125 12.75 16V11.75C12.75 11.5375 12.6781 11.3593 12.5343 11.2155C12.3904 11.0718 12.2122 11 11.9997 11C11.7871 11 11.609 11.0718 11.4655 11.2155C11.3218 11.3593 11.25 11.5375 11.25 11.75V16C11.25 16.2125 11.3219 16.3906 11.4658 16.5343C11.6096 16.6781 11.7878 16.75 12.0003 16.75ZM12 9.2885C12.2288 9.2885 12.4207 9.21108 12.5755 9.05625C12.7303 8.90142 12.8077 8.70958 12.8077 8.48075C12.8077 8.25192 12.7303 8.06008 12.5755 7.90525C12.4207 7.75058 12.2288 7.67325 12 7.67325C11.7712 7.67325 11.5793 7.75058 11.4245 7.90525C11.2697 8.06008 11.1923 8.25192 11.1923 8.48075C11.1923 8.70958 11.2697 8.90142 11.4245 9.05625C11.5793 9.21108 11.7712 9.2885 12 9.2885ZM12.0017 21.5C10.6877 21.5 9.45267 21.2507 8.2965 20.752C7.14033 20.2533 6.13467 19.5766 5.2795 18.7218C4.42433 17.8669 3.74725 16.8617 3.24825 15.706C2.74942 14.5503 2.5 13.3156 2.5 12.0017C2.5 10.6877 2.74933 9.45267 3.248 8.2965C3.74667 7.14033 4.42342 6.13467 5.27825 5.2795C6.13308 4.42433 7.13833 3.74725 8.294 3.24825C9.44967 2.74942 10.6844 2.5 11.9982 2.5C13.3122 2.5 14.5473 2.74933 15.7035 3.248C16.8597 3.74667 17.8653 4.42342 18.7205 5.27825C19.5757 6.13308 20.2528 7.13833 20.7518 8.294C21.2506 9.44967 21.5 10.6844 21.5 11.9982C21.5 13.3122 21.2507 14.5473 20.752 15.7035C20.2533 16.8597 19.5766 17.8653 18.7218 18.7205C17.8669 19.5757 16.8617 20.2528 15.706 20.7518C14.5503 21.2506 13.3156 21.5 12.0017 21.5Z\" />\n </svg>\n)\n\nconst WarningIcon = (props: React.ComponentProps<\"svg\">) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n {...props}\n >\n <path d=\"M3.4255 20.5C3.256 20.5 3.10375 20.4586 2.96875 20.3757C2.83375 20.2929 2.72883 20.1837 2.654 20.048C2.576 19.9133 2.53308 19.7675 2.52525 19.6105C2.51742 19.4535 2.55975 19.298 2.65225 19.144L11.213 4.356C11.3057 4.202 11.4215 4.08817 11.5605 4.0145C11.6997 3.94083 11.8462 3.904 12 3.904C12.1538 3.904 12.3003 3.94083 12.4395 4.0145C12.5785 4.08817 12.6943 4.202 12.787 4.356L21.3477 19.144C21.4402 19.298 21.4826 19.4535 21.4747 19.6105C21.4669 19.7675 21.424 19.9133 21.346 20.048C21.2712 20.1837 21.1663 20.2929 21.0313 20.3757C20.8963 20.4586 20.744 20.5 20.5745 20.5H3.4255ZM12 17.8077C12.2288 17.8077 12.4207 17.7303 12.5755 17.5755C12.7303 17.4207 12.8078 17.2288 12.8078 17C12.8078 16.7712 12.7303 16.5793 12.5755 16.4245C12.4207 16.2697 12.2288 16.1923 12 16.1923C11.7712 16.1923 11.5793 16.2697 11.4245 16.4245C11.2697 16.5793 11.1923 16.7712 11.1923 17C11.1923 17.2288 11.2697 17.4207 11.4245 17.5755C11.5793 17.7303 11.7712 17.8077 12 17.8077ZM12.0003 15.1923C12.2129 15.1923 12.391 15.1204 12.5345 14.9768C12.6782 14.8329 12.75 14.6548 12.75 14.4423V10.9423C12.75 10.7298 12.6781 10.5517 12.5342 10.408C12.3904 10.2642 12.2122 10.1923 11.9997 10.1923C11.7871 10.1923 11.609 10.2642 11.4655 10.408C11.3218 10.5517 11.25 10.7298 11.25 10.9423V14.4423C11.25 14.6548 11.3219 14.8329 11.4658 14.9768C11.6096 15.1204 11.7878 15.1923 12.0003 15.1923Z\" />\n </svg>\n)\n\nconst CheckIcon = (props: React.ComponentProps<\"svg\">) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n {...props}\n >\n <path d=\"M10.5808 14.1463L8.25775 11.823C8.11925 11.6847 7.94517 11.6138 7.7355 11.6105C7.526 11.6073 7.34875 11.6782 7.20375 11.823C7.05892 11.968 6.9865 12.1437 6.9865 12.35C6.9865 12.5563 7.05892 12.732 7.20375 12.877L9.948 15.6212C10.1288 15.8019 10.3398 15.8922 10.5808 15.8922C10.8218 15.8922 11.0327 15.8019 11.2135 15.6212L16.777 10.0577C16.9153 9.91925 16.9862 9.74517 16.9895 9.5355C16.9927 9.326 16.9218 9.14875 16.777 9.00375C16.632 8.85892 16.4563 8.7865 16.25 8.7865C16.0437 8.7865 15.868 8.85892 15.723 9.00375L10.5808 14.1463ZM12.0017 21.5C10.6877 21.5 9.45267 21.2507 8.2965 20.752C7.14033 20.2533 6.13467 19.5766 5.2795 18.7218C4.42433 17.8669 3.74725 16.8617 3.24825 15.706C2.74942 14.5503 2.5 13.3156 2.5 12.0017C2.5 10.6877 2.74933 9.45267 3.248 8.2965C3.74667 7.14033 4.42342 6.13467 5.27825 5.2795C6.13308 4.42433 7.13833 3.74725 8.294 3.24825C9.44967 2.74942 10.6844 2.5 11.9982 2.5C13.3122 2.5 14.5473 2.74933 15.7035 3.248C16.8597 3.74667 17.8653 4.42342 18.7205 5.27825C19.5757 6.13308 20.2528 7.13833 20.7518 8.294C21.2506 9.44967 21.5 10.6844 21.5 11.9982C21.5 13.3122 21.2507 14.5473 20.752 15.7035C20.2533 16.8597 19.5766 17.8653 18.7218 18.7205C17.8669 19.5757 16.8617 20.2528 15.706 20.7518C14.5503 21.2506 13.3156 21.5 12.0017 21.5Z\" />\n </svg>\n)\n\nconst ErrorIcon = (props: React.ComponentProps<\"svg\">) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n {...props}\n >\n <path d=\"M12 16.7307C12.2288 16.7307 12.4207 16.6533 12.5755 16.4985C12.7303 16.3437 12.8077 16.1518 12.8077 15.923C12.8077 15.6942 12.7303 15.5023 12.5755 15.3475C12.4207 15.1928 12.2288 15.1155 12 15.1155C11.7712 15.1155 11.5793 15.1928 11.4245 15.3475C11.2697 15.5023 11.1923 15.6942 11.1923 15.923C11.1923 16.1518 11.2697 16.3437 11.4245 16.4985C11.5793 16.6533 11.7712 16.7307 12 16.7307ZM12.0003 13.077C12.2129 13.077 12.391 13.0051 12.5345 12.8613C12.6782 12.7176 12.75 12.5395 12.75 12.327V7.827C12.75 7.6145 12.6781 7.43633 12.5343 7.2925C12.3904 7.14883 12.2122 7.077 11.9997 7.077C11.7871 7.077 11.609 7.14883 11.4655 7.2925C11.3218 7.43633 11.25 7.6145 11.25 7.827V12.327C11.25 12.5395 11.3219 12.7176 11.4658 12.8613C11.6096 13.0051 11.7878 13.077 12.0003 13.077ZM12.0017 21.5C10.6877 21.5 9.45267 21.2507 8.2965 20.752C7.14033 20.2533 6.13467 19.5766 5.2795 18.7218C4.42433 17.8669 3.74725 16.8617 3.24825 15.706C2.74942 14.5503 2.5 13.3156 2.5 12.0017C2.5 10.6877 2.74933 9.45267 3.248 8.2965C3.74667 7.14033 4.42342 6.13467 5.27825 5.2795C6.13308 4.42433 7.13833 3.74725 8.294 3.24825C9.44967 2.74942 10.6844 2.5 11.9982 2.5C13.3122 2.5 14.5473 2.74933 15.7035 3.248C16.8597 3.74667 17.8653 4.42342 18.7205 5.27825C19.5757 6.13308 20.2528 7.13833 20.7518 8.294C21.2506 9.44967 21.5 10.6844 21.5 11.9982C21.5 13.3122 21.2507 14.5473 20.752 15.7035C20.2533 16.8597 19.5766 17.8653 18.7218 18.7205C17.8669 19.5757 16.8617 20.2528 15.706 20.7518C14.5503 21.2506 13.3156 21.5 12.0017 21.5Z\" />\n </svg>\n)\n\nconst useStyles = makeVoltStyles({\n toast: {\n pointerEvents: \"auto\",\n position: \"relative\",\n width: \"100%\",\n display: \"flex\",\n alignItems: \"baseline\",\n ...shorthands.gap(tokens.spacingElement2),\n ...shorthands.padding(tokens.spacingGroup2, tokens.spacingElement3),\n ...shorthands.borderRadius(tokens.radiusXl),\n ...shorthands.borderStyle(\"solid\"),\n ...shorthands.borderWidth(0),\n ...shorthands.borderColor(tokens.grayA6),\n backgroundColor: tokens.body,\n color: tokens.grayA12,\n boxShadow: \"0 4px 6px -1px #0000001a, 0 2px 4px -2px #0000001a\",\n \":focus-visible\": {\n outlineWidth: \"2px\",\n outlineStyle: \"solid\",\n outlineColor: tokens.grayA8,\n },\n },\n default: {\n backgroundColor: tokens.body,\n ...shorthands.borderColor(tokens.grayA6),\n ...shorthands.gap(tokens.spacingElement2),\n color: tokens.grayA12,\n },\n content: {\n display: \"flex\",\n flexDirection: \"column\",\n ...shorthands.gap(\"0.125rem\"),\n },\n title: {\n fontSize: tokens.textSm,\n lineHeight: tokens.leadingSm,\n fontWeight: tokens.fontWeightSemibold,\n ...shorthands.margin(0),\n },\n description: {\n fontSize: tokens.textSm,\n lineHeight: tokens.leadingSm,\n ...shorthands.margin(0),\n },\n icon: {\n alignSelf: \"flex-start\",\n display: \"flex\",\n width: \"1.25rem\",\n height: \"1.25rem\",\n position: \"relative\",\n justifyContent: \"flex-start\",\n alignItems: \"center\",\n flexShrink: 0,\n marginLeft: \"var(--toast-icon-margin-start)\",\n marginRight: \"var(--toast-icon-margin-end)\",\n },\n actionButton: {\n ...shorthands.borderRadius(\"9999px\"),\n flexShrink: 0,\n alignSelf: \"flex-end\",\n cursor: \"pointer\",\n marginLeft: \"auto\",\n marginTop: tokens.spacingGroup2,\n fontSize: tokens.textXs,\n lineHeight: tokens.leadingXs,\n fontWeight: tokens.fontWeightMedium,\n ...shorthands.padding(\"0.3125rem\", tokens.spacingElement2),\n color: tokens.semAccentContrast,\n backgroundColor: tokens.gray12,\n \":hover\": {\n backgroundColor: tokens.gray11,\n },\n \":focus-visible\": {\n outlineWidth: \"2px\",\n outlineStyle: \"solid\",\n outlineOffset: \"2px\",\n outlineColor: tokens.grayA8,\n },\n },\n cancelButton: {\n backgroundColor: tokens.semGraySoft,\n color: tokens.grayA12,\n \":hover\": {\n backgroundColor: tokens.semGraySoftHover,\n },\n fontSize: tokens.textSm,\n lineHeight: tokens.leadingSm,\n fontWeight: tokens.fontWeightMedium,\n ...shorthands.padding(\"0.3125rem\", tokens.spacingElement2),\n ...shorthands.borderRadius(tokens.radiusMd),\n },\n closeButton: {\n position: \"absolute\",\n right: \"0.625rem\",\n top: \"0.625rem\",\n ...shorthands.borderRadius(\"9999px\"),\n color: \"currentColor\",\n cursor: \"pointer\",\n backgroundColor: \"transparent\",\n ...shorthands.border(\"0\"),\n ...shorthands.padding(0),\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n \":focus-visible\": {\n outlineWidth: \"2px\",\n outlineStyle: \"solid\",\n outlineOffset: \"2px\",\n outlineColor: \"inherit\",\n },\n \"& > svg\": {\n width: \"1rem\",\n height: \"1rem\",\n strokeWidth: \"2px\",\n },\n },\n success: {\n ...shorthands.borderColor(tokens.semSuccessUi),\n backgroundColor: tokens.success4,\n color: tokens.successA12,\n \"& [data-icon]\": {\n color: tokens.successA11,\n },\n },\n info: {\n ...shorthands.borderColor(tokens.semInfoUi),\n backgroundColor: tokens.info3,\n color: tokens.infoA12,\n \"& [data-icon]\": {\n color: tokens.infoA11,\n },\n },\n warning: {\n ...shorthands.borderColor(tokens.semWarningUi),\n backgroundColor: tokens.warning3,\n color: tokens.warningA12,\n \"& [data-icon]\": {\n color: tokens.warningA11,\n },\n },\n error: {\n ...shorthands.borderColor(tokens.semErrorUi),\n backgroundColor: tokens.error4,\n color: tokens.errorA12,\n \"& [data-icon]\": {\n color: tokens.errorA11,\n },\n },\n loading: {},\n spinner: {\n width: \"1.125rem\",\n height: \"1.125rem\",\n },\n})\n\nexport type ToasterProps = Sonner.ToasterProps & {\n theme?: \"light\" | \"dark\"\n}\n\nexport const Toaster = React.forwardRef<HTMLElement, ToasterProps>(\n function Toaster({ theme, toastOptions, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <Sonner.Toaster\n ref={ref}\n closeButton={true}\n theme={theme}\n toastOptions={{\n ...toastOptions,\n unstyled: true,\n classNames: {\n toast: styles.toast,\n default: styles.default,\n content: styles.content,\n title: styles.title,\n description: styles.description,\n icon: styles.icon,\n actionButton: styles.actionButton,\n cancelButton: styles.cancelButton,\n closeButton: styles.closeButton,\n success: styles.success,\n info: styles.info,\n warning: styles.warning,\n error: styles.error,\n loading: styles.loading,\n ...toastOptions?.classNames,\n },\n }}\n icons={{\n success: <CheckIcon />,\n info: <InfoIcon />,\n warning: <WarningIcon />,\n error: <ErrorIcon />,\n loading: <Spinner className={styles.spinner} />,\n }}\n {...props}\n />\n )\n }\n)\n\nexport type ToastOptions = Parameters<typeof Sonner.toast>[1]\n\nexport { toast } from \"sonner\"\n"],"names":["InfoIcon","props","jsxDEV","this","WarningIcon","CheckIcon","ErrorIcon","useStyles","makeVoltStyles","shorthands","tokens.spacingElement2","tokens.spacingGroup2","tokens.spacingElement3","tokens.radiusXl","tokens.grayA6","tokens.body","tokens.grayA12","tokens.grayA8","tokens.textSm","tokens.leadingSm","tokens.fontWeightSemibold","tokens.textXs","tokens.leadingXs","tokens.fontWeightMedium","tokens.semAccentContrast","tokens.gray12","tokens.gray11","tokens.semGraySoft","tokens.semGraySoftHover","tokens.radiusMd","tokens.semSuccessUi","tokens.success4","tokens.successA12","tokens.successA11","tokens.semInfoUi","tokens.info3","tokens.infoA12","tokens.infoA11","tokens.semWarningUi","tokens.warning3","tokens.warningA12","tokens.warningA11","tokens.semErrorUi","tokens.error4","tokens.errorA12","tokens.errorA11","Toaster","React","theme","toastOptions","ref","styles","Sonner.Toaster","Spinner"],"mappings":";;;;;;;;AAQA,MAAMA,IAAW,CAACC,MAChBC,gBAAAA,EAAAA;AAAAA,EAAC;AAAA,EAAA;AAAA,IACC,OAAM;AAAA,IACN,SAAQ;AAAA,IACR,MAAK;AAAA,IACJ,GAAGD;AAAA,IAEJ,UAAAC,gBAAAA,EAAAA,OAAC,QAAA,EAAK,GAAE,m8CAAA,GAAR,QAAA,IAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAA,GAAAC,MAA28C;AAAA,EAAA;AAAA,EAN78C;AAAA,EAAA;AAAA,EAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA;AAAA,EAAAA;AAOA,GAGIC,IAAc,CAACH,MACnBC,gBAAAA,EAAAA;AAAAA,EAAC;AAAA,EAAA;AAAA,IACC,OAAM;AAAA,IACN,SAAQ;AAAA,IACR,MAAK;AAAA,IACJ,GAAGD;AAAA,IAEJ,UAAAC,g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YAChB,MAAMA,EAAO;AAAA,YACb,SAASA,EAAO;AAAA,YAChB,OAAOA,EAAO;AAAA,YACd,SAASA,EAAO;AAAA,YAChB,GAAGF,KAAA,gBAAAA,EAAc;AAAA,UAAA;AAAA,QACnB;AAAA,QAEF,OAAO;AAAA,UACL,kCAAU5C,GAAA,CAAA,GAAD,QAAA,IAAA;AAAA,YAAA,UAAA;AAAA,YAAA,YAAA;AAAA,YAAA,cAAA;AAAA,UAAA,GAAA,IAAW;AAAA,UACpB,+BAAOL,GAAA,CAAA,GAAD,QAAA,IAAA;AAAA,YAAA,UAAA;AAAA,YAAA,YAAA;AAAA,YAAA,cAAA;AAAA,UAAA,GAAA,IAAU;AAAA,UAChB,kCAAUI,GAAA,CAAA,GAAD,QAAA,IAAA;AAAA,YAAA,UAAA;AAAA,YAAA,YAAA;AAAA,YAAA,cAAA;AAAA,UAAA,GAAA,IAAa;AAAA,UACtB,gCAAQE,GAAA,CAAA,GAAD,QAAA,IAAA;AAAA,YAAA,UAAA;AAAA,YAAA,YAAA;AAAA,YAAA,cAAA;AAAA,UAAA,GAAA,IAAW;AAAA,UAClB,SAASJ,gBAAAA,EAAAA,OAACmD,GAAA,EAAQ,WAAWF,EAAO,QAAA,GAA3B,QAAA,IAAA;AAAA,YAAA,UAAA;AAAA,YAAA,YAAA;AAAA,YAAA,cAAA;AAAA,UAAA,GAAA,IAAoC;AAAA,QAAA;AAAA,QAE9C,GAAGlD;AAAA,MAAA;AAAA,MAhCN;AAAA,MAAA;AAAA,MAAA;AAAA,QAAA,UAAA;AAAA,QAAA,YAAA;AAAA,QAAA,cAAA;AAAA,MAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAmCJ;AACF;"}
|
|
@@ -1,49 +1,65 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { j as l } from "../../vendor/react/jsx-dev-runtime.js";
|
|
2
2
|
import * as m from "react";
|
|
3
|
-
import { Root as
|
|
4
|
-
import { shorthands as
|
|
3
|
+
import { Root as u, Item as n } from "../../vendor/@radix-ui/react-toggle-group/dist/index.js";
|
|
4
|
+
import { shorthands as f } from "../../packages/volt-runtime/dist/vendor/@griffel/core/src/index.js";
|
|
5
5
|
import { SLOT_ATTR as a } from "../../packages/volt-runtime/dist/renderer/contract.js";
|
|
6
|
-
import { mergeClasses as
|
|
6
|
+
import { mergeClasses as g } from "../../packages/volt-runtime/dist/vendor/@griffel/core/src/mergeClasses.js";
|
|
7
7
|
import { makeVoltStyles as c } from "../../styles/make-styles.js";
|
|
8
|
-
import { spacingElement1 as
|
|
8
|
+
import { spacingElement1 as x } from "../../tokens/index.js";
|
|
9
9
|
import { useToggleStyles as d } from "./toggle.js";
|
|
10
|
-
const
|
|
10
|
+
const T = c({
|
|
11
11
|
group: {
|
|
12
12
|
display: "flex",
|
|
13
|
-
...
|
|
13
|
+
...f.gap(x)
|
|
14
14
|
}
|
|
15
|
-
}),
|
|
16
|
-
const
|
|
17
|
-
return /* @__PURE__ */
|
|
18
|
-
|
|
15
|
+
}), w = m.forwardRef(function({ className: o, ...e }, r) {
|
|
16
|
+
const t = T();
|
|
17
|
+
return /* @__PURE__ */ l.jsxDEV(
|
|
18
|
+
u,
|
|
19
19
|
{
|
|
20
20
|
ref: r,
|
|
21
21
|
"data-slot": "toggle-group",
|
|
22
22
|
[a]: "toggle-group",
|
|
23
|
-
className:
|
|
24
|
-
...
|
|
25
|
-
}
|
|
23
|
+
className: g(t.group, o),
|
|
24
|
+
...e
|
|
25
|
+
},
|
|
26
|
+
void 0,
|
|
27
|
+
!1,
|
|
28
|
+
{
|
|
29
|
+
fileName: "/Users/wilianmolinari/repos/volt-ui-rollout/release/packages/experimental-griffel/src/components/toggle/toggle-group.tsx",
|
|
30
|
+
lineNumber: 28,
|
|
31
|
+
columnNumber: 5
|
|
32
|
+
},
|
|
33
|
+
this
|
|
26
34
|
);
|
|
27
|
-
}),
|
|
35
|
+
}), E = m.forwardRef(function({ className: o, variant: e = "default", size: r = "base", ...t }, p) {
|
|
28
36
|
const s = d();
|
|
29
|
-
return /* @__PURE__ */
|
|
30
|
-
|
|
37
|
+
return /* @__PURE__ */ l.jsxDEV(
|
|
38
|
+
n,
|
|
31
39
|
{
|
|
32
|
-
ref:
|
|
40
|
+
ref: p,
|
|
33
41
|
"data-slot": "toggle-group-item",
|
|
34
42
|
[a]: "toggle-group-item",
|
|
35
|
-
className:
|
|
43
|
+
className: g(
|
|
36
44
|
s.root,
|
|
37
|
-
s[
|
|
45
|
+
s[e],
|
|
38
46
|
s[r],
|
|
39
47
|
o
|
|
40
48
|
),
|
|
41
|
-
...
|
|
42
|
-
}
|
|
49
|
+
...t
|
|
50
|
+
},
|
|
51
|
+
void 0,
|
|
52
|
+
!1,
|
|
53
|
+
{
|
|
54
|
+
fileName: "/Users/wilianmolinari/repos/volt-ui-rollout/release/packages/experimental-griffel/src/components/toggle/toggle-group.tsx",
|
|
55
|
+
lineNumber: 55,
|
|
56
|
+
columnNumber: 5
|
|
57
|
+
},
|
|
58
|
+
this
|
|
43
59
|
);
|
|
44
60
|
});
|
|
45
61
|
export {
|
|
46
|
-
|
|
47
|
-
|
|
62
|
+
w as ToggleGroup,
|
|
63
|
+
E as ToggleGroupItem
|
|
48
64
|
};
|
|
49
65
|
//# sourceMappingURL=toggle-group.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-group.js","sources":["../../../src/components/toggle/toggle-group.tsx"],"sourcesContent":["import * as React from \"react\"\nimport * as ToggleGroupPrimitive from \"@radix-ui/react-toggle-group\"\nimport { mergeClasses, shorthands } from \"@epilot/volt-ui-runtime\"\n\nimport { SLOT_ATTR } from \"../../renderer/contract\"\nimport { makeVoltStyles } from \"../../styles/make-styles\"\nimport * as tokens from \"../../tokens\"\nimport { useToggleStyles, type ToggleVariant, type ToggleSize } from \"./toggle\"\n\nconst useToggleGroupStyles = makeVoltStyles({\n group: {\n display: \"flex\",\n ...shorthands.gap(tokens.spacingElement1),\n },\n})\n\nexport type ToggleGroupProps = React.ComponentProps<\n typeof ToggleGroupPrimitive.Root\n>\n\nexport const ToggleGroup = React.forwardRef<\n React.ComponentRef<typeof ToggleGroupPrimitive.Root>,\n ToggleGroupProps\n>(function ToggleGroup({ className, ...props }, ref) {\n const styles = useToggleGroupStyles()\n\n return (\n <ToggleGroupPrimitive.Root\n ref={ref}\n data-slot=\"toggle-group\"\n {...{ [SLOT_ATTR]: \"toggle-group\" }}\n className={mergeClasses(styles.group, className)}\n {...props}\n />\n )\n})\n\nexport type ToggleGroupItemProps = React.ComponentProps<\n typeof ToggleGroupPrimitive.Item\n> & {\n variant?: ToggleVariant\n size?: ToggleSize\n}\n\nexport const ToggleGroupItem = React.forwardRef<\n React.ComponentRef<typeof ToggleGroupPrimitive.Item>,\n ToggleGroupItemProps\n>(function ToggleGroupItem(\n { className, variant = \"default\", size = \"base\", ...props },\n ref\n) {\n const styles = useToggleStyles()\n\n return (\n <ToggleGroupPrimitive.Item\n ref={ref}\n data-slot=\"toggle-group-item\"\n {...{ [SLOT_ATTR]: \"toggle-group-item\" }}\n className={mergeClasses(\n styles.root,\n styles[variant],\n styles[size],\n className\n )}\n {...props}\n />\n )\n})\n"],"names":["useToggleGroupStyles","makeVoltStyles","shorthands","tokens.spacingElement1","ToggleGroup","React","className","props","ref","styles","
|
|
1
|
+
{"version":3,"file":"toggle-group.js","sources":["../../../src/components/toggle/toggle-group.tsx"],"sourcesContent":["import * as React from \"react\"\nimport * as ToggleGroupPrimitive from \"@radix-ui/react-toggle-group\"\nimport { mergeClasses, shorthands } from \"@epilot/volt-ui-runtime\"\n\nimport { SLOT_ATTR } from \"../../renderer/contract\"\nimport { makeVoltStyles } from \"../../styles/make-styles\"\nimport * as tokens from \"../../tokens\"\nimport { useToggleStyles, type ToggleVariant, type ToggleSize } from \"./toggle\"\n\nconst useToggleGroupStyles = makeVoltStyles({\n group: {\n display: \"flex\",\n ...shorthands.gap(tokens.spacingElement1),\n },\n})\n\nexport type ToggleGroupProps = React.ComponentProps<\n typeof ToggleGroupPrimitive.Root\n>\n\nexport const ToggleGroup = React.forwardRef<\n React.ComponentRef<typeof ToggleGroupPrimitive.Root>,\n ToggleGroupProps\n>(function ToggleGroup({ className, ...props }, ref) {\n const styles = useToggleGroupStyles()\n\n return (\n <ToggleGroupPrimitive.Root\n ref={ref}\n data-slot=\"toggle-group\"\n {...{ [SLOT_ATTR]: \"toggle-group\" }}\n className={mergeClasses(styles.group, className)}\n {...props}\n />\n )\n})\n\nexport type ToggleGroupItemProps = React.ComponentProps<\n typeof ToggleGroupPrimitive.Item\n> & {\n variant?: ToggleVariant\n size?: ToggleSize\n}\n\nexport const ToggleGroupItem = React.forwardRef<\n React.ComponentRef<typeof ToggleGroupPrimitive.Item>,\n ToggleGroupItemProps\n>(function ToggleGroupItem(\n { className, variant = \"default\", size = \"base\", ...props },\n ref\n) {\n const styles = useToggleStyles()\n\n return (\n <ToggleGroupPrimitive.Item\n ref={ref}\n data-slot=\"toggle-group-item\"\n {...{ [SLOT_ATTR]: \"toggle-group-item\" }}\n className={mergeClasses(\n styles.root,\n styles[variant],\n styles[size],\n className\n )}\n {...props}\n />\n )\n})\n"],"names":["useToggleGroupStyles","makeVoltStyles","shorthands","tokens.spacingElement1","ToggleGroup","React","className","props","ref","styles","jsxDEV","ToggleGroupPrimitive.Root","SLOT_ATTR","mergeClasses","ToggleGroupItem","variant","size","useToggleStyles","ToggleGroupPrimitive.Item"],"mappings":";;;;;;;;;AASA,MAAMA,IAAuBC,EAAe;AAAA,EAC1C,OAAO;AAAA,IACL,SAAS;AAAA,IACT,GAAGC,EAAW,IAAIC,CAAsB;AAAA,EAAA;AAE5C,CAAC,GAMYC,IAAcC,EAAM,WAG/B,SAAqB,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,GAAK;AACnD,QAAMC,IAAST,EAAA;AAEf,SACEU,gBAAAA,EAAAA;AAAAA,IAACC;AAAAA,IAAA;AAAA,MACC,KAAAH;AAAA,MACA,aAAU;AAAA,MACJ,CAACI,CAAS,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