@conveyorhq/arrow-ds 1.188.0 → 1.190.0

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@conveyorhq/arrow-ds",
3
3
  "author": "Conveyor",
4
4
  "license": "MIT",
5
- "version": "1.188.0",
5
+ "version": "1.190.0",
6
6
  "description": "Arrow Design System",
7
7
  "repository": "https://github.com/conveyor/arrow-ds",
8
8
  "publishConfig": {
@@ -6,6 +6,7 @@ export type CheckboxProps = Omit<InputProps, "checked"> & {
6
6
  hideRequiredStyles?: boolean;
7
7
  isRequired?: boolean;
8
8
  checked?: boolean | "indeterminate";
9
+ color?: "brandGreen" | "blue";
9
10
  };
10
11
  export declare enum CheckboxState {
11
12
  CHECKED = "checked",
@@ -13,6 +14,6 @@ export declare enum CheckboxState {
13
14
  INDETERMINATE = "indeterminate"
14
15
  }
15
16
  export declare const Checkbox: {
16
- ({ checked, children, className, disabled, id: idProp, label, onBlur, onChange, onClick, onFocus, hideRequiredStyles, isRequired, tabIndex, theme: themeProp, ...rest }: CheckboxProps): React.JSX.Element;
17
+ ({ checked, children, className, disabled, id: idProp, label, onBlur, onChange, onClick, onFocus, hideRequiredStyles, isRequired, tabIndex, theme: themeProp, color, ...rest }: CheckboxProps): React.JSX.Element;
17
18
  Group: (props: StackProps) => React.JSX.Element;
18
19
  };
@@ -50,7 +50,7 @@ var CheckboxState;
50
50
  CheckboxState["UNCHECKED"] = "unchecked";
51
51
  CheckboxState["INDETERMINATE"] = "indeterminate";
52
52
  })(CheckboxState || (exports.CheckboxState = CheckboxState = {}));
