@longline/aqua-ui 1.0.286 → 1.0.288

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.
@@ -0,0 +1 @@
1
+ export * from './HttpStatusFormatter';
@@ -0,0 +1 @@
1
+ export * from './HttpStatusFormatter';
@@ -17,10 +17,14 @@ interface IProps extends ISelectorProps {
17
17
  */
18
18
  label?: React.ReactNode;
19
19
  /**
20
- * Checkbox visual style: `check`, `toggle`, `slider` or `circle`. Default is `check`.
20
+ * Checkbox visual style: `check`, `toggle` or `circle`. Default is `check`.
21
21
  * @default check
22
22
  */
23
23
  type?: TCheckboxType;
24
+ /**
25
+ * If set, checkbox has a dark label.
26
+ */
27
+ dark?: boolean;
24
28
  }
25
29
  /**
26
30
  * A Selector can be used to create either a HTML checkbox or a HTML radio button.
@@ -28,6 +28,7 @@ import * as React from 'react';
28
28
  import styled, { css } from 'styled-components';
29
29
  import { Checkbox } from './widgets/Checkbox';
30
30
  import { Toggle } from './widgets/Toggle';
31
+ import { Circle } from './widgets/Circle';
31
32
  var SelectorBase = function (props) {
32
33
  var _a = React.useState(props.checked), checked = _a[0], setChecked = _a[1];
33
34
  var inputRef = React.useRef(null);
@@ -56,6 +57,7 @@ var SelectorBase = function (props) {
56
57
  var type = (_a = props.type) !== null && _a !== void 0 ? _a : (props.radio ? 'radio' : 'check');
57
58
  switch (type) {
58
59
  case 'toggle': return React.createElement(Toggle, __assign({}, otherProps));
60
+ case 'circle': return React.createElement(Circle, __assign({}, otherProps));
59
61
  default: return React.createElement(Checkbox, __assign({}, otherProps));
60
62
  }
61
63
  };
@@ -68,7 +70,7 @@ var SelectorStyled = styled(SelectorBase)(templateObject_2 || (templateObject_2
68
70
  /**
69
71
  * A Selector can be used to create either a HTML checkbox or a HTML radio button.
70
72
  */
71
- ])), function (p) { return (p.disabled || p.locked) ? 'none' : 'all'; }, function (p) { return p.disabled ? 'auto' : 'pointer'; }, function (p) { return p.theme.colors.neutral[100]; }, function (p) { return p.disabled && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: #aaa;\n "], ["\n color: #aaa;\n "]))); });
73
+ ])), function (p) { return (p.disabled || p.locked) ? 'none' : 'all'; }, function (p) { return p.disabled ? 'auto' : 'pointer'; }, function (p) { return p.dark ? p.theme.colors.neutral[10] : p.theme.colors.neutral[100]; }, function (p) { return p.disabled && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: #aaa;\n "], ["\n color: #aaa;\n "]))); });
72
74
  /**
73
75
  * A Selector can be used to create either a HTML checkbox or a HTML radio button.
74
76
  */
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ import { ISelectorProps } from '../ISelectorProps';
3
+ declare const Circle: (props: {
4
+ className?: string;
5
+ } & ISelectorProps) => React.JSX.Element;
6
+ export { Circle };
@@ -0,0 +1,24 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ var __assign = (this && this.__assign) || function () {
6
+ __assign = Object.assign || function(t) {
7
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
8
+ s = arguments[i];
9
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
10
+ t[p] = s[p];
11
+ }
12
+ return t;
13
+ };
14
+ return __assign.apply(this, arguments);
15
+ };
16
+ import * as React from 'react';
17
+ import styled, { css } from 'styled-components';
18
+ var CircleBase = function (props) {
19
+ return React.createElement("div", { className: props.className });
20
+ };
21
+ var CircleStyled = styled(CircleBase)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n position: relative;\n\n width: 19px;\n height: 19px;\n border-radius: 50%;\n box-sizing: border-box;\n background-color: transparent;\n border: solid 2px ", ";\n transition: \n left ease-in-out ", "ms, \n background-color ease-in-out ", "ms, \n border-color ease-in-out ", "ms;\n\n // Checked circle:\n input:checked + &:after {\n content: '';\n position: absolute;\n top: 50%;\n left: 50%;\n width: 9px;\n height: 9px;\n transform: translateX(-50%) translateY(-50%);\n border-radius: 50%;\n background-color: ", ";\n }\n\n // Disabled circle:\n ", "\n"], ["\n position: relative;\n\n width: 19px;\n height: 19px;\n border-radius: 50%;\n box-sizing: border-box;\n background-color: transparent;\n border: solid 2px ", ";\n transition: \n left ease-in-out ", "ms, \n background-color ease-in-out ", "ms, \n border-color ease-in-out ", "ms;\n\n // Checked circle:\n input:checked + &:after {\n content: '';\n position: absolute;\n top: 50%;\n left: 50%;\n width: 9px;\n height: 9px;\n transform: translateX(-50%) translateY(-50%);\n border-radius: 50%;\n background-color: ", ";\n }\n\n // Disabled circle:\n ", "\n"])), function (p) { return p.theme.colors.primary[1]; }, function (p) { return p.theme.animation.duration; }, function (p) { return p.theme.animation.duration; }, function (p) { return p.theme.animation.duration; }, function (p) { return p.theme.colors.primary[1]; }, function (p) { return p.disabled && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-color: ", ";\n &:after {\n background-color: ", " !important;\n }\n "], ["\n border-color: ", ";\n &:after {\n background-color: ", " !important;\n }\n "])), p.theme.colors.neutral[50], p.theme.colors.neutral[50]); });
22
+ var Circle = function (props) { return React.createElement(CircleStyled, __assign({}, props)); };
23
+ export { Circle };
24
+ var templateObject_1, templateObject_2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longline/aqua-ui",
3
- "version": "1.0.286",
3
+ "version": "1.0.288",
4
4
  "description": "AquaUI",
5
5
  "author": "Alexander van Oostenrijk / Longline Environment",
6
6
  "license": "Commercial",