orcs-design-system 3.5.5 → 3.5.7
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.
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { keyframes } from "styled-components";
|
|
2
2
|
export const crossFadeIn = /*#__PURE__*/keyframes(["0%{opacity:0;}75%{opacity:0;}100%{opacity:1;}"]);
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export const
|
|
6
|
-
export const
|
|
3
|
+
const DOT_OFFSET = 7; // Match index.js DOT_OFFSET
|
|
4
|
+
|
|
5
|
+
export const beforeDotCollapsing = /*#__PURE__*/keyframes(["0%{transform:translateY(-", "px);}50%{transform:translateY(0);}100%{transform:translateY(0);}"], DOT_OFFSET);
|
|
6
|
+
export const beforeDotExpanding = /*#__PURE__*/keyframes(["0%{transform:translateY(0);}50%{transform:translateY(0);}100%{transform:translateY(-", "px);}"], DOT_OFFSET);
|
|
7
|
+
export const afterDotCollapsing = /*#__PURE__*/keyframes(["0%{transform:translateY(", "px);}50%{transform:translateY(0);}100%{transform:translateY(0);}"], DOT_OFFSET);
|
|
8
|
+
export const afterDotExpanding = /*#__PURE__*/keyframes(["0%{transform:translateY(0);}50%{transform:translateY(0);}100%{transform:translateY(", "px);}"], DOT_OFFSET);
|
|
7
9
|
export const beforeCrossExpanding = /*#__PURE__*/keyframes(["0%{height:4px;transform:rotate(-45deg);}50%{height:4px;transform:rotate(-45deg);}100%{height:18px;transform:translate(0,-7px) rotate(-45deg);}"]);
|
|
8
10
|
export const beforeCrossCollapsing = /*#__PURE__*/keyframes(["0%{height:18px;transform:translate(0,-7px) rotate(-45deg);}50%{height:4px;transform:rotate(-45deg);}100%{height:4px;transform:rotate(-45deg);}"]);
|
|
9
11
|
export const afterCrossExpanding = /*#__PURE__*/keyframes(["0%{height:4px;transform:rotate(45deg);}50%{height:4px;transform:rotate(45deg);}100%{height:18px;transform:translate(0,-7px) rotate(45deg);}"]);
|
|
@@ -8,7 +8,7 @@ import React, { useState, useImperativeHandle, createContext, useContext, useMem
|
|
|
8
8
|
import styled, { css, ThemeProvider } from "styled-components";
|
|
9
9
|
import PropTypes from "prop-types";
|
|
10
10
|
import { NavLink } from "react-router-dom";
|
|
11
|
-
import { space, layout
|
|
11
|
+
import { space, layout } from "styled-system";
|
|
12
12
|
import { themeGet } from "@styled-system/theme-get";
|
|
13
13
|
import { commonKeys } from "../../hooks/keypress";
|
|
14
14
|
import useActionMenu from "./useActionMenu";
|
|
@@ -28,70 +28,18 @@ const Wrapper = /*#__PURE__*/styled.div.withConfig({
|
|
|
28
28
|
const Control = /*#__PURE__*/styled.button.withConfig({
|
|
29
29
|
displayName: "Control",
|
|
30
30
|
componentId: "sc-yvbni2-2"
|
|
31
|
-
})(["position:relative;display:flex;align-items:center;justify-content:center;-moz-appearance:none;-webkit-appearance:none;appearance:none;box-shadow:none;text-decoration:none;text-align:center;transition:", ";cursor:", ";", " &[data-state=\"open\"] .actionsMenu__dots{&::before{animation:500ms ", " cubic-bezier(0.68,-0.6,0.32,1.6) forwards;}&::after{animation:500ms ", " cubic-bezier(0.68,-0.6,0.32,1.6) forwards;}}&[data-state=\"open\"] .actionsMenu__cross{&::before{animation:500ms ", " cubic-bezier(0.68,-0.6,0.32,1.6) forwards;}&::after{animation:500ms ", " cubic-bezier(0.68,-0.6,0.32,1.6) forwards;}}&[data-state=\"closed\"] .actionsMenu__dots{&::before{animation:500ms ", " cubic-bezier(0.68,-0.6,0.32,1.6) forwards;}&::after{animation:500ms ", " cubic-bezier(0.68,-0.6,0.32,1.6) forwards;}}&[data-state=\"closed\"] .actionsMenu__cross{&::before{animation:500ms ", " cubic-bezier(0.68,-0.6,0.32,1.6) forwards;}&::after{animation:500ms ", " cubic-bezier(0.68,-0.6,0.32,1.6) forwards;}}"], props => themeGet("transition.transitionDefault")(props), props => props.disabled ? "not-allowed" : "pointer", props => variant(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
height: "30px",
|
|
36
|
-
borderRadius: themeGet("radii.2")(props),
|
|
37
|
-
border: "solid 1px",
|
|
38
|
-
backgroundColor: props.disabled ? themeGet("colors.greyLighter")(props) : "white",
|
|
39
|
-
borderColor: props.disabled ? themeGet("colors.greyLighter")(props) : themeGet("colors.greyLight")(props),
|
|
40
|
-
"&:hover, &:focus": {
|
|
41
|
-
outline: 0,
|
|
42
|
-
borderColor: props.disabled ? themeGet("colors.greyLighter")(props) : themeGet("colors.primary")(props)
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
circle: {
|
|
46
|
-
width: "35px",
|
|
47
|
-
height: "35px",
|
|
48
|
-
borderRadius: "50%",
|
|
49
|
-
border: "solid 2px",
|
|
50
|
-
backgroundColor: props.disabled ? themeGet("colors.greyLighter")(props) : themeGet("colors.greyDarkest")(props),
|
|
51
|
-
borderColor: props.disabled ? themeGet("colors.greyLighter")(props) : themeGet("colors.greyDarkest")(props),
|
|
52
|
-
"&:hover, &:focus": {
|
|
53
|
-
outline: 0,
|
|
54
|
-
borderColor: props.disabled ? themeGet("colors.greyLighter")(props) : themeGet("colors.primary")(props)
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}), beforeDotCollapsing, afterDotCollapsing, beforeCrossExpanding, afterCrossExpanding, beforeDotExpanding, afterDotExpanding, beforeCrossCollapsing, afterCrossCollapsing);
|
|
31
|
+
})(["position:relative;display:flex;align-items:center;justify-content:center;-moz-appearance:none;-webkit-appearance:none;appearance:none;box-shadow:none;text-decoration:none;text-align:center;border-radius:", ";transition:", ";cursor:", ";width:", ";height:", ";border-radius:", ";border:", ";", " ", " &:hover,&:focus{outline:0;border-color:", ";", "}&[data-state=\"open\"] .actionsMenu__dots{&::before{animation:500ms ", " cubic-bezier(0.68,-0.6,0.32,1.6) forwards;}&::after{animation:500ms ", " cubic-bezier(0.68,-0.6,0.32,1.6) forwards;}}&[data-state=\"open\"] .actionsMenu__cross{&::before{animation:500ms ", " cubic-bezier(0.68,-0.6,0.32,1.6) forwards;}&::after{animation:500ms ", " cubic-bezier(0.68,-0.6,0.32,1.6) forwards;}}&[data-state=\"closed\"] .actionsMenu__dots{&::before{animation:500ms ", " cubic-bezier(0.68,-0.6,0.32,1.6) forwards;}&::after{animation:500ms ", " cubic-bezier(0.68,-0.6,0.32,1.6) forwards;}}&[data-state=\"closed\"] .actionsMenu__cross{&::before{animation:500ms ", " cubic-bezier(0.68,-0.6,0.32,1.6) forwards;}&::after{animation:500ms ", " cubic-bezier(0.68,-0.6,0.32,1.6) forwards;}}"], props => themeGet("radii.2")(props), props => themeGet("transition.transitionDefault")(props), props => props.disabled ? "not-allowed" : "pointer", props => props.variant === "circle" ? "35px" : "30px", props => props.variant === "circle" ? "35px" : "30px", props => props.variant === "circle" ? "50%" : themeGet("radii.2")(props), props => props.variant === "circle" ? "solid 2px" : "solid 1px", props => props.variant === "default" && css(["background-color:", ";border-color:", ";"], props.disabled ? themeGet("colors.greyLighter")(props) : "white", props.disabled ? themeGet("colors.greyLighter")(props) : themeGet("colors.greyLight")(props)), props => props.variant === "circle" && css(["background-color:", ";border-color:", ";"], props.disabled ? themeGet("colors.greyLighter")(props) : themeGet("colors.greyDarkest")(props), props.disabled ? themeGet("colors.greyLighter")(props) : themeGet("colors.greyDarkest")(props)), props => props.disabled ? themeGet("colors.greyLighter")(props) : themeGet("colors.primary")(props), props => !props.disabled && props.variant === "default" && css(["background-color:", ";"], themeGet("colors.greyLightest")(props)), beforeDotCollapsing, afterDotCollapsing, beforeCrossExpanding, afterCrossExpanding, beforeDotExpanding, afterDotExpanding, beforeCrossCollapsing, afterCrossCollapsing);
|
|
32
|
+
const DOT_SIZE = 4;
|
|
33
|
+
const DOT_OFFSET = 7; // Distance from center dot to top/bottom dots
|
|
34
|
+
|
|
59
35
|
const Dots = /*#__PURE__*/styled.div.withConfig({
|
|
60
36
|
displayName: "Dots",
|
|
61
37
|
componentId: "sc-yvbni2-3"
|
|
62
|
-
})(["border-radius:
|
|
63
|
-
variants: {
|
|
64
|
-
default: {
|
|
65
|
-
backgroundColor: themeGet("colors.greyDarker")(props),
|
|
66
|
-
"&::before, &::after": {
|
|
67
|
-
backgroundColor: themeGet("colors.greyDarker")(props)
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
circle: {
|
|
71
|
-
backgroundColor: themeGet("colors.white")(props),
|
|
72
|
-
"&::before, &::after": {
|
|
73
|
-
backgroundColor: themeGet("colors.white")(props)
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}));
|
|
38
|
+
})(["position:relative;border-radius:50%;height:", "px;width:", "px;background-color:", ";transform:translateZ(0);&::before,&::after{content:\"\";display:block;position:absolute;left:0;top:0;border-radius:50%;height:", "px;width:", "px;background-color:", ";}&::before{transform:translateY(-", "px);}&::after{transform:translateY(", "px);}"], DOT_SIZE, DOT_SIZE, props => props.variant === "circle" ? themeGet("colors.white")(props) : themeGet("colors.greyDarker")(props), DOT_SIZE, DOT_SIZE, props => props.variant === "circle" ? themeGet("colors.white")(props) : themeGet("colors.greyDarker")(props), DOT_OFFSET, DOT_OFFSET);
|
|
78
39
|
const Cross = /*#__PURE__*/styled.div.withConfig({
|
|
79
40
|
displayName: "Cross",
|
|
80
41
|
componentId: "sc-yvbni2-4"
|
|
81
|
-
})(["animation:1500ms ", " ease-in-out forwards;opacity:0;position:absolute;left:calc(50% - 2px);top:calc(50% - 2px);&::before,&::after{content:\"\";display:block;position:absolute;border-radius:2px;height:4px;width:4px;}&::before{transform:rotate(-45deg);}&::after{transform:rotate(45deg);}"
|
|
82
|
-
variants: {
|
|
83
|
-
default: {
|
|
84
|
-
"&::before, &::after": {
|
|
85
|
-
backgroundColor: themeGet("colors.greyDarker")(props)
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
circle: {
|
|
89
|
-
"&::before, &::after": {
|
|
90
|
-
backgroundColor: themeGet("colors.white")(props)
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}));
|
|
42
|
+
})(["animation:1500ms ", " ease-in-out forwards;opacity:0;position:absolute;left:calc(50% - 2px);top:calc(50% - 2px);pointer-events:none;&::before,&::after{content:\"\";display:block;position:absolute;border-radius:2px;height:4px;width:4px;background-color:", ";}&::before{transform:rotate(-45deg);}&::after{transform:rotate(45deg);}"], crossFadeIn, props => props.variant === "circle" ? themeGet("colors.white")(props) : themeGet("colors.greyDarker")(props));
|
|
95
43
|
const Menu = /*#__PURE__*/styled.div.withConfig({
|
|
96
44
|
displayName: "Menu",
|
|
97
45
|
componentId: "sc-yvbni2-5"
|
|
@@ -16,11 +16,11 @@ import { themeGet } from "@styled-system/theme-get";
|
|
|
16
16
|
*
|
|
17
17
|
* For full list of icons see here: <https://fontawesome.com/icons?d=listing>.
|
|
18
18
|
*
|
|
19
|
-
* Some examples of icons with props for size, colour or animation below. For full usage guidelines view the readme at https://github.com/FortAwesome/react-fontawesome#usage
|
|
19
|
+
* Some examples of icons with props for size, colour or animation below. For full usage guidelines view the readme at <https://github.com/FortAwesome/react-fontawesome#usage>
|
|
20
20
|
*
|
|
21
21
|
* Note: There are two different icon set weightings available in the Font Awesome free icons sets. Regular and solid. To use we need to specify which set to use by prefixing icon with either "far" or "fas" as shown in example code below.
|
|
22
22
|
*
|
|
23
|
-
* To get started you can import the icons into Font Awesome library. Alternatively if you want to use their full icon set you need to purchase a PRO plan from Font
|
|
23
|
+
* To get started you can import the icons into Font Awesome library. Alternatively if you want to use their full icon set you need to purchase a PRO plan from Font Awesome, and can install the full pro icon packages in your app. See the readme here for more details on how to use and install PRO: <https://github.com/orchestrated-io/orcs-design-system>
|
|
24
24
|
*/
|
|
25
25
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
26
26
|
const IconStyles = compose(space, color, typography);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "orcs-design-system",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.7",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=20.0.0"
|
|
6
6
|
},
|
|
@@ -91,22 +91,22 @@
|
|
|
91
91
|
"@fortawesome/react-fontawesome": "git://github.com/FortAwesome/react-fontawesome.git#0.1.13",
|
|
92
92
|
"@mdx-js/loader": "^2.3.0",
|
|
93
93
|
"@mdx-js/react": "^2.3.0",
|
|
94
|
-
"@storybook/addon-a11y": "^8.6.
|
|
95
|
-
"@storybook/addon-actions": "^8.6.
|
|
96
|
-
"@storybook/addon-docs": "^8.6.
|
|
97
|
-
"@storybook/addon-links": "^8.6.
|
|
98
|
-
"@storybook/addon-toolbars": "^8.6.
|
|
99
|
-
"@storybook/addon-viewport": "^8.6.
|
|
94
|
+
"@storybook/addon-a11y": "^8.6.15",
|
|
95
|
+
"@storybook/addon-actions": "^8.6.15",
|
|
96
|
+
"@storybook/addon-docs": "^8.6.15",
|
|
97
|
+
"@storybook/addon-links": "^8.6.15",
|
|
98
|
+
"@storybook/addon-toolbars": "^8.6.15",
|
|
99
|
+
"@storybook/addon-viewport": "^8.6.15",
|
|
100
100
|
"@storybook/addon-webpack5-compiler-babel": "^3.0.6",
|
|
101
|
-
"@storybook/blocks": "^8.6.
|
|
102
|
-
"@storybook/components": "^8.6.
|
|
103
|
-
"@storybook/core-events": "^8.6.
|
|
104
|
-
"@storybook/manager-api": "^8.6.
|
|
101
|
+
"@storybook/blocks": "^8.6.15",
|
|
102
|
+
"@storybook/components": "^8.6.15",
|
|
103
|
+
"@storybook/core-events": "^8.6.15",
|
|
104
|
+
"@storybook/manager-api": "^8.6.15",
|
|
105
105
|
"@storybook/mdx1-csf": "^1.0.0",
|
|
106
|
-
"@storybook/react": "^8.6.
|
|
107
|
-
"@storybook/react-webpack5": "^8.6.
|
|
106
|
+
"@storybook/react": "^8.6.15",
|
|
107
|
+
"@storybook/react-webpack5": "^8.6.15",
|
|
108
108
|
"@storybook/storybook-deployer": "2.8.16",
|
|
109
|
-
"@storybook/theming": "^8.6.
|
|
109
|
+
"@storybook/theming": "^8.6.15",
|
|
110
110
|
"@testing-library/jest-dom": "^6.9.1",
|
|
111
111
|
"@testing-library/react": "^14.3.1",
|
|
112
112
|
"@types/jest": "^29.5.14",
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
"react-docgen": "^7.0.3",
|
|
142
142
|
"react-dom": "^18.3.1",
|
|
143
143
|
"shelljs": "^0.8.5",
|
|
144
|
-
"storybook": "^8.6.
|
|
144
|
+
"storybook": "^8.6.15",
|
|
145
145
|
"style-loader": "^2.0.0",
|
|
146
146
|
"webpack": "^5.101.1",
|
|
147
147
|
"webpack-cli": "^5.1.4"
|
|
@@ -199,4 +199,4 @@
|
|
|
199
199
|
"\\.(css|less)$": "identity-obj-proxy"
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
|
-
}
|
|
202
|
+
}
|