@myrjfa/ui 1.0.5 → 1.0.7

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.
@@ -1,8 +1,9 @@
1
- declare const DocumentPreviewButton: ({ filepath, label, icon, size, }: {
1
+ declare const DocumentPreviewButton: ({ filepath, label, icon, size, labelInMobile, }: {
2
2
  filepath: string | File;
3
3
  label?: string;
4
4
  icon?: any;
5
5
  size?: "icon" | "lg" | "sm" | "default";
6
+ labelInMobile?: boolean;
6
7
  }) => import("react/jsx-runtime").JSX.Element;
7
8
  export default DocumentPreviewButton;
8
9
  //# sourceMappingURL=file-preview.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"file-preview.d.ts","sourceRoot":"","sources":["../../src/misc/file-preview.tsx"],"names":[],"mappings":"AAuBA,QAAA,MAAM,qBAAqB,GAAI,kCAK5B;IACC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;CAC3C,4CA0EA,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
1
+ {"version":3,"file":"file-preview.d.ts","sourceRoot":"","sources":["../../src/misc/file-preview.tsx"],"names":[],"mappings":"AAuBA,QAAA,MAAM,qBAAqB,GAAI,iDAM5B;IACC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IACxC,aAAa,CAAC,EAAE,OAAO,CAAC;CAC3B,4CAsEA,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
@@ -56,8 +56,8 @@ var imageTypes = ["jpg", "jpeg", "png", "gif", "webp"];
56
56
  var videotypes = ["mp4", "webm"];
57
57
  var docTypes = ["pdf"];
58
58
  var DocumentPreviewButton = function (_a) {
59
- var filepath = _a.filepath, label = _a.label, icon = _a.icon, _b = _a.size, size = _b === void 0 ? 'default' : _b;
60
- var _c = useState(false), loading = _c[0], setLoading = _c[1];
59
+ var filepath = _a.filepath, label = _a.label, icon = _a.icon, _b = _a.size, size = _b === void 0 ? 'default' : _b, _c = _a.labelInMobile, labelInMobile = _c === void 0 ? false : _c;
60
+ var _d = useState(false), loading = _d[0], setLoading = _d[1];
61
61
  var labelInternal = label;
62
62
  var IconInternal = icon || _jsx(FileIcon, { className: "h-8 w-8 text-chart-2" });
63
63
  if (typeof filepath === 'string') {
@@ -125,6 +125,6 @@ var DocumentPreviewButton = function (_a) {
125
125
  }
126
126
  });
127
127
  }); };
128
- return (_jsxs("div", { className: "flex flex-col items-center", children: [_jsxs(Button, { variant: "outline", size: size, className: "w-full cursor-pointer hidden md:flex", onClick: handleOpenFile, disabled: loading, children: [IconInternal, labelInternal] }), _jsx(Button, { variant: "outline", size: size, className: "w-full cursor-pointer flex md:hidden", onClick: handleOpenFile, disabled: loading, children: IconInternal })] }));
128
+ return (_jsx("div", { className: "flex flex-col items-center", children: _jsxs(Button, { variant: "outline", size: size, className: "w-full cursor-pointer flex md:flex", onClick: handleOpenFile, disabled: loading, children: [IconInternal, _jsx("span", { className: "".concat(labelInMobile ? "inline" : "hidden", " md:inline"), children: labelInternal })] }) }));
129
129
  };
130
130
  export default DocumentPreviewButton;
@@ -2,7 +2,7 @@ type FilterProps = {
2
2
  values: string[];
3
3
  label: string;
4
4
  formType: string;
5
- selectedValue: string | null;
5
+ selectedValue: string | null | undefined;
6
6
  onChange: (value: string | null) => void;
7
7
  others?: boolean;
8
8
  };
@@ -1 +1 @@
1
- {"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../src/misc/filter.tsx"],"names":[],"mappings":"AAsBA,KAAK,WAAW,GAAG;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACzC,MAAM,CAAC,EAAE,OAAO,CAAA;CACnB,CAAC;AACF,eAAO,MAAM,WAAW,GAAI,KAAK,MAAM,EAAE,aACwC,CAAC;AAElF,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAgHjC,CAAC;AAEF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../src/misc/filter.tsx"],"names":[],"mappings":"AAsBA,KAAK,WAAW,GAAG;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACzC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACzC,MAAM,CAAC,EAAE,OAAO,CAAA;CACnB,CAAC;AACF,eAAO,MAAM,WAAW,GAAI,KAAK,MAAM,EAAE,aACwC,CAAC;AAElF,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAgHjC,CAAC;AAEF,eAAe,MAAM,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myrjfa/ui",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "Shared UI components for my apps",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",