@orfium/ictinus 4.22.0 → 4.23.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/dist/components/ButtonBase/ButtonBase.d.ts +2 -1
- package/dist/components/ButtonBase/ButtonBase.style.d.ts +22 -16
- package/dist/components/ButtonBase/ButtonBase.style.js +39 -40
- package/dist/components/ButtonBase/config.d.ts +28 -0
- package/dist/components/ButtonBase/config.js +38 -0
- package/dist/components/ButtonBase/utils.d.ts +1 -8
- package/dist/components/ButtonBase/utils.js +4 -29
- package/dist/components/Chip/Chip.d.ts +3 -1
- package/dist/components/Chip/Chip.js +13 -6
- package/dist/components/Chip/Chip.style.d.ts +1 -1
- package/dist/components/Chip/Chip.style.js +32 -22
- package/dist/components/Filter/Filter.style.d.ts +6 -4
- package/dist/components/Filter/Filter.style.js +43 -11
- package/dist/components/Filter/utils.d.ts +3 -3
- package/dist/components/Filter/utils.js +9 -30
- package/dist/components/Select/Select.js +0 -3
- package/dist/components/Select/Select.style.d.ts +2 -7
- package/dist/components/Select/Select.style.js +4 -7
- package/dist/components/TextInputBase/TextInputBase.d.ts +2 -1
- package/dist/components/TextInputBase/TextInputBase.js +1 -13
- package/dist/components/TextInputBase/TextInputBase.style.d.ts +2 -1
- package/dist/components/TextInputBase/TextInputBase.style.js +92 -42
- package/dist/components/TextInputBase/config.d.ts +22 -0
- package/dist/components/TextInputBase/config.js +36 -0
- package/dist/theme/palette.d.ts +3 -1
- package/dist/theme/palette.js +9 -5
- package/dist/theme/states/disabled.d.ts +12 -0
- package/dist/theme/states/disabled.js +25 -0
- package/dist/theme/states/focus.d.ts +16 -0
- package/dist/theme/states/focus.js +31 -0
- package/dist/theme/states/hover.d.ts +15 -0
- package/dist/theme/states/hover.js +31 -0
- package/dist/theme/states/index.d.ts +5 -0
- package/dist/theme/states/index.js +19 -0
- package/dist/theme/states/pressed.d.ts +15 -0
- package/dist/theme/states/pressed.js +31 -0
- package/dist/theme/states/statesConfig.d.ts +34 -0
- package/dist/theme/states/statesConfig.js +36 -0
- package/dist/theme/states/utils.d.ts +7 -0
- package/dist/theme/states/utils.js +24 -0
- package/package.json +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
|
|
5
|
+
var _disabled = require("./disabled");
|
|
6
|
+
|
|
7
|
+
exports.getDisabled = _disabled.getDisabled;
|
|
8
|
+
|
|
9
|
+
var _focus = require("./focus");
|
|
10
|
+
|
|
11
|
+
exports.getFocus = _focus.getFocus;
|
|
12
|
+
|
|
13
|
+
var _hover = require("./hover");
|
|
14
|
+
|
|
15
|
+
exports.getHover = _hover.getHover;
|
|
16
|
+
|
|
17
|
+
var _pressed = require("./pressed");
|
|
18
|
+
|
|
19
|
+
exports.getPressed = _pressed.getPressed;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Theme } from '../index';
|
|
2
|
+
import { colorShades, flatColors } from '../palette';
|
|
3
|
+
export declare type Props = {
|
|
4
|
+
theme: Theme;
|
|
5
|
+
color?: typeof flatColors[number];
|
|
6
|
+
shade?: typeof colorShades[number] | 0;
|
|
7
|
+
};
|
|
8
|
+
export declare type GetPressed = {
|
|
9
|
+
backgroundColor: string;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* On pressed background is darken by two steps in shade.
|
|
13
|
+
* If we exceed the maximum value then we lighten it by two steps.
|
|
14
|
+
* This will be reviewed when dark theme is implemented. **/
|
|
15
|
+
export declare const getPressed: ({ theme, color, shade }: Props) => GetPressed;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.getPressed = void 0;
|
|
5
|
+
|
|
6
|
+
var _statesConfig = require("./statesConfig");
|
|
7
|
+
|
|
8
|
+
var _utils = require("./utils");
|
|
9
|
+
|
|
10
|
+
var backgroundColorStep = _statesConfig.statesConfig.pressed.backgroundColor.step;
|
|
11
|
+
/**
|
|
12
|
+
* On pressed background is darken by two steps in shade.
|
|
13
|
+
* If we exceed the maximum value then we lighten it by two steps.
|
|
14
|
+
* This will be reviewed when dark theme is implemented. **/
|
|
15
|
+
|
|
16
|
+
var getPressed = function getPressed(_ref) {
|
|
17
|
+
var theme = _ref.theme,
|
|
18
|
+
_ref$color = _ref.color,
|
|
19
|
+
color = _ref$color === void 0 ? 'lightGrey' : _ref$color,
|
|
20
|
+
_ref$shade = _ref.shade,
|
|
21
|
+
shade = _ref$shade === void 0 ? 0 : _ref$shade;
|
|
22
|
+
var calculatedShade = (0, _utils.getShadeWithStep)({
|
|
23
|
+
shade: shade,
|
|
24
|
+
step: backgroundColorStep
|
|
25
|
+
});
|
|
26
|
+
return {
|
|
27
|
+
backgroundColor: theme.utils.getColor(color, calculatedShade)
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
exports.getPressed = getPressed;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { colorShades, flatColors } from '../palette';
|
|
2
|
+
declare type StatesConfig = {
|
|
3
|
+
hover: {
|
|
4
|
+
backgroundColor: {
|
|
5
|
+
step: number;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
focus: {
|
|
9
|
+
border: {
|
|
10
|
+
width: {
|
|
11
|
+
step: number;
|
|
12
|
+
};
|
|
13
|
+
color: {
|
|
14
|
+
name: typeof flatColors[number];
|
|
15
|
+
shade: typeof colorShades[number];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
pressed: {
|
|
20
|
+
backgroundColor: {
|
|
21
|
+
step: number;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
disabled: {
|
|
25
|
+
opacity: {
|
|
26
|
+
amount: number;
|
|
27
|
+
};
|
|
28
|
+
cursor: {
|
|
29
|
+
name: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export declare const statesConfig: StatesConfig;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.statesConfig = void 0;
|
|
5
|
+
var statesConfig = {
|
|
6
|
+
hover: {
|
|
7
|
+
backgroundColor: {
|
|
8
|
+
step: 50
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
focus: {
|
|
12
|
+
border: {
|
|
13
|
+
width: {
|
|
14
|
+
step: 1
|
|
15
|
+
},
|
|
16
|
+
color: {
|
|
17
|
+
name: 'magenta',
|
|
18
|
+
shade: 500
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
pressed: {
|
|
23
|
+
backgroundColor: {
|
|
24
|
+
step: 100
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
disabled: {
|
|
28
|
+
opacity: {
|
|
29
|
+
amount: 0.5
|
|
30
|
+
},
|
|
31
|
+
cursor: {
|
|
32
|
+
name: 'not-allowed'
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
exports.statesConfig = statesConfig;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.getShadeWithStep = void 0;
|
|
5
|
+
|
|
6
|
+
var _palette = require("../palette");
|
|
7
|
+
|
|
8
|
+
var getShadeWithStep = function getShadeWithStep(_ref) {
|
|
9
|
+
var _ref$shade = _ref.shade,
|
|
10
|
+
shade = _ref$shade === void 0 ? 0 : _ref$shade,
|
|
11
|
+
_ref$step = _ref.step,
|
|
12
|
+
step = _ref$step === void 0 ? 50 : _ref$step;
|
|
13
|
+
var calculatedShade = shade;
|
|
14
|
+
|
|
15
|
+
if (shade + step > _palette.MAX_SHADE) {
|
|
16
|
+
calculatedShade -= step;
|
|
17
|
+
} else {
|
|
18
|
+
calculatedShade += step;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return calculatedShade;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
exports.getShadeWithStep = getShadeWithStep;
|