@jobber/components 6.62.2 → 6.63.1

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.
@@ -35,9 +35,8 @@ export declare namespace FormatFile {
35
35
  readonly children: React.ReactNode;
36
36
  readonly className?: string;
37
37
  }) => React.JSX.Element;
38
- var DeleteButton: ({ onDelete, size, children, }: {
38
+ var DeleteButton: ({ onDelete, children, }: {
39
39
  readonly onDelete?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
40
- readonly size?: "base" | "large";
41
40
  readonly children?: React.ReactNode;
42
41
  }) => React.JSX.Element;
43
42
  }
@@ -9,7 +9,7 @@ var ProgressBar = require('./ProgressBar-cjs.js');
9
9
  var Button = require('./Button-cjs.js');
10
10
  var ConfirmationModal = require('./ConfirmationModal-cjs.js');
11
11
 
12
- var styles = {"formatFile":"y9T1gWK9SHY-","expanded":"_6qcLC0nLki0-","compact":"cSm0ukEQcOU-","wrapper":"TEarBLxe1QY-","large":"rha7bX0NCtI-","base":"_7kv4ujgaxNk-","thumbnail":"Km0E9H-xb-M-","deleteButton":"d2l80-AKBiU-","clickable":"f7xR4ZcqlLo-","hoverable":"LxLX5kFFkfI-","progress":"_121nzRvOA-0-","contentBlock":"cyiC2EalTkQ-","deleteable":"qwQuqw4uODY-","spinning":"dR8gWEecWxc-"};
12
+ var styles = {"formatFile":"y9T1gWK9SHY-","expanded":"_6qcLC0nLki0-","compact":"cSm0ukEQcOU-","wrapper":"TEarBLxe1QY-","large":"rha7bX0NCtI-","base":"_7kv4ujgaxNk-","thumbnail":"Km0E9H-xb-M-","deleteButton":"d2l80-AKBiU-","customDeleteButton":"qDKY-J4vHJA-","clickable":"f7xR4ZcqlLo-","hoverable":"LxLX5kFFkfI-","progress":"_121nzRvOA-0-","contentBlock":"cyiC2EalTkQ-","deleteable":"qwQuqw4uODY-","spinning":"dR8gWEecWxc-"};
13
13
 
14
14
  const useFormatFile = ({ file }) => {
15
15
  const isComplete = file.progress >= 1;
@@ -105,10 +105,11 @@ FormatFile.Expanded = function FormatFileExpanded({ file, fileSize, isVisible, }
105
105
  FormatFile.Wrapper = function FormatFileWrapper({ children, className, }) {
106
106
  return React.createElement("div", { className: className }, children);
107
107
  };
108
- FormatFile.DeleteButton = function FormatFileDeleteButton({ onDelete, size = "base", children, }) {
109
- const buttonSize = size === "base" ? "small" : "base";
108
+ FormatFile.DeleteButton = function FormatFileDeleteButton({ onDelete, children, }) {
110
109
  return (React.createElement(React.Fragment, null,
111
- React.createElement(Button.Button, { onClick: onDelete, variation: "destructive", type: "tertiary", icon: "trash", ariaLabel: "Delete File", size: buttonSize }),
110
+ React.createElement(Button.Button, { UNSAFE_className: {
111
+ container: styles.customDeleteButton,
112
+ }, onClick: onDelete, variation: "destructive", type: "tertiary", icon: "trash", ariaLabel: "Delete File", size: "small" }),
112
113
  children));
113
114
  };
114
115
 
@@ -7,7 +7,7 @@ import { P as ProgressBar } from './ProgressBar-es.js';
7
7
  import { B as Button } from './Button-es.js';
8
8
  import { C as ConfirmationModal } from './ConfirmationModal-es.js';
9
9
 
10
- var styles = {"formatFile":"y9T1gWK9SHY-","expanded":"_6qcLC0nLki0-","compact":"cSm0ukEQcOU-","wrapper":"TEarBLxe1QY-","large":"rha7bX0NCtI-","base":"_7kv4ujgaxNk-","thumbnail":"Km0E9H-xb-M-","deleteButton":"d2l80-AKBiU-","clickable":"f7xR4ZcqlLo-","hoverable":"LxLX5kFFkfI-","progress":"_121nzRvOA-0-","contentBlock":"cyiC2EalTkQ-","deleteable":"qwQuqw4uODY-","spinning":"dR8gWEecWxc-"};
10
+ var styles = {"formatFile":"y9T1gWK9SHY-","expanded":"_6qcLC0nLki0-","compact":"cSm0ukEQcOU-","wrapper":"TEarBLxe1QY-","large":"rha7bX0NCtI-","base":"_7kv4ujgaxNk-","thumbnail":"Km0E9H-xb-M-","deleteButton":"d2l80-AKBiU-","customDeleteButton":"qDKY-J4vHJA-","clickable":"f7xR4ZcqlLo-","hoverable":"LxLX5kFFkfI-","progress":"_121nzRvOA-0-","contentBlock":"cyiC2EalTkQ-","deleteable":"qwQuqw4uODY-","spinning":"dR8gWEecWxc-"};
11
11
 
12
12
  const useFormatFile = ({ file }) => {
13
13
  const isComplete = file.progress >= 1;
@@ -103,10 +103,11 @@ FormatFile.Expanded = function FormatFileExpanded({ file, fileSize, isVisible, }
103
103
  FormatFile.Wrapper = function FormatFileWrapper({ children, className, }) {
104
104
  return React__default.createElement("div", { className: className }, children);
105
105
  };
106
- FormatFile.DeleteButton = function FormatFileDeleteButton({ onDelete, size = "base", children, }) {
107
- const buttonSize = size === "base" ? "small" : "base";
106
+ FormatFile.DeleteButton = function FormatFileDeleteButton({ onDelete, children, }) {
108
107
  return (React__default.createElement(React__default.Fragment, null,
109
- React__default.createElement(Button, { onClick: onDelete, variation: "destructive", type: "tertiary", icon: "trash", ariaLabel: "Delete File", size: buttonSize }),
108
+ React__default.createElement(Button, { UNSAFE_className: {
109
+ container: styles.customDeleteButton,
110
+ }, onClick: onDelete, variation: "destructive", type: "tertiary", icon: "trash", ariaLabel: "Delete File", size: "small" }),
110
111
  children));
111
112
  };
112
113
 
@@ -4,7 +4,9 @@ export declare enum FileTypes {
4
4
  PNG = "image/png",
5
5
  HEIC = "image/heic",
6
6
  PDF = "application/pdf",
7
- DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
7
+ DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
8
+ XLSX = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
9
+ CSV = "text/csv"
8
10
  }
9
11
  export declare const BASIC_IMAGE_TYPES: string[];
10
12
  export declare const mimeTypeToReadable: (mimeType: string) => string;
@@ -1450,6 +1450,8 @@ var FileTypes;
1450
1450
  FileTypes["HEIC"] = "image/heic";
1451
1451
  FileTypes["PDF"] = "application/pdf";
1452
1452
  FileTypes["DOCX"] = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
1453
+ FileTypes["XLSX"] = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
1454
+ FileTypes["CSV"] = "text/csv";
1453
1455
  })(FileTypes || (FileTypes = {}));
1454
1456
  const BASIC_IMAGE_TYPES = ["PNG", "JPEG", "JPG"];
1455
1457
  // Converts a MIME type to its readable format
@@ -1448,6 +1448,8 @@ var FileTypes;
1448
1448
  FileTypes["HEIC"] = "image/heic";
1449
1449
  FileTypes["PDF"] = "application/pdf";
1450
1450
  FileTypes["DOCX"] = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
1451
+ FileTypes["XLSX"] = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
1452
+ FileTypes["CSV"] = "text/csv";
1451
1453
  })(FileTypes || (FileTypes = {}));
1452
1454
  const BASIC_IMAGE_TYPES = ["PNG", "JPEG", "JPG"];
1453
1455
  // Converts a MIME type to its readable format
package/dist/styles.css CHANGED
@@ -7456,6 +7456,16 @@ a._7BLGtYNuJOU-.zgRx3ehZ2z8-:hover {
7456
7456
  z-index: var(--elevation-base);
7457
7457
  }
7458
7458
 
7459
+ .cSm0ukEQcOU- .qDKY-J4vHJA- {
7460
+ border-radius: 4px;
7461
+ border-radius: var(--radius-small);
7462
+ }
7463
+
7464
+ .cSm0ukEQcOU-._7kv4ujgaxNk- .qDKY-J4vHJA- {
7465
+ max-width: 24px;
7466
+ min-height: 24px;
7467
+ }
7468
+
7459
7469
  ._6qcLC0nLki0- .Km0E9H-xb-M- {
7460
7470
  border-right: none;
7461
7471
  border-bottom-left-radius: 8px;
@@ -7520,22 +7530,18 @@ a._7BLGtYNuJOU-.zgRx3ehZ2z8-:hover {
7520
7530
  top: var(--space-smaller);
7521
7531
  right: 4px;
7522
7532
  right: var(--space-smaller);
7533
+ box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.1), 0px 4px 12px 0px rgba(0, 0, 0, 0.05);
7534
+ box-shadow: var(--shadow-base);
7523
7535
  }
7524
7536
 
7525
- @media (min-width: 768px) {
7526
- .qwQuqw4uODY- ~ .d2l80-AKBiU- {
7527
- visibility: hidden;
7528
- }
7529
-
7530
- .d2l80-AKBiU-:focus-within,
7531
- .d2l80-AKBiU-:hover,
7532
- .qwQuqw4uODY-:hover ~ .d2l80-AKBiU-,
7533
- .qwQuqw4uODY-:focus ~ .d2l80-AKBiU- {
7534
- visibility: visible;
7535
- }
7537
+ .cSm0ukEQcOU-.rha7bX0NCtI- .d2l80-AKBiU- {
7538
+ top: 8px;
7539
+ top: var(--space-small);
7540
+ right: 8px;
7541
+ right: var(--space-small);
7536
7542
  }
7537
7543
 
7538
- @media (--medium-screens-and-up) {
7544
+ @media (any-pointer: fine) {
7539
7545
  .qwQuqw4uODY- ~ .d2l80-AKBiU- {
7540
7546
  visibility: hidden;
7541
7547
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components",
3
- "version": "6.62.2",
3
+ "version": "6.63.1",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -542,5 +542,5 @@
542
542
  "> 1%",
543
543
  "IE 10"
544
544
  ],
545
- "gitHead": "a4cb5a5d369226f54f7c8ec5684ddef1131dffbd"
545
+ "gitHead": "dbc1fa0d717c8345fdcae7b520e5604838f144a3"
546
546
  }