atlas-design-system 1.13.0 → 1.14.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.
@@ -34,7 +34,7 @@ const Sheet_1 = __importDefault(require("../Sheet"));
34
34
  const Text_1 = __importDefault(require("../Text"));
35
35
  const Chevron_1 = __importDefault(require("../Chevron"));
36
36
  const MenuItemDescription_1 = require("../MenuItemDescription");
37
- const CheckboxOptionItem_1 = __importDefault(require("../CheckboxOptionItem"));
37
+ const CheckboxOptionItem_1 = require("../CheckboxOptionItem");
38
38
  const Button_1 = __importDefault(require("../Button"));
39
39
  function CheckboxOptionInput({ caption, label, options = [], onChange, renderOption, renderValues, containerStyle = {}, placeholder = "No Option selected", }) {
40
40
  const styles = useStyles().styles;
@@ -73,7 +73,7 @@ function CheckboxOptionInput({ caption, label, options = [], onChange, renderOpt
73
73
  </react_native_1.View>
74
74
  <Sheet_1.default header={label} open={sheetOpen} setOpen={setSheetOpen} footer={<Button_1.default text="Save" onPress={handleSave}/>}>
75
75
  {options.map((option) => {
76
- return renderOption ? (renderOption(option, handleOptionPress)) : (<CheckboxOptionItem_1.default option={Object.assign(Object.assign({}, option), { selected: !!values.find((v) => v === option.value) })} onPress={() => handleOptionPress(option)} key={option.label}/>);
76
+ return renderOption ? (renderOption(option, handleOptionPress)) : (<CheckboxOptionItem_1.CheckboxOptionItem option={Object.assign(Object.assign({}, option), { selected: !!values.find((v) => v === option.value) })} onPress={() => handleOptionPress(option)} key={option.label}/>);
77
77
  })}
78
78
  </Sheet_1.default>
79
79
  </>);
@@ -1,9 +1,8 @@
1
1
  import { Option } from "../SelectInput/types";
2
- type CheckboxOptionItemProps<T> = {
2
+ export type CheckboxOptionItemProps<T> = {
3
3
  option: Option<T>;
4
4
  disabled?: boolean;
5
5
  onPress?: (value: T) => void;
6
6
  renderItem?: (option: Option<T>) => React.ReactNode;
7
7
  };
8
8
  export default function CheckboxOptionItem<T>({ option, onPress, renderItem, disabled, }: CheckboxOptionItemProps<T>): import("react").JSX.Element;
9
- export {};
@@ -1,2 +1,2 @@
1
- export { default } from "./CheckboxOptionItem";
1
+ export { default as CheckboxOptionItem } from "./CheckboxOptionItem";
2
2
  export * from "./CheckboxOptionItem";
@@ -17,7 +17,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
17
17
  return (mod && mod.__esModule) ? mod : { "default": mod };
18
18
  };
19
19
  Object.defineProperty(exports, "__esModule", { value: true });
20
- exports.default = void 0;
20
+ exports.CheckboxOptionItem = void 0;
21
21
  var CheckboxOptionItem_1 = require("./CheckboxOptionItem");
22
- Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(CheckboxOptionItem_1).default; } });
22
+ Object.defineProperty(exports, "CheckboxOptionItem", { enumerable: true, get: function () { return __importDefault(CheckboxOptionItem_1).default; } });
23
23
  __exportStar(require("./CheckboxOptionItem"), exports);
@@ -153,7 +153,7 @@ const useStyles = (disabled) => (0, hooks_1.useThemedStyle)((0, react_1.useCallb
153
153
  position: "absolute",
154
154
  },
155
155
  label: Object.assign({ color: !disabled
156
- ? t.colors.foreground
156
+ ? t.colors.foregroundHighContrast
157
157
  : t.colors.foregroundLowContrast }, t.typography.p1),
158
158
  iconRight: {},
159
159
  value: {
@@ -214,7 +214,7 @@ const useStyles = (disabled, error) => (0, hooks_1.useThemedStyle)((0, react_1.u
214
214
  position: "absolute",
215
215
  },
216
216
  label: getLabelStyle(disabled, error, {
217
- default: Object.assign({ color: theme.colors.foreground }, theme.typography.p1),
217
+ default: Object.assign({ color: theme.colors.foregroundHighContrast }, theme.typography.p1),
218
218
  disabled: Object.assign({ color: theme.colors.foregroundLowContrast }, theme.typography.p1),
219
219
  error: Object.assign({ color: theme.colors.foregroundNegative }, theme.typography.p1),
220
220
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atlas-design-system",
3
- "version": "1.13.0",
3
+ "version": "1.14.0",
4
4
  "description": "A react native design system for the Atlas workout app",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",