@conveyorhq/arrow-ds 2.0.0-beta.7 → 2.0.0-beta.9
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 +15 -14
- package/public/components/Accordion/Accordion.js +8 -10
- package/public/components/Avatar/Avatar.js +20 -19
- package/public/components/Button/Button.js +2 -2
- package/public/components/ConveyorLogo/ConveyorLogo.js +6 -6
- package/public/components/Drawer/Drawer.js +7 -7
- package/public/components/Frame/Frame.d.ts +1 -1
- package/public/components/Icon/Icon.d.ts +1 -0
- package/public/components/Icon/Icon.js +3 -1
- package/public/components/MenuRenderer/MenuRenderer.js +4 -7
- package/public/components/Modal/Modal.js +1 -1
- package/public/components/OptionButton/OptionButton.js +18 -13
- package/public/components/Select/Select.js +4 -4
- package/public/components/Select/SelectPopover.js +6 -6
- package/public/components/Select/index.d.ts +2 -0
- package/public/components/Select/index.js +3 -0
- package/public/components/Select/theme.js +22 -22
- package/public/components/Svg/Svg.d.ts +3 -3
- package/public/components/Svg/Svg.js +1 -2
- package/public/components/Tooltip/Tooltip.js +11 -19
- package/public/components/VisuallyHidden/VisuallyHidden.d.ts +2 -1
- package/public/components/VisuallyHidden/VisuallyHidden.js +3 -5
- package/public/css/styles.css +139 -59
- package/public/css/styles.min.css +1 -1
- package/public/css/styles.min.css.map +1 -1
- package/public/hooks/index.d.ts +3 -0
- package/public/hooks/index.js +7 -1
- package/public/hooks/useMatchMedia.d.ts +1 -0
- package/public/hooks/useMatchMedia.js +27 -0
- package/public/hooks/usePrefersReducedMotion.d.ts +1 -0
- package/public/hooks/usePrefersReducedMotion.js +9 -0
- package/public/hooks/useScreenOrientation.d.ts +1 -0
- package/public/hooks/useScreenOrientation.js +24 -0
- package/public/{style-dictionary → src/style-dictionary}/dist/tokens.css +1 -0
- package/public/src/style-dictionary/dist/tokens.d.ts +428 -0
- package/public/src/style-dictionary/dist/tokens.js +428 -0
- package/public/src/style-dictionary/dist/tokens.module.js +428 -0
- package/public/src/style-dictionary/tailwind.config.js +87 -0
- package/public/storybook-components/EnumTable.js +2 -1
- package/public/storybook-components/Story.d.ts +2 -1
- package/public/storybook-components/Story.js +4 -1
- package/public/style-dictionary/dist/tokens.d.ts +428 -422
- package/public/style-dictionary/dist/tokens.js +415 -416
- package/public/style-dictionary/dist/tokens.module.d.ts +431 -0
- package/public/style-dictionary/dist/tokens.module.js +412 -415
- package/public/style-dictionary/src/border-radius.d.ts +31 -0
- package/public/style-dictionary/src/border-radius.js +10 -9
- package/public/style-dictionary/src/border-width.d.ts +21 -0
- package/public/style-dictionary/src/border-width.js +9 -8
- package/public/style-dictionary/src/color.d.ts +249 -0
- package/public/style-dictionary/src/color.js +97 -95
- package/public/style-dictionary/src/font-size.d.ts +45 -0
- package/public/style-dictionary/src/font-size.js +14 -13
- package/public/style-dictionary/src/font-weight.d.ts +13 -0
- package/public/style-dictionary/src/font-weight.js +6 -5
- package/public/style-dictionary/src/height.d.ts +215 -0
- package/public/style-dictionary/src/height.js +10 -10
- package/public/style-dictionary/src/leading.d.ts +17 -0
- package/public/style-dictionary/src/leading.js +7 -6
- package/public/style-dictionary/src/screen-width.d.ts +17 -0
- package/public/style-dictionary/src/screen-width.js +7 -6
- package/public/style-dictionary/src/shadow.d.ts +63 -0
- package/public/style-dictionary/src/shadow.js +19 -18
- package/public/style-dictionary/src/spacing.d.ts +197 -0
- package/public/style-dictionary/src/spacing.js +68 -67
- package/public/style-dictionary/src/tracking.d.ts +13 -0
- package/public/style-dictionary/src/tracking.js +6 -5
- package/public/style-dictionary/src/type.d.ts +13 -0
- package/public/style-dictionary/src/type.js +32 -31
- package/public/style-dictionary/src/width.d.ts +287 -0
- package/public/style-dictionary/src/width.js +29 -29
- package/public/style-dictionary/src/z-index.d.ts +53 -0
- package/public/style-dictionary/src/z-index.js +20 -19
- package/public/style-dictionary/tailwind.config.d.ts +392 -0
- package/public/style-dictionary/tailwind.config.js +51 -72
- package/src/components/Accordion/Accordion.tsx +39 -27
- package/src/components/Avatar/Avatar.tsx +20 -19
- package/src/components/Button/Button.tsx +3 -3
- package/src/components/Button/index.css +12 -1
- package/src/components/Card/Card.story.mdx +45 -37
- package/src/components/ConveyorLogo/ConveyorLogo.tsx +6 -6
- package/src/components/Drawer/Drawer.tsx +1 -1
- package/src/components/Frame/Frame.story.mdx +140 -5
- package/src/components/Frame/Frame.tsx +1 -1
- package/src/components/Frame/index.css +8 -13
- package/src/components/Icon/Icon.tsx +3 -0
- package/src/components/MenuRenderer/MenuRenderer.tsx +7 -9
- package/src/components/Modal/Modal.tsx +1 -1
- package/src/components/Modal/index.css +8 -3
- package/src/components/OptionButton/OptionButton.story.mdx +91 -36
- package/src/components/OptionButton/OptionButton.tsx +19 -18
- package/src/components/OptionButton/index.css +13 -0
- package/src/components/Overlay/Overlay.story.mdx +26 -0
- package/src/components/Select/Select.tsx +4 -4
- package/src/components/Select/SelectPopover.tsx +6 -6
- package/src/components/Select/index.ts +14 -0
- package/src/components/Select/theme.ts +22 -22
- package/src/components/Svg/Svg.story.mdx +36 -0
- package/src/components/Svg/Svg.tsx +6 -4
- package/src/components/Text/Text.story.mdx +34 -0
- package/src/components/Tooltip/Tooltip.story.mdx +21 -0
- package/src/components/Tooltip/Tooltip.tsx +23 -27
- package/src/components/Tooltip/index.css +31 -0
- package/src/components/VisuallyHidden/VisuallyHidden.story.mdx +54 -0
- package/src/components/VisuallyHidden/VisuallyHidden.tsx +10 -5
- package/src/components/VisuallyHidden/index.css +3 -0
- package/src/css/components.css +2 -0
- package/src/docs/Colors.story.mdx +13 -13
- package/src/docs/Spacing.story.mdx +4 -20
- package/src/docs/Tokens.story.mdx +230 -0
- package/src/docs/Typography.story.mdx +17 -94
- package/src/docs/hooks/useDisclosureHook.story.mdx +58 -0
- package/src/docs/hooks/useKeyPressHook.story.mdx +54 -0
- package/src/docs/hooks/useMatchMediaHook.story.mdx +42 -0
- package/src/docs/hooks/useOutsideClickHook.story.mdx +56 -0
- package/src/docs/hooks/usePrefersReducedMotion.story.mdx +61 -0
- package/src/docs/hooks/useScreenOrientationHook.story.mdx +56 -0
- package/src/docs/hooks/useStepHook.story.mdx +102 -0
- package/src/hooks/index.ts +3 -0
- package/src/hooks/useMatchMedia.ts +40 -0
- package/src/hooks/usePrefersReducedMotion.ts +9 -0
- package/src/hooks/useScreenOrientation.ts +27 -0
- package/src/storybook-components/EnumTable.tsx +3 -2
- package/src/storybook-components/Story.tsx +13 -1
- package/src/style-dictionary/dist/tokens.css +378 -0
- package/src/style-dictionary/dist/tokens.d.ts +428 -0
- package/src/style-dictionary/dist/tokens.js +428 -0
- package/src/style-dictionary/dist/tokens.module.js +428 -0
- package/src/style-dictionary/src/border-radius.js +11 -0
- package/src/style-dictionary/src/border-width.js +10 -0
- package/src/style-dictionary/src/color.js +98 -0
- package/src/style-dictionary/src/font-size.js +15 -0
- package/src/style-dictionary/src/font-weight.js +7 -0
- package/src/style-dictionary/src/height.js +13 -0
- package/src/style-dictionary/src/leading.js +8 -0
- package/src/style-dictionary/src/screen-width.js +8 -0
- package/src/style-dictionary/src/shadow.js +19 -0
- package/src/style-dictionary/src/spacing.js +69 -0
- package/src/style-dictionary/src/tracking.js +7 -0
- package/src/style-dictionary/src/type.js +34 -0
- package/src/style-dictionary/src/width.js +32 -0
- package/src/style-dictionary/src/z-index.js +21 -0
- package/src/style-dictionary/tailwind.config.js +87 -0
- package/src/tokens/borders.ts +6 -0
- package/src/tokens/box-shadow.ts +3 -0
- package/src/tokens/colors.ts +6 -0
- package/src/tokens/font-family.ts +3 -0
- package/src/tokens/font-size.ts +3 -0
- package/src/tokens/font-weight.ts +3 -0
- package/src/tokens/height.ts +3 -0
- package/src/tokens/index.ts +3 -2
- package/src/tokens/letter-spacing.ts +3 -0
- package/src/tokens/line-height.ts +3 -0
- package/src/tokens/margin.ts +3 -0
- package/src/tokens/padding.ts +3 -0
- package/src/tokens/screens.ts +3 -0
- package/src/tokens/sizing-scale.ts +6 -0
- package/src/tokens/width.ts +9 -0
- package/src/tokens/will-change.ts +3 -0
- package/src/tokens/z-index.ts +3 -0
- package/src/types/index.ts +3 -0
- package/public/components/Overlay/Overlay.story.d.ts +0 -1
- package/public/components/Overlay/Overlay.story.js +0 -12
- package/public/components/Svg/Svg.story.d.ts +0 -1
- package/public/components/Svg/Svg.story.js +0 -14
- package/public/components/Text/Text.story.d.ts +0 -1
- package/public/components/Text/Text.story.js +0 -31
- package/public/components/VisuallyHidden/VisuallyHidden.story.d.ts +0 -1
- package/public/components/VisuallyHidden/VisuallyHidden.story.js +0 -36
- package/public/components/useStep/ExampleSetupWizard.d.ts +0 -4
- package/public/components/useStep/ExampleSetupWizard.js +0 -33
- package/src/components/Overlay/Overlay.md +0 -14
- package/src/components/Overlay/Overlay.story.tsx +0 -12
- package/src/components/Svg/Svg.md +0 -14
- package/src/components/Svg/Svg.story.tsx +0 -15
- package/src/components/Text/Text.md +0 -14
- package/src/components/Text/Text.story.tsx +0 -12
- package/src/components/VisuallyHidden/VisuallyHidden.md +0 -23
- package/src/components/VisuallyHidden/VisuallyHidden.story.tsx +0 -19
- package/src/components/useStep/ExampleSetupWizard.tsx +0 -63
- package/src/components/useStep/useStep.story.mdx +0 -76
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@conveyorhq/arrow-ds",
|
|
3
3
|
"author": "Conveyor",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "2.0.0-beta.
|
|
5
|
+
"version": "2.0.0-beta.9",
|
|
6
6
|
"description": "Arrow Design System",
|
|
7
7
|
"repository": "https://github.com/conveyor/arrow-ds",
|
|
8
8
|
"publishConfig": {
|
|
@@ -25,7 +25,6 @@
|
|
|
25
25
|
"@popperjs/core": "^2.4.2",
|
|
26
26
|
"@reach/auto-id": "^0.6.1",
|
|
27
27
|
"@reach/portal": "^0.6.1",
|
|
28
|
-
"@react-spring/web": "^9.4.2",
|
|
29
28
|
"@rehooks/component-size": "^1.0.3",
|
|
30
29
|
"@types/date-fns": "^2.6.0",
|
|
31
30
|
"classnames": "^2.2.6",
|
|
@@ -57,7 +56,7 @@
|
|
|
57
56
|
"build:css": "yarn run postcss -c postcss.config.js -o public/css/styles.css src/css/styles.css",
|
|
58
57
|
"build:copy-files": "yarn run build:copy-svg && yarn run build:copy-style-dictionary",
|
|
59
58
|
"build:copy-svg": "copyfiles -u 1 src/**/*.svg public/",
|
|
60
|
-
"build:copy-style-dictionary": "copyfiles style-dictionary
|
|
59
|
+
"build:copy-style-dictionary": "copyfiles src/style-dictionary/dist/* src/style-dictionary/tailwind.config.js public/",
|
|
61
60
|
"minify:css": "csso public/css/styles.css --output public/css/styles.min.css --comments none --source-map file",
|
|
62
61
|
"storybook": "yarn run build && start-storybook --docs -p 9002 -c .storybook -s .storybook",
|
|
63
62
|
"build-storybook": "yarn run build && build-storybook --docs -c .storybook -s .storybook -o storybook-static",
|
|
@@ -103,13 +102,15 @@
|
|
|
103
102
|
"@babel/preset-env": "^7.9.0",
|
|
104
103
|
"@babel/preset-react": "^7.7.0",
|
|
105
104
|
"@babel/preset-typescript": "^7.7.2",
|
|
106
|
-
"@commitlint/cli": "^
|
|
107
|
-
"@commitlint/config-conventional": "^
|
|
108
|
-
"@storybook/addon-actions": "^
|
|
109
|
-
"@storybook/addon-docs": "^
|
|
105
|
+
"@commitlint/cli": "^16.2.1",
|
|
106
|
+
"@commitlint/config-conventional": "^16.2.1",
|
|
107
|
+
"@storybook/addon-actions": "^v6.5.0-alpha.44",
|
|
108
|
+
"@storybook/addon-docs": "^v6.5.0-alpha.44",
|
|
110
109
|
"@storybook/addon-postcss": "^2.0.0",
|
|
111
|
-
"@storybook/
|
|
112
|
-
"@storybook/
|
|
110
|
+
"@storybook/builder-webpack5": "^6.4.19",
|
|
111
|
+
"@storybook/manager-webpack5": "^6.4.19",
|
|
112
|
+
"@storybook/react": "^v6.5.0-alpha.44",
|
|
113
|
+
"@storybook/theming": "^v6.5.0-alpha.44",
|
|
113
114
|
"@types/classnames": "^2.2.9",
|
|
114
115
|
"@types/codemirror": "^0.0.91",
|
|
115
116
|
"@types/d3-ease": "^1.0.9",
|
|
@@ -132,14 +133,14 @@
|
|
|
132
133
|
"babel-plugin-inline-react-svg": "^2.0.0",
|
|
133
134
|
"copyfiles": "^2.4.1",
|
|
134
135
|
"csso-cli": "^3.0.0",
|
|
135
|
-
"eslint": "^7.
|
|
136
|
+
"eslint": "^7.32.0",
|
|
136
137
|
"eslint-config-airbnb-typescript": "^12.3.1",
|
|
137
138
|
"eslint-config-prettier": "^8.1.0",
|
|
138
139
|
"eslint-formatter-pretty": "^4.0.0",
|
|
139
140
|
"eslint-import-resolver-typescript": "^2.4.0",
|
|
140
141
|
"eslint-plugin-import": "^2.22.1",
|
|
141
142
|
"eslint-plugin-jsx-a11y": "^6.4.1",
|
|
142
|
-
"eslint-plugin-mdx": "^1.
|
|
143
|
+
"eslint-plugin-mdx": "^1.16.0",
|
|
143
144
|
"eslint-plugin-prettier": "^3.3.1",
|
|
144
145
|
"eslint-plugin-react": "^7.22.0",
|
|
145
146
|
"eslint-plugin-react-hooks": "^4.2.0",
|
|
@@ -147,7 +148,7 @@
|
|
|
147
148
|
"husky": "^3.1.0",
|
|
148
149
|
"lodash.camelcase": "^4.3.0",
|
|
149
150
|
"plop": "^2.5.3",
|
|
150
|
-
"postcss": "^8.4.
|
|
151
|
+
"postcss": "^8.4.7",
|
|
151
152
|
"postcss-cli": "^9.0.2",
|
|
152
153
|
"postcss-import": "^14.0.2",
|
|
153
154
|
"prettier": "^2.2.1",
|
|
@@ -156,9 +157,9 @@
|
|
|
156
157
|
"react-dom": "^16.11.0",
|
|
157
158
|
"react-is": "^16.12.0",
|
|
158
159
|
"regenerator-runtime": "^0.13.3",
|
|
159
|
-
"semantic-release": "^
|
|
160
|
+
"semantic-release": "^19.0.2",
|
|
160
161
|
"style-dictionary": "^3.1.1",
|
|
161
|
-
"tailwindcss": "^3.0.
|
|
162
|
+
"tailwindcss": "^3.0.23",
|
|
162
163
|
"ts-loader": "^6.2.1",
|
|
163
164
|
"typescript": "^4.2.3",
|
|
164
165
|
"webpack": "^5.0.0",
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.Accordion = exports.AccordionContent = exports.AccordionButton = exports.AccordionItem = exports.AccordionGroup = void 0;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const classnames_1 = __importDefault(require("classnames"));
|
|
9
|
-
const
|
|
9
|
+
const renderprops_1 = require("react-spring/renderprops");
|
|
10
10
|
const component_size_1 = __importDefault(require("@rehooks/component-size"));
|
|
11
11
|
const auto_id_1 = require("@reach/auto-id");
|
|
12
12
|
const react_merge_refs_1 = __importDefault(require("react-merge-refs"));
|
|
@@ -69,19 +69,17 @@ const AccordionContent = ({ children, maxHeight, style, className, ...rest }) =>
|
|
|
69
69
|
setChildrenRef({ current: node });
|
|
70
70
|
}
|
|
71
71
|
}, []);
|
|
72
|
-
const { height
|
|
72
|
+
const { height } = component_size_1.default(childrenRef);
|
|
73
|
+
const heightObj = { height };
|
|
73
74
|
const [enableTransition, setEnableTransition] = react_1.default.useState(!defaultIsOpen);
|
|
74
|
-
|
|
75
|
-
height: isOpen ? componentHeight : 0,
|
|
76
|
-
immediate: !enableTransition,
|
|
77
|
-
onRest: () => {
|
|
75
|
+
return (react_1.default.createElement(renderprops_1.Transition, { items: isOpen, from: { height: 0 }, enter: { height }, leave: { height: 0 }, update: heightObj, onRest: () => {
|
|
78
76
|
if (defaultIsOpen && isOpen) {
|
|
79
77
|
setEnableTransition(true);
|
|
80
78
|
}
|
|
81
|
-
},
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
79
|
+
}, immediate: !enableTransition }, (show) => show
|
|
80
|
+
? (styles) => (react_1.default.createElement(Box_1.Box, Object.assign({ className: classnames_1.default("overflow-hidden box-content", className), style: { ...styles, ...style }, "aria-labelledby": buttonId, id: contentId, role: "region" }, rest),
|
|
81
|
+
react_1.default.createElement(Box_1.Box, { ref: onRefChange, className: classnames_1.default(maxHeight && "overflow-y-auto"), style: maxHeight ? { maxHeight } : undefined }, children)))
|
|
82
|
+
: null));
|
|
85
83
|
};
|
|
86
84
|
exports.AccordionContent = AccordionContent;
|
|
87
85
|
const Accordion = (props) => {
|
|
@@ -27,7 +27,7 @@ const react_1 = __importStar(require("react"));
|
|
|
27
27
|
const md5_1 = __importDefault(require("md5"));
|
|
28
28
|
const classnames_1 = __importDefault(require("classnames"));
|
|
29
29
|
const bem_1 = require("../../utilities/bem");
|
|
30
|
-
const tokens_1 = require("../../tokens");
|
|
30
|
+
const tokens_1 = require("../../style-dictionary/dist/tokens");
|
|
31
31
|
const Box_1 = require("../Box");
|
|
32
32
|
const Icon_1 = require("../Icon");
|
|
33
33
|
const Flex_1 = require("../Flex");
|
|
@@ -39,35 +39,36 @@ const AvatarGroup_1 = require("./AvatarGroup");
|
|
|
39
39
|
const types_1 = require("./types");
|
|
40
40
|
const context_1 = require("./context");
|
|
41
41
|
const cn = bem_1.bemHOF("Avatar");
|
|
42
|
+
const { color } = tokens_1.tokens;
|
|
42
43
|
const SystemIcon = (props) => {
|
|
43
44
|
return (react_1.default.createElement(Svg_1.Svg, Object.assign({ viewBox: "0 0 32 32" }, props),
|
|
44
|
-
react_1.default.createElement("path", { fill:
|
|
45
|
-
react_1.default.createElement("path", { fill:
|
|
46
|
-
react_1.default.createElement("path", { fill:
|
|
47
|
-
react_1.default.createElement("path", { fill:
|
|
48
|
-
react_1.default.createElement("path", { fill:
|
|
45
|
+
react_1.default.createElement("path", { fill: color.brandGreen["400"], d: "M19.042 31.58c-1.17 0.275-2.389 0.42-3.642 0.42-0.24 0-0.479-0.005-0.716-0.016v-2.851c0-1.318-1.285-2.25-2.533-1.843-1.934 0.63-3.873 1.249-5.809 1.872-1.371-0.954-2.586-2.118-3.598-3.447l7.94-2.602c1.96-0.637 4.054-0.299 5.721 0.918s2.633 3.115 2.637 5.186l0.001 2.362z" }),
|
|
46
|
+
react_1.default.createElement("path", { fill: color.brandGreen["400"], d: "M20.856 31.037l0.004-8.342c-0.003-2.071 0.95-3.969 2.636-5.191 1.647-1.216 3.736-1.548 5.716-0.909l2.066 0.675c-0.117 1.502-0.441 2.946-0.943 4.302-0.876-0.286-1.751-0.576-2.627-0.861-1.23-0.401-2.48 0.525-2.48 1.824v6.057c-1.308 1.032-2.781 1.862-4.372 2.445z" }),
|
|
47
|
+
react_1.default.createElement("path", { fill: color.brandGreen["400"], d: "M31.314 15.338l-7.709-2.523c-1.98-0.64-3.471-2.149-4.105-4.12s-0.299-4.075 0.911-5.75l1.212-1.677c1.363 0.582 2.629 1.349 3.767 2.27-0.512 0.704-1.032 1.403-1.555 2.099-0.802 1.066-0.321 2.608 0.946 3.015l5.558 1.785c0.567 1.536 0.906 3.184 0.976 4.901z" }),
|
|
48
|
+
react_1.default.createElement("path", { fill: color.brandGreen["400"], d: "M14.89 0.008c0.169-0.005 0.339-0.008 0.509-0.008 1.534 0 3.017 0.218 4.421 0.624l-4.725 6.537c-1.211 1.675-3.098 2.645-5.159 2.648s-3.949-0.956-5.166-2.651l-1.287-1.776c0.971-1.099 2.091-2.063 3.327-2.859l1.565 2.223c0.764 1.085 2.365 1.090 3.135 0.008l3.379-4.747z" }),
|
|
49
|
+
react_1.default.createElement("path", { fill: color.brandGreen["400"], d: "M0.145 11.383c0.487-1.624 1.223-3.14 2.165-4.502l4.823 6.663c1.217 1.695 1.548 3.795 0.906 5.745-0.636 1.99-2.137 3.487-4.097 4.124l-2.253 0.733c-0.737-1.249-1.31-2.608-1.689-4.046l2.681-0.912c1.244-0.423 1.711-1.948 0.93-3.009-1.168-1.589-2.318-3.193-3.466-4.797z" })));
|
|
49
50
|
};
|
|
50
51
|
const SystemIconConveyor = (props) => (react_1.default.createElement(SystemIcon, Object.assign({}, props)));
|
|
51
52
|
exports.SystemIconConveyor = SystemIconConveyor;
|
|
52
53
|
const SystemIconAptible = (props) => (react_1.default.createElement(Svg_1.Svg, Object.assign({ viewBox: "0 0 40 32" }, props),
|
|
53
|
-
react_1.default.createElement("path", { fill:
|
|
54
|
-
react_1.default.createElement("path", { fill:
|
|
55
|
-
react_1.default.createElement("path", { fill:
|
|
56
|
-
react_1.default.createElement("path", { fill:
|
|
54
|
+
react_1.default.createElement("path", { fill: color.gold["400"], d: "M22.018 31.667h5.646v-11.538l11.291 11.538v-7.692l-16.937-17.308z" }),
|
|
55
|
+
react_1.default.createElement("path", { fill: color.gold["400"], d: "M27.777 0h-7.452l18.631 18.333v-7.333l-11.178-11z" }),
|
|
56
|
+
react_1.default.createElement("path", { fill: color.gold["400"], d: "M0 23.974v7.692l11.291-11.538v11.538h5.646v-25l-16.937 17.308z" }),
|
|
57
|
+
react_1.default.createElement("path", { fill: color.gold["400"], d: "M0 11v7.333l18.631-18.333h-7.522l-11.109 11z" })));
|
|
57
58
|
exports.SystemIconAptible = SystemIconAptible;
|
|
58
59
|
const avatarInitialBackgroundColors = [
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
60
|
+
color.green["600"],
|
|
61
|
+
color.gold["600"],
|
|
62
|
+
color.orange["600"],
|
|
63
|
+
color.red["600"],
|
|
64
|
+
color.pink["600"],
|
|
65
|
+
color.purple["600"],
|
|
66
|
+
color.blue["600"],
|
|
67
|
+
color.cyan["600"],
|
|
67
68
|
];
|
|
68
69
|
const Initials = ({ email, name, firstInitial, lastInitial, }) => {
|
|
69
70
|
const initialsBgColor = react_1.useMemo(() => {
|
|
70
|
-
const fallbackColor =
|
|
71
|
+
const fallbackColor = color.gray["600"];
|
|
71
72
|
if (!email)
|
|
72
73
|
return fallbackColor;
|
|
73
74
|
let hash = 0;
|
|
@@ -69,7 +69,7 @@ exports.Button = react_1.forwardRef(({ as: Component = "button", children, class
|
|
|
69
69
|
const isDisabled = disabled || isLoading;
|
|
70
70
|
const themeContext = react_1.useContext(contexts_1.ThemeContext);
|
|
71
71
|
const theme = themeProp || themeContext;
|
|
72
|
-
const buttonClassNames = classnames_1.default(bem_1.bem(cn), bem_1.bem(cn, { m: variant }), bem_1.bem(cn, { m: theme }), block
|
|
72
|
+
const buttonClassNames = classnames_1.default(bem_1.bem(cn), bem_1.bem(cn, { m: variant }), bem_1.bem(cn, { m: theme }), block && bem_1.bem(cn, { m: "block" }), getButtonSizeClasses(size, icon, children), depressed && bem_1.bem(cn, { m: "depressed" }), isDisabled && bem_1.bem(cn, { m: "disabled" }), className);
|
|
73
73
|
const iconClassNames = classnames_1.default(bem_1.bem(cn, { e: "icon" }), children && bem_1.bem(cn, { e: "icon", m: iconPosition }), isLoading && bem_1.bem(cn, { e: "icon", m: "invisible" }));
|
|
74
74
|
const iconProps = icon
|
|
75
75
|
? {
|
|
@@ -85,7 +85,7 @@ exports.Button = react_1.forwardRef(({ as: Component = "button", children, class
|
|
|
85
85
|
type = "button";
|
|
86
86
|
}
|
|
87
87
|
const propsIfLink = Component === Link_1.Link ? { noStyles: true } : {};
|
|
88
|
-
return (react_1.default.createElement(Component, Object.assign({ type: type, className: buttonClassNames, disabled:
|
|
88
|
+
return (react_1.default.createElement(Component, Object.assign({ type: type, className: buttonClassNames, disabled: isDisabled, ref: ref }, propsIfLink, rest),
|
|
89
89
|
icon && iconProps && iconPosition === BUTTON_ICON_POSITION.LEFT && (react_1.default.createElement(Icon_1.Icon, Object.assign({}, iconProps))),
|
|
90
90
|
react_1.default.createElement("span", { className: classnames_1.default(bem_1.bem(cn, { e: "content" }), isLoading && bem_1.bem(cn, { e: "content", m: "invisible" })) }, children),
|
|
91
91
|
icon && iconProps && iconPosition === BUTTON_ICON_POSITION.RIGHT && (react_1.default.createElement(Icon_1.Icon, Object.assign({}, iconProps))),
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.ConveyorLogo = void 0;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const types_1 = require("../../types");
|
|
9
|
-
const tokens_1 = require("../../tokens");
|
|
9
|
+
const tokens_1 = require("../../style-dictionary/dist/tokens");
|
|
10
10
|
const Svg_1 = require("../Svg");
|
|
11
11
|
const WIDTH = 165;
|
|
12
12
|
const HEIGHT = 32;
|
|
@@ -14,17 +14,17 @@ const RATIO = WIDTH / HEIGHT;
|
|
|
14
14
|
const widthFromHeight = (height) => Math.ceil(height * RATIO);
|
|
15
15
|
const ConveyorLogo = ({ height = HEIGHT, monochrome = false, theme = types_1.THEME.PRODUCT, variant = "wordmark", className, ...rest }) => {
|
|
16
16
|
const wordmarkColor = {
|
|
17
|
-
brand: tokens_1.
|
|
18
|
-
product: tokens_1.
|
|
17
|
+
brand: tokens_1.tokens.color.white,
|
|
18
|
+
product: tokens_1.tokens.color.brandBlack,
|
|
19
19
|
};
|
|
20
20
|
const iconColorFunction = () => {
|
|
21
21
|
if (monochrome && theme === types_1.THEME.PRODUCT) {
|
|
22
|
-
return tokens_1.
|
|
22
|
+
return tokens_1.tokens.color.brandBlack;
|
|
23
23
|
}
|
|
24
24
|
if (monochrome && theme === types_1.THEME.BRAND) {
|
|
25
|
-
return tokens_1.
|
|
25
|
+
return tokens_1.tokens.color.white;
|
|
26
26
|
}
|
|
27
|
-
return tokens_1.
|
|
27
|
+
return tokens_1.tokens.color.brandGreen[400];
|
|
28
28
|
};
|
|
29
29
|
const iconColor = iconColorFunction();
|
|
30
30
|
return (react_1.default.createElement(Svg_1.Svg, Object.assign({ width: variant === "wordmark" ? widthFromHeight(height) : height, height: height, viewBox: variant === "wordmark" ? `0 0 ${WIDTH} ${HEIGHT}` : "0 0 32 32", className: className }, rest),
|
|
@@ -24,7 +24,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
exports.Drawer = exports.WithDrawer = void 0;
|
|
26
26
|
const react_1 = __importStar(require("react"));
|
|
27
|
-
const
|
|
27
|
+
const react_spring_1 = require("react-spring");
|
|
28
28
|
const classnames_1 = __importDefault(require("classnames"));
|
|
29
29
|
const d3_ease_1 = require("d3-ease");
|
|
30
30
|
const bem_1 = require("../../utilities/bem");
|
|
@@ -45,7 +45,7 @@ const calculateTransformValue = (isOpen, drawerOnRight, drawerWidth) => {
|
|
|
45
45
|
const WithDrawer = ({ drawerSlot, onClose, isOpen = false, fixedSlotTop, fixedSlotBottom, scrollableSlot, drawerSide = "left", noAnimation = false, drawerWidth = DEFAULT_DRAWER_WIDTH, }) => {
|
|
46
46
|
const drawerOnRight = drawerSide === "right";
|
|
47
47
|
const [isClosedAtRest, setIsClosedAtRest] = react_1.useState(false);
|
|
48
|
-
const { transform, paddingLeft, paddingRight } =
|
|
48
|
+
const { transform, paddingLeft, paddingRight } = react_spring_1.useSpring({
|
|
49
49
|
transform: calculateTransformValue(isOpen, drawerOnRight, drawerWidth),
|
|
50
50
|
paddingLeft: isOpen && !drawerOnRight ? drawerWidth : 0,
|
|
51
51
|
paddingRight: isOpen && drawerOnRight ? drawerWidth : 0,
|
|
@@ -63,7 +63,7 @@ const WithDrawer = ({ drawerSlot, onClose, isOpen = false, fixedSlotTop, fixedSl
|
|
|
63
63
|
easing: d3_ease_1.easeCubicInOut,
|
|
64
64
|
},
|
|
65
65
|
});
|
|
66
|
-
const { transform: transformReverse } =
|
|
66
|
+
const { transform: transformReverse } = react_spring_1.useSpring({
|
|
67
67
|
transform: isOpen && !drawerOnRight
|
|
68
68
|
? `translateX(${drawerWidth}px)`
|
|
69
69
|
: "translateX(0px)",
|
|
@@ -79,16 +79,16 @@ const WithDrawer = ({ drawerSlot, onClose, isOpen = false, fixedSlotTop, fixedSl
|
|
|
79
79
|
react_1.default.createElement(Box_1.Box, { className: classnames_1.default(cn(), {
|
|
80
80
|
[cn({ m: "isOpen" })]: isOpen,
|
|
81
81
|
}) },
|
|
82
|
-
react_1.default.createElement(
|
|
82
|
+
react_1.default.createElement(react_spring_1.animated.div, { className: classnames_1.default(cn({ e: "wrapper" }), { drawerOnRight }), style: wrapperCombinedStyle }, drawerSlot),
|
|
83
83
|
react_1.default.createElement(Flex_1.Flex, { className: classnames_1.default(cn({ e: "onScreenContent" }), {
|
|
84
84
|
drawerOnRight,
|
|
85
85
|
}) },
|
|
86
|
-
fixedSlotTop && (react_1.default.createElement(
|
|
87
|
-
scrollableSlot && (react_1.default.createElement(
|
|
86
|
+
fixedSlotTop && (react_1.default.createElement(react_spring_1.animated.div, { style: { paddingLeft, paddingRight }, className: cn({ e: "fixedSlot" }) }, fixedSlotTop)),
|
|
87
|
+
scrollableSlot && (react_1.default.createElement(react_spring_1.animated.div, { style: {
|
|
88
88
|
transform: transformReverse,
|
|
89
89
|
width: scrollableSlotPaddingToInterpolate.interpolate((w) => `calc(100% - ${w}px)`),
|
|
90
90
|
}, className: cn({ e: "scrollableSlot" }) }, scrollableSlot)),
|
|
91
|
-
fixedSlotBottom && (react_1.default.createElement(
|
|
91
|
+
fixedSlotBottom && (react_1.default.createElement(react_spring_1.animated.div, { style: { paddingLeft, paddingRight }, className: cn({ e: "fixedSlot" }) }, fixedSlotBottom))))));
|
|
92
92
|
};
|
|
93
93
|
exports.WithDrawer = WithDrawer;
|
|
94
94
|
const Drawer = ({ children, headingSlot, footerSlot, className, drawerSide, ...rest }) => {
|
|
@@ -132,6 +132,7 @@ const faThumbsUp_2 = require("@fortawesome/free-solid-svg-icons/faThumbsUp");
|
|
|
132
132
|
const faTicketAlt_1 = require("@fortawesome/free-solid-svg-icons/faTicketAlt");
|
|
133
133
|
const faTimes_1 = require("@fortawesome/free-solid-svg-icons/faTimes");
|
|
134
134
|
const faTrash_1 = require("@fortawesome/free-solid-svg-icons/faTrash");
|
|
135
|
+
const faUnlock_1 = require("@fortawesome/free-solid-svg-icons/faUnlock");
|
|
135
136
|
const faUser_2 = require("@fortawesome/free-solid-svg-icons/faUser");
|
|
136
137
|
const faUserAstronaut_1 = require("@fortawesome/free-solid-svg-icons/faUserAstronaut");
|
|
137
138
|
const faUserPlus_1 = require("@fortawesome/free-solid-svg-icons/faUserPlus");
|
|
@@ -142,7 +143,7 @@ const status_1 = require("../../contexts/status");
|
|
|
142
143
|
const types_1 = require("../../types");
|
|
143
144
|
const utilities_1 = require("../../utilities");
|
|
144
145
|
const cn = utilities_1.bemHOF("Icon");
|
|
145
|
-
fontawesome_svg_core_1.library.add(faArchive_1.faArchive, faArrowDown_1.faArrowDown, faArrowLeft_1.faArrowLeft, faArrowRight_1.faArrowRight, faArrowUp_1.faArrowUp, faBackward_1.faBackward, faBan_1.faBan, faBatteryHalf_1.faBatteryHalf, faBed_1.faBed, faBell_1.faBell, faBolt_1.faBolt, faCalculator_1.faCalculator, faCalendar_1.faCalendar, faCaretDown_1.faCaretDown, faCaretUp_1.faCaretUp, faChartLine_1.faChartLine, faCheck_1.faCheck, faCheckCircle_2.faCheckCircle, faCheckCircle_1.faCheckCircle, faChevronDown_1.faChevronDown, faChevronLeft_1.faChevronLeft, faChevronRight_1.faChevronRight, faChevronUp_1.faChevronUp, faCircle_2.faCircle, faCircleNotch_1.faCircleNotch, faCircle_1.faCircle, faClipboard_1.faClipboard, faClock_1.faClock, faClock_2.faClock, faCog_1.faCog, faColumns_1.faColumns, faCommentAlt_1.faCommentAlt, faCompress_1.faCompress, faCrown_1.faCrown, faEllipsisH_1.faEllipsisH, faEllipsisV_1.faEllipsisV, faEnvelope_1.faEnvelope, faExclamationCircle_1.faExclamationCircle, faExclamationTriangle_1.faExclamationTriangle, faExpand_1.faExpand, faExternalLinkAlt_1.faExternalLinkAlt, faExternalLinkSquareAlt_1.faExternalLinkSquareAlt, faEye_1.faEye, faEyeSlash_1.faEyeSlash, faFastBackward_1.faFastBackward, faFastForward_1.faFastForward, faFileAlt_1.faFileAlt, faFileAlt_2.faFileAlt, faFileImport_1.faFileImport, faFileSignature_1.faFileSignature, faFilter_1.faFilter, faFlag_1.faFlag, faFolder_1.faFolder, faForward_1.faForward, faGripLines_1.faGripLines, faGripLinesVertical_1.faGripLinesVertical, faHashtag_1.faHashtag, faInfoCircle_1.faInfoCircle, faKey_1.faKey, faKeyboard_1.faKeyboard, faLayerGroup_1.faLayerGroup, faLevelUpAlt_1.faLevelUpAlt, faListUl_1.faListUl, faLock_1.faLock, faLongArrowAltRight_1.faLongArrowAltRight, faMagic_1.faMagic, faMapSigns_1.faMapSigns, faMinus_1.faMinus, faMousePointer_1.faMousePointer, faPaperclip_1.faPaperclip, faPause_1.faPause, faPen_1.faPen, faPlay_1.faPlay, faPlus_1.faPlus, faPlusCircle_1.faPlusCircle, faPooStorm_1.faPooStorm, faQuestion_1.faQuestion, faQuestionCircle_2.faQuestionCircle, faQuestionCircle_1.faQuestionCircle, faScroll_1.faScroll, faSearch_1.faSearch, faShareAlt_1.faShareAlt, faShieldAlt_1.faShieldAlt, faSignOutAlt_1.faSignOutAlt, faSignature_1.faSignature, faSlidersH_1.faSlidersH, faSort_1.faSort, faSortDown_1.faSortDown, faSortUp_1.faSortUp, faSpinner_1.faSpinner, faSquare_1.faSquare, faStar_1.faStar, faStar_2.faStar, faSync_1.faSync, faTasks_1.faTasks, faThLarge_1.faThLarge, faThumbsDown_1.faThumbsDown, faThumbsDown_2.faThumbsDown, faThumbsUp_1.faThumbsUp, faThumbsUp_2.faThumbsUp, faTicketAlt_1.faTicketAlt, faTimes_1.faTimes, faTimesCircle_1.faTimesCircle, faTrash_1.faTrash, faUser_2.faUser, faUserAstronaut_1.faUserAstronaut, faUserPlus_1.faUserPlus, faUser_1.faUser, faUsers_1.faUsers, faUserFriends_1.faUserFriends);
|
|
146
|
+
fontawesome_svg_core_1.library.add(faArchive_1.faArchive, faArrowDown_1.faArrowDown, faArrowLeft_1.faArrowLeft, faArrowRight_1.faArrowRight, faArrowUp_1.faArrowUp, faBackward_1.faBackward, faBan_1.faBan, faBatteryHalf_1.faBatteryHalf, faBed_1.faBed, faBell_1.faBell, faBolt_1.faBolt, faCalculator_1.faCalculator, faCalendar_1.faCalendar, faCaretDown_1.faCaretDown, faCaretUp_1.faCaretUp, faChartLine_1.faChartLine, faCheck_1.faCheck, faCheckCircle_2.faCheckCircle, faCheckCircle_1.faCheckCircle, faChevronDown_1.faChevronDown, faChevronLeft_1.faChevronLeft, faChevronRight_1.faChevronRight, faChevronUp_1.faChevronUp, faCircle_2.faCircle, faCircleNotch_1.faCircleNotch, faCircle_1.faCircle, faClipboard_1.faClipboard, faClock_1.faClock, faClock_2.faClock, faCog_1.faCog, faColumns_1.faColumns, faCommentAlt_1.faCommentAlt, faCompress_1.faCompress, faCrown_1.faCrown, faEllipsisH_1.faEllipsisH, faEllipsisV_1.faEllipsisV, faEnvelope_1.faEnvelope, faExclamationCircle_1.faExclamationCircle, faExclamationTriangle_1.faExclamationTriangle, faExpand_1.faExpand, faExternalLinkAlt_1.faExternalLinkAlt, faExternalLinkSquareAlt_1.faExternalLinkSquareAlt, faEye_1.faEye, faEyeSlash_1.faEyeSlash, faFastBackward_1.faFastBackward, faFastForward_1.faFastForward, faFileAlt_1.faFileAlt, faFileAlt_2.faFileAlt, faFileImport_1.faFileImport, faFileSignature_1.faFileSignature, faFilter_1.faFilter, faFlag_1.faFlag, faFolder_1.faFolder, faForward_1.faForward, faGripLines_1.faGripLines, faGripLinesVertical_1.faGripLinesVertical, faHashtag_1.faHashtag, faInfoCircle_1.faInfoCircle, faKey_1.faKey, faKeyboard_1.faKeyboard, faLayerGroup_1.faLayerGroup, faLevelUpAlt_1.faLevelUpAlt, faListUl_1.faListUl, faLock_1.faLock, faLongArrowAltRight_1.faLongArrowAltRight, faMagic_1.faMagic, faMapSigns_1.faMapSigns, faMinus_1.faMinus, faMousePointer_1.faMousePointer, faPaperclip_1.faPaperclip, faPause_1.faPause, faPen_1.faPen, faPlay_1.faPlay, faPlus_1.faPlus, faPlusCircle_1.faPlusCircle, faPooStorm_1.faPooStorm, faQuestion_1.faQuestion, faQuestionCircle_2.faQuestionCircle, faQuestionCircle_1.faQuestionCircle, faScroll_1.faScroll, faSearch_1.faSearch, faShareAlt_1.faShareAlt, faShieldAlt_1.faShieldAlt, faSignOutAlt_1.faSignOutAlt, faSignature_1.faSignature, faSlidersH_1.faSlidersH, faSort_1.faSort, faSortDown_1.faSortDown, faSortUp_1.faSortUp, faSpinner_1.faSpinner, faSquare_1.faSquare, faStar_1.faStar, faStar_2.faStar, faSync_1.faSync, faTasks_1.faTasks, faThLarge_1.faThLarge, faThumbsDown_1.faThumbsDown, faThumbsDown_2.faThumbsDown, faThumbsUp_1.faThumbsUp, faThumbsUp_2.faThumbsUp, faTicketAlt_1.faTicketAlt, faTimes_1.faTimes, faTimesCircle_1.faTimesCircle, faTrash_1.faTrash, faUnlock_1.faUnlock, faUser_2.faUser, faUserAstronaut_1.faUserAstronaut, faUserPlus_1.faUserPlus, faUser_1.faUser, faUsers_1.faUsers, faUserFriends_1.faUserFriends);
|
|
146
147
|
var CUSTOM_ICON_TYPE;
|
|
147
148
|
(function (CUSTOM_ICON_TYPE) {
|
|
148
149
|
CUSTOM_ICON_TYPE["ARROW_TO_BOTTOM"] = "arrow-to-bottom";
|
|
@@ -260,6 +261,7 @@ var ICON_TYPE;
|
|
|
260
261
|
ICON_TYPE["THUMBS_DOWN"] = "thumbs-down";
|
|
261
262
|
ICON_TYPE["THUMBS_UP"] = "thumbs-up";
|
|
262
263
|
ICON_TYPE["TRASH"] = "trash";
|
|
264
|
+
ICON_TYPE["UNLOCK"] = "unlock";
|
|
263
265
|
ICON_TYPE["USER"] = "user";
|
|
264
266
|
ICON_TYPE["USER_ASTRONAUT"] = "user-astronaut";
|
|
265
267
|
ICON_TYPE["USER_PLUS"] = "user-plus";
|
|
@@ -27,7 +27,7 @@ const react_1 = __importStar(require("react"));
|
|
|
27
27
|
const auto_id_1 = require("@reach/auto-id");
|
|
28
28
|
const react_focus_lock_1 = __importDefault(require("react-focus-lock"));
|
|
29
29
|
const react_popper_1 = require("react-popper");
|
|
30
|
-
const
|
|
30
|
+
const react_spring_1 = require("react-spring");
|
|
31
31
|
const d3_ease_1 = require("d3-ease");
|
|
32
32
|
const hooks_1 = require("../../hooks");
|
|
33
33
|
const types_1 = require("../../types");
|
|
@@ -128,7 +128,7 @@ const MenuRenderer = ({ children, className, placement = "bottom-start", positio
|
|
|
128
128
|
}
|
|
129
129
|
}, [children, update]);
|
|
130
130
|
const PortalComponent = hasPortal ? Portal_1.Portal : react_1.Fragment;
|
|
131
|
-
const transitions =
|
|
131
|
+
const transitions = react_spring_1.useTransition(isOpen, null, {
|
|
132
132
|
from: TRANSITION_START,
|
|
133
133
|
enter: TRANSITION_END,
|
|
134
134
|
leave: TRANSITION_START,
|
|
@@ -139,14 +139,11 @@ const MenuRenderer = ({ children, className, placement = "bottom-start", positio
|
|
|
139
139
|
});
|
|
140
140
|
return (react_1.default.createElement(Box_1.Box, Object.assign({ className: className, ref: menuElement }, rest),
|
|
141
141
|
react_1.default.createElement(Box_1.Box, { ref: setReferenceElement }, trigger(triggerProps, triggerState)),
|
|
142
|
-
transitions(({
|
|
142
|
+
transitions.map(({ item, key, props: transitionProps }) => item && (react_1.default.createElement(PortalComponent, { key: key },
|
|
143
143
|
react_1.default.createElement(context_1.MenuContext.Provider, { value: context },
|
|
144
144
|
react_1.default.createElement(Box_1.Box, Object.assign({ className: hasPortal ? "z-toast" : "z-menu", ref: setPopperElement, style: { minWidth: `${minWidth}px`, ...styles.popper } }, attributes.popper),
|
|
145
145
|
react_1.default.createElement(react_focus_lock_1.default, { autoFocus: autoFocus },
|
|
146
|
-
react_1.default.createElement(
|
|
147
|
-
opacity,
|
|
148
|
-
transform,
|
|
149
|
-
}, ref: menuListElement }, typeof children === "function"
|
|
146
|
+
react_1.default.createElement(react_spring_1.animated.div, { key: key, style: transitionProps, ref: menuListElement }, typeof children === "function"
|
|
150
147
|
? children(renderProps)
|
|
151
148
|
: children)))))))));
|
|
152
149
|
};
|
|
@@ -52,7 +52,7 @@ const ModalFooterMultiStep = ({ steps, currentStep, leftButtonLabel, rightButton
|
|
|
52
52
|
react_1.default.createElement(Flex_1.Flex, { className: bem_1.bem(cn, { e: "buttonLabels" }) },
|
|
53
53
|
react_1.default.createElement(Box_1.Box, { className: bem_1.bem(cn, { e: "buttonLabel", m: "left" }) }, leftButtonLabel),
|
|
54
54
|
react_1.default.createElement(Box_1.Box, { className: bem_1.bem(cn, { e: "buttonLabel", m: "right" }) }, rightButtonLabel)),
|
|
55
|
-
react_1.default.createElement(Box_1.Box, { className: "
|
|
55
|
+
react_1.default.createElement(Box_1.Box, { className: bem_1.bem(cn, { e: "progressDots-container" }) },
|
|
56
56
|
children,
|
|
57
57
|
react_1.default.createElement(Flex_1.Flex, { className: bem_1.bem(cn, { e: "progressDots" }) },
|
|
58
58
|
react_1.default.createElement(Stack_1.Stack, { spacing: 5 }, [...new Array(steps).keys()].map((dot, index) => (react_1.default.createElement(Box_1.Box, { key: dot, className: classnames_1.default([
|
|
@@ -16,7 +16,7 @@ const bem_1 = require("../../utilities/bem");
|
|
|
16
16
|
const isUndefined_1 = __importDefault(require("../../utilities/isUndefined"));
|
|
17
17
|
const types_1 = require("../../types");
|
|
18
18
|
const context_1 = require("./context");
|
|
19
|
-
const cn = "OptionButton";
|
|
19
|
+
const cn = bem_1.bemHOF("OptionButton");
|
|
20
20
|
const OptionButtonGroup = (props) => {
|
|
21
21
|
const { name = "", type = "radio", orientation = types_1.ORIENTATION.VERTICAL, ...rest } = props;
|
|
22
22
|
return (react_1.default.createElement(context_1.OptionButtonContext.Provider, { value: {
|
|
@@ -27,7 +27,7 @@ const OptionButtonGroup = (props) => {
|
|
|
27
27
|
};
|
|
28
28
|
exports.OptionButtonGroup = OptionButtonGroup;
|
|
29
29
|
const OptionButtonRoot = ({ children, className, ...rest }) => {
|
|
30
|
-
return (react_1.default.createElement("label", Object.assign({ className: classnames_1.default(
|
|
30
|
+
return (react_1.default.createElement("label", Object.assign({ className: classnames_1.default(cn(), className) }, rest), children));
|
|
31
31
|
};
|
|
32
32
|
exports.OptionButtonRoot = OptionButtonRoot;
|
|
33
33
|
const OptionButtonInput = (props) => {
|
|
@@ -37,33 +37,38 @@ const OptionButtonInput = (props) => {
|
|
|
37
37
|
const id = isUndefined_1.default(idProp) ? fallbackId : idProp;
|
|
38
38
|
const name = isUndefined_1.default(nameFromContext) ? nameProp : nameFromContext;
|
|
39
39
|
const type = isUndefined_1.default(typeFromContext) ? typeProp : typeFromContext;
|
|
40
|
-
return (react_1.default.createElement(Input_1.Input, Object.assign({ id: id, name: name, type: type, checked: checked, className: classnames_1.default([
|
|
40
|
+
return (react_1.default.createElement(Input_1.Input, Object.assign({ id: id, name: name, type: type, checked: checked, className: classnames_1.default([cn({ e: "input" }), className]), defaultValue: defaultValue, "aria-checked": checked ? "true" : "false" }, rest)));
|
|
41
41
|
};
|
|
42
42
|
exports.OptionButtonInput = OptionButtonInput;
|
|
43
|
-
const OptionButtonContent = ({ className, children, ...rest }) => (react_1.default.createElement(Box_1.Box, Object.assign({ className: classnames_1.default([
|
|
43
|
+
const OptionButtonContent = ({ className, children, ...rest }) => (react_1.default.createElement(Box_1.Box, Object.assign({ className: classnames_1.default([cn({ e: "content" }), className]) }, rest), children));
|
|
44
44
|
exports.OptionButtonContent = OptionButtonContent;
|
|
45
|
-
const OptionButtonHeading = ({ className, children, ...rest }) => (react_1.default.createElement(Text_1.Text, Object.assign({ as: "div", className: classnames_1.default([
|
|
45
|
+
const OptionButtonHeading = ({ className, children, ...rest }) => (react_1.default.createElement(Text_1.Text, Object.assign({ as: "div", className: classnames_1.default([cn({ e: "heading" }), className]) }, rest), children));
|
|
46
46
|
exports.OptionButtonHeading = OptionButtonHeading;
|
|
47
|
-
const OptionButtonDescription = ({ className, children, ...rest }) => (react_1.default.createElement(Text_1.Text, Object.assign({ as: "div", className: classnames_1.default([
|
|
47
|
+
const OptionButtonDescription = ({ className, children, ...rest }) => (react_1.default.createElement(Text_1.Text, Object.assign({ as: "div", className: classnames_1.default([cn({ e: "description" }), className]) }, rest), children));
|
|
48
48
|
exports.OptionButtonDescription = OptionButtonDescription;
|
|
49
|
-
const OptionButtonBackdrop = ({ className, ...rest }) => (react_1.default.createElement(Box_1.Box, Object.assign({ className: classnames_1.default([
|
|
49
|
+
const OptionButtonBackdrop = ({ className, ...rest }) => (react_1.default.createElement(Box_1.Box, Object.assign({ className: classnames_1.default([cn({ e: "backdrop" }), className]) }, rest)));
|
|
50
50
|
exports.OptionButtonBackdrop = OptionButtonBackdrop;
|
|
51
|
-
const OptionButtonSelectedIcon = ({ className, ...rest }) => (react_1.default.createElement(Box_1.Box, Object.assign({ className: classnames_1.default([
|
|
52
|
-
react_1.default.createElement(Icon_1.Icon, { className:
|
|
51
|
+
const OptionButtonSelectedIcon = ({ className, ...rest }) => (react_1.default.createElement(Box_1.Box, Object.assign({ className: classnames_1.default([cn({ e: "selected" }), className]) }, rest),
|
|
52
|
+
react_1.default.createElement(Icon_1.Icon, { className: cn({ e: "icon" }), icon: Icon_1.ICON_TYPE.CHECK }),
|
|
53
53
|
"Selected"));
|
|
54
54
|
exports.OptionButtonSelectedIcon = OptionButtonSelectedIcon;
|
|
55
55
|
const OptionButton = (props) => {
|
|
56
56
|
const { name: nameFromContext, type: typeFromContext, } = context_1.useOptionButtonContext();
|
|
57
|
-
const { heading, description, id: idProp, name: nameProp, checked, className, defaultValue, type: typeProp = "radio", ...rest } = props;
|
|
58
|
-
const fallbackId = `OptionButton
|
|
57
|
+
const { heading, description, id: idProp, name: nameProp, checked, className, defaultValue, type: typeProp = "radio", disabled = false, ...rest } = props;
|
|
58
|
+
const fallbackId = `OptionButton-${auto_id_1.useId()}`;
|
|
59
59
|
const id = isUndefined_1.default(idProp) ? fallbackId : idProp;
|
|
60
60
|
const name = isUndefined_1.default(nameFromContext) ? nameProp : nameFromContext;
|
|
61
61
|
const type = isUndefined_1.default(typeFromContext) ? typeProp : typeFromContext;
|
|
62
|
-
|
|
62
|
+
const rootClassName = classnames_1.default([
|
|
63
|
+
cn(),
|
|
64
|
+
disabled && cn({ m: "disabled" }),
|
|
65
|
+
className,
|
|
66
|
+
]);
|
|
67
|
+
return (react_1.default.createElement(exports.OptionButtonRoot, { className: rootClassName },
|
|
63
68
|
react_1.default.createElement(exports.OptionButtonContent, null,
|
|
64
69
|
heading && react_1.default.createElement(exports.OptionButtonHeading, null, heading),
|
|
65
70
|
description && (react_1.default.createElement(exports.OptionButtonDescription, null, description))),
|
|
66
|
-
react_1.default.createElement(exports.OptionButtonInput, Object.assign({ id: id, name: name, type: type, checked: checked, defaultValue: defaultValue, "aria-checked": checked ? "true" : "false" }, rest)),
|
|
71
|
+
react_1.default.createElement(exports.OptionButtonInput, Object.assign({ id: id, name: name, type: type, checked: checked, defaultValue: defaultValue, "aria-checked": checked ? "true" : "false", disabled: disabled }, rest)),
|
|
67
72
|
react_1.default.createElement(exports.OptionButtonBackdrop, null),
|
|
68
73
|
react_1.default.createElement(exports.OptionButtonSelectedIcon, null)));
|
|
69
74
|
};
|
|
@@ -28,7 +28,7 @@ const classnames_1 = __importDefault(require("classnames"));
|
|
|
28
28
|
const react_select_1 = __importStar(require("react-select"));
|
|
29
29
|
const creatable_1 = __importDefault(require("react-select/creatable"));
|
|
30
30
|
const async_1 = __importDefault(require("react-select/async"));
|
|
31
|
-
const tokens_1 = require("../../tokens");
|
|
31
|
+
const tokens_1 = require("../../style-dictionary/dist/tokens");
|
|
32
32
|
const types_1 = require("../../types");
|
|
33
33
|
const utilities_1 = require("../../utilities");
|
|
34
34
|
const Box_1 = require("../Box");
|
|
@@ -88,14 +88,14 @@ const generateHardcodedProps = ({ controlHeight, menuInPortal, menuRef, componen
|
|
|
88
88
|
...styles,
|
|
89
89
|
menuPortal: (base) => ({
|
|
90
90
|
...base,
|
|
91
|
-
zIndex: tokens_1.zIndex.max,
|
|
91
|
+
zIndex: tokens_1.tokens.zIndex.max,
|
|
92
92
|
}),
|
|
93
93
|
singleValue: (base, state) => {
|
|
94
94
|
return {
|
|
95
95
|
...base,
|
|
96
96
|
paddingLeft: state.selectProps.isSearchable ? "2px" : "0",
|
|
97
97
|
color: state.selectProps.menuIsOpen && state.selectProps.isSearchable
|
|
98
|
-
? tokens_1.
|
|
98
|
+
? tokens_1.tokens.color.gray["600"]
|
|
99
99
|
: base.color,
|
|
100
100
|
};
|
|
101
101
|
},
|
|
@@ -110,7 +110,7 @@ const generateHardcodedProps = ({ controlHeight, menuInPortal, menuRef, componen
|
|
|
110
110
|
},
|
|
111
111
|
};
|
|
112
112
|
};
|
|
113
|
-
const SelectBase = ({ variant: variantProp = types_1.STATUS_VARIANT.DEFAULT, id: idProp, className, height: controlHeight = utilities_1.toNumber(tokens_1.height["10"]), menuInPortal = false, menuRef, components, optionsMessage, styles, ...rest }) => {
|
|
113
|
+
const SelectBase = ({ variant: variantProp = types_1.STATUS_VARIANT.DEFAULT, id: idProp, className, height: controlHeight = utilities_1.toNumber(tokens_1.tokens.height["10"]), menuInPortal = false, menuRef, components, optionsMessage, styles, ...rest }) => {
|
|
114
114
|
const { variant: variantContext, id: idContext } = react_1.useContext(FormGroupContext_1.FormGroupContext);
|
|
115
115
|
const id = idContext || idProp;
|
|
116
116
|
const variant = variantContext || variantProp;
|
|
@@ -26,7 +26,7 @@ exports.SelectPopover = void 0;
|
|
|
26
26
|
const react_1 = __importStar(require("react"));
|
|
27
27
|
const classnames_1 = __importDefault(require("classnames"));
|
|
28
28
|
const react_focus_lock_1 = __importDefault(require("react-focus-lock"));
|
|
29
|
-
const tokens_1 = require("../../tokens");
|
|
29
|
+
const tokens_1 = require("../../style-dictionary/dist/tokens");
|
|
30
30
|
const hooks_1 = require("../../hooks");
|
|
31
31
|
const Box_1 = require("../Box");
|
|
32
32
|
const Flex_1 = require("../Flex");
|
|
@@ -49,19 +49,19 @@ const SelectPopover = ({ readView, cancelButton, onCancelEdit, preventOutsideCli
|
|
|
49
49
|
const selectStyles = {
|
|
50
50
|
control: (provided) => ({
|
|
51
51
|
...provided,
|
|
52
|
-
width: `calc(100% - ${tokens_1.tokens.
|
|
53
|
-
margin: tokens_1.tokens.
|
|
52
|
+
width: `calc(100% - ${tokens_1.tokens.spacing[6]})`,
|
|
53
|
+
margin: tokens_1.tokens.spacing[3],
|
|
54
54
|
}),
|
|
55
55
|
menu: (provided) => ({
|
|
56
56
|
...provided,
|
|
57
57
|
boxShadow: "none !important",
|
|
58
58
|
borderRadius: "0 !important",
|
|
59
59
|
zIndex: "1 !important",
|
|
60
|
-
backgroundColor: tokens_1.tokens.
|
|
60
|
+
backgroundColor: tokens_1.tokens.color.white,
|
|
61
61
|
position: "relative",
|
|
62
|
-
marginTop: tokens_1.tokens.
|
|
62
|
+
marginTop: tokens_1.tokens.spacing[3],
|
|
63
63
|
marginBottom: 0,
|
|
64
|
-
borderTop: `1px solid ${tokens_1.tokens.
|
|
64
|
+
borderTop: `1px solid ${tokens_1.tokens.color.gray[300]}`,
|
|
65
65
|
maxHeight: "184px",
|
|
66
66
|
overflowY: "auto",
|
|
67
67
|
}),
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export * from "./Select";
|
|
2
2
|
export * from "./SelectPopover";
|
|
3
|
+
export { components as ReactSelectComponents } from "react-select";
|
|
4
|
+
export type { MenuProps as ReactSelectMenuProps, GroupProps as ReactSelectGroupProps, InputProps as ReactSelectInputProps, OptionProps as ReactSelectOptionProps, ControlProps as ReactSelectControlProps, IndicatorProps as ReactSelectIndicatorProps, MultiValueProps as ReactSelectMultiValueProps, PlaceholderProps as ReactSelectPlaceholderProps, SingleValueProps as ReactSelectSingleValueProps, ValueContainerProps as ReactSelectValueContainerProps, MenuListComponentProps as ReactSelectMenuListComponentProps, } from "react-select";
|
|
@@ -10,5 +10,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.ReactSelectComponents = void 0;
|
|
13
14
|
__exportStar(require("./Select"), exports);
|
|
14
15
|
__exportStar(require("./SelectPopover"), exports);
|
|
16
|
+
var react_select_1 = require("react-select");
|
|
17
|
+
Object.defineProperty(exports, "ReactSelectComponents", { enumerable: true, get: function () { return react_select_1.components; } });
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.adsTheme = void 0;
|
|
4
|
-
const tokens_1 = require("../../tokens");
|
|
4
|
+
const tokens_1 = require("../../style-dictionary/dist/tokens");
|
|
5
5
|
const toNumber_1 = require("../../utilities/toNumber");
|
|
6
6
|
exports.adsTheme = {
|
|
7
|
-
borderRadius: toNumber_1.toNumber(tokens_1.borderRadius.DEFAULT),
|
|
7
|
+
borderRadius: toNumber_1.toNumber(tokens_1.tokens.borderRadius.DEFAULT),
|
|
8
8
|
colors: {
|
|
9
|
-
danger: tokens_1.
|
|
10
|
-
dangerLight: tokens_1.
|
|
11
|
-
neutral0: tokens_1.
|
|
12
|
-
neutral5: tokens_1.
|
|
13
|
-
neutral10: tokens_1.
|
|
14
|
-
neutral20: tokens_1.
|
|
15
|
-
neutral30: tokens_1.
|
|
16
|
-
neutral40: tokens_1.
|
|
17
|
-
neutral50: tokens_1.
|
|
18
|
-
neutral60: tokens_1.
|
|
19
|
-
neutral70: tokens_1.
|
|
20
|
-
neutral80: tokens_1.
|
|
21
|
-
neutral90: tokens_1.
|
|
22
|
-
primary: tokens_1.
|
|
23
|
-
primary25: tokens_1.
|
|
24
|
-
primary50: tokens_1.
|
|
25
|
-
primary75: tokens_1.
|
|
9
|
+
danger: tokens_1.tokens.color.red["400"],
|
|
10
|
+
dangerLight: tokens_1.tokens.color.red["300"],
|
|
11
|
+
neutral0: tokens_1.tokens.color.white,
|
|
12
|
+
neutral5: tokens_1.tokens.color.gray["100"],
|
|
13
|
+
neutral10: tokens_1.tokens.color.gray["100"],
|
|
14
|
+
neutral20: tokens_1.tokens.color.gray["200"],
|
|
15
|
+
neutral30: tokens_1.tokens.color.gray["400"],
|
|
16
|
+
neutral40: tokens_1.tokens.color.gray["500"],
|
|
17
|
+
neutral50: tokens_1.tokens.color.gray["600"],
|
|
18
|
+
neutral60: tokens_1.tokens.color.gray["700"],
|
|
19
|
+
neutral70: tokens_1.tokens.color.gray["800"],
|
|
20
|
+
neutral80: tokens_1.tokens.color.gray["900"],
|
|
21
|
+
neutral90: tokens_1.tokens.color.gray["900"],
|
|
22
|
+
primary: tokens_1.tokens.color.blue["500"],
|
|
23
|
+
primary25: tokens_1.tokens.color.gray["300"],
|
|
24
|
+
primary50: tokens_1.tokens.color.gray["300"],
|
|
25
|
+
primary75: tokens_1.tokens.color.blue["400"],
|
|
26
26
|
},
|
|
27
27
|
spacing: {
|
|
28
|
-
baseUnit: toNumber_1.toNumber(tokens_1.
|
|
29
|
-
controlHeight: toNumber_1.toNumber(tokens_1.height["10"]),
|
|
30
|
-
menuGutter: toNumber_1.toNumber(tokens_1.
|
|
28
|
+
baseUnit: toNumber_1.toNumber(tokens_1.tokens.spacing["1"]),
|
|
29
|
+
controlHeight: toNumber_1.toNumber(tokens_1.tokens.height["10"]),
|
|
30
|
+
menuGutter: toNumber_1.toNumber(tokens_1.tokens.spacing["1"]),
|
|
31
31
|
},
|
|
32
32
|
};
|