@conveyorhq/arrow-ds 1.31.0 → 1.32.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/package.json +9 -10
- package/public/components/Accordion/Accordion.js +8 -10
- package/public/components/Avatar/Avatar.js +1 -1
- package/public/components/ConveyorLogo/ConveyorLogo.js +1 -1
- package/public/components/Drawer/Drawer.js +7 -7
- 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/Select/Select.js +1 -1
- package/public/components/Select/SelectPopover.js +1 -1
- package/public/components/Select/theme.js +1 -1
- package/public/components/Tooltip/Tooltip.js +1 -1
- package/public/components/VisuallyHidden/VisuallyHidden.d.ts +1 -1
- package/public/css/styles.css +1 -1
- package/public/css/styles.min.css.map +1 -1
- package/public/{style-dictionary → src/style-dictionary}/dist/tokens.css +0 -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 +1 -1
- package/public/style-dictionary/dist/tokens.d.ts +428 -423
- package/public/style-dictionary/dist/tokens.js +415 -417
- package/public/style-dictionary/dist/tokens.module.d.ts +431 -0
- package/public/style-dictionary/dist/tokens.module.js +412 -416
- package/public/style-dictionary/src/border-radius.d.ts +31 -0
- package/public/style-dictionary/src/border-radius.js +12 -0
- package/public/style-dictionary/src/border-width.d.ts +21 -0
- package/public/style-dictionary/src/border-width.js +11 -0
- package/public/style-dictionary/src/color.d.ts +249 -0
- package/public/style-dictionary/src/color.js +99 -0
- package/public/style-dictionary/src/font-size.d.ts +45 -0
- package/public/style-dictionary/src/font-size.js +16 -0
- package/public/style-dictionary/src/font-weight.d.ts +13 -0
- package/public/style-dictionary/src/font-weight.js +8 -0
- package/public/style-dictionary/src/height.d.ts +215 -0
- package/public/style-dictionary/src/height.js +13 -0
- package/public/style-dictionary/src/leading.d.ts +17 -0
- package/public/style-dictionary/src/leading.js +9 -0
- package/public/style-dictionary/src/screen-width.d.ts +17 -0
- package/public/style-dictionary/src/screen-width.js +9 -0
- package/public/style-dictionary/src/shadow.d.ts +63 -0
- package/public/style-dictionary/src/shadow.js +20 -0
- package/public/style-dictionary/src/spacing.d.ts +197 -0
- package/public/style-dictionary/src/spacing.js +70 -0
- package/public/style-dictionary/src/tracking.d.ts +13 -0
- package/public/style-dictionary/src/tracking.js +8 -0
- package/public/style-dictionary/src/type.d.ts +13 -0
- package/public/style-dictionary/src/type.js +35 -0
- package/public/style-dictionary/src/width.d.ts +287 -0
- package/public/style-dictionary/src/width.js +32 -0
- package/public/style-dictionary/src/z-index.d.ts +53 -0
- package/public/style-dictionary/src/z-index.js +22 -0
- 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 +1 -1
- package/src/components/Card/Card.story.mdx +1 -1
- package/src/components/ConveyorLogo/ConveyorLogo.tsx +1 -1
- package/src/components/Drawer/Drawer.tsx +1 -1
- package/src/components/Icon/Icon.tsx +3 -0
- package/src/components/MenuRenderer/MenuRenderer.tsx +7 -9
- package/src/components/Select/Select.tsx +1 -1
- package/src/components/Select/SelectPopover.tsx +1 -1
- package/src/components/Select/theme.ts +1 -1
- package/src/components/Tooltip/Tooltip.story.mdx +22 -1
- package/src/components/Tooltip/Tooltip.tsx +3 -1
- package/src/components/VisuallyHidden/VisuallyHidden.tsx +6 -5
- package/src/storybook-components/EnumTable.tsx +1 -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/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@conveyorhq/arrow-ds",
|
|
3
3
|
"author": "Conveyor",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.32.0",
|
|
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",
|
|
@@ -56,7 +55,7 @@
|
|
|
56
55
|
"build:css": "yarn run postcss -c postcss.config.js -o public/css/styles.css src/css/styles.css",
|
|
57
56
|
"build:copy-files": "yarn run build:copy-svg && yarn run build:copy-style-dictionary",
|
|
58
57
|
"build:copy-svg": "copyfiles -u 1 src/**/*.svg public/",
|
|
59
|
-
"build:copy-style-dictionary": "copyfiles style-dictionary/dist/* style-dictionary/tailwind.config.js public/",
|
|
58
|
+
"build:copy-style-dictionary": "copyfiles src/style-dictionary/dist/* src/style-dictionary/tailwind.config.js public/",
|
|
60
59
|
"minify:css": "csso public/css/styles.css --output public/css/styles.min.css --comments none --source-map file",
|
|
61
60
|
"storybook": "yarn run build && start-storybook --docs -p 9002 -c .storybook -s .storybook",
|
|
62
61
|
"build-storybook": "yarn run build && build-storybook --docs -c .storybook -s .storybook -o storybook-static",
|
|
@@ -104,11 +103,11 @@
|
|
|
104
103
|
"@babel/preset-typescript": "^7.7.2",
|
|
105
104
|
"@commitlint/cli": "^13.0.0",
|
|
106
105
|
"@commitlint/config-conventional": "^13.0.0",
|
|
107
|
-
"@storybook/addon-actions": "^6.4.
|
|
108
|
-
"@storybook/addon-docs": "^6.4.
|
|
106
|
+
"@storybook/addon-actions": "^6.4.18",
|
|
107
|
+
"@storybook/addon-docs": "^6.4.18",
|
|
109
108
|
"@storybook/addon-postcss": "^2.0.0",
|
|
110
|
-
"@storybook/react": "^6.4.
|
|
111
|
-
"@storybook/theming": "^6.4.
|
|
109
|
+
"@storybook/react": "^6.4.18",
|
|
110
|
+
"@storybook/theming": "^6.4.18",
|
|
112
111
|
"@types/classnames": "^2.2.9",
|
|
113
112
|
"@types/codemirror": "^0.0.91",
|
|
114
113
|
"@types/d3-ease": "^1.0.9",
|
|
@@ -138,7 +137,7 @@
|
|
|
138
137
|
"eslint-import-resolver-typescript": "^2.4.0",
|
|
139
138
|
"eslint-plugin-import": "^2.22.1",
|
|
140
139
|
"eslint-plugin-jsx-a11y": "^6.4.1",
|
|
141
|
-
"eslint-plugin-mdx": "^1.
|
|
140
|
+
"eslint-plugin-mdx": "^1.16.0",
|
|
142
141
|
"eslint-plugin-prettier": "^3.3.1",
|
|
143
142
|
"eslint-plugin-react": "^7.22.0",
|
|
144
143
|
"eslint-plugin-react-hooks": "^4.2.0",
|
|
@@ -155,9 +154,9 @@
|
|
|
155
154
|
"react-dom": "^16.11.0",
|
|
156
155
|
"react-is": "^16.12.0",
|
|
157
156
|
"regenerator-runtime": "^0.13.3",
|
|
158
|
-
"semantic-release": "^
|
|
157
|
+
"semantic-release": "^19.0.2",
|
|
159
158
|
"style-dictionary": "^3.1.1",
|
|
160
|
-
"tailwindcss": "^3.0.
|
|
159
|
+
"tailwindcss": "^3.0.18",
|
|
161
160
|
"ts-loader": "^6.2.1",
|
|
162
161
|
"typescript": "^4.2.3",
|
|
163
162
|
"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("
|
|
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");
|
|
@@ -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("
|
|
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;
|
|
@@ -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");
|
|
@@ -46,7 +46,7 @@ const calculateTransformValue = (isOpen, drawerOnRight, drawerWidth) => {
|
|
|
46
46
|
const WithDrawer = ({ drawerSlot, onClose, isOpen = false, fixedSlotTop, fixedSlotBottom, scrollableSlot, drawerSide = "left", noAnimation = false, drawerWidth = DEFAULT_DRAWER_WIDTH, }) => {
|
|
47
47
|
const drawerOnRight = drawerSide === "right";
|
|
48
48
|
const [isClosedAtRest, setIsClosedAtRest] = react_1.useState(false);
|
|
49
|
-
const { transform, paddingLeft, paddingRight } =
|
|
49
|
+
const { transform, paddingLeft, paddingRight } = react_spring_1.useSpring({
|
|
50
50
|
transform: calculateTransformValue(isOpen, drawerOnRight, drawerWidth),
|
|
51
51
|
paddingLeft: isOpen && !drawerOnRight ? drawerWidth : 0,
|
|
52
52
|
paddingRight: isOpen && drawerOnRight ? drawerWidth : 0,
|
|
@@ -64,7 +64,7 @@ const WithDrawer = ({ drawerSlot, onClose, isOpen = false, fixedSlotTop, fixedSl
|
|
|
64
64
|
easing: d3_ease_1.easeCubicInOut,
|
|
65
65
|
},
|
|
66
66
|
});
|
|
67
|
-
const { transform: transformReverse } =
|
|
67
|
+
const { transform: transformReverse } = react_spring_1.useSpring({
|
|
68
68
|
transform: isOpen && !drawerOnRight
|
|
69
69
|
? `translateX(${drawerWidth}px)`
|
|
70
70
|
: "translateX(0px)",
|
|
@@ -80,16 +80,16 @@ const WithDrawer = ({ drawerSlot, onClose, isOpen = false, fixedSlotTop, fixedSl
|
|
|
80
80
|
react_1.default.createElement(Box_1.Box, { className: classnames_1.default(cn(), {
|
|
81
81
|
[cn({ m: "isOpen" })]: isOpen,
|
|
82
82
|
}) },
|
|
83
|
-
react_1.default.createElement(
|
|
83
|
+
react_1.default.createElement(react_spring_1.animated.div, { className: classnames_1.default(cn({ e: "wrapper" }), { drawerOnRight }), style: wrapperCombinedStyle }, drawerSlot),
|
|
84
84
|
react_1.default.createElement(Flex_1.Flex, { className: classnames_1.default(cn({ e: "onScreenContent" }), {
|
|
85
85
|
drawerOnRight,
|
|
86
86
|
}) },
|
|
87
|
-
fixedSlotTop && (react_1.default.createElement(
|
|
88
|
-
scrollableSlot && (react_1.default.createElement(
|
|
87
|
+
fixedSlotTop && (react_1.default.createElement(react_spring_1.animated.div, { style: { paddingLeft, paddingRight }, className: cn({ e: "fixedSlot" }) }, fixedSlotTop)),
|
|
88
|
+
scrollableSlot && (react_1.default.createElement(react_spring_1.animated.div, { style: {
|
|
89
89
|
transform: transformReverse,
|
|
90
90
|
width: scrollableSlotPaddingToInterpolate.interpolate((w) => `calc(100% - ${w}px)`),
|
|
91
91
|
}, className: cn({ e: "scrollableSlot" }) }, scrollableSlot)),
|
|
92
|
-
fixedSlotBottom && (react_1.default.createElement(
|
|
92
|
+
fixedSlotBottom && (react_1.default.createElement(react_spring_1.animated.div, { style: { paddingLeft, paddingRight }, className: cn({ e: "fixedSlot" }) }, fixedSlotBottom))))));
|
|
93
93
|
};
|
|
94
94
|
exports.WithDrawer = WithDrawer;
|
|
95
95
|
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_2_1 = require("react-popper-2");
|
|
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
|
};
|
|
@@ -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("
|
|
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");
|
|
@@ -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("
|
|
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");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.adsTheme = void 0;
|
|
4
|
-
const tokens_1 = require("
|
|
4
|
+
const tokens_1 = require("../../style-dictionary/dist/tokens");
|
|
5
5
|
const toNumber_1 = require("../../utilities/toNumber");
|
|
6
6
|
exports.adsTheme = {
|
|
7
7
|
borderRadius: toNumber_1.toNumber(tokens_1.tokens.borderRadius.DEFAULT),
|
|
@@ -111,6 +111,6 @@ const Tooltip = (props) => {
|
|
|
111
111
|
tabIndex: 0,
|
|
112
112
|
})
|
|
113
113
|
: referenceElement;
|
|
114
|
-
return (react_1.default.createElement(Popover_1.Popover, Object.assign({ showArrow: true, isVisible: isOpen, referenceElement: referenceElementWithMouseHandlers, placement: placement, className: classnames_1.default(bem_1.bem(cn), className), onMouseEnter: !isVisibleProp ? handlePopoverMouseEnter : undefined, onMouseLeave: !isVisibleProp ? handlePopoverMouseLeave : undefined, style: style }, rest), children));
|
|
114
|
+
return children ? (react_1.default.createElement(Popover_1.Popover, Object.assign({ showArrow: true, isVisible: isOpen, referenceElement: referenceElementWithMouseHandlers, placement: placement, className: classnames_1.default(bem_1.bem(cn), className), onMouseEnter: !isVisibleProp ? handlePopoverMouseEnter : undefined, onMouseLeave: !isVisibleProp ? handlePopoverMouseLeave : undefined, style: style }, rest), children)) : (referenceElement);
|
|
115
115
|
};
|
|
116
116
|
exports.Tooltip = Tooltip;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { BoxProps } from "../Box";
|
|
3
|
-
export declare const VisuallyHidden: React.
|
|
3
|
+
export declare const VisuallyHidden: React.FunctionComponent<BoxProps>;
|