@jobber/components 6.92.0 → 6.93.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.
@@ -8,9 +8,11 @@ var styles = {"actionContainer":"NWf8JR3TBoo-","actionButton":"PoMXFVYVY5A-","sp
8
8
 
9
9
  function ComboboxAction(props) {
10
10
  const { searchValue, handleClose } = React.useContext(ComboboxProvider.ComboboxContext);
11
- if (props.visible) {
12
- const isVisible = typeof props.visible === "function" && !props.visible({ searchValue });
13
- if (isVisible || !props.visible) {
11
+ if (props.visible !== undefined) {
12
+ const isVisible = typeof props.visible === "function"
13
+ ? props.visible({ searchValue })
14
+ : props.visible;
15
+ if (!isVisible) {
14
16
  return null;
15
17
  }
16
18
  }
@@ -6,9 +6,11 @@ var styles = {"actionContainer":"NWf8JR3TBoo-","actionButton":"PoMXFVYVY5A-","sp
6
6
 
7
7
  function ComboboxAction(props) {
8
8
  const { searchValue, handleClose } = useContext(ComboboxContext);
9
- if (props.visible) {
10
- const isVisible = typeof props.visible === "function" && !props.visible({ searchValue });
11
- if (isVisible || !props.visible) {
9
+ if (props.visible !== undefined) {
10
+ const isVisible = typeof props.visible === "function"
11
+ ? props.visible({ searchValue })
12
+ : props.visible;
13
+ if (!isVisible) {
12
14
  return null;
13
15
  }
14
16
  }
@@ -84,6 +84,10 @@ interface InputFileProps {
84
84
  * @default "base"
85
85
  */
86
86
  readonly size?: "small" | "base";
87
+ /**
88
+ * Sets the `name` attribute on the underlying `<input>` element.
89
+ */
90
+ readonly name?: string;
87
91
  /**
88
92
  * Label for the InputFile's button.
89
93
  * @default Automatic
@@ -162,7 +166,7 @@ interface InputFileProps {
162
166
  */
163
167
  readonly validator?: <T extends File>(file: T) => FileError | FileError[] | null;
164
168
  }
165
- export declare function InputFile({ variation, size, buttonLabel: providedButtonLabel, allowMultiple, allowedTypes, description, hintText, maxFilesValidation, getUploadParams, onUploadStart, onUploadProgress, onUploadComplete, onUploadError, validator, children, }: InputFileProps): React.JSX.Element;
169
+ export declare function InputFile({ variation, size, name, buttonLabel: providedButtonLabel, allowMultiple, allowedTypes, description, hintText, maxFilesValidation, getUploadParams, onUploadStart, onUploadProgress, onUploadComplete, onUploadError, validator, children, }: InputFileProps): React.JSX.Element;
166
170
  export declare namespace InputFile {
167
171
  var Button: typeof InputFileButton;
168
172
  var Description: typeof InputFileDescription;
@@ -1538,7 +1538,7 @@ function InputFileValidationErrors({ validationErrors, }) {
1538
1538
  }
1539
1539
 
1540
1540
  /* eslint-disable max-statements */
1541
- function InputFile({ variation = "dropzone", size = "base", buttonLabel: providedButtonLabel, allowMultiple = false, allowedTypes = "all", description, hintText, maxFilesValidation, getUploadParams, onUploadStart, onUploadProgress, onUploadComplete, onUploadError, validator, children, }) {
1541
+ function InputFile({ variation = "dropzone", size = "base", name, buttonLabel: providedButtonLabel, allowMultiple = false, allowedTypes = "all", description, hintText, maxFilesValidation, getUploadParams, onUploadStart, onUploadProgress, onUploadComplete, onUploadError, validator, children, }) {
1542
1542
  const maxFiles = (maxFilesValidation === null || maxFilesValidation === void 0 ? void 0 : maxFilesValidation.maxFiles) || 0;
1543
1543
  const numberOfCurrentFiles = (maxFilesValidation === null || maxFilesValidation === void 0 ? void 0 : maxFilesValidation.numberOfCurrentFiles) || 0;
1544
1544
  const handleValidation = React.useCallback((file) => {
@@ -1635,7 +1635,7 @@ function InputFile({ variation = "dropzone", size = "base", buttonLabel: provide
1635
1635
  variation === "button" && React.createElement(InputFile.Button, { fullWidth: true })));
1636
1636
  return (React.createElement(React.Fragment, null,
1637
1637
  React.createElement("div", Object.assign({}, getRootProps({ className: dropZone }), { tabIndex: variation === "button" ? -1 : 0 }),
1638
- React.createElement("input", Object.assign({}, getInputProps(), { "data-testid": "input-file-input" })),
1638
+ React.createElement("input", Object.assign({}, getInputProps(), { "data-testid": "input-file-input", name: name })),
1639
1639
  React.createElement(InputFileContentContext.Provider, { value: contentContext }, children || defaultContent)),
1640
1640
  React.createElement(InputFileValidationErrors, { validationErrors: validationErrors })));
1641
1641
  function handleDrop(acceptedFiles) {
@@ -1536,7 +1536,7 @@ function InputFileValidationErrors({ validationErrors, }) {
1536
1536
  }
1537
1537
 
1538
1538
  /* eslint-disable max-statements */
1539
- function InputFile({ variation = "dropzone", size = "base", buttonLabel: providedButtonLabel, allowMultiple = false, allowedTypes = "all", description, hintText, maxFilesValidation, getUploadParams, onUploadStart, onUploadProgress, onUploadComplete, onUploadError, validator, children, }) {
1539
+ function InputFile({ variation = "dropzone", size = "base", name, buttonLabel: providedButtonLabel, allowMultiple = false, allowedTypes = "all", description, hintText, maxFilesValidation, getUploadParams, onUploadStart, onUploadProgress, onUploadComplete, onUploadError, validator, children, }) {
1540
1540
  const maxFiles = (maxFilesValidation === null || maxFilesValidation === void 0 ? void 0 : maxFilesValidation.maxFiles) || 0;
1541
1541
  const numberOfCurrentFiles = (maxFilesValidation === null || maxFilesValidation === void 0 ? void 0 : maxFilesValidation.numberOfCurrentFiles) || 0;
1542
1542
  const handleValidation = useCallback((file) => {
@@ -1633,7 +1633,7 @@ function InputFile({ variation = "dropzone", size = "base", buttonLabel: provide
1633
1633
  variation === "button" && React__default.createElement(InputFile.Button, { fullWidth: true })));
1634
1634
  return (React__default.createElement(React__default.Fragment, null,
1635
1635
  React__default.createElement("div", Object.assign({}, getRootProps({ className: dropZone }), { tabIndex: variation === "button" ? -1 : 0 }),
1636
- React__default.createElement("input", Object.assign({}, getInputProps(), { "data-testid": "input-file-input" })),
1636
+ React__default.createElement("input", Object.assign({}, getInputProps(), { "data-testid": "input-file-input", name: name })),
1637
1637
  React__default.createElement(InputFileContentContext.Provider, { value: contentContext }, children || defaultContent)),
1638
1638
  React__default.createElement(InputFileValidationErrors, { validationErrors: validationErrors })));
1639
1639
  function handleDrop(acceptedFiles) {
package/dist/styles.css CHANGED
@@ -442,7 +442,7 @@
442
442
  }
443
443
 
444
444
  .W4Fsewoz1sg- {
445
- color: hsl(0, 0%, 72%);
445
+ color: hsl(0, 0%, 58%);
446
446
  color: var(--color-disabled);
447
447
  }
448
448
 
@@ -1336,14 +1336,14 @@ a._7BLGtYNuJOU-.zgRx3ehZ2z8-,
1336
1336
  a._7BLGtYNuJOU-.zgRx3ehZ2z8-:hover {
1337
1337
  border-color: hsl(0, 0%, 93%);
1338
1338
  border-color: var(--color-disabled--secondary);
1339
- color: hsl(0, 0%, 72%);
1339
+ color: hsl(0, 0%, 58%);
1340
1340
  color: var(--color-disabled);
1341
1341
  -webkit-user-select: none;
1342
1342
  -ms-user-select: none;
1343
1343
  user-select: none;
1344
1344
  background-color: hsl(0, 0%, 93%);
1345
1345
  background-color: var(--color-disabled--secondary);
1346
- fill: hsl(0, 0%, 72%);
1346
+ fill: hsl(0, 0%, 58%);
1347
1347
  fill: var(--color-disabled);
1348
1348
  pointer-events: none;
1349
1349
  cursor: not-allowed;
@@ -3305,7 +3305,7 @@ a._7BLGtYNuJOU-.zgRx3ehZ2z8-:hover {
3305
3305
  }
3306
3306
 
3307
3307
  .TKr3J-6ARFo- p {
3308
- color: hsl(0, 0%, 72%);
3308
+ color: hsl(0, 0%, 58%);
3309
3309
  color: var(--color-disabled);
3310
3310
  }
3311
3311
 
@@ -3536,7 +3536,7 @@ a._7BLGtYNuJOU-.zgRx3ehZ2z8-:hover {
3536
3536
  ._3uJEejbZvig-:hover,
3537
3537
  ._3uJEejbZvig-:focus-visible {
3538
3538
  --chip-border-color: var(--color-disabled--secondary);
3539
- color: hsl(0, 0%, 72%);
3539
+ color: hsl(0, 0%, 58%);
3540
3540
  color: var(--color-disabled);
3541
3541
  --chip-base-bg-color: var(--color-disabled--secondary);
3542
3542
  --chip-base-hover-bg-color: var(--color-disabled--secondary);
@@ -3544,7 +3544,7 @@ a._7BLGtYNuJOU-.zgRx3ehZ2z8-:hover {
3544
3544
  }
3545
3545
 
3546
3546
  ._3uJEejbZvig- .oV7kqacWv-U- {
3547
- background-color: hsl(0, 0%, 72%);
3547
+ background-color: hsl(0, 0%, 58%);
3548
3548
  background-color: var(--color-disabled);
3549
3549
  }
3550
3550
 
@@ -3554,7 +3554,7 @@ a._7BLGtYNuJOU-.zgRx3ehZ2z8-:hover {
3554
3554
  }
3555
3555
 
3556
3556
  .FJNLweTKlm4-._3uJEejbZvig- .OufFSBZ4gLc- path {
3557
- fill: hsl(0, 0%, 72%);
3557
+ fill: hsl(0, 0%, 58%);
3558
3558
  fill: var(--color-disabled);
3559
3559
  }
3560
3560
 
@@ -6339,12 +6339,12 @@ a._7BLGtYNuJOU-.zgRx3ehZ2z8-:hover {
6339
6339
 
6340
6340
  /* Disabled groups and their options */
6341
6341
  optgroup[disabled] {
6342
- color: hsl(0, 0%, 72%);
6342
+ color: hsl(0, 0%, 58%);
6343
6343
  color: var(--color-disabled);
6344
6344
  }
6345
6345
  optgroup[disabled] option,
6346
6346
  option[disabled] {
6347
- color: hsl(0, 0%, 72%);
6347
+ color: hsl(0, 0%, 58%);
6348
6348
  color: var(--color-disabled);
6349
6349
  cursor: default;
6350
6350
  }
@@ -7236,7 +7236,7 @@ h2.react-datepicker__current-month {
7236
7236
  background: var(--color-interactive--background);
7237
7237
  }
7238
7238
  .Ma55F5Y-XhE- .react-datepicker__day--disabled {
7239
- color: hsl(0, 0%, 72%);
7239
+ color: hsl(0, 0%, 58%);
7240
7240
  color: var(--color-disabled);
7241
7241
  cursor: default;
7242
7242
  }
@@ -7806,12 +7806,12 @@ h2.react-datepicker__current-month {
7806
7806
  .e-cSZjkHGw8- .PiwOCJz7Zto- {
7807
7807
  border-color: hsl(0, 0%, 93%);
7808
7808
  border-color: var(--color-disabled--secondary);
7809
- background-color: hsl(0, 0%, 72%);
7809
+ background-color: hsl(0, 0%, 58%);
7810
7810
  background-color: var(--color-disabled);
7811
7811
  }
7812
7812
 
7813
7813
  .e-cSZjkHGw8- {
7814
- border-color: hsl(0, 0%, 72%);
7814
+ border-color: hsl(0, 0%, 58%);
7815
7815
  border-color: var(--color-disabled);
7816
7816
  background-color: rgba(255, 255, 255, 1);
7817
7817
  background-color: var(--color-surface);
@@ -7819,7 +7819,7 @@ h2.react-datepicker__current-month {
7819
7819
  }
7820
7820
 
7821
7821
  ._40c6OIH33p8-.e-cSZjkHGw8- {
7822
- background-color: hsl(0, 0%, 72%);
7822
+ background-color: hsl(0, 0%, 58%);
7823
7823
  background-color: var(--color-disabled);
7824
7824
  }
7825
7825
 
@@ -7829,7 +7829,7 @@ h2.react-datepicker__current-month {
7829
7829
  }
7830
7830
 
7831
7831
  .e-cSZjkHGw8-:hover {
7832
- border-color: hsl(0, 0%, 72%);
7832
+ border-color: hsl(0, 0%, 58%);
7833
7833
  border-color: var(--color-disabled);
7834
7834
  }
7835
7835
 
@@ -9697,7 +9697,7 @@ input.oOrjwubmsVA- {
9697
9697
  }
9698
9698
 
9699
9699
  .w1Rr3bk2t5g-[disabled] + .gN41T07x0l0- {
9700
- color: hsl(0, 0%, 72%);
9700
+ color: hsl(0, 0%, 58%);
9701
9701
  color: var(--color-disabled);
9702
9702
  cursor: not-allowed;
9703
9703
  }
@@ -9710,7 +9710,7 @@ input.oOrjwubmsVA- {
9710
9710
  .w1Rr3bk2t5g-[disabled]:checked + .gN41T07x0l0-::before {
9711
9711
  --radio--checked-shadow: 0px 0px 0px var(--space-minuscule)
9712
9712
  var(--color-disabled);
9713
- border-color: hsl(0, 0%, 72%);
9713
+ border-color: hsl(0, 0%, 58%);
9714
9714
  border-color: var(--color-disabled);
9715
9715
  }
9716
9716
 
@@ -9725,7 +9725,7 @@ input.oOrjwubmsVA- {
9725
9725
  }
9726
9726
 
9727
9727
  .w1Rr3bk2t5g-[disabled] + .gN41T07x0l0- + .Ke2WKKuvmRo- > p {
9728
- color: hsl(0, 0%, 72%);
9728
+ color: hsl(0, 0%, 58%);
9729
9729
  color: var(--color-disabled);
9730
9730
  }
9731
9731
 
@@ -9823,7 +9823,7 @@ input.oOrjwubmsVA- {
9823
9823
  }
9824
9824
 
9825
9825
  .XGjk9DHJAmw-:disabled + .zulupkPyEs8- {
9826
- color: hsl(0, 0%, 72%);
9826
+ color: hsl(0, 0%, 58%);
9827
9827
  color: var(--color-disabled);
9828
9828
  background: hsl(0, 0%, 93%);
9829
9829
  background: var(--color-disabled--secondary);
@@ -9847,7 +9847,7 @@ input.oOrjwubmsVA- {
9847
9847
  .XGjk9DHJAmw-:disabled:checked + .zulupkPyEs8- {
9848
9848
  color: hsl(0, 0%, 93%);
9849
9849
  color: var(--color-disabled--secondary);
9850
- background: hsl(0, 0%, 72%);
9850
+ background: hsl(0, 0%, 58%);
9851
9851
  background: var(--color-disabled);
9852
9852
  }
9853
9853
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components",
3
- "version": "6.92.0",
3
+ "version": "6.93.1",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -541,5 +541,5 @@
541
541
  "> 1%",
542
542
  "IE 10"
543
543
  ],
544
- "gitHead": "a623e4d884e7089cce658fd1e7948923ee8553f5"
544
+ "gitHead": "7335511721601761dd9eddf3182e8862f796ac21"
545
545
  }