@epilot/spark-ui 0.28.2 → 0.30.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/calendar-lists-CTby2kR5.d.cts +27 -0
- package/dist/calendar-lists-DoloqsCN.d.ts +27 -0
- package/dist/components/accordion.cjs +1 -1
- package/dist/components/accordion.js +1 -1
- package/dist/components/attachment.cjs +1 -1
- package/dist/components/attachment.js +1 -1
- package/dist/components/autocomplete.cjs +1 -0
- package/dist/components/autocomplete.cjs.map +1 -1
- package/dist/components/autocomplete.js +1 -0
- package/dist/components/autocomplete.js.map +1 -1
- package/dist/components/avatar.d.cts +1 -1
- package/dist/components/avatar.d.ts +1 -1
- package/dist/components/badge.cjs +1 -1
- package/dist/components/badge.d.cts +1 -1
- package/dist/components/badge.d.ts +1 -1
- package/dist/components/badge.js +1 -1
- package/dist/components/banner.cjs +1 -1
- package/dist/components/banner.d.cts +1 -1
- package/dist/components/banner.js +1 -1
- package/dist/components/box.d.cts +1 -1
- package/dist/components/box.d.ts +1 -1
- package/dist/components/box.js +1 -1
- package/dist/components/breadcrumbs.cjs +1 -1
- package/dist/components/breadcrumbs.js +1 -1
- package/dist/components/bubble.cjs +1 -1
- package/dist/components/bubble.d.cts +1 -1
- package/dist/components/bubble.d.ts +1 -1
- package/dist/components/bubble.js +1 -1
- package/dist/components/button-group.cjs +1 -1
- package/dist/components/button-group.d.cts +1 -1
- package/dist/components/button-group.d.ts +1 -1
- package/dist/components/button-group.js +1 -1
- package/dist/components/button.cjs +17 -17
- package/dist/components/button.cjs.map +1 -1
- package/dist/components/button.d.cts +3 -3
- package/dist/components/button.d.ts +3 -3
- package/dist/components/button.js +17 -17
- package/dist/components/button.js.map +1 -1
- package/dist/components/calendar.cjs +23 -4
- package/dist/components/calendar.cjs.map +1 -1
- package/dist/components/calendar.d.cts +11 -2
- package/dist/components/calendar.d.ts +11 -2
- package/dist/components/calendar.js +23 -4
- package/dist/components/calendar.js.map +1 -1
- package/dist/components/callout.cjs +1 -1
- package/dist/components/callout.d.cts +1 -1
- package/dist/components/callout.d.ts +1 -1
- package/dist/components/callout.js +1 -1
- package/dist/components/card.cjs +1 -1
- package/dist/components/card.d.cts +1 -1
- package/dist/components/card.d.ts +1 -1
- package/dist/components/card.js +2 -2
- package/dist/components/checkbox-group.d.cts +1 -1
- package/dist/components/checkbox-group.d.ts +1 -1
- package/dist/components/checkbox.d.cts +1 -1
- package/dist/components/checkbox.d.ts +1 -1
- package/dist/components/combobox.cjs +45 -15
- package/dist/components/combobox.cjs.map +1 -1
- package/dist/components/combobox.d.cts +3 -1
- package/dist/components/combobox.d.ts +3 -1
- package/dist/components/combobox.js +46 -16
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/drawer.cjs +1 -1
- package/dist/components/drawer.js +1 -1
- package/dist/components/empty-state.cjs +1 -1
- package/dist/components/empty-state.js +1 -1
- package/dist/components/entity-card.cjs +1 -1
- package/dist/components/entity-card.js +1 -1
- package/dist/components/field.cjs +58 -17
- package/dist/components/field.cjs.map +1 -1
- package/dist/components/field.d.cts +8 -4
- package/dist/components/field.d.ts +8 -4
- package/dist/components/field.js +58 -17
- package/dist/components/field.js.map +1 -1
- package/dist/components/hero-metric.cjs +1 -1
- package/dist/components/hero-metric.js +1 -1
- package/dist/components/info-block.cjs +1 -1
- package/dist/components/info-block.js +1 -1
- package/dist/components/input-date-time.cjs +212 -0
- package/dist/components/input-date-time.cjs.map +1 -0
- package/dist/components/input-date-time.d.cts +38 -0
- package/dist/components/input-date-time.d.ts +38 -0
- package/dist/components/input-date-time.js +205 -0
- package/dist/components/input-date-time.js.map +1 -0
- package/dist/components/input-group.cjs +72 -4
- package/dist/components/input-group.cjs.map +1 -1
- package/dist/components/input-group.d.cts +6 -1
- package/dist/components/input-group.d.ts +6 -1
- package/dist/components/input-group.js +72 -5
- package/dist/components/input-group.js.map +1 -1
- package/dist/components/input-otp.cjs +1 -1
- package/dist/components/input-otp.js +1 -1
- package/dist/components/input.cjs +7 -4
- package/dist/components/input.cjs.map +1 -1
- package/dist/components/input.d.cts +1 -1
- package/dist/components/input.d.ts +1 -1
- package/dist/components/input.js +8 -5
- package/dist/components/input.js.map +1 -1
- package/dist/components/list.cjs +1 -1
- package/dist/components/list.d.cts +1 -1
- package/dist/components/list.d.ts +1 -1
- package/dist/components/list.js +1 -1
- package/dist/components/marker.cjs +1 -1
- package/dist/components/marker.d.cts +1 -1
- package/dist/components/marker.d.ts +1 -1
- package/dist/components/marker.js +1 -1
- package/dist/components/message-scroller.cjs +1 -1
- package/dist/components/message-scroller.js +1 -1
- package/dist/components/page-header.cjs +1 -1
- package/dist/components/page-header.js +1 -1
- package/dist/components/pill.d.cts +1 -1
- package/dist/components/pill.d.ts +1 -1
- package/dist/components/popover.cjs +1 -1
- package/dist/components/popover.js +1 -1
- package/dist/components/radio.d.cts +1 -1
- package/dist/components/radio.d.ts +1 -1
- package/dist/components/segmented-control.d.cts +1 -1
- package/dist/components/segmented-control.d.ts +1 -1
- package/dist/components/select.cjs +4 -2
- package/dist/components/select.cjs.map +1 -1
- package/dist/components/select.d.cts +1 -1
- package/dist/components/select.d.ts +1 -1
- package/dist/components/select.js +4 -2
- package/dist/components/select.js.map +1 -1
- package/dist/components/separator.cjs +15 -18
- package/dist/components/separator.cjs.map +1 -1
- package/dist/components/separator.d.cts +3 -0
- package/dist/components/separator.d.ts +3 -0
- package/dist/components/separator.js +16 -19
- package/dist/components/separator.js.map +1 -1
- package/dist/components/skeleton.cjs +20 -5
- package/dist/components/skeleton.cjs.map +1 -1
- package/dist/components/skeleton.d.cts +9 -5
- package/dist/components/skeleton.d.ts +9 -5
- package/dist/components/skeleton.js +19 -6
- package/dist/components/skeleton.js.map +1 -1
- package/dist/components/spinner.cjs +8 -81
- package/dist/components/spinner.cjs.map +1 -1
- package/dist/components/spinner.js +8 -81
- package/dist/components/spinner.js.map +1 -1
- package/dist/components/switch-group.d.cts +1 -1
- package/dist/components/switch-group.d.ts +1 -1
- package/dist/components/switch.d.cts +1 -1
- package/dist/components/switch.d.ts +1 -1
- package/dist/components/textarea.cjs +7 -4
- package/dist/components/textarea.cjs.map +1 -1
- package/dist/components/textarea.d.cts +1 -1
- package/dist/components/textarea.d.ts +1 -1
- package/dist/components/textarea.js +7 -4
- package/dist/components/textarea.js.map +1 -1
- package/dist/components/theme.cjs +1 -1
- package/dist/components/theme.d.cts +1 -1
- package/dist/components/theme.d.ts +1 -1
- package/dist/components/theme.js +1 -1
- package/dist/components/toggle-group.d.cts +1 -1
- package/dist/components/toggle-group.d.ts +1 -1
- package/dist/components/toggle.cjs +1 -1
- package/dist/components/toggle.d.cts +1 -1
- package/dist/components/toggle.d.ts +1 -1
- package/dist/components/toggle.js +1 -1
- package/dist/components/tooltip.cjs +29 -25
- package/dist/components/tooltip.cjs.map +1 -1
- package/dist/components/tooltip.d.cts +4 -2
- package/dist/components/tooltip.d.ts +4 -2
- package/dist/components/tooltip.js +29 -25
- package/dist/components/tooltip.js.map +1 -1
- package/dist/lib/accent-theme.cjs +75 -17
- package/dist/lib/accent-theme.cjs.map +1 -1
- package/dist/lib/accent-theme.d.cts +15 -2
- package/dist/lib/accent-theme.d.ts +15 -2
- package/dist/lib/accent-theme.js +74 -18
- package/dist/lib/accent-theme.js.map +1 -1
- package/dist/lib/calendar-lists.cjs +222 -0
- package/dist/lib/calendar-lists.cjs.map +1 -0
- package/dist/lib/calendar-lists.d.cts +4 -0
- package/dist/lib/calendar-lists.d.ts +4 -0
- package/dist/lib/calendar-lists.js +217 -0
- package/dist/lib/calendar-lists.js.map +1 -0
- package/dist/lib/container-chrome.d.cts +1 -1
- package/dist/lib/container-chrome.d.ts +1 -1
- package/dist/lib/control-glyphs.cjs +37 -0
- package/dist/lib/control-glyphs.cjs.map +1 -0
- package/dist/lib/control-glyphs.d.cts +11 -0
- package/dist/lib/control-glyphs.d.ts +11 -0
- package/dist/lib/control-glyphs.js +35 -0
- package/dist/lib/control-glyphs.js.map +1 -0
- package/dist/lib/date-time-mask.cjs +155 -0
- package/dist/lib/date-time-mask.cjs.map +1 -0
- package/dist/lib/date-time-mask.d.cts +56 -0
- package/dist/lib/date-time-mask.d.ts +56 -0
- package/dist/lib/date-time-mask.js +147 -0
- package/dist/lib/date-time-mask.js.map +1 -0
- package/dist/lib/input-box-variants.cjs +11 -0
- package/dist/lib/input-box-variants.cjs.map +1 -1
- package/dist/lib/input-box-variants.d.cts +6 -2
- package/dist/lib/input-box-variants.d.ts +6 -2
- package/dist/lib/input-box-variants.js +8 -1
- package/dist/lib/input-box-variants.js.map +1 -1
- package/dist/lib/input-date-parts.cjs +154 -0
- package/dist/lib/input-date-parts.cjs.map +1 -0
- package/dist/lib/input-date-parts.d.cts +53 -0
- package/dist/lib/input-date-parts.d.ts +53 -0
- package/dist/lib/input-date-parts.js +147 -0
- package/dist/lib/input-date-parts.js.map +1 -0
- package/dist/lib/selection-list.d.cts +1 -1
- package/dist/lib/selection-list.d.ts +1 -1
- package/dist/lib/theme-types.cjs.map +1 -1
- package/dist/lib/theme-types.d.cts +1 -1
- package/dist/lib/theme-types.d.ts +1 -1
- package/dist/lib/theme-types.js.map +1 -1
- package/dist/lib/toggle-group-context.d.cts +1 -1
- package/dist/lib/toggle-group-context.d.ts +1 -1
- package/dist/styles/spark-default.css +369 -25
- package/dist/styles/theme.css +18 -98
- package/dist/{theme-types-Dlge0s3s.d.ts → theme-types-CHl-L2F-.d.cts} +2 -2
- package/dist/{theme-types-Dlge0s3s.d.cts → theme-types-CHl-L2F-.d.ts} +2 -2
- package/package.json +3 -2
|
@@ -18,90 +18,17 @@ const Spinner = React$1.forwardRef(({ className, size = "default", label = "Load
|
|
|
18
18
|
className: "sr-only",
|
|
19
19
|
children: label
|
|
20
20
|
}), /* @__PURE__ */ jsxs("svg", {
|
|
21
|
-
className: "size-full animate-
|
|
21
|
+
className: "size-full animate-spin [animation-duration:.65s] motion-reduce:animate-none",
|
|
22
22
|
fill: "none",
|
|
23
23
|
viewBox: "0 0 24 24",
|
|
24
24
|
xmlns: "http://www.w3.org/2000/svg",
|
|
25
|
-
children: [/* @__PURE__ */
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
r: "9.5",
|
|
33
|
-
stroke: "currentColor",
|
|
34
|
-
strokeWidth: "3",
|
|
35
|
-
strokeLinecap: "round",
|
|
36
|
-
strokeDasharray: "3.75 200",
|
|
37
|
-
strokeDashoffset: "0",
|
|
38
|
-
opacity: ".12"
|
|
39
|
-
}),
|
|
40
|
-
/* @__PURE__ */ jsxs("g", {
|
|
41
|
-
opacity: ".3",
|
|
42
|
-
children: [/* @__PURE__ */ jsx("circle", {
|
|
43
|
-
className: "animate-spinner-band-1 motion-reduce:animate-none",
|
|
44
|
-
cx: "12",
|
|
45
|
-
cy: "12",
|
|
46
|
-
r: "9.5",
|
|
47
|
-
stroke: "currentColor",
|
|
48
|
-
strokeWidth: "3",
|
|
49
|
-
strokeDasharray: "3.75 200",
|
|
50
|
-
strokeDashoffset: "-3.75"
|
|
51
|
-
}), /* @__PURE__ */ jsx("circle", {
|
|
52
|
-
className: "animate-spinner-band-1-end motion-reduce:animate-none",
|
|
53
|
-
cx: "12",
|
|
54
|
-
cy: "12",
|
|
55
|
-
r: "9.5",
|
|
56
|
-
stroke: "currentColor",
|
|
57
|
-
strokeWidth: "3",
|
|
58
|
-
strokeLinecap: "round",
|
|
59
|
-
strokeDasharray: ".01 200",
|
|
60
|
-
strokeDashoffset: "-3.75"
|
|
61
|
-
})]
|
|
62
|
-
}),
|
|
63
|
-
/* @__PURE__ */ jsx("circle", {
|
|
64
|
-
className: "animate-spinner-band-2 motion-reduce:animate-none",
|
|
65
|
-
cx: "12",
|
|
66
|
-
cy: "12",
|
|
67
|
-
r: "9.5",
|
|
68
|
-
stroke: "currentColor",
|
|
69
|
-
strokeWidth: "3",
|
|
70
|
-
strokeDasharray: "3.75 200",
|
|
71
|
-
strokeDashoffset: "-7.5",
|
|
72
|
-
opacity: ".6"
|
|
73
|
-
}),
|
|
74
|
-
/* @__PURE__ */ jsx("circle", {
|
|
75
|
-
className: "animate-spinner-band-3 motion-reduce:animate-none",
|
|
76
|
-
cx: "12",
|
|
77
|
-
cy: "12",
|
|
78
|
-
r: "9.5",
|
|
79
|
-
stroke: "currentColor",
|
|
80
|
-
strokeWidth: "3",
|
|
81
|
-
strokeLinecap: "round",
|
|
82
|
-
strokeDasharray: "3.75 200",
|
|
83
|
-
strokeDashoffset: "-11.25"
|
|
84
|
-
})
|
|
85
|
-
]
|
|
86
|
-
}), /* @__PURE__ */ jsxs("g", {
|
|
87
|
-
className: "hidden motion-reduce:inline",
|
|
88
|
-
children: [/* @__PURE__ */ jsx("circle", {
|
|
89
|
-
cx: "12",
|
|
90
|
-
cy: "12",
|
|
91
|
-
r: "9.5",
|
|
92
|
-
stroke: "currentColor",
|
|
93
|
-
strokeWidth: "3",
|
|
94
|
-
opacity: ".25"
|
|
95
|
-
}), /* @__PURE__ */ jsx("circle", {
|
|
96
|
-
cx: "12",
|
|
97
|
-
cy: "12",
|
|
98
|
-
r: "9.5",
|
|
99
|
-
stroke: "currentColor",
|
|
100
|
-
strokeWidth: "3",
|
|
101
|
-
strokeLinecap: "round",
|
|
102
|
-
strokeDasharray: "15 60",
|
|
103
|
-
strokeDashoffset: "-29.85"
|
|
104
|
-
})]
|
|
25
|
+
children: [/* @__PURE__ */ jsx("path", {
|
|
26
|
+
d: "M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z",
|
|
27
|
+
fill: "currentColor",
|
|
28
|
+
opacity: ".25"
|
|
29
|
+
}), /* @__PURE__ */ jsx("path", {
|
|
30
|
+
d: "M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z",
|
|
31
|
+
fill: "currentColor"
|
|
105
32
|
})]
|
|
106
33
|
})]
|
|
107
34
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spinner.js","names":["React"],"sources":["../../src/components/spinner.tsx"],"sourcesContent":["import * as React from 'react'\nimport { cn } from '../utils/cn'\n\ninterface SpinnerProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Size variant */\n size?: 'sm' | 'default' | 'lg'\n /** Screen-reader announcement */\n label?: string\n}\n\nconst sizeClasses = {\n sm: 'size-4',\n default: 'size-6',\n lg: 'size-8',\n} as const\n\nconst Spinner = React.forwardRef<HTMLDivElement, SpinnerProps>(\n ({ className, size = 'default', label = 'Loading', ...props }, ref) => (\n // color + size live on the wrapper so className can override them (svg inherits via currentColor/size-full)\n <div\n className={cn('inline-flex text-spark-9', sizeClasses[size], className)}\n data-slot=\"spinner\"\n ref={ref}\n role=\"status\"\n {...props}\n >\n <span className=\"sr-only\">{label}</span>\n <svg\n className=\"size-full animate-
|
|
1
|
+
{"version":3,"file":"spinner.js","names":["React"],"sources":["../../src/components/spinner.tsx"],"sourcesContent":["import * as React from 'react'\nimport { cn } from '../utils/cn'\n\ninterface SpinnerProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Size variant */\n size?: 'sm' | 'default' | 'lg'\n /** Screen-reader announcement */\n label?: string\n}\n\nconst sizeClasses = {\n sm: 'size-4',\n default: 'size-6',\n lg: 'size-8',\n} as const\n\nconst Spinner = React.forwardRef<HTMLDivElement, SpinnerProps>(\n ({ className, size = 'default', label = 'Loading', ...props }, ref) => (\n // color + size live on the wrapper so className can override them (svg inherits via currentColor/size-full)\n <div\n className={cn('inline-flex text-spark-9', sizeClasses[size], className)}\n data-slot=\"spinner\"\n ref={ref}\n role=\"status\"\n {...props}\n >\n <span className=\"sr-only\">{label}</span>\n {/* CSS animation (not the ECP loader's SMIL): respects prefers-reduced-motion\n and stays off the main thread; the 0.65s speed matches ECP */}\n <svg\n className=\"size-full animate-spin [animation-duration:.65s] motion-reduce:animate-none\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z\"\n fill=\"currentColor\"\n opacity=\".25\"\n />\n <path\n d=\"M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z\"\n fill=\"currentColor\"\n />\n </svg>\n </div>\n ),\n)\n\nSpinner.displayName = 'Spinner'\n\nexport { Spinner }\nexport type { SpinnerProps }\n"],"mappings":";;;;;AAUA,MAAM,cAAc;CAClB,IAAI;CACJ,SAAS;CACT,IAAI;AACN;AAEA,MAAM,UAAUA,QAAM,YACnB,EAAE,WAAW,OAAO,WAAW,QAAQ,WAAW,GAAG,SAAS,QAE7D,qBAAC,OAAD;CACE,WAAW,GAAG,4BAA4B,YAAY,OAAO,SAAS;CACtE,aAAU;CACL;CACL,MAAK;CACL,GAAI;WALN,CAOE,oBAAC,QAAD;EAAM,WAAU;YAAW;CAAY,CAAA,GAGvC,qBAAC,OAAD;EACE,WAAU;EACV,MAAK;EACL,SAAQ;EACR,OAAM;YAJR,CAME,oBAAC,QAAD;GACE,GAAE;GACF,MAAK;GACL,SAAQ;EACT,CAAA,GACD,oBAAC,QAAD;GACE,GAAE;GACF,MAAK;EACN,CAAA,CACE;GACF;EAET;AAEA,QAAQ,cAAc"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { d as SparkInputStyle, v as SparkStyle } from "../theme-types-
|
|
3
|
+
import { d as SparkInputStyle, v as SparkStyle } from "../theme-types-CHl-L2F-.cjs";
|
|
4
4
|
import { SparkSwitchColor } from "./switch.cjs";
|
|
5
5
|
import * as React$1 from "react";
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { d as SparkInputStyle, v as SparkStyle } from "../theme-types-
|
|
3
|
+
import { d as SparkInputStyle, v as SparkStyle } from "../theme-types-CHl-L2F-.js";
|
|
4
4
|
import { SparkSwitchColor } from "./switch.js";
|
|
5
5
|
import * as React$1 from "react";
|
|
6
6
|
|
|
@@ -5,8 +5,8 @@ const require_lib_input_box_variants = require("../lib/input-box-variants.cjs");
|
|
|
5
5
|
const require_components_field = require("./field.cjs");
|
|
6
6
|
let react = require("react");
|
|
7
7
|
react = require_chunk.__toESM(react);
|
|
8
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
8
|
let class_variance_authority = require("class-variance-authority");
|
|
9
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
10
10
|
let cn = require("cn");
|
|
11
11
|
//#region src/components/textarea.tsx
|
|
12
12
|
const textareaVariants = (0, class_variance_authority.cva)("flex w-full min-w-0 bg-transparent text-gray transition-[color,background-color,border-color] group-data-[invalid=true]/field:text-error placeholder:text-gray-placeholder disabled:cursor-not-allowed disabled:text-gray-disabled disabled:placeholder:text-gray-disabled aria-invalid:text-error motion-reduce:transition-none", {
|
|
@@ -101,21 +101,24 @@ const textareaVariants = (0, class_variance_authority.cva)("flex w-full min-w-0
|
|
|
101
101
|
}
|
|
102
102
|
]
|
|
103
103
|
});
|
|
104
|
-
const Textarea = react.forwardRef(function Textarea({ variant, autoResize = false, rows = 3, className, id: idProp, "aria-describedby": ariaDescribedByProp, ...props }, ref) {
|
|
104
|
+
const Textarea = react.forwardRef(function Textarea({ variant, autoResize = false, rows = 3, className, placeholder, id: idProp, "aria-describedby": ariaDescribedByProp, ...props }, ref) {
|
|
105
105
|
const { field, id, ariaDescribedBy, ariaInvalid, inputStyle, inputColor } = require_components_field.useFieldControl({
|
|
106
106
|
id: idProp,
|
|
107
107
|
ariaDescribedBy: ariaDescribedByProp,
|
|
108
108
|
variant: variant !== "none" ? variant : void 0
|
|
109
109
|
});
|
|
110
|
+
const chrome = variant === "none" ? "none" : !variant && field?.labelPosition === "inset" ? "inset" : "box";
|
|
111
|
+
const floating = field?.labelPosition === "floating";
|
|
110
112
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
|
|
111
113
|
"data-slot": "textarea",
|
|
112
114
|
className: (0, cn.cn)(textareaVariants({
|
|
113
|
-
chrome
|
|
115
|
+
chrome,
|
|
114
116
|
inputStyle,
|
|
115
117
|
inputColor,
|
|
116
118
|
autoResize
|
|
117
|
-
}), className),
|
|
119
|
+
}), floating && chrome === "box" && (inputStyle === "outlined" ? "border-0! px-3 pt-3 pb-3 focus-visible:outline-hidden!" : (0, cn.cn)("pt-6 pb-2", inputStyle === "surface" && "focus-visible:outline-offset-[-2px]!")), className),
|
|
118
120
|
id,
|
|
121
|
+
placeholder: placeholder ?? (floating ? " " : void 0),
|
|
119
122
|
rows,
|
|
120
123
|
ref,
|
|
121
124
|
"aria-invalid": ariaInvalid,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.cjs","names":["INSET_UNDERLINE","boxChrome","React","useFieldControl"],"sources":["../../src/components/textarea.tsx"],"sourcesContent":["import { cva } from 'class-variance-authority'\nimport * as React from 'react'\nimport {
|
|
1
|
+
{"version":3,"file":"textarea.cjs","names":["INSET_UNDERLINE","boxChrome","React","useFieldControl"],"sources":["../../src/components/textarea.tsx"],"sourcesContent":["import { cva } from 'class-variance-authority'\nimport * as React from 'react'\nimport {\n boxChrome,\n FLOATING_PLACEHOLDER,\n FLOATING_SURFACE_FOCUS,\n INSET_UNDERLINE,\n} from '../lib/input-box-variants'\nimport type { SparkInputStyle } from '../lib/theme-types'\nimport { cn } from '../utils/cn'\nimport { useFieldControl } from './field'\n\ntype TextareaVariant = SparkInputStyle | 'none'\n\nconst textareaVariants = cva(\n 'flex w-full min-w-0 bg-transparent text-gray transition-[color,background-color,border-color] group-data-[invalid=true]/field:text-error placeholder:text-gray-placeholder disabled:cursor-not-allowed disabled:text-gray-disabled disabled:placeholder:text-gray-disabled aria-invalid:text-error motion-reduce:transition-none',\n {\n variants: {\n chrome: {\n none: 'border-0 px-0 focus-visible:outline-hidden',\n inset: INSET_UNDERLINE,\n box: 'min-h-11 rounded-md px-3 py-2 text-base transition-[color,background-color,border-color] motion-reduce:transition-none',\n },\n inputStyle: { soft: '', surface: '', outlined: '', ghost: '' },\n inputColor: { brand: '', gray: '' },\n autoResize: {\n true: 'field-sizing-content resize-none',\n false: 'resize-y',\n },\n },\n compoundVariants: [\n {\n chrome: 'box',\n inputStyle: 'soft',\n inputColor: 'brand',\n class: boxChrome.soft.brand,\n },\n {\n chrome: 'box',\n inputStyle: 'soft',\n inputColor: 'gray',\n class: boxChrome.soft.gray,\n },\n {\n chrome: 'box',\n inputStyle: 'surface',\n inputColor: 'brand',\n class: boxChrome.surface.brand,\n },\n {\n chrome: 'box',\n inputStyle: 'surface',\n inputColor: 'gray',\n class: boxChrome.surface.gray,\n },\n {\n chrome: 'box',\n inputStyle: 'outlined',\n inputColor: 'brand',\n class: boxChrome.outlined.brand,\n },\n {\n chrome: 'box',\n inputStyle: 'outlined',\n inputColor: 'gray',\n class: boxChrome.outlined.gray,\n },\n {\n chrome: 'box',\n inputStyle: 'ghost',\n inputColor: 'brand',\n class: boxChrome.ghost.brand,\n },\n {\n chrome: 'box',\n inputStyle: 'ghost',\n inputColor: 'gray',\n class: boxChrome.ghost.gray,\n },\n { chrome: 'inset', inputColor: 'brand', class: 'border-b-input' },\n { chrome: 'inset', inputColor: 'gray', class: 'border-b-input-gray' },\n // GHOST_UNDERLINE and boxChrome.ghost.* hardcode h-10; un-clamp for\n // textarea's min-height model — must come after those compounds above\n { chrome: 'inset', class: 'h-auto min-h-10' },\n { chrome: 'box', inputStyle: 'ghost', class: 'h-auto' },\n ],\n },\n)\n\ninterface TextareaProps extends React.ComponentProps<'textarea'> {\n variant?: TextareaVariant\n autoResize?: boolean\n}\n\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n function Textarea(\n {\n variant,\n autoResize = false,\n rows = 3,\n className,\n placeholder,\n id: idProp,\n 'aria-describedby': ariaDescribedByProp,\n ...props\n },\n ref,\n ) {\n const { field, id, ariaDescribedBy, ariaInvalid, inputStyle, inputColor } =\n useFieldControl({\n id: idProp,\n ariaDescribedBy: ariaDescribedByProp,\n variant: variant !== 'none' ? variant : undefined,\n })\n // an explicit variant prop keeps the box even inside an inset field\n const chrome =\n variant === 'none'\n ? 'none'\n : !variant && field?.labelPosition === 'inset'\n ? 'inset'\n : 'box'\n const floating = field?.labelPosition === 'floating'\n\n return (\n <textarea\n data-slot=\"textarea\"\n className={cn(\n textareaVariants({ chrome, inputStyle, inputColor, autoResize }),\n floating &&\n chrome === 'box' &&\n (inputStyle === 'outlined'\n ? 'border-0! px-3 pt-3 pb-3 focus-visible:outline-hidden!'\n : cn(\n 'pt-6 pb-2',\n inputStyle === 'surface' && FLOATING_SURFACE_FOCUS,\n )),\n className,\n )}\n id={id}\n placeholder={\n placeholder ?? (floating ? FLOATING_PLACEHOLDER : undefined)\n }\n rows={rows}\n ref={ref}\n aria-invalid={ariaInvalid}\n {...props}\n aria-describedby={ariaDescribedBy}\n />\n )\n },\n)\n\nexport { Textarea }\nexport type { TextareaProps, TextareaVariant }\n"],"mappings":";;;;;;;;;;;AAcA,MAAM,oBAAA,GAAA,yBAAA,KACJ,oUACA;CACE,UAAU;EACR,QAAQ;GACN,MAAM;GACN,OAAOA,+BAAAA;GACP,KAAK;EACP;EACA,YAAY;GAAE,MAAM;GAAI,SAAS;GAAI,UAAU;GAAI,OAAO;EAAG;EAC7D,YAAY;GAAE,OAAO;GAAI,MAAM;EAAG;EAClC,YAAY;GACV,MAAM;GACN,OAAO;EACT;CACF;CACA,kBAAkB;EAChB;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OAAOC,+BAAAA,UAAU,KAAK;EACxB;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OAAOA,+BAAAA,UAAU,KAAK;EACxB;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OAAOA,+BAAAA,UAAU,QAAQ;EAC3B;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OAAOA,+BAAAA,UAAU,QAAQ;EAC3B;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OAAOA,+BAAAA,UAAU,SAAS;EAC5B;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OAAOA,+BAAAA,UAAU,SAAS;EAC5B;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OAAOA,+BAAAA,UAAU,MAAM;EACzB;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OAAOA,+BAAAA,UAAU,MAAM;EACzB;EACA;GAAE,QAAQ;GAAS,YAAY;GAAS,OAAO;EAAiB;EAChE;GAAE,QAAQ;GAAS,YAAY;GAAQ,OAAO;EAAsB;EAGpE;GAAE,QAAQ;GAAS,OAAO;EAAkB;EAC5C;GAAE,QAAQ;GAAO,YAAY;GAAS,OAAO;EAAS;CACxD;AACF,CACF;AAOA,MAAM,WAAWC,MAAM,WACrB,SAAS,SACP,EACE,SACA,aAAa,OACb,OAAO,GACP,WACA,aACA,IAAI,QACJ,oBAAoB,qBACpB,GAAG,SAEL,KACA;CACA,MAAM,EAAE,OAAO,IAAI,iBAAiB,aAAa,YAAY,eAC3DC,yBAAAA,gBAAgB;EACd,IAAI;EACJ,iBAAiB;EACjB,SAAS,YAAY,SAAS,UAAU,KAAA;CAC1C,CAAC;CAEH,MAAM,SACJ,YAAY,SACR,SACA,CAAC,WAAW,OAAO,kBAAkB,UACnC,UACA;CACR,MAAM,WAAW,OAAO,kBAAkB;CAE1C,OACE,iBAAA,GAAA,kBAAA,KAAC,YAAD;EACE,aAAU;EACV,YAAA,GAAA,GAAA,IACE,iBAAiB;GAAE;GAAQ;GAAY;GAAY;EAAW,CAAC,GAC/D,YACE,WAAW,UACV,eAAe,aACZ,4DAAA,GAAA,GAAA,IAEE,aACA,eAAe,aAAA,sCACjB,IACN,SACF;EACI;EACJ,aACE,gBAAgB,WAAA,MAAkC,KAAA;EAE9C;EACD;EACL,gBAAc;EACd,GAAI;EACJ,oBAAkB;CACnB,CAAA;AAEL,CACF"}
|
|
@@ -3,8 +3,8 @@ import { cn } from "../utils/cn.js";
|
|
|
3
3
|
import { INSET_UNDERLINE, boxChrome } from "../lib/input-box-variants.js";
|
|
4
4
|
import { useFieldControl } from "./field.js";
|
|
5
5
|
import * as React$1 from "react";
|
|
6
|
-
import { jsx } from "react/jsx-runtime";
|
|
7
6
|
import { cva } from "class-variance-authority";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
//#region src/components/textarea.tsx
|
|
9
9
|
const textareaVariants = cva("flex w-full min-w-0 bg-transparent text-gray transition-[color,background-color,border-color] group-data-[invalid=true]/field:text-error placeholder:text-gray-placeholder disabled:cursor-not-allowed disabled:text-gray-disabled disabled:placeholder:text-gray-disabled aria-invalid:text-error motion-reduce:transition-none", {
|
|
10
10
|
variants: {
|
|
@@ -98,21 +98,24 @@ const textareaVariants = cva("flex w-full min-w-0 bg-transparent text-gray trans
|
|
|
98
98
|
}
|
|
99
99
|
]
|
|
100
100
|
});
|
|
101
|
-
const Textarea = React$1.forwardRef(function Textarea({ variant, autoResize = false, rows = 3, className, id: idProp, "aria-describedby": ariaDescribedByProp, ...props }, ref) {
|
|
101
|
+
const Textarea = React$1.forwardRef(function Textarea({ variant, autoResize = false, rows = 3, className, placeholder, id: idProp, "aria-describedby": ariaDescribedByProp, ...props }, ref) {
|
|
102
102
|
const { field, id, ariaDescribedBy, ariaInvalid, inputStyle, inputColor } = useFieldControl({
|
|
103
103
|
id: idProp,
|
|
104
104
|
ariaDescribedBy: ariaDescribedByProp,
|
|
105
105
|
variant: variant !== "none" ? variant : void 0
|
|
106
106
|
});
|
|
107
|
+
const chrome = variant === "none" ? "none" : !variant && field?.labelPosition === "inset" ? "inset" : "box";
|
|
108
|
+
const floating = field?.labelPosition === "floating";
|
|
107
109
|
return /* @__PURE__ */ jsx("textarea", {
|
|
108
110
|
"data-slot": "textarea",
|
|
109
111
|
className: cn(textareaVariants({
|
|
110
|
-
chrome
|
|
112
|
+
chrome,
|
|
111
113
|
inputStyle,
|
|
112
114
|
inputColor,
|
|
113
115
|
autoResize
|
|
114
|
-
}), className),
|
|
116
|
+
}), floating && chrome === "box" && (inputStyle === "outlined" ? "border-0! px-3 pt-3 pb-3 focus-visible:outline-hidden!" : cn("pt-6 pb-2", inputStyle === "surface" && "focus-visible:outline-offset-[-2px]!")), className),
|
|
115
117
|
id,
|
|
118
|
+
placeholder: placeholder ?? (floating ? " " : void 0),
|
|
116
119
|
rows,
|
|
117
120
|
ref,
|
|
118
121
|
"aria-invalid": ariaInvalid,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.js","names":["React"],"sources":["../../src/components/textarea.tsx"],"sourcesContent":["import { cva } from 'class-variance-authority'\nimport * as React from 'react'\nimport {
|
|
1
|
+
{"version":3,"file":"textarea.js","names":["React"],"sources":["../../src/components/textarea.tsx"],"sourcesContent":["import { cva } from 'class-variance-authority'\nimport * as React from 'react'\nimport {\n boxChrome,\n FLOATING_PLACEHOLDER,\n FLOATING_SURFACE_FOCUS,\n INSET_UNDERLINE,\n} from '../lib/input-box-variants'\nimport type { SparkInputStyle } from '../lib/theme-types'\nimport { cn } from '../utils/cn'\nimport { useFieldControl } from './field'\n\ntype TextareaVariant = SparkInputStyle | 'none'\n\nconst textareaVariants = cva(\n 'flex w-full min-w-0 bg-transparent text-gray transition-[color,background-color,border-color] group-data-[invalid=true]/field:text-error placeholder:text-gray-placeholder disabled:cursor-not-allowed disabled:text-gray-disabled disabled:placeholder:text-gray-disabled aria-invalid:text-error motion-reduce:transition-none',\n {\n variants: {\n chrome: {\n none: 'border-0 px-0 focus-visible:outline-hidden',\n inset: INSET_UNDERLINE,\n box: 'min-h-11 rounded-md px-3 py-2 text-base transition-[color,background-color,border-color] motion-reduce:transition-none',\n },\n inputStyle: { soft: '', surface: '', outlined: '', ghost: '' },\n inputColor: { brand: '', gray: '' },\n autoResize: {\n true: 'field-sizing-content resize-none',\n false: 'resize-y',\n },\n },\n compoundVariants: [\n {\n chrome: 'box',\n inputStyle: 'soft',\n inputColor: 'brand',\n class: boxChrome.soft.brand,\n },\n {\n chrome: 'box',\n inputStyle: 'soft',\n inputColor: 'gray',\n class: boxChrome.soft.gray,\n },\n {\n chrome: 'box',\n inputStyle: 'surface',\n inputColor: 'brand',\n class: boxChrome.surface.brand,\n },\n {\n chrome: 'box',\n inputStyle: 'surface',\n inputColor: 'gray',\n class: boxChrome.surface.gray,\n },\n {\n chrome: 'box',\n inputStyle: 'outlined',\n inputColor: 'brand',\n class: boxChrome.outlined.brand,\n },\n {\n chrome: 'box',\n inputStyle: 'outlined',\n inputColor: 'gray',\n class: boxChrome.outlined.gray,\n },\n {\n chrome: 'box',\n inputStyle: 'ghost',\n inputColor: 'brand',\n class: boxChrome.ghost.brand,\n },\n {\n chrome: 'box',\n inputStyle: 'ghost',\n inputColor: 'gray',\n class: boxChrome.ghost.gray,\n },\n { chrome: 'inset', inputColor: 'brand', class: 'border-b-input' },\n { chrome: 'inset', inputColor: 'gray', class: 'border-b-input-gray' },\n // GHOST_UNDERLINE and boxChrome.ghost.* hardcode h-10; un-clamp for\n // textarea's min-height model — must come after those compounds above\n { chrome: 'inset', class: 'h-auto min-h-10' },\n { chrome: 'box', inputStyle: 'ghost', class: 'h-auto' },\n ],\n },\n)\n\ninterface TextareaProps extends React.ComponentProps<'textarea'> {\n variant?: TextareaVariant\n autoResize?: boolean\n}\n\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n function Textarea(\n {\n variant,\n autoResize = false,\n rows = 3,\n className,\n placeholder,\n id: idProp,\n 'aria-describedby': ariaDescribedByProp,\n ...props\n },\n ref,\n ) {\n const { field, id, ariaDescribedBy, ariaInvalid, inputStyle, inputColor } =\n useFieldControl({\n id: idProp,\n ariaDescribedBy: ariaDescribedByProp,\n variant: variant !== 'none' ? variant : undefined,\n })\n // an explicit variant prop keeps the box even inside an inset field\n const chrome =\n variant === 'none'\n ? 'none'\n : !variant && field?.labelPosition === 'inset'\n ? 'inset'\n : 'box'\n const floating = field?.labelPosition === 'floating'\n\n return (\n <textarea\n data-slot=\"textarea\"\n className={cn(\n textareaVariants({ chrome, inputStyle, inputColor, autoResize }),\n floating &&\n chrome === 'box' &&\n (inputStyle === 'outlined'\n ? 'border-0! px-3 pt-3 pb-3 focus-visible:outline-hidden!'\n : cn(\n 'pt-6 pb-2',\n inputStyle === 'surface' && FLOATING_SURFACE_FOCUS,\n )),\n className,\n )}\n id={id}\n placeholder={\n placeholder ?? (floating ? FLOATING_PLACEHOLDER : undefined)\n }\n rows={rows}\n ref={ref}\n aria-invalid={ariaInvalid}\n {...props}\n aria-describedby={ariaDescribedBy}\n />\n )\n },\n)\n\nexport { Textarea }\nexport type { TextareaProps, TextareaVariant }\n"],"mappings":";;;;;;;;AAcA,MAAM,mBAAmB,IACvB,oUACA;CACE,UAAU;EACR,QAAQ;GACN,MAAM;GACN,OAAO;GACP,KAAK;EACP;EACA,YAAY;GAAE,MAAM;GAAI,SAAS;GAAI,UAAU;GAAI,OAAO;EAAG;EAC7D,YAAY;GAAE,OAAO;GAAI,MAAM;EAAG;EAClC,YAAY;GACV,MAAM;GACN,OAAO;EACT;CACF;CACA,kBAAkB;EAChB;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OAAO,UAAU,KAAK;EACxB;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OAAO,UAAU,KAAK;EACxB;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OAAO,UAAU,QAAQ;EAC3B;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OAAO,UAAU,QAAQ;EAC3B;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OAAO,UAAU,SAAS;EAC5B;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OAAO,UAAU,SAAS;EAC5B;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OAAO,UAAU,MAAM;EACzB;EACA;GACE,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,OAAO,UAAU,MAAM;EACzB;EACA;GAAE,QAAQ;GAAS,YAAY;GAAS,OAAO;EAAiB;EAChE;GAAE,QAAQ;GAAS,YAAY;GAAQ,OAAO;EAAsB;EAGpE;GAAE,QAAQ;GAAS,OAAO;EAAkB;EAC5C;GAAE,QAAQ;GAAO,YAAY;GAAS,OAAO;EAAS;CACxD;AACF,CACF;AAOA,MAAM,WAAWA,QAAM,WACrB,SAAS,SACP,EACE,SACA,aAAa,OACb,OAAO,GACP,WACA,aACA,IAAI,QACJ,oBAAoB,qBACpB,GAAG,SAEL,KACA;CACA,MAAM,EAAE,OAAO,IAAI,iBAAiB,aAAa,YAAY,eAC3D,gBAAgB;EACd,IAAI;EACJ,iBAAiB;EACjB,SAAS,YAAY,SAAS,UAAU,KAAA;CAC1C,CAAC;CAEH,MAAM,SACJ,YAAY,SACR,SACA,CAAC,WAAW,OAAO,kBAAkB,UACnC,UACA;CACR,MAAM,WAAW,OAAO,kBAAkB;CAE1C,OACE,oBAAC,YAAD;EACE,aAAU;EACV,WAAW,GACT,iBAAiB;GAAE;GAAQ;GAAY;GAAY;EAAW,CAAC,GAC/D,YACE,WAAW,UACV,eAAe,aACZ,2DACA,GACE,aACA,eAAe,aAAA,sCACjB,IACN,SACF;EACI;EACJ,aACE,gBAAgB,WAAA,MAAkC,KAAA;EAE9C;EACD;EACL,gBAAc;EACd,GAAI;EACJ,oBAAkB;CACnB,CAAA;AAEL,CACF"}
|
|
@@ -6,9 +6,9 @@ const require_lib_theme_types = require("../lib/theme-types.cjs");
|
|
|
6
6
|
const require_lib_accent_theme = require("../lib/accent-theme.cjs");
|
|
7
7
|
let react = require("react");
|
|
8
8
|
react = require_chunk.__toESM(react);
|
|
9
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
10
9
|
let _base_ui_react_merge_props = require("@base-ui/react/merge-props");
|
|
11
10
|
let _base_ui_react_use_render = require("@base-ui/react/use-render");
|
|
11
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
12
12
|
let cn = require("cn");
|
|
13
13
|
//#region src/components/theme.tsx
|
|
14
14
|
/** The epilot brand accent — the scale `spark-default.css` ships statically. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { _ as SparkSpacing, a as SparkButtonRole, c as SparkCardColor, d as SparkInputStyle, f as SparkLabelPosition, g as SparkScaling, h as SparkRadius, i as SparkButtonDesignVariant, l as SparkCardVariant, m as SparkNeutralFamily, n as SparkButtonColor, o as SparkButtonRoles, p as SparkNeutral, r as SparkButtonDesignColor, u as SparkInputColor, v as SparkStyle } from "../theme-types-
|
|
3
|
+
import { _ as SparkSpacing, a as SparkButtonRole, c as SparkCardColor, d as SparkInputStyle, f as SparkLabelPosition, g as SparkScaling, h as SparkRadius, i as SparkButtonDesignVariant, l as SparkCardVariant, m as SparkNeutralFamily, n as SparkButtonColor, o as SparkButtonRoles, p as SparkNeutral, r as SparkButtonDesignColor, u as SparkInputColor, v as SparkStyle } from "../theme-types-CHl-L2F-.cjs";
|
|
4
4
|
import { Appearance } from "../lib/accent-theme.cjs";
|
|
5
5
|
import * as React$1 from "react";
|
|
6
6
|
import { useRender } from "@base-ui/react/use-render";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { _ as SparkSpacing, a as SparkButtonRole, c as SparkCardColor, d as SparkInputStyle, f as SparkLabelPosition, g as SparkScaling, h as SparkRadius, i as SparkButtonDesignVariant, l as SparkCardVariant, m as SparkNeutralFamily, n as SparkButtonColor, o as SparkButtonRoles, p as SparkNeutral, r as SparkButtonDesignColor, u as SparkInputColor, v as SparkStyle } from "../theme-types-
|
|
3
|
+
import { _ as SparkSpacing, a as SparkButtonRole, c as SparkCardColor, d as SparkInputStyle, f as SparkLabelPosition, g as SparkScaling, h as SparkRadius, i as SparkButtonDesignVariant, l as SparkCardVariant, m as SparkNeutralFamily, n as SparkButtonColor, o as SparkButtonRoles, p as SparkNeutral, r as SparkButtonDesignColor, u as SparkInputColor, v as SparkStyle } from "../theme-types-CHl-L2F-.js";
|
|
4
4
|
import { Appearance } from "../lib/accent-theme.js";
|
|
5
5
|
import * as React$1 from "react";
|
|
6
6
|
import { useRender } from "@base-ui/react/use-render";
|
package/dist/components/theme.js
CHANGED
|
@@ -4,9 +4,9 @@ import { isSparkNeutralFamily } from "../lib/theme-types.js";
|
|
|
4
4
|
import { CURATED_ACCENTS, accentSparkVars, appearanceForBackground, generateAccentScale, getMatchingNeutral, invertAccentScale, isParsableColor, neutralFamilyVars, neutralSparkVars, resolveAutoNeutral } from "../lib/accent-theme.js";
|
|
5
5
|
import { cn } from "../utils/cn.js";
|
|
6
6
|
import * as React$1 from "react";
|
|
7
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
7
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
9
8
|
import { useRender } from "@base-ui/react/use-render";
|
|
9
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
//#region src/components/theme.tsx
|
|
11
11
|
/** The epilot brand accent — the scale `spark-default.css` ships statically. */
|
|
12
12
|
const DEFAULT_ACCENT = "#005EB4";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { n as SparkButtonColor } from "../theme-types-
|
|
3
|
+
import { n as SparkButtonColor } from "../theme-types-CHl-L2F-.cjs";
|
|
4
4
|
import { ToggleProps, ToggleStyle } from "./toggle.cjs";
|
|
5
5
|
import * as React$1 from "react";
|
|
6
6
|
import { ToggleGroup as ToggleGroup$1 } from "@base-ui/react/toggle-group";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { n as SparkButtonColor } from "../theme-types-
|
|
3
|
+
import { n as SparkButtonColor } from "../theme-types-CHl-L2F-.js";
|
|
4
4
|
import { ToggleProps, ToggleStyle } from "./toggle.js";
|
|
5
5
|
import * as React$1 from "react";
|
|
6
6
|
import { ToggleGroup as ToggleGroup$1 } from "@base-ui/react/toggle-group";
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
4
|
const require_chunk = require("../chunk-DY84GLCh.cjs");
|
|
5
5
|
const require_lib_accent_colors = require("../lib/accent-colors.cjs");
|
|
6
|
-
const require_lib_toggle_group_context = require("../lib/toggle-group-context.cjs");
|
|
7
6
|
const require_components_button = require("./button.cjs");
|
|
7
|
+
const require_lib_toggle_group_context = require("../lib/toggle-group-context.cjs");
|
|
8
8
|
let react = require("react");
|
|
9
9
|
react = require_chunk.__toESM(react);
|
|
10
10
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { n as SparkButtonColor, v as SparkStyle } from "../theme-types-
|
|
3
|
+
import { n as SparkButtonColor, v as SparkStyle } from "../theme-types-CHl-L2F-.cjs";
|
|
4
4
|
import { buttonVariants } from "./button.cjs";
|
|
5
5
|
import * as React$1 from "react";
|
|
6
6
|
import { VariantProps } from "class-variance-authority";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { n as SparkButtonColor, v as SparkStyle } from "../theme-types-
|
|
3
|
+
import { n as SparkButtonColor, v as SparkStyle } from "../theme-types-CHl-L2F-.js";
|
|
4
4
|
import { buttonVariants } from "./button.js";
|
|
5
5
|
import * as React$1 from "react";
|
|
6
6
|
import { VariantProps } from "class-variance-authority";
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
import { accentByColor } from "../lib/accent-colors.js";
|
|
4
4
|
import { cn } from "../utils/cn.js";
|
|
5
|
-
import { ToggleGroupContext } from "../lib/toggle-group-context.js";
|
|
6
5
|
import { buttonVariants } from "./button.js";
|
|
6
|
+
import { ToggleGroupContext } from "../lib/toggle-group-context.js";
|
|
7
7
|
import * as React$1 from "react";
|
|
8
8
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import { Toggle as Toggle$1 } from "@base-ui/react/toggle";
|
|
@@ -31,34 +31,38 @@ const TooltipTrigger = ({ ...props }) => {
|
|
|
31
31
|
...props
|
|
32
32
|
});
|
|
33
33
|
};
|
|
34
|
-
const TooltipContent = ({ className, hideArrow = false, variant = "default", children, align, alignOffset, side, sideOffset = 4, ...props }) => {
|
|
35
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TooltipPortal, {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
children: [children, !hideArrow && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_tooltip.Tooltip.Arrow, {
|
|
34
|
+
const TooltipContent = ({ className, hideArrow = false, variant = "default", children, align, alignOffset, side, sideOffset = 4, collisionPadding, container, ...props }) => {
|
|
35
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TooltipPortal, {
|
|
36
|
+
container,
|
|
37
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_tooltip.Tooltip.Positioner, {
|
|
38
|
+
align,
|
|
39
|
+
alignOffset,
|
|
40
|
+
className: "isolate z-50",
|
|
41
|
+
collisionPadding,
|
|
42
|
+
side,
|
|
43
|
+
sideOffset,
|
|
44
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_base_ui_react_tooltip.Tooltip.Popup, {
|
|
45
|
+
"data-slot": "tooltip-content",
|
|
47
46
|
"data-variant": variant,
|
|
48
|
-
className: (0, cn.cn)("z-50", "data-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
47
|
+
className: (0, cn.cn)("z-50 w-fit origin-(--transform-origin) rounded-lg p-2 text-xs leading-none transition-[opacity,scale,translate] duration-150 motion-reduce:transition-opacity", "data-starting-style:scale-95 data-starting-style:opacity-0", "data-[side=bottom]:data-starting-style:-translate-y-1 data-[side=left]:data-starting-style:translate-x-1 data-[side=right]:data-starting-style:-translate-x-1 data-[side=top]:data-starting-style:translate-y-1", "data-ending-style:opacity-0 data-ending-style:duration-0", "data-[variant=default]:bg-gray-12 data-[variant=default]:text-gray-1", "data-[variant=destructive]:bg-red-12 data-[variant=destructive]:text-red-1", className),
|
|
48
|
+
...props,
|
|
49
|
+
children: [children, !hideArrow && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_tooltip.Tooltip.Arrow, {
|
|
50
|
+
"data-variant": variant,
|
|
51
|
+
className: (0, cn.cn)("z-50", "data-[side=bottom]:top-[-8px]", "data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180", "data-[side=left]:right-[-13px] data-[side=left]:rotate-90", "data-[side=right]:left-[-13px] data-[side=right]:-rotate-90", "data-[variant=default]:text-gray-12", "data-[variant=destructive]:text-red-12"),
|
|
52
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
|
|
53
|
+
fill: "none",
|
|
54
|
+
height: "10",
|
|
55
|
+
viewBox: "0 0 20 10",
|
|
56
|
+
width: "20",
|
|
57
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
58
|
+
d: "M9.66437 2.60207L4.80758 6.97318C4.07308 7.63423 3.11989 8 2.13172 8H0V10H20V8H18.5349C17.5468 8 16.5936 7.63423 15.8591 6.97318L11.0023 2.60207C10.622 2.2598 10.0447 2.25979 9.66437 2.60207Z",
|
|
59
|
+
fill: "currentColor"
|
|
60
|
+
})
|
|
57
61
|
})
|
|
58
|
-
})
|
|
59
|
-
})
|
|
62
|
+
})]
|
|
63
|
+
})
|
|
60
64
|
})
|
|
61
|
-
})
|
|
65
|
+
});
|
|
62
66
|
};
|
|
63
67
|
const InfoTooltip = ({ content, label, "aria-label": ariaLabel }) => {
|
|
64
68
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Tooltip, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(TooltipTrigger, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.cjs","names":["TooltipPrimitive","PortalTheme","Info"],"sources":["../../src/components/tooltip.tsx"],"sourcesContent":["import { Tooltip as TooltipPrimitive } from '@base-ui/react/tooltip'\nimport { Info } from '@epilot/spark-icons'\nimport * as React from 'react'\nimport { cn } from '../utils/cn'\nimport { PortalTheme } from './theme'\n\nconst TooltipProvider = ({\n delay = 0,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Provider>) => {\n return <TooltipPrimitive.Provider delay={delay} {...props} />\n}\n\nconst TooltipPortal = ({\n children,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Portal>) => {\n return (\n <TooltipPrimitive.Portal data-slot=\"tooltip-portal\" {...props}>\n <PortalTheme>{children}</PortalTheme>\n </TooltipPrimitive.Portal>\n )\n}\n\ntype TooltipProps = React.ComponentProps<typeof TooltipPrimitive.Root>\n\nconst Tooltip = ({ ...props }: TooltipProps) => {\n return <TooltipPrimitive.Root {...props} />\n}\n\nconst TooltipTrigger = ({\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Trigger>) => {\n return <TooltipPrimitive.Trigger data-slot=\"tooltip-trigger\" {...props} />\n}\n\ntype TooltipContentProps = React.ComponentProps<typeof TooltipPrimitive.Popup> &\n Pick<\n TooltipPrimitive.Positioner.Props,\n 'align' | 'alignOffset' | 'side' | 'sideOffset'\n > & {\n hideArrow?: boolean\n variant?: 'default' | 'destructive'\n }\n\nconst TooltipContent = ({\n className,\n hideArrow = false,\n variant = 'default',\n children,\n align,\n alignOffset,\n side,\n sideOffset = 4,\n ...props\n}: TooltipContentProps) => {\n return (\n <TooltipPortal>\n <TooltipPrimitive.Positioner\n align={align}\n alignOffset={alignOffset}\n className=\"isolate z-50\"\n side={side}\n sideOffset={sideOffset}\n >\n <TooltipPrimitive.Popup\n data-slot=\"tooltip-content\"\n data-variant={variant}\n className={cn(\n 'z-50 w-fit origin-(--transform-origin) rounded-lg p-2 text-xs leading-none transition-[opacity,scale,translate] duration-150 motion-reduce:transition-opacity',\n // enter: fade + zoom + a slight per-side slide (was animate-in)\n 'data-starting-style:scale-95 data-starting-style:opacity-0',\n 'data-[side=bottom]:data-starting-style:-translate-y-1 data-[side=left]:data-starting-style:translate-x-1 data-[side=right]:data-starting-style:-translate-x-1 data-[side=top]:data-starting-style:translate-y-1',\n // exit: instant (was data-[state=closed]:duration-0)\n 'data-ending-style:opacity-0 data-ending-style:duration-0',\n 'data-[variant=default]:bg-gray-12 data-[variant=default]:text-gray-1',\n 'data-[variant=destructive]:bg-red-12 data-[variant=destructive]:text-red-1',\n className,\n )}\n {...props}\n >\n {children}\n {!hideArrow && (\n <TooltipPrimitive.Arrow\n data-variant={variant}\n className={cn(\n 'z-50',\n // svg tip points up; rotate per side, overlap 2px for a seamless join\n 'data-[side=bottom]:top-[-8px]',\n 'data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180',\n 'data-[side=left]:right-[-13px] data-[side=left]:rotate-90',\n 'data-[side=right]:left-[-13px] data-[side=right]:-rotate-90',\n 'data-[variant=default]:text-gray-12',\n 'data-[variant=destructive]:text-red-12',\n )}\n >\n <svg fill=\"none\" height=\"10\" viewBox=\"0 0 20 10\" width=\"20\">\n <path\n d=\"M9.66437 2.60207L4.80758 6.97318C4.07308 7.63423 3.11989 8 2.13172 8H0V10H20V8H18.5349C17.5468 8 16.5936 7.63423 15.8591 6.97318L11.0023 2.60207C10.622 2.2598 10.0447 2.25979 9.66437 2.60207Z\"\n fill=\"currentColor\"\n />\n </svg>\n </TooltipPrimitive.Arrow>\n )}\n </TooltipPrimitive.Popup>\n </TooltipPrimitive.Positioner>\n </TooltipPortal>\n )\n}\n\ninterface InfoTooltipProps {\n content: string\n label: string\n 'aria-label'?: string\n}\n\nconst InfoTooltip = ({\n content,\n label,\n 'aria-label': ariaLabel,\n}: InfoTooltipProps) => {\n return (\n <Tooltip>\n <TooltipTrigger\n render={\n <button\n aria-label={ariaLabel ?? label}\n className=\"touch-target inline-flex size-6 min-h-[24px] min-w-[24px] shrink-0 cursor-help items-center justify-center rounded-full p-0 text-gray-light transition-colors hover:text-gray\"\n type=\"button\"\n />\n }\n >\n <Info className=\"text-sm!\" />\n </TooltipTrigger>\n <TooltipContent className=\"max-w-xs whitespace-pre-line\">\n {content}\n </TooltipContent>\n </Tooltip>\n )\n}\n\nexport {\n Tooltip,\n TooltipTrigger,\n TooltipContent,\n TooltipProvider,\n TooltipPortal,\n InfoTooltip,\n}\n"],"mappings":";;;;;;;;;;;AAMA,MAAM,mBAAmB,EACvB,QAAQ,GACR,GAAG,YACyD;CAC5D,OAAO,iBAAA,GAAA,kBAAA,KAACA,uBAAAA,QAAiB,UAAlB;EAAkC;EAAO,GAAI;CAAQ,CAAA;AAC9D;AAEA,MAAM,iBAAiB,EACrB,UACA,GAAG,YACuD;CAC1D,OACE,iBAAA,GAAA,kBAAA,KAACA,uBAAAA,QAAiB,QAAlB;EAAyB,aAAU;EAAiB,GAAI;YACtD,iBAAA,GAAA,kBAAA,KAACC,yBAAAA,aAAD,EAAc,SAAsB,CAAA;CACb,CAAA;AAE7B;AAIA,MAAM,WAAW,EAAE,GAAG,YAA0B;CAC9C,OAAO,iBAAA,GAAA,kBAAA,KAACD,uBAAAA,QAAiB,MAAlB,EAAuB,GAAI,MAAQ,CAAA;AAC5C;AAEA,MAAM,kBAAkB,EACtB,GAAG,YACwD;CAC3D,OAAO,iBAAA,GAAA,kBAAA,KAACA,uBAAAA,QAAiB,SAAlB;EAA0B,aAAU;EAAkB,GAAI;CAAQ,CAAA;AAC3E;
|
|
1
|
+
{"version":3,"file":"tooltip.cjs","names":["TooltipPrimitive","PortalTheme","Info"],"sources":["../../src/components/tooltip.tsx"],"sourcesContent":["import { Tooltip as TooltipPrimitive } from '@base-ui/react/tooltip'\nimport { Info } from '@epilot/spark-icons'\nimport * as React from 'react'\nimport { cn } from '../utils/cn'\nimport { PortalTheme } from './theme'\n\nconst TooltipProvider = ({\n delay = 0,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Provider>) => {\n return <TooltipPrimitive.Provider delay={delay} {...props} />\n}\n\nconst TooltipPortal = ({\n children,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Portal>) => {\n return (\n <TooltipPrimitive.Portal data-slot=\"tooltip-portal\" {...props}>\n <PortalTheme>{children}</PortalTheme>\n </TooltipPrimitive.Portal>\n )\n}\n\ntype TooltipProps = React.ComponentProps<typeof TooltipPrimitive.Root>\n\nconst Tooltip = ({ ...props }: TooltipProps) => {\n return <TooltipPrimitive.Root {...props} />\n}\n\nconst TooltipTrigger = ({\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Trigger>) => {\n return <TooltipPrimitive.Trigger data-slot=\"tooltip-trigger\" {...props} />\n}\n\ntype TooltipContentProps = React.ComponentProps<typeof TooltipPrimitive.Popup> &\n Pick<\n TooltipPrimitive.Positioner.Props,\n 'align' | 'alignOffset' | 'side' | 'sideOffset' | 'collisionPadding'\n > &\n Pick<TooltipPrimitive.Portal.Props, 'container'> & {\n hideArrow?: boolean\n variant?: 'default' | 'destructive'\n }\n\nconst TooltipContent = ({\n className,\n hideArrow = false,\n variant = 'default',\n children,\n align,\n alignOffset,\n side,\n sideOffset = 4,\n collisionPadding,\n container,\n ...props\n}: TooltipContentProps) => {\n return (\n <TooltipPortal container={container}>\n <TooltipPrimitive.Positioner\n align={align}\n alignOffset={alignOffset}\n className=\"isolate z-50\"\n collisionPadding={collisionPadding}\n side={side}\n sideOffset={sideOffset}\n >\n <TooltipPrimitive.Popup\n data-slot=\"tooltip-content\"\n data-variant={variant}\n className={cn(\n 'z-50 w-fit origin-(--transform-origin) rounded-lg p-2 text-xs leading-none transition-[opacity,scale,translate] duration-150 motion-reduce:transition-opacity',\n // enter: fade + zoom + a slight per-side slide (was animate-in)\n 'data-starting-style:scale-95 data-starting-style:opacity-0',\n 'data-[side=bottom]:data-starting-style:-translate-y-1 data-[side=left]:data-starting-style:translate-x-1 data-[side=right]:data-starting-style:-translate-x-1 data-[side=top]:data-starting-style:translate-y-1',\n // exit: instant (was data-[state=closed]:duration-0)\n 'data-ending-style:opacity-0 data-ending-style:duration-0',\n 'data-[variant=default]:bg-gray-12 data-[variant=default]:text-gray-1',\n 'data-[variant=destructive]:bg-red-12 data-[variant=destructive]:text-red-1',\n className,\n )}\n {...props}\n >\n {children}\n {!hideArrow && (\n <TooltipPrimitive.Arrow\n data-variant={variant}\n className={cn(\n 'z-50',\n // svg tip points up; rotate per side, overlap 2px for a seamless join\n 'data-[side=bottom]:top-[-8px]',\n 'data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180',\n 'data-[side=left]:right-[-13px] data-[side=left]:rotate-90',\n 'data-[side=right]:left-[-13px] data-[side=right]:-rotate-90',\n 'data-[variant=default]:text-gray-12',\n 'data-[variant=destructive]:text-red-12',\n )}\n >\n <svg fill=\"none\" height=\"10\" viewBox=\"0 0 20 10\" width=\"20\">\n <path\n d=\"M9.66437 2.60207L4.80758 6.97318C4.07308 7.63423 3.11989 8 2.13172 8H0V10H20V8H18.5349C17.5468 8 16.5936 7.63423 15.8591 6.97318L11.0023 2.60207C10.622 2.2598 10.0447 2.25979 9.66437 2.60207Z\"\n fill=\"currentColor\"\n />\n </svg>\n </TooltipPrimitive.Arrow>\n )}\n </TooltipPrimitive.Popup>\n </TooltipPrimitive.Positioner>\n </TooltipPortal>\n )\n}\n\ninterface InfoTooltipProps {\n content: string\n label: string\n 'aria-label'?: string\n}\n\nconst InfoTooltip = ({\n content,\n label,\n 'aria-label': ariaLabel,\n}: InfoTooltipProps) => {\n return (\n <Tooltip>\n <TooltipTrigger\n render={\n <button\n aria-label={ariaLabel ?? label}\n className=\"touch-target inline-flex size-6 min-h-[24px] min-w-[24px] shrink-0 cursor-help items-center justify-center rounded-full p-0 text-gray-light transition-colors hover:text-gray\"\n type=\"button\"\n />\n }\n >\n <Info className=\"text-sm!\" />\n </TooltipTrigger>\n <TooltipContent className=\"max-w-xs whitespace-pre-line\">\n {content}\n </TooltipContent>\n </Tooltip>\n )\n}\n\nexport type { TooltipContentProps }\n\nexport {\n Tooltip,\n TooltipTrigger,\n TooltipContent,\n TooltipProvider,\n TooltipPortal,\n InfoTooltip,\n}\n"],"mappings":";;;;;;;;;;;AAMA,MAAM,mBAAmB,EACvB,QAAQ,GACR,GAAG,YACyD;CAC5D,OAAO,iBAAA,GAAA,kBAAA,KAACA,uBAAAA,QAAiB,UAAlB;EAAkC;EAAO,GAAI;CAAQ,CAAA;AAC9D;AAEA,MAAM,iBAAiB,EACrB,UACA,GAAG,YACuD;CAC1D,OACE,iBAAA,GAAA,kBAAA,KAACA,uBAAAA,QAAiB,QAAlB;EAAyB,aAAU;EAAiB,GAAI;YACtD,iBAAA,GAAA,kBAAA,KAACC,yBAAAA,aAAD,EAAc,SAAsB,CAAA;CACb,CAAA;AAE7B;AAIA,MAAM,WAAW,EAAE,GAAG,YAA0B;CAC9C,OAAO,iBAAA,GAAA,kBAAA,KAACD,uBAAAA,QAAiB,MAAlB,EAAuB,GAAI,MAAQ,CAAA;AAC5C;AAEA,MAAM,kBAAkB,EACtB,GAAG,YACwD;CAC3D,OAAO,iBAAA,GAAA,kBAAA,KAACA,uBAAAA,QAAiB,SAAlB;EAA0B,aAAU;EAAkB,GAAI;CAAQ,CAAA;AAC3E;AAYA,MAAM,kBAAkB,EACtB,WACA,YAAY,OACZ,UAAU,WACV,UACA,OACA,aACA,MACA,aAAa,GACb,kBACA,WACA,GAAG,YACsB;CACzB,OACE,iBAAA,GAAA,kBAAA,KAAC,eAAD;EAA0B;YACxB,iBAAA,GAAA,kBAAA,KAACA,uBAAAA,QAAiB,YAAlB;GACS;GACM;GACb,WAAU;GACQ;GACZ;GACM;aAEZ,iBAAA,GAAA,kBAAA,MAACA,uBAAAA,QAAiB,OAAlB;IACE,aAAU;IACV,gBAAc;IACd,YAAA,GAAA,GAAA,IACE,iKAEA,8DACA,mNAEA,4DACA,wEACA,8EACA,SACF;IACA,GAAI;cAdN,CAgBG,UACA,CAAC,aACA,iBAAA,GAAA,kBAAA,KAACA,uBAAAA,QAAiB,OAAlB;KACE,gBAAc;KACd,YAAA,GAAA,GAAA,IACE,QAEA,iCACA,4DACA,6DACA,+DACA,uCACA,wCACF;eAEA,iBAAA,GAAA,kBAAA,KAAC,OAAD;MAAK,MAAK;MAAO,QAAO;MAAK,SAAQ;MAAY,OAAM;gBACrD,iBAAA,GAAA,kBAAA,KAAC,QAAD;OACE,GAAE;OACF,MAAK;MACN,CAAA;KACE,CAAA;IACiB,CAAA,CAEJ;;EACG,CAAA;CAChB,CAAA;AAEnB;AAQA,MAAM,eAAe,EACnB,SACA,OACA,cAAc,gBACQ;CACtB,OACE,iBAAA,GAAA,kBAAA,MAAC,SAAD,EAAA,UAAA,CACE,iBAAA,GAAA,kBAAA,KAAC,gBAAD;EACE,QACE,iBAAA,GAAA,kBAAA,KAAC,UAAD;GACE,cAAY,aAAa;GACzB,WAAU;GACV,MAAK;EACN,CAAA;YAGH,iBAAA,GAAA,kBAAA,KAACE,oBAAAA,MAAD,EAAM,WAAU,WAAY,CAAA;CACd,CAAA,GAChB,iBAAA,GAAA,kBAAA,KAAC,gBAAD;EAAgB,WAAU;YACvB;CACa,CAAA,CACT,EAAA,CAAA;AAEb"}
|
|
@@ -19,7 +19,7 @@ declare const Tooltip: ({
|
|
|
19
19
|
declare const TooltipTrigger: ({
|
|
20
20
|
...props
|
|
21
21
|
}: React$1.ComponentProps<typeof Tooltip$1.Trigger>) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
-
type TooltipContentProps = React$1.ComponentProps<typeof Tooltip$1.Popup> & Pick<Tooltip$1.Positioner.Props, 'align' | 'alignOffset' | 'side' | 'sideOffset'> & {
|
|
22
|
+
type TooltipContentProps = React$1.ComponentProps<typeof Tooltip$1.Popup> & Pick<Tooltip$1.Positioner.Props, 'align' | 'alignOffset' | 'side' | 'sideOffset' | 'collisionPadding'> & Pick<Tooltip$1.Portal.Props, 'container'> & {
|
|
23
23
|
hideArrow?: boolean;
|
|
24
24
|
variant?: 'default' | 'destructive';
|
|
25
25
|
};
|
|
@@ -32,6 +32,8 @@ declare const TooltipContent: ({
|
|
|
32
32
|
alignOffset,
|
|
33
33
|
side,
|
|
34
34
|
sideOffset,
|
|
35
|
+
collisionPadding,
|
|
36
|
+
container,
|
|
35
37
|
...props
|
|
36
38
|
}: TooltipContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
37
39
|
interface InfoTooltipProps {
|
|
@@ -45,5 +47,5 @@ declare const InfoTooltip: ({
|
|
|
45
47
|
"aria-label": ariaLabel
|
|
46
48
|
}: InfoTooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
47
49
|
//#endregion
|
|
48
|
-
export { InfoTooltip, Tooltip, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger };
|
|
50
|
+
export { InfoTooltip, Tooltip, TooltipContent, type TooltipContentProps, TooltipPortal, TooltipProvider, TooltipTrigger };
|
|
49
51
|
//# sourceMappingURL=tooltip.d.cts.map
|
|
@@ -19,7 +19,7 @@ declare const Tooltip: ({
|
|
|
19
19
|
declare const TooltipTrigger: ({
|
|
20
20
|
...props
|
|
21
21
|
}: React$1.ComponentProps<typeof Tooltip$1.Trigger>) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
-
type TooltipContentProps = React$1.ComponentProps<typeof Tooltip$1.Popup> & Pick<Tooltip$1.Positioner.Props, 'align' | 'alignOffset' | 'side' | 'sideOffset'> & {
|
|
22
|
+
type TooltipContentProps = React$1.ComponentProps<typeof Tooltip$1.Popup> & Pick<Tooltip$1.Positioner.Props, 'align' | 'alignOffset' | 'side' | 'sideOffset' | 'collisionPadding'> & Pick<Tooltip$1.Portal.Props, 'container'> & {
|
|
23
23
|
hideArrow?: boolean;
|
|
24
24
|
variant?: 'default' | 'destructive';
|
|
25
25
|
};
|
|
@@ -32,6 +32,8 @@ declare const TooltipContent: ({
|
|
|
32
32
|
alignOffset,
|
|
33
33
|
side,
|
|
34
34
|
sideOffset,
|
|
35
|
+
collisionPadding,
|
|
36
|
+
container,
|
|
35
37
|
...props
|
|
36
38
|
}: TooltipContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
37
39
|
interface InfoTooltipProps {
|
|
@@ -45,5 +47,5 @@ declare const InfoTooltip: ({
|
|
|
45
47
|
"aria-label": ariaLabel
|
|
46
48
|
}: InfoTooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
47
49
|
//#endregion
|
|
48
|
-
export { InfoTooltip, Tooltip, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger };
|
|
50
|
+
export { InfoTooltip, Tooltip, TooltipContent, type TooltipContentProps, TooltipPortal, TooltipProvider, TooltipTrigger };
|
|
49
51
|
//# sourceMappingURL=tooltip.d.ts.map
|