@scripso-homepad/ui 0.4.12 → 0.4.13
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/{chunk-YSDLHEJ7.js → chunk-WFMQYYH6.js} +17 -9
- package/dist/chunk-WFMQYYH6.js.map +1 -0
- package/dist/index.cjs +28 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +34 -3
- package/dist/index.d.ts +34 -3
- package/dist/index.js +15 -14
- package/dist/index.js.map +1 -1
- package/dist/web/index.cjs +38 -37
- package/dist/web/index.cjs.map +1 -1
- package/dist/web/index.css +2 -2
- package/dist/web/index.css.map +1 -1
- package/dist/web/index.d.cts +2 -0
- package/dist/web/index.d.ts +2 -0
- package/dist/web/index.js +30 -31
- package/dist/web/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/CountryCodeSelector.tsx +2 -1
- package/src/components/DatePicker.tsx +2 -2
- package/src/components/Select.tsx +2 -2
- package/src/index.ts +1 -0
- package/src/theme/calendar.ts +6 -6
- package/src/theme/tokens.ts +21 -7
- package/src/web/components/Drawer.stories.tsx +1 -1
- package/src/web/components/sonner-toast.css +2 -2
- package/src/web/components/table/TablePrimitives.tsx +5 -1
- package/src/web/icons/TableMenuActivateIcon.tsx +2 -2
- package/src/web/icons/TableMenuEditIcon.tsx +2 -2
- package/src/web/icons/TableMenuSuspendIcon.tsx +2 -9
- package/src/web/mutation-toast.ts +14 -2
- package/dist/chunk-YSDLHEJ7.js.map +0 -1
package/dist/web/index.cjs
CHANGED
|
@@ -28616,8 +28616,10 @@ var radii = {
|
|
|
28616
28616
|
var spacing = {
|
|
28617
28617
|
sm: 8};
|
|
28618
28618
|
var fontSize = {
|
|
28619
|
-
sm: 12,
|
|
28620
28619
|
md: 14};
|
|
28620
|
+
var typographyScale = {
|
|
28621
|
+
12: { fontSize: 12, lineHeight: 16 },
|
|
28622
|
+
14: { fontSize: 14, lineHeight: 19 }};
|
|
28621
28623
|
var fontWeight = {
|
|
28622
28624
|
medium: "500",
|
|
28623
28625
|
semibold: "600"};
|
|
@@ -28626,24 +28628,24 @@ var fonts = {
|
|
|
28626
28628
|
};
|
|
28627
28629
|
var labelTypography = {
|
|
28628
28630
|
fontFamily: fonts.sans,
|
|
28629
|
-
fontSize: fontSize
|
|
28631
|
+
fontSize: typographyScale[12].fontSize,
|
|
28630
28632
|
fontWeight: fontWeight.medium,
|
|
28631
|
-
lineHeight:
|
|
28633
|
+
lineHeight: typographyScale[12].lineHeight,
|
|
28632
28634
|
letterSpacing: 0
|
|
28633
28635
|
};
|
|
28634
28636
|
var buttonTypography = {
|
|
28635
28637
|
lg: {
|
|
28636
28638
|
fontFamily: fonts.sans,
|
|
28637
|
-
fontSize: 14,
|
|
28639
|
+
fontSize: typographyScale[14].fontSize,
|
|
28638
28640
|
fontWeight: fontWeight.semibold,
|
|
28639
|
-
lineHeight:
|
|
28641
|
+
lineHeight: typographyScale[14].lineHeight,
|
|
28640
28642
|
letterSpacing: 0
|
|
28641
28643
|
},
|
|
28642
28644
|
sm: {
|
|
28643
28645
|
fontFamily: fonts.sans,
|
|
28644
|
-
fontSize: 12,
|
|
28646
|
+
fontSize: typographyScale[12].fontSize,
|
|
28645
28647
|
fontWeight: fontWeight.semibold,
|
|
28646
|
-
lineHeight:
|
|
28648
|
+
lineHeight: typographyScale[12].lineHeight,
|
|
28647
28649
|
letterSpacing: 0
|
|
28648
28650
|
}
|
|
28649
28651
|
};
|
|
@@ -29916,9 +29918,9 @@ function TableMenuActivateIcon({ className }) {
|
|
|
29916
29918
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
29917
29919
|
"path",
|
|
29918
29920
|
{
|
|
29919
|
-
d: "
|
|
29921
|
+
d: "M5.83333 9.16631V5.83297C5.83229 4.79968 6.21523 3.80286 6.90781 3.03603C7.60039 2.2692 8.55319 1.78706 9.58125 1.68321C10.6093 1.57937 11.6393 1.86123 12.4712 2.47407C13.3032 3.08691 13.8777 3.98701 14.0833 4.99964M4.16667 9.16631H15.8333C16.7538 9.16631 17.5 9.9125 17.5 10.833V16.6663C17.5 17.5868 16.7538 18.333 15.8333 18.333H4.16667C3.24619 18.333 2.5 17.5868 2.5 16.6663V10.833C2.5 9.9125 3.24619 9.16631 4.16667 9.16631Z",
|
|
29920
29922
|
stroke: "#279D54",
|
|
29921
|
-
strokeWidth: "
|
|
29923
|
+
strokeWidth: "2",
|
|
29922
29924
|
strokeLinecap: "round",
|
|
29923
29925
|
strokeLinejoin: "round"
|
|
29924
29926
|
}
|
|
@@ -29940,9 +29942,9 @@ function TableMenuEditIcon({ className }) {
|
|
|
29940
29942
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
29941
29943
|
"path",
|
|
29942
29944
|
{
|
|
29943
|
-
d: "
|
|
29945
|
+
d: "M10 2.50019H4.16667C3.72464 2.50019 3.30072 2.67578 2.98816 2.98834C2.67559 3.3009 2.5 3.72483 2.5 4.16686V15.8335C2.5 16.2755 2.67559 16.6995 2.98816 17.012C3.30072 17.3246 3.72464 17.5002 4.16667 17.5002H15.8333C16.2754 17.5002 16.6993 17.3246 17.0118 17.012C17.3244 16.6995 17.5 16.2755 17.5 15.8335V10.0002M15.3125 2.18769C15.644 1.85617 16.0937 1.66992 16.5625 1.66992C17.0313 1.66992 17.481 1.85617 17.8125 2.18769C18.144 2.51921 18.3303 2.96885 18.3303 3.43769C18.3303 3.90653 18.144 4.35617 17.8125 4.68769L10.3017 12.1994C10.1038 12.3971 9.85934 12.5418 9.59083 12.6202L7.19667 13.3202C7.12496 13.3411 7.04895 13.3424 6.97659 13.3238C6.90423 13.3053 6.83819 13.2676 6.78537 13.2148C6.73255 13.162 6.69491 13.096 6.67637 13.0236C6.65783 12.9512 6.65909 12.8752 6.68 12.8035L7.38 10.4094C7.45877 10.1411 7.60378 9.8969 7.80167 9.69936L15.3125 2.18769Z",
|
|
29944
29946
|
stroke: "#B5BCC1",
|
|
29945
|
-
strokeWidth: "
|
|
29947
|
+
strokeWidth: "2",
|
|
29946
29948
|
strokeLinecap: "round",
|
|
29947
29949
|
strokeLinejoin: "round"
|
|
29948
29950
|
}
|
|
@@ -29951,7 +29953,7 @@ function TableMenuEditIcon({ className }) {
|
|
|
29951
29953
|
);
|
|
29952
29954
|
}
|
|
29953
29955
|
function TableMenuSuspendIcon({ className }) {
|
|
29954
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
29956
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
29955
29957
|
"svg",
|
|
29956
29958
|
{
|
|
29957
29959
|
width: "20",
|
|
@@ -29961,28 +29963,16 @@ function TableMenuSuspendIcon({ className }) {
|
|
|
29961
29963
|
xmlns: "http://www.w3.org/2000/svg",
|
|
29962
29964
|
"aria-hidden": true,
|
|
29963
29965
|
className: cn("shrink-0", className),
|
|
29964
|
-
children:
|
|
29965
|
-
|
|
29966
|
-
|
|
29967
|
-
|
|
29968
|
-
|
|
29969
|
-
|
|
29970
|
-
|
|
29971
|
-
|
|
29972
|
-
|
|
29973
|
-
|
|
29974
|
-
),
|
|
29975
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
29976
|
-
"path",
|
|
29977
|
-
{
|
|
29978
|
-
d: "M6.66667 10H13.3333",
|
|
29979
|
-
stroke: "#AE0011",
|
|
29980
|
-
strokeWidth: "1.75",
|
|
29981
|
-
strokeLinecap: "round",
|
|
29982
|
-
strokeLinejoin: "round"
|
|
29983
|
-
}
|
|
29984
|
-
)
|
|
29985
|
-
]
|
|
29966
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
29967
|
+
"path",
|
|
29968
|
+
{
|
|
29969
|
+
d: "M4.08464 4.08366L15.918 15.917M18.3346 10.0003C18.3346 14.6027 14.6037 18.3337 10.0013 18.3337C5.39893 18.3337 1.66797 14.6027 1.66797 10.0003C1.66797 5.39795 5.39893 1.66699 10.0013 1.66699C14.6037 1.66699 18.3346 5.39795 18.3346 10.0003Z",
|
|
29970
|
+
stroke: "#AE0011",
|
|
29971
|
+
strokeWidth: "2",
|
|
29972
|
+
strokeLinecap: "round",
|
|
29973
|
+
strokeLinejoin: "round"
|
|
29974
|
+
}
|
|
29975
|
+
)
|
|
29986
29976
|
}
|
|
29987
29977
|
);
|
|
29988
29978
|
}
|
|
@@ -30314,13 +30304,14 @@ function TableCell({
|
|
|
30314
30304
|
...props
|
|
30315
30305
|
}) {
|
|
30316
30306
|
const disabled = useTableRowDisabled();
|
|
30307
|
+
const resolvedVariant = disabled ? "muted" : variant;
|
|
30317
30308
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
30318
30309
|
"td",
|
|
30319
30310
|
{
|
|
30320
30311
|
className: cn(
|
|
30321
30312
|
tableCellPaddingClassName,
|
|
30322
30313
|
tableBodyClassName,
|
|
30323
|
-
tableCellVariantClasses[
|
|
30314
|
+
tableCellVariantClasses[resolvedVariant],
|
|
30324
30315
|
disabled && tableRowDisabledCellClassName,
|
|
30325
30316
|
tableAlignClasses[align],
|
|
30326
30317
|
className
|
|
@@ -30331,6 +30322,7 @@ function TableCell({
|
|
|
30331
30322
|
);
|
|
30332
30323
|
}
|
|
30333
30324
|
function TableActionsCell({ className, children, ...props }) {
|
|
30325
|
+
const disabled = useTableRowDisabled();
|
|
30334
30326
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
30335
30327
|
"td",
|
|
30336
30328
|
{
|
|
@@ -30339,6 +30331,7 @@ function TableActionsCell({ className, children, ...props }) {
|
|
|
30339
30331
|
tableCellPaddingClassName,
|
|
30340
30332
|
tableBodyClassName,
|
|
30341
30333
|
tableStickyRightShadowClassName,
|
|
30334
|
+
disabled && tableRowDisabledCellClassName,
|
|
30342
30335
|
className
|
|
30343
30336
|
),
|
|
30344
30337
|
...props,
|
|
@@ -31479,11 +31472,19 @@ function ToasterProvider() {
|
|
|
31479
31472
|
async function runMutationWithToast(action, messages, options) {
|
|
31480
31473
|
try {
|
|
31481
31474
|
await action();
|
|
31482
|
-
|
|
31475
|
+
if (messages.successDescription) {
|
|
31476
|
+
sonner.toast.success(messages.success, { description: messages.successDescription });
|
|
31477
|
+
} else {
|
|
31478
|
+
sonner.toast.success(messages.success);
|
|
31479
|
+
}
|
|
31483
31480
|
return { success: true };
|
|
31484
31481
|
} catch (error) {
|
|
31485
31482
|
const errorMessage = options?.getErrorMessage?.(error) ?? messages.error;
|
|
31486
|
-
|
|
31483
|
+
if (messages.errorDescription) {
|
|
31484
|
+
sonner.toast.error(errorMessage, { description: messages.errorDescription });
|
|
31485
|
+
} else {
|
|
31486
|
+
sonner.toast.error(errorMessage);
|
|
31487
|
+
}
|
|
31487
31488
|
return { success: false, errorMessage };
|
|
31488
31489
|
}
|
|
31489
31490
|
}
|