@nearform/quantum 1.6.1 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/global.css +18 -6
- package/dist/global.css.map +1 -1
- package/dist/index.d.mts +21 -4
- package/dist/index.d.ts +21 -4
- package/dist/index.js +107 -29
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +121 -43
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
package/dist/index.mjs
CHANGED
|
@@ -109,6 +109,7 @@ __export(index_exports, {
|
|
|
109
109
|
TableBody: () => TableBody,
|
|
110
110
|
TableCaption: () => TableCaption,
|
|
111
111
|
TableCell: () => TableCell,
|
|
112
|
+
TableEmpty: () => TableEmpty,
|
|
112
113
|
TableFooter: () => TableFooter,
|
|
113
114
|
TableHead: () => TableHead,
|
|
114
115
|
TableHeader: () => TableHeader,
|
|
@@ -4802,17 +4803,36 @@ SubnavLink.displayName = "SubnavLink";
|
|
|
4802
4803
|
// src/components/Table/index.tsx
|
|
4803
4804
|
import * as React37 from "react";
|
|
4804
4805
|
import { cva as cva30 } from "class-variance-authority";
|
|
4805
|
-
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
4806
|
+
import { jsx as jsx40, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
4806
4807
|
var tableBodyVariants = cva30("bg-background dark:bg-grey-900", {
|
|
4807
4808
|
variants: {
|
|
4808
4809
|
variant: {
|
|
4809
4810
|
zebra: [
|
|
4810
|
-
"[&>*:nth-child(even)]:bg-background-subtle",
|
|
4811
|
-
"dark:[&>*:nth-child(even)]:bg-background-subtle-dark"
|
|
4811
|
+
"[:where(&>*:nth-child(even))]:bg-background-subtle",
|
|
4812
|
+
"dark:[:where(&>*:nth-child(even))]:bg-background-subtle-dark"
|
|
4812
4813
|
]
|
|
4813
4814
|
}
|
|
4814
4815
|
}
|
|
4815
4816
|
});
|
|
4817
|
+
var alignVariants2 = cva30("", {
|
|
4818
|
+
variants: {
|
|
4819
|
+
align: {
|
|
4820
|
+
left: "text-left",
|
|
4821
|
+
center: "text-center",
|
|
4822
|
+
right: "text-right"
|
|
4823
|
+
}
|
|
4824
|
+
}
|
|
4825
|
+
});
|
|
4826
|
+
var ariaSortFor = (direction) => {
|
|
4827
|
+
if (direction === "asc") return "ascending";
|
|
4828
|
+
if (direction === "desc") return "descending";
|
|
4829
|
+
return void 0;
|
|
4830
|
+
};
|
|
4831
|
+
var SortIcon = ({ direction }) => {
|
|
4832
|
+
if (direction === "asc") return /* @__PURE__ */ jsx40(assets_exports.BsArrowUp, { "aria-hidden": "true" });
|
|
4833
|
+
if (direction === "desc") return /* @__PURE__ */ jsx40(assets_exports.BsArrowDown, { "aria-hidden": "true" });
|
|
4834
|
+
return /* @__PURE__ */ jsx40(assets_exports.BsArrowDownUp, { "aria-hidden": "true" });
|
|
4835
|
+
};
|
|
4816
4836
|
var Table = React37.forwardRef(
|
|
4817
4837
|
(_a, ref) => {
|
|
4818
4838
|
var _b = _a, { className, containerClassName } = _b, props = __objRest(_b, ["className", "containerClassName"]);
|
|
@@ -4851,16 +4871,41 @@ var TableHeader = React37.forwardRef((_a, ref) => {
|
|
|
4851
4871
|
);
|
|
4852
4872
|
});
|
|
4853
4873
|
TableHeader.displayName = "TableHeader";
|
|
4854
|
-
var TableHead = React37.forwardRef(
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4874
|
+
var TableHead = React37.forwardRef(
|
|
4875
|
+
(_a, ref) => {
|
|
4876
|
+
var _b = _a, { className, align, sortDirection, onSort, children } = _b, props = __objRest(_b, ["className", "align", "sortDirection", "onSort", "children"]);
|
|
4877
|
+
return /* @__PURE__ */ jsx40(
|
|
4878
|
+
"th",
|
|
4879
|
+
__spreadProps(__spreadValues({
|
|
4880
|
+
ref,
|
|
4881
|
+
"aria-sort": onSort ? ariaSortFor(sortDirection) : void 0,
|
|
4882
|
+
className: cn(
|
|
4883
|
+
"px-4 py-5 leading-[21px] font-bold",
|
|
4884
|
+
alignVariants2({ align }),
|
|
4885
|
+
className
|
|
4886
|
+
)
|
|
4887
|
+
}, props), {
|
|
4888
|
+
children: onSort ? /* @__PURE__ */ jsxs27(
|
|
4889
|
+
"button",
|
|
4890
|
+
{
|
|
4891
|
+
type: "button",
|
|
4892
|
+
onClick: onSort,
|
|
4893
|
+
className: cn(
|
|
4894
|
+
"inline-flex min-h-6 items-center gap-2 rounded-xs font-bold",
|
|
4895
|
+
"focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-current",
|
|
4896
|
+
"[&>svg]:h-3.5 [&>svg]:w-3.5 [&>svg]:shrink-0",
|
|
4897
|
+
align === "right" && "flex-row-reverse"
|
|
4898
|
+
),
|
|
4899
|
+
children: [
|
|
4900
|
+
children,
|
|
4901
|
+
/* @__PURE__ */ jsx40(SortIcon, { direction: sortDirection })
|
|
4902
|
+
]
|
|
4903
|
+
}
|
|
4904
|
+
) : children
|
|
4905
|
+
})
|
|
4906
|
+
);
|
|
4907
|
+
}
|
|
4908
|
+
);
|
|
4864
4909
|
TableHead.displayName = "TableHead";
|
|
4865
4910
|
var TableBody = React37.forwardRef(
|
|
4866
4911
|
(_a, ref) => {
|
|
@@ -4875,25 +4920,57 @@ var TableBody = React37.forwardRef(
|
|
|
4875
4920
|
}
|
|
4876
4921
|
);
|
|
4877
4922
|
TableBody.displayName = "TableBody";
|
|
4878
|
-
var TableRow = React37.forwardRef(
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
"
|
|
4886
|
-
className
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4923
|
+
var TableRow = React37.forwardRef(
|
|
4924
|
+
(_a, ref) => {
|
|
4925
|
+
var _b = _a, { className, selected } = _b, props = __objRest(_b, ["className", "selected"]);
|
|
4926
|
+
return /* @__PURE__ */ jsx40(
|
|
4927
|
+
"tr",
|
|
4928
|
+
__spreadValues({
|
|
4929
|
+
ref,
|
|
4930
|
+
"data-state": selected ? "selected" : void 0,
|
|
4931
|
+
className: cn(
|
|
4932
|
+
"h-[50px] self-stretch items-center gap-2 font-normal text-left",
|
|
4933
|
+
"data-[state=selected]:bg-background-alt",
|
|
4934
|
+
"dark:data-[state=selected]:bg-background-alt-dark",
|
|
4935
|
+
className
|
|
4936
|
+
)
|
|
4937
|
+
}, props)
|
|
4938
|
+
);
|
|
4939
|
+
}
|
|
4940
|
+
);
|
|
4891
4941
|
TableRow.displayName = "TableRow";
|
|
4892
|
-
var TableCell = React37.forwardRef(
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4942
|
+
var TableCell = React37.forwardRef(
|
|
4943
|
+
(_a, ref) => {
|
|
4944
|
+
var _b = _a, { className, align } = _b, props = __objRest(_b, ["className", "align"]);
|
|
4945
|
+
return /* @__PURE__ */ jsx40(
|
|
4946
|
+
"td",
|
|
4947
|
+
__spreadValues({
|
|
4948
|
+
ref,
|
|
4949
|
+
className: cn("p-4", alignVariants2({ align }), className)
|
|
4950
|
+
}, props)
|
|
4951
|
+
);
|
|
4952
|
+
}
|
|
4953
|
+
);
|
|
4896
4954
|
TableCell.displayName = "TableCell";
|
|
4955
|
+
var TableEmpty = React37.forwardRef(
|
|
4956
|
+
(_a, ref) => {
|
|
4957
|
+
var _b = _a, { className, children = "No results." } = _b, props = __objRest(_b, ["className", "children"]);
|
|
4958
|
+
return /* @__PURE__ */ jsx40(TableRow, { children: /* @__PURE__ */ jsx40(
|
|
4959
|
+
TableCell,
|
|
4960
|
+
__spreadProps(__spreadValues({
|
|
4961
|
+
ref,
|
|
4962
|
+
align: "center",
|
|
4963
|
+
className: cn(
|
|
4964
|
+
"h-24 text-foreground-muted dark:text-foreground-muted-dark",
|
|
4965
|
+
className
|
|
4966
|
+
)
|
|
4967
|
+
}, props), {
|
|
4968
|
+
children
|
|
4969
|
+
})
|
|
4970
|
+
) });
|
|
4971
|
+
}
|
|
4972
|
+
);
|
|
4973
|
+
TableEmpty.displayName = "TableEmpty";
|
|
4897
4974
|
var TableCaption = React37.forwardRef((_a, ref) => {
|
|
4898
4975
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
4899
4976
|
return /* @__PURE__ */ jsx40("caption", __spreadValues({ ref, className: cn("mt-4", className) }, props));
|
|
@@ -4916,7 +4993,7 @@ import * as React38 from "react";
|
|
|
4916
4993
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
4917
4994
|
import { Slottable as Slottable3 } from "@radix-ui/react-slot";
|
|
4918
4995
|
import { cva as cva31 } from "class-variance-authority";
|
|
4919
|
-
import { jsx as jsx41, jsxs as
|
|
4996
|
+
import { jsx as jsx41, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
4920
4997
|
var tabsVariants = cva31([
|
|
4921
4998
|
"flex",
|
|
4922
4999
|
"gap-4",
|
|
@@ -5033,7 +5110,7 @@ var TabsList = React38.forwardRef((_a, ref) => {
|
|
|
5033
5110
|
TabsList.displayName = "TabsList";
|
|
5034
5111
|
var TabsTrigger = React38.forwardRef((_a, ref) => {
|
|
5035
5112
|
var _b = _a, { className, size, count, children } = _b, props = __objRest(_b, ["className", "size", "count", "children"]);
|
|
5036
|
-
return /* @__PURE__ */
|
|
5113
|
+
return /* @__PURE__ */ jsxs28(
|
|
5037
5114
|
TabsPrimitive.Trigger,
|
|
5038
5115
|
__spreadProps(__spreadValues({
|
|
5039
5116
|
ref,
|
|
@@ -5062,7 +5139,7 @@ TabsContent.displayName = "TabsContent";
|
|
|
5062
5139
|
// src/components/Textarea/index.tsx
|
|
5063
5140
|
import React39 from "react";
|
|
5064
5141
|
import { cva as cva32 } from "class-variance-authority";
|
|
5065
|
-
import { jsx as jsx42, jsxs as
|
|
5142
|
+
import { jsx as jsx42, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
5066
5143
|
var textareaVariants = cva32(
|
|
5067
5144
|
[
|
|
5068
5145
|
"flex",
|
|
@@ -5148,7 +5225,7 @@ var Textarea = React39.forwardRef(
|
|
|
5148
5225
|
const textareaId = id != null ? id : generatedId;
|
|
5149
5226
|
const helpTextId = `${textareaId}-helptext`;
|
|
5150
5227
|
const describedBy = [ariaDescribedby, helpText ? helpTextId : void 0].filter(Boolean).join(" ") || void 0;
|
|
5151
|
-
return /* @__PURE__ */
|
|
5228
|
+
return /* @__PURE__ */ jsxs29("div", { className: "flex flex-col gap-3", children: [
|
|
5152
5229
|
labelText && /* @__PURE__ */ jsx42(
|
|
5153
5230
|
"label",
|
|
5154
5231
|
{
|
|
@@ -5184,7 +5261,7 @@ Textarea.displayName = "Textarea";
|
|
|
5184
5261
|
import * as React40 from "react";
|
|
5185
5262
|
import * as ToastPrimitive from "@radix-ui/react-toast";
|
|
5186
5263
|
import { cva as cva33 } from "class-variance-authority";
|
|
5187
|
-
import { jsx as jsx43, jsxs as
|
|
5264
|
+
import { jsx as jsx43, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
5188
5265
|
var focusClasses = [
|
|
5189
5266
|
"outline-hidden",
|
|
5190
5267
|
"focus-visible:shadow-brandGreen",
|
|
@@ -5263,7 +5340,7 @@ var Toast = React40.forwardRef((_a, ref) => {
|
|
|
5263
5340
|
var _b = _a, { className, variant, icon, type, children } = _b, props = __objRest(_b, ["className", "variant", "icon", "type", "children"]);
|
|
5264
5341
|
const resolved = variant != null ? variant : "info";
|
|
5265
5342
|
const { icon: Icon3, className: iconClassName } = toastIcons[resolved];
|
|
5266
|
-
return /* @__PURE__ */
|
|
5343
|
+
return /* @__PURE__ */ jsxs30(
|
|
5267
5344
|
ToastPrimitive.Root,
|
|
5268
5345
|
__spreadProps(__spreadValues({
|
|
5269
5346
|
ref,
|
|
@@ -5380,7 +5457,7 @@ ToastClose.displayName = ToastPrimitive.Close.displayName;
|
|
|
5380
5457
|
|
|
5381
5458
|
// src/components/ToggleList/index.tsx
|
|
5382
5459
|
import * as React41 from "react";
|
|
5383
|
-
import { jsx as jsx44, jsxs as
|
|
5460
|
+
import { jsx as jsx44, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
5384
5461
|
var ToggleList = React41.forwardRef((_a, ref) => {
|
|
5385
5462
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
5386
5463
|
return /* @__PURE__ */ jsx44(
|
|
@@ -5398,7 +5475,7 @@ var ToggleListItem = React41.forwardRef(
|
|
|
5398
5475
|
var _b = _a, { className, label, onRemove, removeLabel, id, disabled } = _b, props = __objRest(_b, ["className", "label", "onRemove", "removeLabel", "id", "disabled"]);
|
|
5399
5476
|
const generatedId = React41.useId();
|
|
5400
5477
|
const switchId = id != null ? id : generatedId;
|
|
5401
|
-
return /* @__PURE__ */
|
|
5478
|
+
return /* @__PURE__ */ jsxs31(
|
|
5402
5479
|
"li",
|
|
5403
5480
|
{
|
|
5404
5481
|
className: cn(
|
|
@@ -5444,7 +5521,7 @@ ToggleListItem.displayName = "ToggleListItem";
|
|
|
5444
5521
|
import * as React42 from "react";
|
|
5445
5522
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
5446
5523
|
import { cva as cva34 } from "class-variance-authority";
|
|
5447
|
-
import { jsx as jsx45, jsxs as
|
|
5524
|
+
import { jsx as jsx45, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
5448
5525
|
var tooltipVariants = cva34([
|
|
5449
5526
|
[
|
|
5450
5527
|
"fill-accent",
|
|
@@ -5465,9 +5542,9 @@ var tooltipVariants = cva34([
|
|
|
5465
5542
|
]
|
|
5466
5543
|
]);
|
|
5467
5544
|
var Tooltip = React42.forwardRef(({ children, side, content, sideOffset }, ref) => {
|
|
5468
|
-
return /* @__PURE__ */ jsx45(TooltipPrimitive.Provider, { children: /* @__PURE__ */
|
|
5545
|
+
return /* @__PURE__ */ jsx45(TooltipPrimitive.Provider, { children: /* @__PURE__ */ jsxs32(TooltipPrimitive.Root, { delayDuration: 100, children: [
|
|
5469
5546
|
/* @__PURE__ */ jsx45(TooltipPrimitive.Trigger, { asChild: React42.isValidElement(children), children }),
|
|
5470
|
-
/* @__PURE__ */
|
|
5547
|
+
/* @__PURE__ */ jsxs32(
|
|
5471
5548
|
TooltipPrimitive.Content,
|
|
5472
5549
|
{
|
|
5473
5550
|
side: side != null ? side : "top",
|
|
@@ -5487,7 +5564,7 @@ Tooltip.displayName = "Tooltip";
|
|
|
5487
5564
|
// src/components/WebsiteFooter/index.tsx
|
|
5488
5565
|
import { cva as cva35 } from "class-variance-authority";
|
|
5489
5566
|
import React43 from "react";
|
|
5490
|
-
import { jsx as jsx46, jsxs as
|
|
5567
|
+
import { jsx as jsx46, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
5491
5568
|
var websiteFooterVariants = cva35(
|
|
5492
5569
|
["flex", "flex-col", "w-full", "items-center", "px-16", "py-4"],
|
|
5493
5570
|
{
|
|
@@ -5610,7 +5687,7 @@ var LinkRow = React43.forwardRef(
|
|
|
5610
5687
|
var LinkColumn = React43.forwardRef(
|
|
5611
5688
|
(_a, ref) => {
|
|
5612
5689
|
var _b = _a, { className, size, title, children } = _b, props = __objRest(_b, ["className", "size", "title", "children"]);
|
|
5613
|
-
return /* @__PURE__ */
|
|
5690
|
+
return /* @__PURE__ */ jsxs33(
|
|
5614
5691
|
"div",
|
|
5615
5692
|
__spreadProps(__spreadValues({
|
|
5616
5693
|
className: cn(linkColumnVariants({ size }), className)
|
|
@@ -5725,6 +5802,7 @@ export {
|
|
|
5725
5802
|
TableBody,
|
|
5726
5803
|
TableCaption,
|
|
5727
5804
|
TableCell,
|
|
5805
|
+
TableEmpty,
|
|
5728
5806
|
TableFooter,
|
|
5729
5807
|
TableHead,
|
|
5730
5808
|
TableHeader,
|