53
- const Checkbox = ({ checked, children, className, disabled = false, id: idProp, label, onBlur, onChange = () => { }, onClick, onFocus, hideRequiredStyles = true, isRequired = undefined, tabIndex, theme: themeProp, ...rest }) => {
53
+ const Checkbox = ({ checked, children, className, disabled = false, id: idProp, label, onBlur, onChange = () => { }, onClick, onFocus, hideRequiredStyles = true, isRequired = undefined, tabIndex, theme: themeProp, color = "brandGreen", ...rest }) => {
54
54
  const { isRequired: isRequiredContext, theme: themeContext } = (0, react_1.useContext)(FormGroupContext_1.FormGroupContext);
55
55
  const fallbackId = `checkbox-${(0, react_1.useId)()}`;
56
56
  const id = (0, isUndefined_1.default)(idProp) ? fallbackId : idProp;
@@ -87,6 +87,12 @@ const Checkbox = ({ checked, children, className, disabled = false, id: idProp,
87
87
  else if (checkedState === CheckboxState.UNCHECKED) {
88
88
  updatedChecked = CheckboxState.CHECKED;
89
89
  }
90
+ else if (checkedState === CheckboxState.INDETERMINATE) {
91
+ updatedChecked = CheckboxState.INDETERMINATE;
92
+ }
93
+ else {
94
+ updatedChecked = CheckboxState.UNCHECKED;
95
+ }
90
96
  setCheckedState(updatedChecked);
91
97
  if (onChange) {
92
98
  onChange(event);
@@ -103,10 +109,10 @@ const Checkbox = ({ checked, children, className, disabled = false, id: idProp,
103
109
  };
104
110
  const bareCheckbox = (react_1.default.createElement(Box_1.Box, { className: (0, bem_1.bem)(cn, { e: "BoxWrapper" }) },
105
111
  react_1.default.createElement(Input_1.Input, { "aria-checked": ariaChecked(), checked: checkedState === CheckboxState.CHECKED, className: (0, bem_1.bem)(cn, { e: "Input" }), disabled: disabled, id: id, onChange: handleChange, type: "checkbox", onFocus: onFocus, onBlur: onBlur, onClick: label ? handleClick : undefined, tabIndex: tabIndex, ...rest }),
106
- react_1.default.createElement(Box_1.Box, { className: (0, classnames_1.default)((0, bem_1.bem)(cn, { e: "Box" }), (0, bem_1.bem)(cn, { e: "Box", m: theme }), checked && (0, bem_1.bem)(cn, { e: "Box", m: "checked" })) }),
107
- checked && (react_1.default.createElement(Icon_1.Icon, { className: (0, classnames_1.default)((0, bem_1.bem)(cn, { e: "Check" }), (0, bem_1.bem)(cn, { e: "Check", m: theme })), icon: checkedState === CheckboxState.INDETERMINATE
112
+ react_1.default.createElement(Box_1.Box, { className: (0, classnames_1.default)((0, bem_1.bem)(cn, { e: "Box" }), (0, bem_1.bem)(cn, { e: "Box", m: theme }), (0, bem_1.bem)(cn, { e: "Box", m: color }), checked && (0, bem_1.bem)(cn, { e: "Box", m: "checked" })) }),
113
+ react_1.default.createElement(Icon_1.Icon, { className: (0, classnames_1.default)((0, bem_1.bem)(cn, { e: "Check" }), (0, bem_1.bem)(cn, { e: "Check", m: theme }), checked && (0, bem_1.bem)(cn, { e: "Check", m: "checked" })), icon: checkedState === CheckboxState.INDETERMINATE
108
114
  ? Icon_1.ICON_TYPE.MINUS
109
- : Icon_1.ICON_TYPE.CHECK }))));
115
+ : Icon_1.ICON_TYPE.CHECK })));
110
116
  const checkboxWithLabel = label || children ? (react_1.default.createElement(Label_1.Label, { className: (0, bem_1.bem)(cn, { e: "Label" }), isRequired: calculatedRequired && !hideRequiredStyles },
111
117
  bareCheckbox,
112
118
  react_1.default.createElement(Text_1.Text, { as: "span", className: (0, classnames_1.default)((0, bem_1.bem)(cn, { e: "LabelText" }), (0, bem_1.bem)(cn, { e: "LabelText", m: theme })) },
@@ -17,6 +17,7 @@ export declare enum CUSTOM_ICON_TYPE {
17
17
  DIALOG_CHECK = "dialog-check",
18
18
  DO_NOT_ENTER = "do-not-enter",
19
19
  FOLDERS = "folders",
20
+ GLOBE = "globe",
20
21
  INSERT_END = "insert-end",
21
22
  INSERT_MIDDLE = "insert-middle",
22
23
  INSERT_START = "insert-start",
@@ -266,6 +266,7 @@ var CUSTOM_ICON_TYPE;
266
266
  CUSTOM_ICON_TYPE["DIALOG_CHECK"] = "dialog-check";
267
267
  CUSTOM_ICON_TYPE["DO_NOT_ENTER"] = "do-not-enter";
268
268
  CUSTOM_ICON_TYPE["FOLDERS"] = "folders";
269
+ CUSTOM_ICON_TYPE["GLOBE"] = "globe";
269
270
  CUSTOM_ICON_TYPE["INSERT_END"] = "insert-end";
270
271
  CUSTOM_ICON_TYPE["INSERT_MIDDLE"] = "insert-middle";
271
272
  CUSTOM_ICON_TYPE["INSERT_START"] = "insert-start";
@@ -291,6 +292,7 @@ const CustomIcons = {
291
292
  [CUSTOM_ICON_TYPE.DIALOG_CHECK]: svg_1.DialogCheck,
292
293
  [CUSTOM_ICON_TYPE.DO_NOT_ENTER]: svg_1.DoNotEnter,
293
294
  [CUSTOM_ICON_TYPE.FOLDERS]: svg_1.Folders,
295
+ [CUSTOM_ICON_TYPE.GLOBE]: svg_1.Globe,
294
296
  [CUSTOM_ICON_TYPE.INSERT_END]: svg_1.InsertEnd,
295
297
  [CUSTOM_ICON_TYPE.INSERT_MIDDLE]: svg_1.InsertMiddle,
296
298
  [CUSTOM_ICON_TYPE.INSERT_START]: svg_1.InsertStart,
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { SvgProps } from "../../Svg";
3
+ export declare const Globe: (props: SvgProps) => React.JSX.Element;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Globe = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ const Svg_1 = require("../../Svg");
9
+ const Globe = (props) => {
10
+ return (react_1.default.createElement(Svg_1.Svg, { width: "14", height: "15", viewBox: "0 0 14 15", fill: "none", ...props },
11
+ react_1.default.createElement("path", { d: "M6.78125 0.96875C10.5273 0.96875 13.5625 4.00391 13.5625 7.75C13.5625 11.4961 10.5273 14.5312 6.78125 14.5312C3.03516 14.5312 0 11.4961 0 7.75C0 4.00391 3.03516 0.96875 6.78125 0.96875ZM11.6758 5.34375C11.1016 4.19531 10.1445 3.29297 8.96875 2.77344C9.35156 3.48438 9.65234 4.35938 9.84375 5.34375H11.6758ZM6.78125 2.28125C6.26172 2.28125 5.44141 3.42969 5.03125 5.34375H8.50391C8.09375 3.42969 7.27344 2.28125 6.78125 2.28125ZM1.3125 7.75C1.3125 8.13281 1.33984 8.51562 1.42188 8.84375H3.52734C3.5 8.48828 3.5 8.13281 3.5 7.75C3.5 7.39453 3.5 7.03906 3.52734 6.65625H1.42188C1.33984 7.01172 1.3125 7.39453 1.3125 7.75ZM1.85938 10.1562C2.43359 11.3047 3.39062 12.2344 4.56641 12.7539C4.18359 12.043 3.88281 11.168 3.69141 10.1562H1.85938ZM3.69141 5.34375C3.88281 4.35938 4.18359 3.48438 4.56641 2.77344C3.39062 3.29297 2.43359 4.19531 1.85938 5.34375H3.69141ZM6.78125 13.2188C7.27344 13.2188 8.09375 12.0977 8.50391 10.1562H5.03125C5.44141 12.0977 6.26172 13.2188 6.78125 13.2188ZM8.69531 8.84375C8.72266 8.51562 8.75 8.13281 8.75 7.75C8.75 7.36719 8.72266 7.01172 8.69531 6.65625H4.83984C4.8125 7.01172 4.8125 7.36719 4.8125 7.75C4.8125 8.13281 4.8125 8.51562 4.83984 8.84375H8.69531ZM8.96875 12.7539C10.1445 12.2344 11.1016 11.3047 11.6758 10.1562H9.84375C9.65234 11.168 9.35156 12.043 8.96875 12.7539ZM10.0078 8.84375H12.1406C12.1953 8.51562 12.25 8.13281 12.25 7.75C12.25 7.39453 12.1953 7.01172 12.1406 6.65625H10.0078C10.0352 7.03906 10.0625 7.39453 10.0625 7.75C10.0625 8.13281 10.0352 8.48828 10.0078 8.84375Z", fill: "currentColor" })));
12
+ };
13
+ exports.Globe = Globe;
@@ -12,6 +12,7 @@ export * from "./ConveyorLogoIcon";
12
12
  export * from "./DialogCheck";
13
13
  export * from "./DoNotEnter";
14
14
  export * from "./Folders";
15
+ export * from "./Globe";
15
16
  export * from "./InsertEnd";
16
17
  export * from "./InsertMiddle";
17
18
  export * from "./InsertStart";
@@ -28,6 +28,7 @@ __exportStar(require("./ConveyorLogoIcon"), exports);
28
28
  __exportStar(require("./DialogCheck"), exports);
29
29
  __exportStar(require("./DoNotEnter"), exports);
30
30
  __exportStar(require("./Folders"), exports);
31
+ __exportStar(require("./Globe"), exports);
31
32
  __exportStar(require("./InsertEnd"), exports);
32
33
  __exportStar(require("./InsertMiddle"), exports);
33
34
  __exportStar(require("./InsertStart"), exports);
@@ -2244,15 +2244,26 @@ override built-in Image component classes */
2244
2244
  border-color: rgb(134 163 181 / var(--tw-border-opacity));
2245
2245
  --tw-bg-opacity: 1;
2246
2246
  background-color: rgb(249 251 252 / var(--tw-bg-opacity));
2247
+ transition-duration: 150ms;
2248
+
2249
+ transition-property: background-color, border-color, opacity;
2247
2250
  }
2248
2251
 
2249
- .ads-Checkbox-Box--product.ads-Checkbox-Box--checked {
2252
+ .ads-Checkbox-Box--product.ads-Checkbox-Box--checked,
2253
+ .ads-Checkbox-Box--product.ads-Checkbox-Box--checked.ads-Checkbox-Box--brandGreen {
2250
2254
  --tw-border-opacity: 1;
2251
2255
  border-color: rgb(51 198 159 / var(--tw-border-opacity));
2252
2256
  --tw-bg-opacity: 1;
2253
2257
  background-color: rgb(51 198 159 / var(--tw-bg-opacity));
2254
2258
  }
2255
2259
 
2260
+ .ads-Checkbox-Box--product.ads-Checkbox-Box--checked.ads-Checkbox-Box--blue {
2261
+ --tw-border-opacity: 1;
2262
+ border-color: rgb(13 125 228 / var(--tw-border-opacity));
2263
+ --tw-bg-opacity: 1;
2264
+ background-color: rgb(13 125 228 / var(--tw-bg-opacity));
2265
+ }
2266
+
2256
2267
  .ads-Checkbox-Check--product {
2257
2268
  --tw-text-opacity: 1;
2258
2269
  color: rgb(255 255 255 / var(--tw-text-opacity));
@@ -2268,13 +2279,21 @@ override built-in Image component classes */
2268
2279
  .ads-Checkbox.is-disabled .ads-Checkbox-Box--product {
2269
2280
  --tw-border-opacity: 1;
2270
2281
  border-color: rgb(222 231 238 / var(--tw-border-opacity));
2282
+ transition-duration: 150ms;
2271
2283
  }
2272
2284
 
2273
- .ads-Checkbox.is-disabled .ads-Checkbox-Box--product.ads-Checkbox-Box--checked {
2285
+ .ads-Checkbox.is-disabled .ads-Checkbox-Box--product.ads-Checkbox-Box--checked,
2286
+ .ads-Checkbox.is-disabled
2287
+ .ads-Checkbox-Box--product.ads-Checkbox-Box--checked.ads-Checkbox-Box--brandGreen {
2274
2288
  --tw-border-opacity: 1;
2275
- border-color: rgb(125 229 202 / var(--tw-border-opacity));
2276
- --tw-bg-opacity: 1;
2277
- background-color: rgb(125 229 202 / var(--tw-bg-opacity));
2289
+ border-color: rgb(51 198 159 / var(--tw-border-opacity));
2290
+ opacity: 0.5;
2291
+ }
2292
+
2293
+ .ads-Checkbox.is-disabled
2294
+ .ads-Checkbox-Box--product.ads-Checkbox-Box--checked.ads-Checkbox-Box--blue {
2295
+ --tw-border-opacity: 1;
2296
+ border-color: rgb(13 125 228 / var(--tw-border-opacity));
2278
2297
  opacity: 0.5;
2279
2298
  }
2280
2299
 
@@ -2366,12 +2385,39 @@ override built-in Image component classes */
2366
2385
  /* Checked */
2367
2386
 
2368
2387
  .ads-Checkbox-Check {
2388
+ pointer-events: none;
2369
2389
  position: absolute;
2390
+ top: 0;
2391
+ right: 0;
2392
+ bottom: 0;
2393
+ left: 0;
2394
+ display: flex;
2395
+ align-items: center;
2396
+ justify-content: center;
2370
2397
  font-size: 12px;
2371
- top: 50%;
2372
- left: 50%;
2373
- -webkit-transform: translate(-50%, -50%);
2374
- transform: translate(-50%, -50%);
2398
+ opacity: 0;
2399
+ transition-duration: 150ms;
2400
+
2401
+ transition-property: opacity, -webkit-transform;
2402
+
2403
+ transition-property: opacity, transform;
2404
+
2405
+ transition-property: opacity, transform, -webkit-transform;
2406
+ -webkit-transform: scale(0.5);
2407
+ transform: scale(0.5);
2408
+ }
2409
+
2410
+ .ads-Checkbox-Check--checked {
2411
+ opacity: 1;
2412
+ transition-duration: 150ms;
2413
+
2414
+ transition-property: opacity, -webkit-transform;
2415
+
2416
+ transition-property: opacity, transform;
2417
+
2418
+ transition-property: opacity, transform, -webkit-transform;
2419
+ -webkit-transform: scale(1);
2420
+ transform: scale(1);
2375
2421
  }
2376
2422
 
2377
2423
  /* Focused */