@vention/machine-ui 4.1.1 → 4.1.2
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/README.md +1 -0
- package/ac-motor.esm.js +6 -6
- package/access-point.esm.js +3 -3
- package/actuator.esm.js +9 -9
- package/actuator1.esm.js +6 -6
- package/actuator10.esm.js +9 -9
- package/actuator2.esm.js +7 -7
- package/actuator3.esm.js +7 -7
- package/actuator4.esm.js +7 -7
- package/actuator5.esm.js +7 -7
- package/actuator6.esm.js +7 -7
- package/actuator7.esm.js +7 -7
- package/actuator8.esm.js +8 -8
- package/actuator9.esm.js +10 -10
- package/adjustments-alt-filled.esm.js +12 -12
- package/adjustments-alt.esm.js +3 -3
- package/adjustments-filled.esm.js +9 -9
- package/adjustments-horizontal.esm.js +3 -3
- package/alarm-bell-filled.esm.js +6 -6
- package/alarm-bell-ringing.esm.js +3 -3
- package/alarm-bell.esm.js +3 -3
- package/alarm.esm.js +3 -3
- package/alert-circle-filled.esm.js +3 -3
- package/alert-circle.esm.js +3 -3
- package/alert-triangle-filled.esm.js +3 -3
- package/alert-triangle.esm.js +3 -3
- package/analytics.esm.js +3 -3
- package/angle.esm.js +3 -3
- package/apps-2.esm.js +6 -6
- package/apps.esm.js +3 -3
- package/arrow-bar-both.esm.js +3 -3
- package/arrow-bar-down.esm.js +3 -3
- package/arrow-bar-left.esm.js +3 -3
- package/arrow-bar-right.esm.js +3 -3
- package/arrow-bar-to-down.esm.js +3 -3
- package/arrow-bar-to-left.esm.js +3 -3
- package/arrow-bar-to-right.esm.js +3 -3
- package/arrow-bar-to-up.esm.js +3 -3
- package/arrow-bar-up.esm.js +3 -3
- package/arrow-big-down.esm.js +3 -3
- package/arrow-big-left.esm.js +3 -3
- package/arrow-big-right-lines.esm.js +9 -9
- package/arrow-big-right.esm.js +3 -3
- package/arrow-big-up.esm.js +3 -3
- package/arrow-left-from-arc.esm.js +9 -9
- package/arrow-left.esm.js +3 -3
- package/arrow-narrow-down.esm.js +3 -3
- package/arrow-narrow-left.esm.js +3 -3
- package/arrow-narrow-right.esm.js +3 -3
- package/arrow-narrow-up.esm.js +3 -3
- package/arrow-right.esm.js +3 -3
- package/arrow-up-right.esm.js +4 -4
- package/arrows-diagonal-minimize-1.esm.js +6 -6
- package/arrows-diagonal.esm.js +6 -6
- package/arrows-diff.esm.js +3 -3
- package/arrows-exchange-1.esm.js +4 -4
- package/arrows-exchange.esm.js +4 -4
- package/arrows-maximize.esm.js +3 -3
- package/arrows-minimize.esm.js +3 -3
- package/arrows-move.esm.js +3 -3
- package/arrows-right-left.esm.js +10 -10
- package/assembly.esm.js +4 -4
- package/asset.esm.js +3 -3
- package/axis.esm.js +3 -3
- package/belt-actuator-2.esm.js +5 -5
- package/belt-actuator-3.esm.js +6 -6
- package/belt-actuator.esm.js +5 -5
- package/binary-tree-2.esm.js +3 -3
- package/binary-tree.esm.js +3 -3
- package/binary.esm.js +3 -3
- package/blend.esm.js +3 -3
- package/bolt-filled.esm.js +3 -3
- package/bolt.esm.js +3 -3
- package/bomb.esm.js +3 -3
- package/book-2.esm.js +3 -3
- package/book.esm.js +3 -3
- package/bookmark.esm.js +3 -3
- package/books.esm.js +3 -3
- package/braces.esm.js +3 -3
- package/brand-python.esm.js +3 -3
- package/bug.esm.js +3 -3
- package/building-broadcast-tower.esm.js +3 -3
- package/building-community.esm.js +3 -3
- package/building-factory-2.esm.js +3 -3
- package/building-skyscraper.esm.js +3 -3
- package/building.esm.js +3 -3
- package/button-black.esm.js +3 -3
- package/button-white.esm.js +3 -3
- package/calendar-month.esm.js +3 -3
- package/camera.esm.js +4 -4
- package/capture.esm.js +3 -3
- package/caret-down-filled.esm.js +3 -3
- package/caret-down.esm.js +3 -3
- package/caret-left-filled.esm.js +3 -3
- package/caret-left.esm.js +3 -3
- package/caret-right-filled.esm.js +3 -3
- package/caret-right.esm.js +3 -3
- package/caret-up-filled.esm.js +3 -3
- package/caret-up.esm.js +3 -3
- package/category-filled.esm.js +10 -10
- package/category.esm.js +6 -6
- package/cell-signal-full.esm.js +3 -3
- package/cell-signal-low.esm.js +3 -3
- package/cell-signal-off.esm.js +3 -3
- package/chart-dots-2.esm.js +3 -3
- package/check.esm.js +3 -3
- package/checkbox.esm.js +5 -5
- package/checks.esm.js +3 -3
- package/chevron-down.esm.js +3 -3
- package/chevron-left.esm.js +3 -3
- package/chevron-right.esm.js +3 -3
- package/chevron-up.esm.js +3 -3
- package/chevrons-down.esm.js +3 -3
- package/chevrons-left.esm.js +3 -3
- package/chevrons-right.esm.js +3 -3
- package/chevrons-up.esm.js +3 -3
- package/circle-arrow-up.esm.js +3 -3
- package/circle-check-filled.esm.js +3 -3
- package/circle-check.esm.js +3 -3
- package/circle-minus.esm.js +3 -3
- package/circle-plus.esm.js +3 -3
- package/circle-square.esm.js +4 -4
- package/circle-x-filled.esm.js +3 -3
- package/circle-x.esm.js +3 -3
- package/clock.esm.js +3 -3
- package/clockwise-1.esm.js +3 -3
- package/clockwise-2.esm.js +3 -3
- package/close.esm.js +3 -3
- package/cloud-computing.esm.js +3 -3
- package/cloud-data-connection.esm.js +3 -3
- package/cloud-download-1.esm.js +5 -5
- package/cloud-download-off.esm.js +8 -8
- package/cloud-download.esm.js +3 -3
- package/cloud-off.esm.js +3 -3
- package/cloud-upload.esm.js +3 -3
- package/cloud.esm.js +3 -3
- package/code.esm.js +3 -3
- package/command-do.esm.js +3 -3
- package/command-elif.esm.js +3 -3
- package/command-else.esm.js +3 -3
- package/command-if.esm.js +3 -3
- package/condition-tree.esm.js +3 -3
- package/confetti.esm.js +3 -3
- package/connection.esm.js +3 -3
- package/conveyor.esm.js +6 -6
- package/copy.esm.js +3 -3
- package/corner-up-left.esm.js +7 -7
- package/corner-up-right.esm.js +7 -7
- package/counterclockwise-1.esm.js +3 -3
- package/counterclockwise-2.esm.js +3 -3
- package/cpu-2.esm.js +3 -3
- package/cpu.esm.js +3 -3
- package/cube-plus.esm.js +3 -3
- package/cube-send.esm.js +3 -3
- package/cube.esm.js +3 -3
- package/custom-gear-fill.esm.js +3 -3
- package/custom-help-bold-filled.esm.js +3 -3
- package/custom-help-bold.esm.js +5 -5
- package/custom-help-fill.esm.js +3 -3
- package/custom-help.esm.js +5 -5
- package/custom-info-1.esm.js +3 -3
- package/custom-info-bold-filled.esm.js +3 -3
- package/custom-info-bold.esm.js +5 -5
- package/custom-info.esm.js +5 -5
- package/custom-point-to-point.esm.js +5 -5
- package/custom-rocket-fat.esm.js +6 -6
- package/custom-rocket.esm.js +6 -6
- package/dashboard.esm.js +6 -6
- package/decline.esm.js +4 -4
- package/device-laptop.esm.js +3 -3
- package/device-tv.esm.js +3 -3
- package/devices-2.esm.js +3 -3
- package/dimensions.esm.js +10 -10
- package/dots-vertical.esm.js +5 -5
- package/dots.esm.js +5 -5
- package/download-off.esm.js +3 -3
- package/download.esm.js +3 -3
- package/duotone-analytics.esm.js +5 -5
- package/duotone-communication.esm.js +13 -13
- package/duotone-conveyor.esm.js +6 -6
- package/duotone-input-output.esm.js +5 -5
- package/duotone-linear.esm.js +5 -5
- package/duotone-pneumatic.esm.js +7 -7
- package/duotone-programming.esm.js +6 -6
- package/duotone-robot-arm.esm.js +12 -12
- package/duotone-rotary.esm.js +5 -5
- package/duotone-state-machine.esm.js +10 -10
- package/edit.esm.js +3 -3
- package/electric-actuator.esm.js +4 -4
- package/exclamation-mark.esm.js +3 -3
- package/external-link.esm.js +3 -3
- package/eye-closed.esm.js +3 -3
- package/eye.esm.js +4 -4
- package/file-3-d.esm.js +3 -3
- package/file-code.esm.js +3 -3
- package/file-description.esm.js +3 -3
- package/file-download.esm.js +3 -3
- package/file-type-pdf.esm.js +3 -3
- package/file-upload.esm.js +3 -3
- package/file-wrong.esm.js +10 -10
- package/file.esm.js +3 -3
- package/filter.esm.js +3 -3
- package/focus.esm.js +3 -3
- package/folder-open.esm.js +7 -7
- package/folder-plus-1.esm.js +9 -9
- package/folder.esm.js +3 -3
- package/frame-3.esm.js +3 -3
- package/function-icon.esm.js +3 -3
- package/git-branch-deleted.esm.js +3 -3
- package/git-branch.esm.js +3 -3
- package/git-compare.esm.js +3 -3
- package/git-fork.esm.js +3 -3
- package/git-merge.esm.js +3 -3
- package/gizmo.esm.js +3 -3
- package/graph.esm.js +3 -3
- package/grid-dots.esm.js +11 -11
- package/grip-horizontal.esm.js +8 -8
- package/grip-vertical.esm.js +8 -8
- package/gripper-1.esm.js +5 -5
- package/gripper-2.esm.js +5 -5
- package/hand-stop.esm.js +3 -3
- package/hash.esm.js +7 -7
- package/hb-menu.esm.js +3 -3
- package/headphones-filled.esm.js +3 -3
- package/headset-filled.esm.js +5 -5
- package/headset.esm.js +3 -3
- package/help-circle-filled.esm.js +3 -3
- package/help.esm.js +3 -3
- package/history-toggle.esm.js +3 -3
- package/history.esm.js +3 -3
- package/hmi.esm.js +6 -6
- package/home-2.esm.js +5 -5
- package/home-solid.esm.js +7 -7
- package/home.esm.js +3 -3
- package/hourglass-empty.esm.js +3 -3
- package/i-o.esm.js +6 -6
- package/icon-box-padding.esm.js +3 -3
- package/icon-components.esm.js +10 -10
- package/icon-nut.esm.js +4 -4
- package/icon-ruler-2.esm.js +3 -3
- package/icon-square-rotated.esm.js +3 -3
- package/incline.esm.js +4 -4
- package/index.esm.js +473 -469
- package/infinity.esm.js +3 -3
- package/info-circle-filled.esm.js +3 -3
- package/info-circle.esm.js +3 -3
- package/input-output.esm.js +8 -8
- package/io-link.esm.js +3 -3
- package/ipad-horizontal.esm.js +3 -3
- package/json.esm.js +3 -3
- package/lan.esm.js +3 -3
- package/language.esm.js +3 -3
- package/layout-sidebar-right.esm.js +4 -4
- package/legacy-axis.esm.js +4 -4
- package/legacy-robot.esm.js +3 -3
- package/letter-case.esm.js +3 -3
- package/line.esm.js +9 -9
- package/linear.esm.js +9 -9
- package/link.esm.js +3 -3
- package/list-check.esm.js +9 -9
- package/load-balancer.esm.js +3 -3
- package/lock.esm.js +3 -3
- package/logout.esm.js +3 -3
- package/machine-apps-headset.esm.js +4 -4
- package/machinelogic-2.esm.js +7 -7
- package/magnet.esm.js +5 -5
- package/mail-fast.esm.js +3 -3
- package/mail.esm.js +3 -3
- package/mailbox.esm.js +3 -3
- package/math-equal-greater.esm.js +3 -3
- package/math-equal-lower.esm.js +3 -3
- package/maximize.esm.js +3 -3
- package/menu-2.esm.js +3 -3
- package/menu-waffle.esm.js +11 -11
- package/menu.esm.js +3 -3
- package/merge.esm.js +3 -3
- package/message-2.esm.js +3 -3
- package/message-chatbot.esm.js +3 -3
- package/message-circle-filled.esm.js +3 -3
- package/message-circle.esm.js +3 -3
- package/message-dots.esm.js +3 -3
- package/message.esm.js +3 -3
- package/messages.esm.js +3 -3
- package/microphone.esm.js +3 -3
- package/minus-vertical.esm.js +3 -3
- package/minus.esm.js +3 -3
- package/mirror-flip-horizontal.esm.js +3 -3
- package/mirror-flip-vertical.esm.js +3 -3
- package/module-1.esm.js +10 -10
- package/module-2.esm.js +9 -9
- package/module-3.esm.js +6 -6
- package/module-4.esm.js +4 -4
- package/motor-1.esm.js +9 -9
- package/motor-2.esm.js +9 -9
- package/motor-3.esm.js +13 -13
- package/motor-4.esm.js +3 -3
- package/motor-5.esm.js +4 -4
- package/mouse-left.esm.js +8 -8
- package/mouse-right.esm.js +6 -6
- package/mouse-scroll.esm.js +7 -7
- package/move-to-ground.esm.js +3 -3
- package/movie.esm.js +3 -3
- package/multiplier.esm.js +9 -9
- package/music.esm.js +3 -3
- package/network-2.esm.js +3 -3
- package/network-off.esm.js +3 -3
- package/network.esm.js +3 -3
- package/number-1.esm.js +7 -7
- package/number-2.esm.js +7 -7
- package/number-3.esm.js +8 -8
- package/number-4.esm.js +7 -7
- package/operator.esm.js +6 -6
- package/package.json +1 -1
- package/pdf.esm.js +3 -3
- package/phone-call.esm.js +3 -3
- package/phone-off.esm.js +3 -3
- package/phone.esm.js +3 -3
- package/photo.esm.js +3 -3
- package/pinned.esm.js +3 -3
- package/player-pause.esm.js +4 -4
- package/player-play-filled.esm.js +7 -7
- package/player-play.esm.js +3 -3
- package/player-record.esm.js +3 -3
- package/player-skip-back.esm.js +3 -3
- package/player-skip-forward.esm.js +3 -3
- package/player-stop-filled.esm.js +3 -3
- package/player-stop.esm.js +3 -3
- package/player-track-next.esm.js +4 -4
- package/player-track-prev.esm.js +4 -4
- package/plug-x.esm.js +3 -3
- package/plug.esm.js +3 -3
- package/plus.esm.js +3 -3
- package/pneumatic.esm.js +7 -7
- package/point-to-point-3.esm.js +4 -4
- package/point-to-point-check.esm.js +10 -10
- package/position-rx.esm.js +5 -5
- package/position-ry.esm.js +5 -5
- package/position-rz.esm.js +5 -5
- package/position-x.esm.js +4 -4
- package/position-y.esm.js +4 -4
- package/position-z.esm.js +4 -4
- package/power.esm.js +3 -3
- package/programming.esm.js +5 -5
- package/pushbutton.esm.js +3 -3
- package/receipt-dollar.esm.js +3 -3
- package/receipt.esm.js +4 -4
- package/reference-frame-2.esm.js +3 -3
- package/reference-frame.esm.js +8 -8
- package/refresh-alert.esm.js +3 -3
- package/refresh-off.esm.js +3 -3
- package/refresh.esm.js +3 -3
- package/reload.esm.js +3 -3
- package/repeat.esm.js +3 -3
- package/rewind-backward-15.esm.js +10 -10
- package/rewind-forward-15.esm.js +10 -10
- package/robot-arm-2.esm.js +8 -8
- package/robot-arm-duotone-2.esm.js +8 -8
- package/robot-arm.esm.js +10 -10
- package/robot-face.esm.js +3 -3
- package/rotary.esm.js +5 -5
- package/route-square.esm.js +3 -3
- package/row-insert-bottom.esm.js +3 -3
- package/row-insert-top.esm.js +3 -3
- package/ruler-measure-2.esm.js +15 -15
- package/ruler.esm.js +3 -3
- package/save.esm.js +3 -3
- package/search.esm.js +3 -3
- package/selector.esm.js +3 -3
- package/send.esm.js +3 -3
- package/sensor.esm.js +4 -4
- package/sensor1.esm.js +6 -6
- package/sensor2.esm.js +6 -6
- package/sequence.esm.js +10 -10
- package/setting-automation.esm.js +5 -5
- package/settings-2.esm.js +4 -4
- package/settings-filled.esm.js +3 -3
- package/settings.esm.js +4 -4
- package/shield-code.esm.js +5 -5
- package/shield-filled.esm.js +3 -3
- package/shield-half.esm.js +3 -3
- package/shield.esm.js +3 -3
- package/shopping-bag.esm.js +3 -3
- package/shopping-cart-filled.esm.js +3 -3
- package/shopping-cart.esm.js +3 -3
- package/show-3d.esm.js +8 -8
- package/sitemap-1.esm.js +3 -3
- package/sitemap.esm.js +3 -3
- package/slash.esm.js +3 -3
- package/speedtest.esm.js +3 -3
- package/sphere.esm.js +3 -3
- package/square-number-0.esm.js +4 -4
- package/square-number-1.esm.js +4 -4
- package/square-number-2.esm.js +4 -4
- package/square-number-3.esm.js +4 -4
- package/src/lib/components/vention-alert/vention-alert-utils.d.ts +1 -1
- package/src/lib/components/vention-menu/vention-menu-styling-helpers.d.ts +1 -1
- package/src/lib/components/vention-tree-item/vention-tree-item.d.ts +1 -1
- package/stack.esm.js +3 -3
- package/star.esm.js +3 -3
- package/state-machine.esm.js +4 -4
- package/status-danger-hmi.esm.js +3 -3
- package/status-small.esm.js +3 -3
- package/status-warning-hmi.esm.js +3 -3
- package/stopwatch.esm.js +10 -10
- package/subtask.esm.js +3 -3
- package/switch-horizontal.esm.js +6 -6
- package/switch-vertical.esm.js +3 -3
- package/tag.esm.js +4 -4
- package/target.esm.js +5 -5
- package/template.esm.js +11 -11
- package/terminal-2.esm.js +3 -3
- package/terminal.esm.js +3 -3
- package/text-plus-1.esm.js +12 -12
- package/timeline.esm.js +3 -3
- package/tiny-caret-down.esm.js +3 -3
- package/tiny-caret-right.esm.js +3 -3
- package/tool-1.esm.js +3 -3
- package/tool.esm.js +3 -3
- package/topology-bus.esm.js +3 -3
- package/topology-complex.esm.js +3 -3
- package/topology-full-hierarchy.esm.js +3 -3
- package/topology-full.esm.js +3 -3
- package/topology-ring-2.esm.js +3 -3
- package/topology-ring-3.esm.js +3 -3
- package/topology-ring.esm.js +3 -3
- package/topology-star-3.esm.js +3 -3
- package/trash.esm.js +3 -3
- package/trending-up.esm.js +8 -8
- package/truck-delivery.esm.js +3 -3
- package/truck-loading.esm.js +3 -3
- package/un-pinned.esm.js +4 -4
- package/unlink.esm.js +3 -3
- package/unplugged.esm.js +7 -7
- package/update.esm.js +8 -8
- package/upload.esm.js +3 -3
- package/user-circle.esm.js +5 -5
- package/user-off.esm.js +6 -6
- package/user-plus.esm.js +3 -3
- package/user-shield.esm.js +6 -6
- package/user.esm.js +3 -3
- package/users-plus.esm.js +3 -3
- package/users.esm.js +3 -3
- package/variable.esm.js +3 -3
- package/vention.esm.js +3 -3
- package/versions.esm.js +3 -3
- package/video.esm.js +4 -4
- package/web-link.esm.js +3 -3
- package/weight-2.esm.js +3 -3
- package/weight.esm.js +4 -4
- package/wifi-low.esm.js +3 -3
- package/wifi-lowest.esm.js +3 -3
- package/wifi-off.esm.js +3 -3
- package/wifi.esm.js +3 -3
- package/world-download.esm.js +3 -3
- package/world.esm.js +3 -3
- package/xyz-1.esm.js +5 -5
- package/xyz-2.esm.js +5 -5
package/index.esm.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
1
|
import { Typography, Button, Stack, Box as Box$1, Grid, IconButton, ClickAwayListener, Modal, CircularProgress as CircularProgress$1, linearProgressClasses, LinearProgress, InputAdornment, TextField, Radio, FormControlLabel, FormControl, Select, MenuItem, FormHelperText, ButtonGroup, Paper, Card, CardMedia, CardContent, ListItemIcon, ListItemText, Popover, MenuList, useTheme as useTheme$1, Drawer, Tooltip, Checkbox } from '@mui/material';
|
|
3
2
|
import { IconCheck, IconAlertTriangleFilled, IconAlertTriangle, IconExclamationMark, IconExternalLink, IconX, IconInfoCircleFilled, IconCircleCheckFilled, IconChevronUp, IconChevronDown, IconInfoCircle, IconInfoSmall, IconMinus, IconPlus, IconLoader2, IconCaretRightFilled, IconChevronsRight, IconChevronsLeft, IconChevronRight } from '@tabler/icons-react';
|
|
4
3
|
import { forwardRef, useState, cloneElement, useRef, useEffect, useCallback, lazy, memo, Suspense, useMemo, createContext, useContext, useImperativeHandle, Children, Fragment as Fragment$1, useReducer } from 'react';
|
|
5
4
|
import { tss } from 'tss-react/mui';
|
|
6
5
|
import Box from '@mui/material/Box';
|
|
7
6
|
import CircularProgress from '@mui/material/CircularProgress';
|
|
7
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
8
8
|
import { createTheme, useTheme } from '@mui/material/styles';
|
|
9
9
|
import Draggable from 'react-draggable';
|
|
10
10
|
import Slider from '@mui/material/Slider';
|
|
@@ -1637,44 +1637,21 @@ for (var COLLECTION_NAME in DOMIterables) {
|
|
|
1637
1637
|
handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
|
|
1638
1638
|
|
|
1639
1639
|
// utility functions for Machine UI here
|
|
1640
|
+
|
|
1640
1641
|
//The following function already exists in shared-utils.ts but that increases bundle size for Machine UI package
|
|
1641
1642
|
function applyDefaultProps(inputProps, defaultProps) {
|
|
1642
|
-
return Object.assign(
|
|
1643
|
+
return Object.assign({}, defaultProps, inputProps);
|
|
1643
1644
|
}
|
|
1644
1645
|
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
1655
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
1656
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
1657
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
1658
|
-
***************************************************************************** */
|
|
1659
|
-
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
function __rest(s, e) {
|
|
1663
|
-
var t = {};
|
|
1664
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1665
|
-
t[p] = s[p];
|
|
1666
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
1667
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
1668
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
1669
|
-
t[p[i]] = s[p[i]];
|
|
1670
|
-
}
|
|
1671
|
-
return t;
|
|
1672
|
-
}
|
|
1673
|
-
|
|
1674
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
1675
|
-
var e = new Error(message);
|
|
1676
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
1677
|
-
};
|
|
1646
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
1647
|
+
if (null == r) return {};
|
|
1648
|
+
var t = {};
|
|
1649
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
1650
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
1651
|
+
t[n] = r[n];
|
|
1652
|
+
}
|
|
1653
|
+
return t;
|
|
1654
|
+
}
|
|
1678
1655
|
|
|
1679
1656
|
function getButtonStylingPropertiesGivenProps(variant, size, theme) {
|
|
1680
1657
|
const {
|
|
@@ -1814,33 +1791,33 @@ const VentionSpinner = props => {
|
|
|
1814
1791
|
stroke: 2,
|
|
1815
1792
|
size: iconSize
|
|
1816
1793
|
};
|
|
1817
|
-
const successIconProperties = Object.assign(
|
|
1794
|
+
const successIconProperties = Object.assign({}, iconProperties, {
|
|
1818
1795
|
"data-testid": "successIcon"
|
|
1819
1796
|
});
|
|
1820
|
-
const errorIconProperties = Object.assign(
|
|
1797
|
+
const errorIconProperties = Object.assign({}, iconProperties, {
|
|
1821
1798
|
"data-testid": "errorIcon"
|
|
1822
1799
|
});
|
|
1823
1800
|
const spinnerProperties = {
|
|
1824
1801
|
size: spinnerSize,
|
|
1825
1802
|
thickness
|
|
1826
1803
|
};
|
|
1827
|
-
return jsxs(Box, {
|
|
1804
|
+
return /*#__PURE__*/jsxs(Box, {
|
|
1828
1805
|
className: classes.container,
|
|
1829
|
-
children: [jsxs(Box, {
|
|
1806
|
+
children: [/*#__PURE__*/jsxs(Box, {
|
|
1830
1807
|
className: spinnerContainerClass,
|
|
1831
1808
|
"data-testid": "spinnerContainer",
|
|
1832
|
-
children: [props.type === "progress" && jsx(CircularProgress, Object.assign({
|
|
1809
|
+
children: [props.type === "progress" && /*#__PURE__*/jsx(CircularProgress, Object.assign({
|
|
1833
1810
|
className: classes.backgroundCircle,
|
|
1834
1811
|
variant: "determinate",
|
|
1835
1812
|
value: 100,
|
|
1836
1813
|
"data-testid": "backgroundSpinner"
|
|
1837
|
-
}, spinnerProperties)), isSpinningState && jsx(CircularProgress, Object.assign({
|
|
1814
|
+
}, spinnerProperties)), isSpinningState && /*#__PURE__*/jsx(CircularProgress, Object.assign({
|
|
1838
1815
|
className: classes.main,
|
|
1839
1816
|
variant: props.type === "indeterminate" ? "indeterminate" : "determinate",
|
|
1840
1817
|
value: props.value,
|
|
1841
1818
|
"data-testid": "mainSpinner"
|
|
1842
|
-
}, spinnerProperties)), props.type === "success" && jsx(IconCheck, Object.assign({}, successIconProperties)), props.type === "error" && spinnerSize > SPINNER_SIZES.small.size && jsx(IconAlertTriangleFilled, Object.assign({}, errorIconProperties)), props.type === "error" && (props.size === "small" || props.size === "x-small") && jsx(IconAlertTriangle, Object.assign({}, errorIconProperties)), props.type === "error" && props.size === "xx-small" && jsx(IconExclamationMark, Object.assign({}, errorIconProperties))]
|
|
1843
|
-
}), props.label && jsx(Typography, {
|
|
1819
|
+
}, spinnerProperties)), props.type === "success" && /*#__PURE__*/jsx(IconCheck, Object.assign({}, successIconProperties)), props.type === "error" && spinnerSize > SPINNER_SIZES.small.size && /*#__PURE__*/jsx(IconAlertTriangleFilled, Object.assign({}, errorIconProperties)), props.type === "error" && (props.size === "small" || props.size === "x-small") && /*#__PURE__*/jsx(IconAlertTriangle, Object.assign({}, errorIconProperties)), props.type === "error" && props.size === "xx-small" && /*#__PURE__*/jsx(IconExclamationMark, Object.assign({}, errorIconProperties))]
|
|
1820
|
+
}), props.label && /*#__PURE__*/jsx(Typography, {
|
|
1844
1821
|
variant: "uiText14Regular",
|
|
1845
1822
|
align: "center",
|
|
1846
1823
|
children: props.label
|
|
@@ -1879,13 +1856,13 @@ const useStyles$I = tss.withParams().create(({
|
|
|
1879
1856
|
position: "relative",
|
|
1880
1857
|
display: "block"
|
|
1881
1858
|
}, containerSize),
|
|
1882
|
-
statusContainer: Object.assign(
|
|
1859
|
+
statusContainer: Object.assign({
|
|
1883
1860
|
display: "flex",
|
|
1884
1861
|
justifyContent: "center",
|
|
1885
1862
|
alignItems: "center",
|
|
1886
1863
|
borderRadius: "50%",
|
|
1887
1864
|
backgroundColor: statusContainerColor
|
|
1888
|
-
}, containerSize
|
|
1865
|
+
}, containerSize, {
|
|
1889
1866
|
"& .tabler-icon": {
|
|
1890
1867
|
color: statusIconColor
|
|
1891
1868
|
}
|
|
@@ -2530,12 +2507,12 @@ const machineUiTheme = createTheme({
|
|
|
2530
2507
|
styleOverrides: {
|
|
2531
2508
|
root: ({
|
|
2532
2509
|
theme
|
|
2533
|
-
}) => Object.assign(
|
|
2510
|
+
}) => Object.assign({}, theme.typography.uiText14SemiBold, {
|
|
2534
2511
|
transform: "none",
|
|
2535
2512
|
transition: "none",
|
|
2536
2513
|
position: "relative",
|
|
2537
2514
|
color: theme.palette.text.primary
|
|
2538
|
-
}
|
|
2515
|
+
}, theme.typography.h5, {
|
|
2539
2516
|
"&.Mui-focused": {
|
|
2540
2517
|
color: theme.palette.text.primary
|
|
2541
2518
|
},
|
|
@@ -2549,13 +2526,13 @@ const machineUiTheme = createTheme({
|
|
|
2549
2526
|
styleOverrides: {
|
|
2550
2527
|
root: ({
|
|
2551
2528
|
theme
|
|
2552
|
-
}) => Object.assign(
|
|
2529
|
+
}) => Object.assign({
|
|
2553
2530
|
margin: 0,
|
|
2554
2531
|
display: "flex",
|
|
2555
2532
|
alignItems: "flex-start",
|
|
2556
2533
|
gap: "2px",
|
|
2557
2534
|
alignSelf: "stretch"
|
|
2558
|
-
}, theme.typography.uiText12Regular
|
|
2535
|
+
}, theme.typography.uiText12Regular, {
|
|
2559
2536
|
"&.Mui-error": {
|
|
2560
2537
|
color: theme.palette.text.negative
|
|
2561
2538
|
}
|
|
@@ -2572,12 +2549,17 @@ const machineUiTheme = createTheme({
|
|
|
2572
2549
|
}
|
|
2573
2550
|
}
|
|
2574
2551
|
});
|
|
2575
|
-
const machineUiHmiTheme = createTheme(Object.assign(
|
|
2576
|
-
custom: Object.assign(
|
|
2552
|
+
const machineUiHmiTheme = createTheme(Object.assign({}, machineUiTheme, {
|
|
2553
|
+
custom: Object.assign({}, machineUiTheme.custom, {
|
|
2577
2554
|
iconStrokeWidth: "1.5px"
|
|
2578
2555
|
})
|
|
2579
2556
|
}));
|
|
2580
2557
|
|
|
2558
|
+
// module augmentation for custom theme variables
|
|
2559
|
+
|
|
2560
|
+
// Feel free to extend this further by appending more x's to sizes
|
|
2561
|
+
|
|
2562
|
+
const _excluded$d = ["variant", "size", "fullWidth", "className", "disabled", "iconLeft", "iconRight", "onClick", "type", "children", "labelText", "loading"];
|
|
2581
2563
|
const VentionButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
2582
2564
|
const {
|
|
2583
2565
|
variant = "filled-brand",
|
|
@@ -2593,7 +2575,7 @@ const VentionButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
2593
2575
|
labelText = "Button",
|
|
2594
2576
|
loading = false
|
|
2595
2577
|
} = props,
|
|
2596
|
-
other =
|
|
2578
|
+
other = _objectWithoutPropertiesLoose(props, _excluded$d);
|
|
2597
2579
|
const {
|
|
2598
2580
|
classes,
|
|
2599
2581
|
cx
|
|
@@ -2602,7 +2584,7 @@ const VentionButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
2602
2584
|
size: size,
|
|
2603
2585
|
fullWidth: fullWidth
|
|
2604
2586
|
});
|
|
2605
|
-
return jsx(Button, Object.assign({
|
|
2587
|
+
return /*#__PURE__*/jsx(Button, Object.assign({
|
|
2606
2588
|
ref: ref,
|
|
2607
2589
|
className: cx(classes.root, className),
|
|
2608
2590
|
disableRipple: true,
|
|
@@ -2613,10 +2595,10 @@ const VentionButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
2613
2595
|
endIcon: iconRight,
|
|
2614
2596
|
fullWidth: fullWidth
|
|
2615
2597
|
}, other, {
|
|
2616
|
-
children: loading ? jsx(VentionSpinner, {
|
|
2598
|
+
children: loading ? /*#__PURE__*/jsx(VentionSpinner, {
|
|
2617
2599
|
color: getSpinnerColor(variant),
|
|
2618
2600
|
size: getSpinnerSize(size)
|
|
2619
|
-
}) : jsx(Typography, {
|
|
2601
|
+
}) : /*#__PURE__*/jsx(Typography, {
|
|
2620
2602
|
variant: getButtonTypography(size),
|
|
2621
2603
|
className: classes.label,
|
|
2622
2604
|
children: children || labelText
|
|
@@ -2637,7 +2619,7 @@ const useStyles$H = tss.withParams().create(({
|
|
|
2637
2619
|
textOverflow: "ellipsis",
|
|
2638
2620
|
whiteSpace: "nowrap"
|
|
2639
2621
|
},
|
|
2640
|
-
root: Object.assign(
|
|
2622
|
+
root: Object.assign({
|
|
2641
2623
|
height: getButtonHeight(size, theme),
|
|
2642
2624
|
backgroundColor: stylingProperties.backgroundColor,
|
|
2643
2625
|
color: stylingProperties.textColor,
|
|
@@ -2646,7 +2628,7 @@ const useStyles$H = tss.withParams().create(({
|
|
|
2646
2628
|
padding
|
|
2647
2629
|
}, fullWidth && {
|
|
2648
2630
|
width: "100%"
|
|
2649
|
-
}
|
|
2631
|
+
}, {
|
|
2650
2632
|
"&:hover": {
|
|
2651
2633
|
backgroundColor: stylingProperties.backgroundColorOnHover
|
|
2652
2634
|
},
|
|
@@ -2735,13 +2717,13 @@ const VentionLink = inputProps => {
|
|
|
2735
2717
|
underlined: linkProps.underlined,
|
|
2736
2718
|
size: linkProps.size
|
|
2737
2719
|
});
|
|
2738
|
-
return jsxs(Button, {
|
|
2720
|
+
return /*#__PURE__*/jsxs(Button, {
|
|
2739
2721
|
className: classes.root,
|
|
2740
2722
|
disableRipple: true,
|
|
2741
2723
|
disabled: linkProps.disabled,
|
|
2742
2724
|
onClick: linkProps.onClick,
|
|
2743
2725
|
"data-testid": linkProps["data-testid"],
|
|
2744
|
-
children: [linkProps.labelText, linkProps.external ? jsx(IconExternalLink, {
|
|
2726
|
+
children: [linkProps.labelText, linkProps.external ? /*#__PURE__*/jsx(IconExternalLink, {
|
|
2745
2727
|
stroke: 1.25,
|
|
2746
2728
|
size: linkProps.size === "medium" ? 14 : 16,
|
|
2747
2729
|
className: classes.linkIcon
|
|
@@ -2804,21 +2786,21 @@ const VentionAlertControls = alertControlProps => {
|
|
|
2804
2786
|
const {
|
|
2805
2787
|
classes
|
|
2806
2788
|
} = useStyles$F(alertControlProps);
|
|
2807
|
-
return alertControlProps.display ? jsxs(Stack, {
|
|
2789
|
+
return alertControlProps.display ? /*#__PURE__*/jsxs(Stack, {
|
|
2808
2790
|
className: classes.alertControls,
|
|
2809
|
-
children: [alertControlProps.primaryButtonText ? jsx(VentionButton, {
|
|
2791
|
+
children: [alertControlProps.primaryButtonText ? /*#__PURE__*/jsx(VentionButton, {
|
|
2810
2792
|
onClick: alertControlProps.onPrimaryButtonClick,
|
|
2811
2793
|
labelText: alertControlProps.primaryButtonText,
|
|
2812
2794
|
size: alertControlProps.size,
|
|
2813
2795
|
variant: "shaded",
|
|
2814
2796
|
"data-testid": "alertPrimaryBtn"
|
|
2815
|
-
}) : null, alertControlProps.secondaryButtonText ? jsx(VentionButton, {
|
|
2797
|
+
}) : null, alertControlProps.secondaryButtonText ? /*#__PURE__*/jsx(VentionButton, {
|
|
2816
2798
|
onClick: alertControlProps.onSecondaryButtonClick,
|
|
2817
2799
|
labelText: alertControlProps.secondaryButtonText,
|
|
2818
2800
|
size: alertControlProps.size,
|
|
2819
2801
|
variant: "text-only",
|
|
2820
2802
|
"data-testid": "alertSecondaryBtn"
|
|
2821
|
-
}) : null, alertControlProps.linkText ? jsx(VentionLink, {
|
|
2803
|
+
}) : null, alertControlProps.linkText ? /*#__PURE__*/jsx(VentionLink, {
|
|
2822
2804
|
onClick: alertControlProps.onLinkClick,
|
|
2823
2805
|
labelText: alertControlProps.linkText,
|
|
2824
2806
|
size: alertControlProps.size === "small" ? "medium" : "large"
|
|
@@ -2850,54 +2832,54 @@ const VentionAlert = inputProps => {
|
|
|
2850
2832
|
const hasControlProps = !!(alertProps.linkText || alertProps.primaryButtonText || alertProps.secondaryButtonText);
|
|
2851
2833
|
const {
|
|
2852
2834
|
classes
|
|
2853
|
-
} = useStyles$E(Object.assign(
|
|
2835
|
+
} = useStyles$E(Object.assign({}, alertProps, {
|
|
2854
2836
|
hasControlProps
|
|
2855
2837
|
}));
|
|
2856
2838
|
const [titleTypography, descriptionTypography] = getTypographyVariant$2(alertProps.size);
|
|
2857
|
-
return visible ? jsx(Box$1, {
|
|
2839
|
+
return visible ? /*#__PURE__*/jsx(Box$1, {
|
|
2858
2840
|
"data-testid": "alertRootDiv",
|
|
2859
2841
|
className: classes.root,
|
|
2860
|
-
children: jsxs(Grid, {
|
|
2842
|
+
children: /*#__PURE__*/jsxs(Grid, {
|
|
2861
2843
|
container: true,
|
|
2862
2844
|
spacing: 0,
|
|
2863
2845
|
className: classes.alertGridContainer,
|
|
2864
|
-
children: [alertProps.leftIcon ? jsx(Grid, {
|
|
2846
|
+
children: [alertProps.leftIcon ? /*#__PURE__*/jsx(Grid, {
|
|
2865
2847
|
"data-testid": "leftIcon",
|
|
2866
2848
|
className: classes.leftIcon,
|
|
2867
2849
|
children: /*#__PURE__*/cloneElement(alertProps.leftIcon, {
|
|
2868
2850
|
size: getIconSize$1(alertProps.size)
|
|
2869
2851
|
})
|
|
2870
|
-
}) : null, jsxs(Grid, {
|
|
2852
|
+
}) : null, /*#__PURE__*/jsxs(Grid, {
|
|
2871
2853
|
className: classes.alertContent,
|
|
2872
|
-
children: [alertProps.title ? jsx(Typography, {
|
|
2854
|
+
children: [alertProps.title ? /*#__PURE__*/jsx(Typography, {
|
|
2873
2855
|
variant: titleTypography,
|
|
2874
2856
|
className: classes.title,
|
|
2875
2857
|
children: alertProps.title
|
|
2876
|
-
}) : null, jsx(Typography, {
|
|
2858
|
+
}) : null, /*#__PURE__*/jsx(Typography, {
|
|
2877
2859
|
variant: descriptionTypography,
|
|
2878
2860
|
className: classes.desc,
|
|
2879
2861
|
children: alertProps.descriptionText
|
|
2880
|
-
}), jsx(VentionAlertControls, Object.assign({}, alertProps, {
|
|
2862
|
+
}), /*#__PURE__*/jsx(VentionAlertControls, Object.assign({}, alertProps, {
|
|
2881
2863
|
display: !alertProps.isSingleLine
|
|
2882
2864
|
}))]
|
|
2883
|
-
}), jsxs(Grid, {
|
|
2865
|
+
}), /*#__PURE__*/jsxs(Grid, {
|
|
2884
2866
|
item: true,
|
|
2885
2867
|
className: classes.rightColumn,
|
|
2886
|
-
children: [jsx(VentionAlertControls, Object.assign({}, alertProps, {
|
|
2868
|
+
children: [/*#__PURE__*/jsx(VentionAlertControls, Object.assign({}, alertProps, {
|
|
2887
2869
|
display: alertProps.isSingleLine
|
|
2888
|
-
})), alertProps.rightIcon ? jsx(Grid, {
|
|
2870
|
+
})), alertProps.rightIcon ? /*#__PURE__*/jsx(Grid, {
|
|
2889
2871
|
"data-testid": "rightIcon",
|
|
2890
2872
|
className: classes.rightIcon,
|
|
2891
2873
|
children: /*#__PURE__*/cloneElement(alertProps.rightIcon, {
|
|
2892
2874
|
size: getIconSize$1(alertProps.size)
|
|
2893
2875
|
})
|
|
2894
|
-
}) : null, alertProps.isCloseable ? jsx(Grid, {
|
|
2876
|
+
}) : null, alertProps.isCloseable ? /*#__PURE__*/jsx(Grid, {
|
|
2895
2877
|
width: 16,
|
|
2896
|
-
children: jsx(Button, {
|
|
2878
|
+
children: /*#__PURE__*/jsx(Button, {
|
|
2897
2879
|
"data-testid": "closeButton",
|
|
2898
2880
|
className: classes.closeButton,
|
|
2899
2881
|
onClick: alertProps.onCloseButtonClick,
|
|
2900
|
-
children: jsx(IconX, {
|
|
2882
|
+
children: /*#__PURE__*/jsx(IconX, {
|
|
2901
2883
|
stroke: 1,
|
|
2902
2884
|
size: 16
|
|
2903
2885
|
})
|
|
@@ -3086,13 +3068,13 @@ const getAlertColors = (severity, theme) => {
|
|
|
3086
3068
|
const getAlertIcon = severity => {
|
|
3087
3069
|
switch (severity) {
|
|
3088
3070
|
case "warn":
|
|
3089
|
-
return jsx(IconAlertTriangleFilled, {});
|
|
3071
|
+
return /*#__PURE__*/jsx(IconAlertTriangleFilled, {});
|
|
3090
3072
|
case "error":
|
|
3091
|
-
return jsx(IconAlertTriangleFilled, {});
|
|
3073
|
+
return /*#__PURE__*/jsx(IconAlertTriangleFilled, {});
|
|
3092
3074
|
case "success":
|
|
3093
|
-
return jsx(IconCircleCheckFilled, {});
|
|
3075
|
+
return /*#__PURE__*/jsx(IconCircleCheckFilled, {});
|
|
3094
3076
|
case "info":
|
|
3095
|
-
return jsx(IconInfoCircleFilled, {});
|
|
3077
|
+
return /*#__PURE__*/jsx(IconInfoCircleFilled, {});
|
|
3096
3078
|
}
|
|
3097
3079
|
};
|
|
3098
3080
|
const getIconSize$1 = size => {
|
|
@@ -3137,9 +3119,9 @@ const VentionBadge = props => {
|
|
|
3137
3119
|
color: props.color,
|
|
3138
3120
|
variant: props.variant
|
|
3139
3121
|
});
|
|
3140
|
-
return jsxs("div", {
|
|
3122
|
+
return /*#__PURE__*/jsxs("div", {
|
|
3141
3123
|
className: cx(classes.root, props.className),
|
|
3142
|
-
children: [props.iconLeft, jsx(Typography, {
|
|
3124
|
+
children: [props.iconLeft, /*#__PURE__*/jsx(Typography, {
|
|
3143
3125
|
textAlign: "center",
|
|
3144
3126
|
variant: getBadgeTypographyVariant(props.size),
|
|
3145
3127
|
style: {
|
|
@@ -3306,6 +3288,7 @@ const getVentionBadgeColors = (color, variant, theme) => {
|
|
|
3306
3288
|
return badgeStyleMap[color][variant](theme);
|
|
3307
3289
|
};
|
|
3308
3290
|
|
|
3291
|
+
const _excluded$c = ["variant", "size", "className", "disabled", "onClick", "children"];
|
|
3309
3292
|
const VentionIconButton = /*#__PURE__*/forwardRef((inputProps, ref) => {
|
|
3310
3293
|
const {
|
|
3311
3294
|
variant = "filled-brand",
|
|
@@ -3315,7 +3298,7 @@ const VentionIconButton = /*#__PURE__*/forwardRef((inputProps, ref) => {
|
|
|
3315
3298
|
onClick,
|
|
3316
3299
|
children
|
|
3317
3300
|
} = inputProps,
|
|
3318
|
-
other =
|
|
3301
|
+
other = _objectWithoutPropertiesLoose(inputProps, _excluded$c);
|
|
3319
3302
|
const {
|
|
3320
3303
|
classes,
|
|
3321
3304
|
cx
|
|
@@ -3323,7 +3306,7 @@ const VentionIconButton = /*#__PURE__*/forwardRef((inputProps, ref) => {
|
|
|
3323
3306
|
variant: variant,
|
|
3324
3307
|
size: size
|
|
3325
3308
|
});
|
|
3326
|
-
return jsx(IconButton, Object.assign({
|
|
3309
|
+
return /*#__PURE__*/jsx(IconButton, Object.assign({
|
|
3327
3310
|
ref: ref,
|
|
3328
3311
|
className: cx(classes.root, className),
|
|
3329
3312
|
disableRipple: true,
|
|
@@ -3365,11 +3348,12 @@ const useStyles$C = tss.withParams().create(({
|
|
|
3365
3348
|
};
|
|
3366
3349
|
});
|
|
3367
3350
|
|
|
3351
|
+
const _excluded$b = ["variant", "size", "className", "disabled", "onClose", "onOpen", "isOpen", "icon", "badgeText", "label", "stroke", "contentColor", "children", "menuPlacement", "menuAlignment", "onClick"];
|
|
3368
3352
|
const menuTestIds = {
|
|
3369
3353
|
menuRootDiv: "menuRootDiv"
|
|
3370
3354
|
};
|
|
3371
|
-
const VentionDropdownButton =
|
|
3372
|
-
|
|
3355
|
+
const VentionDropdownButton = _ref => {
|
|
3356
|
+
let {
|
|
3373
3357
|
variant = "simple",
|
|
3374
3358
|
size = "small",
|
|
3375
3359
|
className,
|
|
@@ -3386,8 +3370,8 @@ const VentionDropdownButton = _a => {
|
|
|
3386
3370
|
menuPlacement = "bottom",
|
|
3387
3371
|
menuAlignment = "start",
|
|
3388
3372
|
onClick
|
|
3389
|
-
} =
|
|
3390
|
-
other =
|
|
3373
|
+
} = _ref,
|
|
3374
|
+
other = _objectWithoutPropertiesLoose(_ref, _excluded$b);
|
|
3391
3375
|
const {
|
|
3392
3376
|
classes,
|
|
3393
3377
|
cx
|
|
@@ -3407,46 +3391,46 @@ const VentionDropdownButton = _a => {
|
|
|
3407
3391
|
const handleClick = useCallback(event => {
|
|
3408
3392
|
if (!showDropdown) {
|
|
3409
3393
|
setShowDropdownInternal(true);
|
|
3410
|
-
onOpen
|
|
3394
|
+
onOpen == null || onOpen();
|
|
3411
3395
|
} else {
|
|
3412
3396
|
setShowDropdownInternal(false);
|
|
3413
|
-
onClose
|
|
3397
|
+
onClose == null || onClose();
|
|
3414
3398
|
}
|
|
3415
|
-
onClick
|
|
3399
|
+
onClick == null || onClick(event);
|
|
3416
3400
|
}, [showDropdown, onClose, onOpen, onClick]);
|
|
3417
|
-
return jsx(ClickAwayListener, {
|
|
3401
|
+
return /*#__PURE__*/jsx(ClickAwayListener, {
|
|
3418
3402
|
onClickAway: () => {
|
|
3419
3403
|
setShowDropdownInternal(false);
|
|
3420
|
-
onClose
|
|
3404
|
+
onClose == null || onClose();
|
|
3421
3405
|
},
|
|
3422
|
-
children: jsxs("div", {
|
|
3406
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
3423
3407
|
style: {
|
|
3424
3408
|
display: "inline-block",
|
|
3425
3409
|
position: "relative"
|
|
3426
3410
|
},
|
|
3427
|
-
children: [jsxs(IconButton, Object.assign({
|
|
3411
|
+
children: [/*#__PURE__*/jsxs(IconButton, Object.assign({
|
|
3428
3412
|
ref: ref,
|
|
3429
3413
|
className: cx(classes.root, className),
|
|
3430
3414
|
disableRipple: true
|
|
3431
3415
|
}, other, {
|
|
3432
3416
|
disabled: disabled,
|
|
3433
3417
|
onClick: handleClick,
|
|
3434
|
-
children: [icon, label && jsx(Typography, {
|
|
3418
|
+
children: [icon, label && /*#__PURE__*/jsx(Typography, {
|
|
3435
3419
|
className: classes.label,
|
|
3436
3420
|
variant: LABEL_VARIANTS[size],
|
|
3437
3421
|
children: label
|
|
3438
|
-
}), badgeText && jsx(VentionBadge, {
|
|
3422
|
+
}), badgeText && /*#__PURE__*/jsx(VentionBadge, {
|
|
3439
3423
|
size: "small",
|
|
3440
3424
|
color: "slate",
|
|
3441
3425
|
text: badgeText,
|
|
3442
3426
|
variant: "filled",
|
|
3443
3427
|
className: classes.badge
|
|
3444
|
-
}), jsx(Chevron, {
|
|
3428
|
+
}), /*#__PURE__*/jsx(Chevron, {
|
|
3445
3429
|
stroke: stroke,
|
|
3446
3430
|
size: 16,
|
|
3447
3431
|
color: contentColor
|
|
3448
3432
|
})]
|
|
3449
|
-
})), showDropdown && jsx("div", {
|
|
3433
|
+
})), showDropdown && /*#__PURE__*/jsx("div", {
|
|
3450
3434
|
"data-testid": menuTestIds.menuRootDiv,
|
|
3451
3435
|
className: classes.menuContainer,
|
|
3452
3436
|
children: children
|
|
@@ -3463,7 +3447,7 @@ const useStyles$B = tss.withParams().create(({
|
|
|
3463
3447
|
theme
|
|
3464
3448
|
}) => {
|
|
3465
3449
|
const stylingProperties = getButtonStylingPropertiesGivenProps(variant, size, theme);
|
|
3466
|
-
const color = contentColor
|
|
3450
|
+
const color = contentColor != null ? contentColor : theme.palette.text.primary;
|
|
3467
3451
|
return {
|
|
3468
3452
|
root: {
|
|
3469
3453
|
gap: BUTTON_GAPS[size],
|
|
@@ -3534,7 +3518,7 @@ const getMenuPositionStyles = (placement, alignment) => {
|
|
|
3534
3518
|
bottom: 0
|
|
3535
3519
|
}
|
|
3536
3520
|
};
|
|
3537
|
-
return Object.assign(
|
|
3521
|
+
return Object.assign({}, placementStyles[placement], alignmentStyles[alignment]);
|
|
3538
3522
|
};
|
|
3539
3523
|
const LABEL_VARIANTS = {
|
|
3540
3524
|
small: "uiText12Medium",
|
|
@@ -3557,7 +3541,7 @@ const defaultProps$6 = {
|
|
|
3557
3541
|
size: "medium",
|
|
3558
3542
|
descriptionText: "Description placeholder",
|
|
3559
3543
|
variant: "shaded",
|
|
3560
|
-
leftIcon: jsx(IconInfoCircle, {
|
|
3544
|
+
leftIcon: /*#__PURE__*/jsx(IconInfoCircle, {
|
|
3561
3545
|
stroke: 1,
|
|
3562
3546
|
size: 16
|
|
3563
3547
|
})
|
|
@@ -3573,7 +3557,7 @@ const VentionCallout = inputProps => {
|
|
|
3573
3557
|
});
|
|
3574
3558
|
const theme = useTheme();
|
|
3575
3559
|
const [visible, setVisible] = useState(true);
|
|
3576
|
-
return visible ? jsx(Box$1, {
|
|
3560
|
+
return visible ? /*#__PURE__*/jsx(Box$1, {
|
|
3577
3561
|
"data-testid": "calloutRootDiv",
|
|
3578
3562
|
display: "flex",
|
|
3579
3563
|
justifyContent: "center",
|
|
@@ -3584,12 +3568,12 @@ const VentionCallout = inputProps => {
|
|
|
3584
3568
|
border: `1px solid var(--Border-Default-border-default, ${theme.palette.border.main})`,
|
|
3585
3569
|
className: classes.root,
|
|
3586
3570
|
padding: getCalloutPadding(calloutProps),
|
|
3587
|
-
children: jsxs(Grid, {
|
|
3571
|
+
children: /*#__PURE__*/jsxs(Grid, {
|
|
3588
3572
|
container: true,
|
|
3589
3573
|
spacing: 0,
|
|
3590
3574
|
flexWrap: "nowrap",
|
|
3591
3575
|
lineHeight: "0px",
|
|
3592
|
-
children: [calloutProps.leftIcon ? jsx(Grid, {
|
|
3576
|
+
children: [calloutProps.leftIcon ? /*#__PURE__*/jsx(Grid, {
|
|
3593
3577
|
item: true,
|
|
3594
3578
|
width: "fit-content",
|
|
3595
3579
|
"data-testid": "leftIcon",
|
|
@@ -3598,7 +3582,7 @@ const VentionCallout = inputProps => {
|
|
|
3598
3582
|
children: /*#__PURE__*/cloneElement(calloutProps.leftIcon, {
|
|
3599
3583
|
size: calloutProps.size === "small" ? 16 : 24
|
|
3600
3584
|
})
|
|
3601
|
-
}) : null, jsxs(Grid, {
|
|
3585
|
+
}) : null, /*#__PURE__*/jsxs(Grid, {
|
|
3602
3586
|
item: true,
|
|
3603
3587
|
width: "auto",
|
|
3604
3588
|
marginRight: getMarginRightValueForContent(calloutProps),
|
|
@@ -3607,47 +3591,47 @@ const VentionCallout = inputProps => {
|
|
|
3607
3591
|
flexDirection: calloutProps.isSingleLine ? "row" : "column",
|
|
3608
3592
|
gap: getGapSpaceForContent(calloutProps.isSingleLine, calloutProps.size),
|
|
3609
3593
|
alignItems: calloutProps.isSingleLine ? "center" : "normal",
|
|
3610
|
-
children: [calloutProps.title ? jsx(Typography, {
|
|
3594
|
+
children: [calloutProps.title ? /*#__PURE__*/jsx(Typography, {
|
|
3611
3595
|
variant: calloutProps.size === "small" ? "uiText12SemiBold" : "uiText14SemiBold",
|
|
3612
3596
|
className: classes.title,
|
|
3613
3597
|
children: calloutProps.title
|
|
3614
|
-
}) : null, jsx(Typography, {
|
|
3598
|
+
}) : null, /*#__PURE__*/jsx(Typography, {
|
|
3615
3599
|
variant: calloutProps.size === "small" ? "uiText12Regular" : "uiText14Regular",
|
|
3616
3600
|
className: classes.desc,
|
|
3617
3601
|
style: {
|
|
3618
3602
|
whiteSpace: "pre-wrap"
|
|
3619
3603
|
},
|
|
3620
3604
|
children: calloutProps.descriptionText
|
|
3621
|
-
}), jsxs(Stack, {
|
|
3605
|
+
}), /*#__PURE__*/jsxs(Stack, {
|
|
3622
3606
|
flexDirection: calloutProps.isSingleLine ? "row-reverse" : "row",
|
|
3623
3607
|
gap: "8px",
|
|
3624
|
-
children: [calloutProps.primaryButtonText ? jsx(VentionButton, {
|
|
3608
|
+
children: [calloutProps.primaryButtonText ? /*#__PURE__*/jsx(VentionButton, {
|
|
3625
3609
|
onClick: calloutProps.onPrimaryButtonClick,
|
|
3626
3610
|
labelText: calloutProps.primaryButtonText,
|
|
3627
3611
|
size: calloutProps.size === "small" ? "small" : "medium",
|
|
3628
3612
|
variant: calloutProps.primaryButtonVariant ? calloutProps.primaryButtonVariant : "filled-brand",
|
|
3629
3613
|
"data-testid": "calloutPrimaryBtn"
|
|
3630
|
-
}) : null, calloutProps.secondaryButtonText ? jsx(VentionButton, {
|
|
3614
|
+
}) : null, calloutProps.secondaryButtonText ? /*#__PURE__*/jsx(VentionButton, {
|
|
3631
3615
|
variant: "outline",
|
|
3632
3616
|
onClick: calloutProps.onSecondaryButtonClick,
|
|
3633
3617
|
labelText: calloutProps.secondaryButtonText,
|
|
3634
3618
|
size: calloutProps.size === "small" ? "small" : "medium",
|
|
3635
3619
|
"data-testid": "calloutSecondaryBtn"
|
|
3636
|
-
}) : null, calloutProps.linkText ? jsx(VentionLink, {
|
|
3620
|
+
}) : null, calloutProps.linkText ? /*#__PURE__*/jsx(VentionLink, {
|
|
3637
3621
|
onClick: calloutProps.onLinkClick,
|
|
3638
3622
|
labelText: calloutProps.linkText,
|
|
3639
3623
|
size: calloutProps.size === "small" ? "medium" : "large"
|
|
3640
3624
|
}) : null]
|
|
3641
3625
|
})]
|
|
3642
|
-
}), calloutProps.isCloseable ? jsx(Grid, {
|
|
3626
|
+
}), calloutProps.isCloseable ? /*#__PURE__*/jsx(Grid, {
|
|
3643
3627
|
item: true,
|
|
3644
3628
|
width: 16,
|
|
3645
3629
|
alignSelf: calloutProps.isSingleLine ? "center" : "normal",
|
|
3646
|
-
children: jsx(Button, {
|
|
3630
|
+
children: /*#__PURE__*/jsx(Button, {
|
|
3647
3631
|
className: classes.closeButton,
|
|
3648
3632
|
"data-testid": "closeButton",
|
|
3649
3633
|
onClick: () => setVisible(false),
|
|
3650
|
-
children: jsx(IconX, {
|
|
3634
|
+
children: /*#__PURE__*/jsx(IconX, {
|
|
3651
3635
|
stroke: 1,
|
|
3652
3636
|
size: 16,
|
|
3653
3637
|
color: theme.palette.icon.primary
|
|
@@ -3830,10 +3814,10 @@ const VentionCounter = props => {
|
|
|
3830
3814
|
color: props.color,
|
|
3831
3815
|
variant: props.variant
|
|
3832
3816
|
});
|
|
3833
|
-
return jsx("div", {
|
|
3817
|
+
return /*#__PURE__*/jsx("div", {
|
|
3834
3818
|
className: classes.root,
|
|
3835
3819
|
"data-testid": props["data-testid"],
|
|
3836
|
-
children: jsx(Typography, {
|
|
3820
|
+
children: /*#__PURE__*/jsx(Typography, {
|
|
3837
3821
|
textAlign: "center",
|
|
3838
3822
|
variant: props.size === "small" ? "uiText12Medium" : "uiText14Medium",
|
|
3839
3823
|
children: getShownValue(props)
|
|
@@ -3987,6 +3971,7 @@ const getColors$3 = (color, variant, theme) => {
|
|
|
3987
3971
|
return counterStyleMap[color][variant](theme);
|
|
3988
3972
|
};
|
|
3989
3973
|
|
|
3974
|
+
const _excluded$a = ["open", "className", "ownerState"];
|
|
3990
3975
|
const VentionModalBase = props => {
|
|
3991
3976
|
const {
|
|
3992
3977
|
modalSize = "medium",
|
|
@@ -4011,11 +3996,10 @@ const VentionModalBase = props => {
|
|
|
4011
3996
|
const Backdrop = /*#__PURE__*/forwardRef((props, ref) => {
|
|
4012
3997
|
const {
|
|
4013
3998
|
open,
|
|
4014
|
-
className
|
|
4015
|
-
ownerState
|
|
3999
|
+
className
|
|
4016
4000
|
} = props,
|
|
4017
|
-
other =
|
|
4018
|
-
return jsx("div", Object.assign({
|
|
4001
|
+
other = _objectWithoutPropertiesLoose(props, _excluded$a);
|
|
4002
|
+
return /*#__PURE__*/jsx("div", Object.assign({
|
|
4019
4003
|
className: cx(classes.backdrop, {
|
|
4020
4004
|
"base-Backdrop-open": open
|
|
4021
4005
|
}, className),
|
|
@@ -4025,21 +4009,21 @@ const VentionModalBase = props => {
|
|
|
4025
4009
|
}));
|
|
4026
4010
|
});
|
|
4027
4011
|
const iconSize = isTouchDevice ? machineUiTheme.spacing(7) : machineUiTheme.spacing(4);
|
|
4028
|
-
return jsx(Modal, {
|
|
4012
|
+
return /*#__PURE__*/jsx(Modal, {
|
|
4029
4013
|
open: props.isOpen,
|
|
4030
4014
|
onClose: handleClose,
|
|
4031
4015
|
slots: {
|
|
4032
4016
|
backdrop: Backdrop
|
|
4033
4017
|
},
|
|
4034
4018
|
className: classes.modal,
|
|
4035
|
-
children: jsxs("div", {
|
|
4019
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
4036
4020
|
className: classes.modalContainer,
|
|
4037
4021
|
"data-testid": ventionModalBaseTestIds.modalContainer,
|
|
4038
|
-
children: [jsx("div", {
|
|
4022
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
4039
4023
|
className: classes.closeIconButton,
|
|
4040
4024
|
onClick: props.onClose,
|
|
4041
4025
|
"data-testid": ventionModalBaseTestIds.closeIcon,
|
|
4042
|
-
children: jsx(IconX, {
|
|
4026
|
+
children: /*#__PURE__*/jsx(IconX, {
|
|
4043
4027
|
stroke: 1,
|
|
4044
4028
|
size: iconSize
|
|
4045
4029
|
})
|
|
@@ -4161,43 +4145,43 @@ const VentionModal = props => {
|
|
|
4161
4145
|
props.onClose();
|
|
4162
4146
|
};
|
|
4163
4147
|
const buttonSize = getButtonSize(modalSize, isTouchDevice);
|
|
4164
|
-
return jsx(VentionModalBase, {
|
|
4148
|
+
return /*#__PURE__*/jsx(VentionModalBase, {
|
|
4165
4149
|
onClose: handleClose,
|
|
4166
4150
|
isOpen: props.isOpen,
|
|
4167
4151
|
modalSize: props.modalSize,
|
|
4168
4152
|
isTouchDevice: isTouchDevice,
|
|
4169
4153
|
backDropClickClosable: backDropClickClosable,
|
|
4170
4154
|
width: props.width,
|
|
4171
|
-
children: jsxs(Box$1, {
|
|
4155
|
+
children: /*#__PURE__*/jsxs(Box$1, {
|
|
4172
4156
|
className: classes.modalContent,
|
|
4173
|
-
children: [props.type !== "none" && jsx(Box$1, {
|
|
4157
|
+
children: [props.type !== "none" && /*#__PURE__*/jsx(Box$1, {
|
|
4174
4158
|
className: classes.statusGlow,
|
|
4175
|
-
children: jsxs(Box$1, {
|
|
4159
|
+
children: /*#__PURE__*/jsxs(Box$1, {
|
|
4176
4160
|
className: classes.statusCircle,
|
|
4177
|
-
children: [props.type === "positive" && jsx(IconCheck, Object.assign({}, iconProps, {
|
|
4161
|
+
children: [props.type === "positive" && /*#__PURE__*/jsx(IconCheck, Object.assign({}, iconProps, {
|
|
4178
4162
|
"data-testid": ventionModalTestIds.positiveIcon
|
|
4179
|
-
})), props.type === "info" && jsx(IconInfoSmall, Object.assign({}, iconProps, {
|
|
4163
|
+
})), props.type === "info" && /*#__PURE__*/jsx(IconInfoSmall, Object.assign({}, iconProps, {
|
|
4180
4164
|
"data-testid": ventionModalTestIds.infoIcon
|
|
4181
|
-
})), props.type === "loading" && jsx(CircularProgress$1, {
|
|
4165
|
+
})), props.type === "loading" && /*#__PURE__*/jsx(CircularProgress$1, {
|
|
4182
4166
|
"data-testid": ventionModalTestIds.loadingIcon
|
|
4183
|
-
}), props.type === "warning" && jsx(IconAlertTriangle, Object.assign({}, iconProps, {
|
|
4167
|
+
}), props.type === "warning" && /*#__PURE__*/jsx(IconAlertTriangle, Object.assign({}, iconProps, {
|
|
4184
4168
|
"data-testid": ventionModalTestIds.warningIcon
|
|
4185
|
-
})), props.type === "negative" && jsx(IconAlertTriangle, Object.assign({}, iconProps, {
|
|
4169
|
+
})), props.type === "negative" && /*#__PURE__*/jsx(IconAlertTriangle, Object.assign({}, iconProps, {
|
|
4186
4170
|
"data-testid": ventionModalTestIds.negativeIcon
|
|
4187
4171
|
}))]
|
|
4188
4172
|
})
|
|
4189
|
-
}), jsx(Typography, {
|
|
4173
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
4190
4174
|
className: classes.titleText,
|
|
4191
4175
|
variant: getTitleTypography(modalSize, isTouchDevice),
|
|
4192
4176
|
children: props.titleText
|
|
4193
|
-
}), jsx(Typography, {
|
|
4177
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
4194
4178
|
className: classes.bodyText,
|
|
4195
4179
|
variant: getBodyTextTypography(modalSize, isTouchDevice),
|
|
4196
4180
|
children: props.body
|
|
4197
|
-
}), jsxs(Box$1, {
|
|
4181
|
+
}), /*#__PURE__*/jsxs(Box$1, {
|
|
4198
4182
|
className: classes.modalActions,
|
|
4199
4183
|
"data-testid": ventionModalTestIds.modalActions,
|
|
4200
|
-
children: [props.secondaryButton && jsx(VentionButton, {
|
|
4184
|
+
children: [props.secondaryButton && /*#__PURE__*/jsx(VentionButton, {
|
|
4201
4185
|
size: buttonSize,
|
|
4202
4186
|
"data-testid": props.secondaryButton.dataTestId,
|
|
4203
4187
|
onClick: props.secondaryButton.onClick,
|
|
@@ -4206,7 +4190,7 @@ const VentionModal = props => {
|
|
|
4206
4190
|
disabled: props.secondaryButton.disabled,
|
|
4207
4191
|
fullWidth: props.buttonPosition === undefined ? true : false,
|
|
4208
4192
|
children: props.secondaryButton.text
|
|
4209
|
-
}), props.primaryButton && jsx(VentionButton, {
|
|
4193
|
+
}), props.primaryButton && /*#__PURE__*/jsx(VentionButton, {
|
|
4210
4194
|
"data-testid": props.primaryButton.dataTestId,
|
|
4211
4195
|
size: buttonSize,
|
|
4212
4196
|
onClick: props.primaryButton.onClick,
|
|
@@ -4366,33 +4350,33 @@ const VentionProgressBar = inputProps => {
|
|
|
4366
4350
|
colored: props.colored,
|
|
4367
4351
|
state: props.state
|
|
4368
4352
|
});
|
|
4369
|
-
return jsxs(Box$1, {
|
|
4370
|
-
children: [props.label && (typeof props.label === "string" ? jsx(Typography, {
|
|
4353
|
+
return /*#__PURE__*/jsxs(Box$1, {
|
|
4354
|
+
children: [props.label && (typeof props.label === "string" ? /*#__PURE__*/jsx(Typography, {
|
|
4371
4355
|
variant: "uiText14Regular",
|
|
4372
4356
|
color: "textPrimary",
|
|
4373
4357
|
children: props.label
|
|
4374
|
-
}) : props.label), jsx(LinearProgress, {
|
|
4358
|
+
}) : props.label), /*#__PURE__*/jsx(LinearProgress, {
|
|
4375
4359
|
className: classes.progressBar,
|
|
4376
4360
|
variant: "determinate",
|
|
4377
4361
|
value: props.state === "success" ? 100 : props.value,
|
|
4378
4362
|
"data-testid": "progressBar"
|
|
4379
|
-
}), isStatusState && props.statusText && jsxs(Stack, {
|
|
4363
|
+
}), isStatusState && props.statusText && /*#__PURE__*/jsxs(Stack, {
|
|
4380
4364
|
direction: "row",
|
|
4381
4365
|
gap: 1,
|
|
4382
4366
|
alignItems: "center",
|
|
4383
4367
|
alignContent: "center",
|
|
4384
4368
|
className: classes.statusText,
|
|
4385
|
-
children: [props.state === "error" ? jsx(IconAlertTriangleFilled, {
|
|
4369
|
+
children: [props.state === "error" ? /*#__PURE__*/jsx(IconAlertTriangleFilled, {
|
|
4386
4370
|
size: 14,
|
|
4387
4371
|
"data-testid": "errorIcon"
|
|
4388
|
-
}) : jsx(IconCheck, {
|
|
4372
|
+
}) : /*#__PURE__*/jsx(IconCheck, {
|
|
4389
4373
|
size: 14,
|
|
4390
4374
|
"data-testid": "successIcon"
|
|
4391
|
-
}), jsx(Typography, {
|
|
4375
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
4392
4376
|
variant: "uiText12Regular",
|
|
4393
4377
|
children: props.statusText
|
|
4394
4378
|
})]
|
|
4395
|
-
}), props.helperText && jsx(Typography, {
|
|
4379
|
+
}), props.helperText && /*#__PURE__*/jsx(Typography, {
|
|
4396
4380
|
variant: "uiText12Regular",
|
|
4397
4381
|
color: "textSecondary",
|
|
4398
4382
|
children: props.helperText
|
|
@@ -4410,7 +4394,7 @@ const useStyles$w = tss.withParams().create(({
|
|
|
4410
4394
|
textColor
|
|
4411
4395
|
} = getColors$1(state, colored, theme);
|
|
4412
4396
|
return {
|
|
4413
|
-
progressBar: Object.assign(
|
|
4397
|
+
progressBar: Object.assign({}, PROGRESS_BAR_SIZES[size], {
|
|
4414
4398
|
marginBottom: theme.spacing(1),
|
|
4415
4399
|
[`&.${linearProgressClasses.colorPrimary}`]: {
|
|
4416
4400
|
backgroundColor: theme.palette.background.surface3
|
|
@@ -4940,43 +4924,40 @@ const VentionSteps = props => {
|
|
|
4940
4924
|
console.warn("The design system doesn't support vention-steps bullet numbering for the requested size. Defaulting to dots style.");
|
|
4941
4925
|
variant = "dot";
|
|
4942
4926
|
}
|
|
4943
|
-
return jsx("div", {
|
|
4927
|
+
return /*#__PURE__*/jsx("div", {
|
|
4944
4928
|
className: cx(classes.root, props.disabled && classes.stepsDisabled),
|
|
4945
4929
|
children: props.steps.map((step, index) => {
|
|
4946
4930
|
const previousStep = props.steps[index - 1];
|
|
4947
4931
|
const isCurrentStep = !step.isCompleted && (!previousStep || previousStep.isCompleted) && !props.disabled;
|
|
4948
|
-
return jsxs("div", {
|
|
4932
|
+
return /*#__PURE__*/jsxs("div", {
|
|
4949
4933
|
"data-testid": ElementTestIds.Content,
|
|
4950
4934
|
className: cx(classes.step, step.isSelected && classes.stepSelected, step.onClick !== undefined && classes.stepClickable),
|
|
4951
|
-
onClick: () =>
|
|
4952
|
-
var _a;
|
|
4953
|
-
return (_a = step.onClick) === null || _a === void 0 ? void 0 : _a.call(step, step);
|
|
4954
|
-
},
|
|
4935
|
+
onClick: () => step.onClick == null ? void 0 : step.onClick(step),
|
|
4955
4936
|
role: "button",
|
|
4956
|
-
children: [jsxs("div", {
|
|
4937
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
4957
4938
|
className: classes.stepProgress,
|
|
4958
|
-
children: [jsx("div", {
|
|
4939
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
4959
4940
|
"data-testid": ElementTestIds.Bullet,
|
|
4960
4941
|
className: cx(classes.stepBullet, props.size === "small" && classes.small, variant === "number" && classes.stepNumber, variant === "dot" && classes.stepDot, step.isCompleted && classes.stepCompleted, isCurrentStep && classes.stepCurrent),
|
|
4961
|
-
children: step.isCompleted ? jsx(IconCheck, {
|
|
4942
|
+
children: step.isCompleted ? /*#__PURE__*/jsx(IconCheck, {
|
|
4962
4943
|
"data-testid": ElementTestIds.CheckIcon,
|
|
4963
4944
|
className: classes.checkIcon
|
|
4964
|
-
}) : jsx(BulletContent, {
|
|
4945
|
+
}) : /*#__PURE__*/jsx(BulletContent, {
|
|
4965
4946
|
bulletVariant: variant,
|
|
4966
4947
|
typographyVariant: typographyVariants.bulletText,
|
|
4967
4948
|
bulletText: (index + 1).toFixed(0)
|
|
4968
4949
|
})
|
|
4969
|
-
}), props.steps.length !== index + 1 && jsx("div", {
|
|
4950
|
+
}), props.steps.length !== index + 1 && /*#__PURE__*/jsx("div", {
|
|
4970
4951
|
"data-testid": ElementTestIds.Bar,
|
|
4971
4952
|
className: cx(classes.bar, props.size === "small" && classes.small, step.isCompleted && classes.barCompleted)
|
|
4972
4953
|
})]
|
|
4973
|
-
}), jsxs("div", {
|
|
4954
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
4974
4955
|
className: classes.stepContent,
|
|
4975
|
-
children: [jsx(Typography, {
|
|
4956
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
4976
4957
|
"data-testid": ElementTestIds.Title,
|
|
4977
4958
|
variant: typographyVariants.heading,
|
|
4978
4959
|
children: step.title
|
|
4979
|
-
}), step.description && jsx(Typography, {
|
|
4960
|
+
}), step.description && /*#__PURE__*/jsx(Typography, {
|
|
4980
4961
|
"data-testid": ElementTestIds.Description,
|
|
4981
4962
|
variant: typographyVariants.description,
|
|
4982
4963
|
children: step.description
|
|
@@ -5111,12 +5092,12 @@ const useStyles$v = tss.withParams().withNestedSelectors().create(({
|
|
|
5111
5092
|
function BulletContent(props) {
|
|
5112
5093
|
switch (props.bulletVariant) {
|
|
5113
5094
|
case "number":
|
|
5114
|
-
return jsx(Typography, {
|
|
5095
|
+
return /*#__PURE__*/jsx(Typography, {
|
|
5115
5096
|
variant: props.typographyVariant,
|
|
5116
5097
|
children: props.bulletText
|
|
5117
5098
|
});
|
|
5118
5099
|
case "dot":
|
|
5119
|
-
return jsx("div", {});
|
|
5100
|
+
return /*#__PURE__*/jsx("div", {});
|
|
5120
5101
|
}
|
|
5121
5102
|
}
|
|
5122
5103
|
const ElementTestIds = {
|
|
@@ -5180,9 +5161,9 @@ const VentionStatusDot = props => {
|
|
|
5180
5161
|
borderColor: props.borderColor,
|
|
5181
5162
|
size
|
|
5182
5163
|
});
|
|
5183
|
-
return jsx("div", {
|
|
5164
|
+
return /*#__PURE__*/jsx("div", {
|
|
5184
5165
|
className: cx(classes.root, className),
|
|
5185
|
-
children: jsx("div", {
|
|
5166
|
+
children: /*#__PURE__*/jsx("div", {
|
|
5186
5167
|
className: classes.dot
|
|
5187
5168
|
})
|
|
5188
5169
|
});
|
|
@@ -5352,15 +5333,16 @@ const getTypography = (size, theme) => {
|
|
|
5352
5333
|
};
|
|
5353
5334
|
};
|
|
5354
5335
|
|
|
5355
|
-
const
|
|
5356
|
-
|
|
5336
|
+
const _excluded$9 = ["state", "variant", "size", "rightItemText", "leftItemText"];
|
|
5337
|
+
const VentionTextInput = _ref => {
|
|
5338
|
+
let {
|
|
5357
5339
|
state = "default",
|
|
5358
5340
|
variant,
|
|
5359
5341
|
size,
|
|
5360
5342
|
rightItemText,
|
|
5361
5343
|
leftItemText
|
|
5362
|
-
} =
|
|
5363
|
-
props =
|
|
5344
|
+
} = _ref,
|
|
5345
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$9);
|
|
5364
5346
|
const {
|
|
5365
5347
|
classes
|
|
5366
5348
|
} = useStyles$t({
|
|
@@ -5368,41 +5350,47 @@ const VentionTextInput = _a => {
|
|
|
5368
5350
|
variant,
|
|
5369
5351
|
state
|
|
5370
5352
|
});
|
|
5371
|
-
const inputProps = Object.assign(
|
|
5353
|
+
const inputProps = Object.assign({}, props.InputProps, {
|
|
5372
5354
|
disabled: state === "disabled"
|
|
5373
|
-
}
|
|
5374
|
-
startAdornment: jsx(InputAdornment, {
|
|
5355
|
+
}, leftItemText ? {
|
|
5356
|
+
startAdornment: /*#__PURE__*/jsx(InputAdornment, {
|
|
5375
5357
|
position: "start",
|
|
5376
5358
|
className: classes.leftItem,
|
|
5377
|
-
children: jsx(Box$1, {
|
|
5359
|
+
children: /*#__PURE__*/jsx(Box$1, {
|
|
5378
5360
|
display: "flex",
|
|
5379
5361
|
alignItems: "center",
|
|
5380
5362
|
height: "100%",
|
|
5381
|
-
children: jsx(Typography, {
|
|
5363
|
+
children: /*#__PURE__*/jsx(Typography, {
|
|
5382
5364
|
className: classes.leftItemText,
|
|
5383
5365
|
children: leftItemText
|
|
5384
5366
|
})
|
|
5385
5367
|
})
|
|
5386
5368
|
})
|
|
5387
|
-
} : {}
|
|
5388
|
-
endAdornment: jsx(InputAdornment, {
|
|
5369
|
+
} : {}, rightItemText ? {
|
|
5370
|
+
endAdornment: /*#__PURE__*/jsx(InputAdornment, {
|
|
5389
5371
|
position: "end",
|
|
5390
5372
|
className: classes.rightItem,
|
|
5391
|
-
children: jsx(Box$1, {
|
|
5373
|
+
children: /*#__PURE__*/jsx(Box$1, {
|
|
5392
5374
|
display: "flex",
|
|
5393
5375
|
alignItems: "center",
|
|
5394
5376
|
height: "100%",
|
|
5395
|
-
children: jsx(Typography, {
|
|
5377
|
+
children: /*#__PURE__*/jsx(Typography, {
|
|
5396
5378
|
className: classes.rightItemText,
|
|
5397
5379
|
children: rightItemText
|
|
5398
5380
|
})
|
|
5399
5381
|
})
|
|
5400
5382
|
})
|
|
5401
5383
|
} : {});
|
|
5402
|
-
return jsx(TextField, Object.assign({
|
|
5384
|
+
return /*#__PURE__*/jsx(TextField, Object.assign({
|
|
5403
5385
|
classes: {
|
|
5404
5386
|
root: classes.root
|
|
5405
5387
|
}
|
|
5388
|
+
/**
|
|
5389
|
+
* The variant is always outlined.
|
|
5390
|
+
* the shaded variant is used only in the useStyles because TextField does not support custom variants.
|
|
5391
|
+
*
|
|
5392
|
+
* More: https://github.com/mui/material-ui/issues/37846#issuecomment-1639917252
|
|
5393
|
+
*/
|
|
5406
5394
|
}, props, {
|
|
5407
5395
|
value: (props.type === "number" || props.type === "tel") && (props.value === undefined || props.value === null) ? "" : props.value,
|
|
5408
5396
|
variant: "outlined",
|
|
@@ -5449,10 +5437,10 @@ const useStyles$t = tss.withParams().create(({
|
|
|
5449
5437
|
backgroundColor: getBackgroundColorFromState("disabled", theme)
|
|
5450
5438
|
}
|
|
5451
5439
|
},
|
|
5452
|
-
" & .MuiInputBase-input": Object.assign(
|
|
5440
|
+
" & .MuiInputBase-input": Object.assign({}, typographyVariants.text, {
|
|
5453
5441
|
zIndex: 1,
|
|
5454
5442
|
backgroundColor: "transparent"
|
|
5455
|
-
}
|
|
5443
|
+
}, getInputPaddingStyles(size, theme)),
|
|
5456
5444
|
" & .MuiInputBase-input::placeholder": {
|
|
5457
5445
|
color: theme.palette.text.tertiary,
|
|
5458
5446
|
opacity: 1
|
|
@@ -5582,6 +5570,7 @@ const radioColorMap = {
|
|
|
5582
5570
|
}
|
|
5583
5571
|
};
|
|
5584
5572
|
|
|
5573
|
+
const _excluded$8 = ["radioSize", "hideWhenUnchecked"];
|
|
5585
5574
|
const defaultProps$4 = {
|
|
5586
5575
|
variant: "outlined",
|
|
5587
5576
|
radioSize: "medium",
|
|
@@ -5591,18 +5580,15 @@ const defaultProps$4 = {
|
|
|
5591
5580
|
};
|
|
5592
5581
|
const VentionRadio = inputProps => {
|
|
5593
5582
|
const props = applyDefaultProps(inputProps, defaultProps$4);
|
|
5583
|
+
|
|
5594
5584
|
//removing props that would be unknown to Radio Component
|
|
5595
|
-
const
|
|
5596
|
-
|
|
5597
|
-
hideWhenUnchecked
|
|
5598
|
-
} = props,
|
|
5599
|
-
radioProps = __rest(props, ["radioSize", "hideWhenUnchecked"]);
|
|
5600
|
-
return jsx(Radio, Object.assign({}, radioProps, {
|
|
5585
|
+
const radioProps = _objectWithoutPropertiesLoose(props, _excluded$8);
|
|
5586
|
+
return /*#__PURE__*/jsx(Radio, Object.assign({}, radioProps, {
|
|
5601
5587
|
disableRipple: true,
|
|
5602
|
-
checkedIcon: jsx(VentionRadioIcon, Object.assign({}, props, {
|
|
5588
|
+
checkedIcon: /*#__PURE__*/jsx(VentionRadioIcon, Object.assign({}, props, {
|
|
5603
5589
|
checked: true
|
|
5604
5590
|
})),
|
|
5605
|
-
icon: jsx(VentionRadioIcon, Object.assign({}, props, {
|
|
5591
|
+
icon: /*#__PURE__*/jsx(VentionRadioIcon, Object.assign({}, props, {
|
|
5606
5592
|
checked: false
|
|
5607
5593
|
}))
|
|
5608
5594
|
}));
|
|
@@ -5618,10 +5604,10 @@ const VentionRadioIcon = props => {
|
|
|
5618
5604
|
state: props.state
|
|
5619
5605
|
});
|
|
5620
5606
|
const isErrorState = props.state === "error";
|
|
5621
|
-
return props.hideWhenUnchecked && !props.checked ? jsx("span", {
|
|
5607
|
+
return props.hideWhenUnchecked && !props.checked ? /*#__PURE__*/jsx("span", {
|
|
5622
5608
|
className: classes.hiddenRadio,
|
|
5623
5609
|
"data-testid": "hiddenRadio"
|
|
5624
|
-
}) : jsx("span", {
|
|
5610
|
+
}) : /*#__PURE__*/jsx("span", {
|
|
5625
5611
|
"data-testid": "radioIcon",
|
|
5626
5612
|
className: cx({
|
|
5627
5613
|
[classes.ventionRadioIcon]: !isErrorState,
|
|
@@ -5770,10 +5756,10 @@ const VentionRadioTileControl = props => {
|
|
|
5770
5756
|
} = useStyles$r({
|
|
5771
5757
|
radioLocation: props.radioLocation
|
|
5772
5758
|
});
|
|
5773
|
-
return jsx("div", {
|
|
5759
|
+
return /*#__PURE__*/jsx("div", {
|
|
5774
5760
|
className: classes.controllerContainer,
|
|
5775
5761
|
"data-testid": "RadioTileControl",
|
|
5776
|
-
children: jsx(VentionRadio, {
|
|
5762
|
+
children: /*#__PURE__*/jsx(VentionRadio, {
|
|
5777
5763
|
checked: props.checked,
|
|
5778
5764
|
variant: props.variant,
|
|
5779
5765
|
radioSize: props.radioSize,
|
|
@@ -5808,10 +5794,10 @@ const VentionRadioTileLabel = props => {
|
|
|
5808
5794
|
size: props.size,
|
|
5809
5795
|
labelText: props.labelText
|
|
5810
5796
|
});
|
|
5811
|
-
return jsxs("div", {
|
|
5797
|
+
return /*#__PURE__*/jsxs("div", {
|
|
5812
5798
|
className: classes.labelContainer,
|
|
5813
5799
|
"data-testid": "RadioTileLabel",
|
|
5814
|
-
children: [props.graphic, jsx(Typography, {
|
|
5800
|
+
children: [props.graphic, /*#__PURE__*/jsx(Typography, {
|
|
5815
5801
|
variant: getTypographyVariant$1(props.size),
|
|
5816
5802
|
my: props.size === "xx-large" ? 1 : 0,
|
|
5817
5803
|
children: props.labelText
|
|
@@ -5849,8 +5835,9 @@ const getTypographyVariant$1 = size => {
|
|
|
5849
5835
|
}
|
|
5850
5836
|
};
|
|
5851
5837
|
|
|
5838
|
+
const _excluded$7 = ["labelText", "radioSize", "tileHeight", "tileWidth", "radioLocation"];
|
|
5852
5839
|
const defaultProps$3 = {
|
|
5853
|
-
graphic: jsx("div", {}),
|
|
5840
|
+
graphic: /*#__PURE__*/jsx("div", {}),
|
|
5854
5841
|
variant: "outlined",
|
|
5855
5842
|
radioSize: "medium",
|
|
5856
5843
|
state: "default",
|
|
@@ -5870,25 +5857,19 @@ const VentionRadioTile = radioTileProps => {
|
|
|
5870
5857
|
tileHeight: props.tileHeight,
|
|
5871
5858
|
tileWidth: props.tileWidth
|
|
5872
5859
|
});
|
|
5860
|
+
|
|
5873
5861
|
//removing props that would be unknown to label Component
|
|
5874
|
-
const
|
|
5875
|
-
|
|
5876
|
-
radioSize,
|
|
5877
|
-
tileHeight,
|
|
5878
|
-
tileWidth,
|
|
5879
|
-
radioLocation
|
|
5880
|
-
} = props,
|
|
5881
|
-
formControlLabelProps = __rest(props, ["labelText", "radioSize", "tileHeight", "tileWidth", "radioLocation"]);
|
|
5882
|
-
return jsx(FormControlLabel, Object.assign({}, formControlLabelProps, {
|
|
5862
|
+
const formControlLabelProps = _objectWithoutPropertiesLoose(props, _excluded$7);
|
|
5863
|
+
return /*#__PURE__*/jsx(FormControlLabel, Object.assign({}, formControlLabelProps, {
|
|
5883
5864
|
className: props.className,
|
|
5884
5865
|
classes: classes,
|
|
5885
5866
|
labelPlacement: "bottom",
|
|
5886
|
-
label: jsx(VentionRadioTileLabel, {
|
|
5867
|
+
label: /*#__PURE__*/jsx(VentionRadioTileLabel, {
|
|
5887
5868
|
graphic: props.graphic,
|
|
5888
5869
|
labelText: props.labelText,
|
|
5889
5870
|
size: props.radioSize
|
|
5890
5871
|
}),
|
|
5891
|
-
control: jsx(VentionRadioTileControl, Object.assign({}, props)),
|
|
5872
|
+
control: /*#__PURE__*/jsx(VentionRadioTileControl, Object.assign({}, props)),
|
|
5892
5873
|
"data-testid": "RadioTileFormControlLabel"
|
|
5893
5874
|
}));
|
|
5894
5875
|
};
|
|
@@ -7748,12 +7729,12 @@ const VentionIcon = /*#__PURE__*/memo(props => {
|
|
|
7748
7729
|
});
|
|
7749
7730
|
const isDuotoneIcon = props.type in duotoneIconImports;
|
|
7750
7731
|
const IconSvg = isDuotoneIcon ? duotoneIconImports[props.type] : iconImports[props.type];
|
|
7751
|
-
return jsx("div", {
|
|
7732
|
+
return /*#__PURE__*/jsx("div", {
|
|
7752
7733
|
className: classes.root,
|
|
7753
7734
|
"data-testid": props.dataTestId || `icon-${String(props.type)}-root`,
|
|
7754
|
-
children: jsx(Suspense, {
|
|
7735
|
+
children: /*#__PURE__*/jsx(Suspense, {
|
|
7755
7736
|
fallback: null,
|
|
7756
|
-
children: jsx(IconSvg, {
|
|
7737
|
+
children: /*#__PURE__*/jsx(IconSvg, {
|
|
7757
7738
|
className: isDuotoneIcon ? classes.duotoneIcon : classes.icon,
|
|
7758
7739
|
"data-testid": `icon-${String(props.type)}`
|
|
7759
7740
|
})
|
|
@@ -7775,7 +7756,7 @@ const useStyles$o = tss.withParams().create(({
|
|
|
7775
7756
|
justifyContent: "center"
|
|
7776
7757
|
},
|
|
7777
7758
|
icon: {
|
|
7778
|
-
color: color
|
|
7759
|
+
color: color != null ? color : theme.palette.icon.primary,
|
|
7779
7760
|
transition: "color 0.1s ease-in-out",
|
|
7780
7761
|
height: size,
|
|
7781
7762
|
width: size,
|
|
@@ -7791,6 +7772,7 @@ const useStyles$o = tss.withParams().create(({
|
|
|
7791
7772
|
}
|
|
7792
7773
|
}));
|
|
7793
7774
|
|
|
7775
|
+
const _excluded$6 = ["size", "placeholder", "value", "menuItems", "labelText", "isDisabled", "onChange", "errorText", "isMultiple", "state"];
|
|
7794
7776
|
const getChevronIconSize = size => {
|
|
7795
7777
|
switch (size) {
|
|
7796
7778
|
case "small":
|
|
@@ -7818,25 +7800,25 @@ const VentionSelect = props => {
|
|
|
7818
7800
|
isMultiple,
|
|
7819
7801
|
state = "default"
|
|
7820
7802
|
} = props,
|
|
7821
|
-
other =
|
|
7803
|
+
other = _objectWithoutPropertiesLoose(props, _excluded$6);
|
|
7822
7804
|
const theme = useTheme();
|
|
7823
7805
|
const typographyVariants = typographyNameFromSizeMap[size];
|
|
7824
7806
|
const menuItemsMap = useMemo(() => new Map(menuItems.map(item => [item.value, item])), [menuItems]);
|
|
7825
|
-
return jsx(FormControl, {
|
|
7807
|
+
return /*#__PURE__*/jsx(FormControl, {
|
|
7826
7808
|
fullWidth: true,
|
|
7827
7809
|
error: Boolean(errorText),
|
|
7828
|
-
children: jsxs(Box$1, {
|
|
7810
|
+
children: /*#__PURE__*/jsxs(Box$1, {
|
|
7829
7811
|
display: "flex",
|
|
7830
7812
|
flexDirection: "column",
|
|
7831
7813
|
gap: theme.spacing(1),
|
|
7832
|
-
children: [labelText && jsx(Typography, {
|
|
7814
|
+
children: [labelText && /*#__PURE__*/jsx(Typography, {
|
|
7833
7815
|
variant: typographyVariants.label,
|
|
7834
7816
|
component: "label",
|
|
7835
7817
|
children: labelText
|
|
7836
|
-
}), jsx(Select, Object.assign({
|
|
7837
|
-
IconComponent: () => jsx("div", {
|
|
7818
|
+
}), /*#__PURE__*/jsx(Select, Object.assign({
|
|
7819
|
+
IconComponent: () => /*#__PURE__*/jsx("div", {
|
|
7838
7820
|
className: classes.chevronIconContainer,
|
|
7839
|
-
children: jsx(VentionIcon, {
|
|
7821
|
+
children: /*#__PURE__*/jsx(VentionIcon, {
|
|
7840
7822
|
type: "chevron-down",
|
|
7841
7823
|
size: getChevronIconSize(size),
|
|
7842
7824
|
color: theme.palette.icon.primary
|
|
@@ -7845,7 +7827,7 @@ const VentionSelect = props => {
|
|
|
7845
7827
|
disabled: isDisabled,
|
|
7846
7828
|
displayEmpty: true,
|
|
7847
7829
|
onChange: onChange,
|
|
7848
|
-
value: value
|
|
7830
|
+
value: value != null ? value : "",
|
|
7849
7831
|
MenuProps: {
|
|
7850
7832
|
classes: {
|
|
7851
7833
|
paper: classes.dropdownStyle
|
|
@@ -7854,9 +7836,9 @@ const VentionSelect = props => {
|
|
|
7854
7836
|
className: classes.selectContainer,
|
|
7855
7837
|
multiple: isMultiple,
|
|
7856
7838
|
renderValue: selected => {
|
|
7857
|
-
var
|
|
7839
|
+
var _ref, _menuItemSelected$dis;
|
|
7858
7840
|
if (selected === undefined || selected === null || selected === "" || Array.isArray(selected) && selected.length === 0) {
|
|
7859
|
-
return jsx(Typography, {
|
|
7841
|
+
return /*#__PURE__*/jsx(Typography, {
|
|
7860
7842
|
variant: typographyVariants.text,
|
|
7861
7843
|
className: classes.placeholder,
|
|
7862
7844
|
children: placeholder
|
|
@@ -7865,28 +7847,28 @@ const VentionSelect = props => {
|
|
|
7865
7847
|
if (isMultiple) {
|
|
7866
7848
|
if (!Array.isArray(selected)) throw new Error("Selected value must be an array when isMultiple is true");
|
|
7867
7849
|
const isOnlyText = selected.every(value => {
|
|
7868
|
-
var
|
|
7869
|
-
return ((
|
|
7850
|
+
var _menuItemsMap$get;
|
|
7851
|
+
return ((_menuItemsMap$get = menuItemsMap.get(value)) == null ? void 0 : _menuItemsMap$get.displayNode) === undefined;
|
|
7870
7852
|
});
|
|
7871
7853
|
if (isOnlyText) {
|
|
7872
7854
|
const _inputValue = selected.map(value => {
|
|
7873
|
-
var
|
|
7855
|
+
var _menuItem$displayText;
|
|
7874
7856
|
const menuItem = menuItemsMap.get(value);
|
|
7875
|
-
return (
|
|
7857
|
+
return (_menuItem$displayText = menuItem == null ? void 0 : menuItem.displayText) != null ? _menuItem$displayText : value;
|
|
7876
7858
|
}).join(", ");
|
|
7877
|
-
return jsx("div", {
|
|
7859
|
+
return /*#__PURE__*/jsx("div", {
|
|
7878
7860
|
className: classes.inputValue,
|
|
7879
7861
|
children: _inputValue
|
|
7880
7862
|
});
|
|
7881
7863
|
}
|
|
7882
|
-
return jsx(Box$1, {
|
|
7864
|
+
return /*#__PURE__*/jsx(Box$1, {
|
|
7883
7865
|
display: "flex",
|
|
7884
7866
|
flexWrap: "nowrap",
|
|
7885
7867
|
gap: theme.spacing(2),
|
|
7886
7868
|
className: classes.inputValue,
|
|
7887
7869
|
children: selected.map(value => {
|
|
7888
7870
|
const menuItem = menuItemsMap.get(value);
|
|
7889
|
-
return jsx(Box$1, {
|
|
7871
|
+
return /*#__PURE__*/jsx(Box$1, {
|
|
7890
7872
|
children: menuItem && "displayNode" in menuItem ? menuItem.displayNode : menuItem.displayText
|
|
7891
7873
|
}, toReactKey(value));
|
|
7892
7874
|
})
|
|
@@ -7894,30 +7876,30 @@ const VentionSelect = props => {
|
|
|
7894
7876
|
}
|
|
7895
7877
|
if (Array.isArray(selected)) throw new Error("Selected value must be a string or number when isMultiple is false");
|
|
7896
7878
|
const menuItemSelected = menuItemsMap.get(selected);
|
|
7897
|
-
const inputValue = (
|
|
7898
|
-
return jsx("div", {
|
|
7879
|
+
const inputValue = (_ref = (_menuItemSelected$dis = menuItemSelected == null ? void 0 : menuItemSelected.displayText) != null ? _menuItemSelected$dis : menuItemSelected == null ? void 0 : menuItemSelected.displayNode) != null ? _ref : selected;
|
|
7880
|
+
return /*#__PURE__*/jsx("div", {
|
|
7899
7881
|
className: classes.inputValue,
|
|
7900
7882
|
children: inputValue
|
|
7901
7883
|
});
|
|
7902
7884
|
}
|
|
7903
7885
|
}, other, {
|
|
7904
|
-
children: menuItems.map(item => jsxs(MenuItem, {
|
|
7886
|
+
children: menuItems.map(item => /*#__PURE__*/jsxs(MenuItem, {
|
|
7905
7887
|
value: item.value,
|
|
7906
7888
|
className: classes.menuItem,
|
|
7907
7889
|
disableRipple: true,
|
|
7908
|
-
children: ["displayText" in item && jsx(Typography, {
|
|
7890
|
+
children: ["displayText" in item && /*#__PURE__*/jsx(Typography, {
|
|
7909
7891
|
variant: typographyVariants.text,
|
|
7910
7892
|
children: item.displayText
|
|
7911
7893
|
}), "displayNode" in item && item.displayNode]
|
|
7912
7894
|
}, toReactKey(item.value)))
|
|
7913
|
-
})), errorText && jsxs(FormHelperText, {
|
|
7895
|
+
})), errorText && /*#__PURE__*/jsxs(FormHelperText, {
|
|
7914
7896
|
error: Boolean(errorText),
|
|
7915
7897
|
classes: {
|
|
7916
7898
|
root: classes.formHelperText
|
|
7917
7899
|
},
|
|
7918
|
-
children: [jsx(IconAlertTriangleFilled, {
|
|
7900
|
+
children: [/*#__PURE__*/jsx(IconAlertTriangleFilled, {
|
|
7919
7901
|
size: getIconSize(props.size)
|
|
7920
|
-
}), jsx(Typography, {
|
|
7902
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
7921
7903
|
variant: typographyVariants.helperText,
|
|
7922
7904
|
children: errorText
|
|
7923
7905
|
})]
|
|
@@ -7947,7 +7929,7 @@ const useStyles$n = tss.withParams().create(({
|
|
|
7947
7929
|
height,
|
|
7948
7930
|
borderRadius: theme.shape.borderRadius,
|
|
7949
7931
|
textAlign: "center",
|
|
7950
|
-
"& .MuiSelect-select": Object.assign(
|
|
7932
|
+
"& .MuiSelect-select": Object.assign({}, theme.typography[typographyVariant.text], {
|
|
7951
7933
|
display: "flex",
|
|
7952
7934
|
alignItems: "center",
|
|
7953
7935
|
overflow: "hidden"
|
|
@@ -8077,11 +8059,12 @@ const getIconSize = size => {
|
|
|
8077
8059
|
return 14;
|
|
8078
8060
|
}
|
|
8079
8061
|
};
|
|
8062
|
+
|
|
8080
8063
|
/**
|
|
8081
8064
|
* `undefined` is not a valid React key, so we'll format it to the string `"undefined"`
|
|
8082
8065
|
*/
|
|
8083
8066
|
function toReactKey(key) {
|
|
8084
|
-
return key
|
|
8067
|
+
return key != null ? key : "undefined";
|
|
8085
8068
|
}
|
|
8086
8069
|
|
|
8087
8070
|
const VentionStepper = props => {
|
|
@@ -8095,7 +8078,7 @@ const VentionStepper = props => {
|
|
|
8095
8078
|
const {
|
|
8096
8079
|
classes
|
|
8097
8080
|
} = useStyles$m();
|
|
8098
|
-
return jsxs(ButtonGroup, {
|
|
8081
|
+
return /*#__PURE__*/jsxs(ButtonGroup, {
|
|
8099
8082
|
variant: "contained",
|
|
8100
8083
|
"aria-label": "Basic button group",
|
|
8101
8084
|
className: classes.root,
|
|
@@ -8108,35 +8091,35 @@ const VentionStepper = props => {
|
|
|
8108
8091
|
borderLeft: "none !important"
|
|
8109
8092
|
}
|
|
8110
8093
|
},
|
|
8111
|
-
children: [jsx(Button, Object.assign({
|
|
8094
|
+
children: [/*#__PURE__*/jsx(Button, Object.assign({
|
|
8112
8095
|
"data-testid": "minus-button",
|
|
8113
8096
|
className: classes.buttonStep
|
|
8114
8097
|
}, minusButtonProps, {
|
|
8115
|
-
children: jsx(IconMinus, {
|
|
8098
|
+
children: /*#__PURE__*/jsx(IconMinus, {
|
|
8116
8099
|
className: classes.signSVG
|
|
8117
8100
|
})
|
|
8118
|
-
})), jsxs(Paper, {
|
|
8101
|
+
})), /*#__PURE__*/jsxs(Paper, {
|
|
8119
8102
|
"data-testid": "input-paper",
|
|
8120
8103
|
elevation: 0,
|
|
8121
8104
|
className: classes.inputPaper,
|
|
8122
|
-
children: [leadingText && jsx(Typography, {
|
|
8105
|
+
children: [leadingText && /*#__PURE__*/jsx(Typography, {
|
|
8123
8106
|
variant: "heading18SemiBold",
|
|
8124
8107
|
className: classes.text,
|
|
8125
8108
|
children: leadingText
|
|
8126
|
-
}), jsx(Typography, {
|
|
8109
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
8127
8110
|
variant: "heading18SemiBold",
|
|
8128
8111
|
className: classes.value,
|
|
8129
8112
|
children: value
|
|
8130
|
-
}), trailingText && jsx(Typography, {
|
|
8113
|
+
}), trailingText && /*#__PURE__*/jsx(Typography, {
|
|
8131
8114
|
variant: "heading18SemiBold",
|
|
8132
8115
|
className: classes.text,
|
|
8133
8116
|
children: trailingText
|
|
8134
8117
|
})]
|
|
8135
|
-
}), jsx(Button, Object.assign({
|
|
8118
|
+
}), /*#__PURE__*/jsx(Button, Object.assign({
|
|
8136
8119
|
"data-testid": "plus-button",
|
|
8137
8120
|
className: classes.buttonStep
|
|
8138
8121
|
}, plusButtonProps, {
|
|
8139
|
-
children: jsx(IconPlus, {
|
|
8122
|
+
children: /*#__PURE__*/jsx(IconPlus, {
|
|
8140
8123
|
className: classes.signSVG
|
|
8141
8124
|
})
|
|
8142
8125
|
}))]
|
|
@@ -8226,13 +8209,13 @@ const VentionTabs = ({
|
|
|
8226
8209
|
cx,
|
|
8227
8210
|
classes
|
|
8228
8211
|
} = useStyles$l();
|
|
8229
|
-
return jsx(Box$1, {
|
|
8212
|
+
return /*#__PURE__*/jsx(Box$1, {
|
|
8230
8213
|
className: classes.root,
|
|
8231
|
-
children: tabOptions.map((buttonLabel, index) => jsx(Button, {
|
|
8214
|
+
children: tabOptions.map((buttonLabel, index) => /*#__PURE__*/jsx(Button, {
|
|
8232
8215
|
className: index === value ? cx(classes.button, classes.selectedButton) : classes.button,
|
|
8233
8216
|
onClick: event => onChange(event, index),
|
|
8234
8217
|
disableRipple: true,
|
|
8235
|
-
children: jsx(Typography, {
|
|
8218
|
+
children: /*#__PURE__*/jsx(Typography, {
|
|
8236
8219
|
variant: "heading18SemiBold",
|
|
8237
8220
|
children: buttonLabel
|
|
8238
8221
|
})
|
|
@@ -8275,24 +8258,24 @@ const VentionDraggable = props => {
|
|
|
8275
8258
|
const {
|
|
8276
8259
|
classes
|
|
8277
8260
|
} = useStyles$k(props);
|
|
8278
|
-
return jsx(Draggable, {
|
|
8261
|
+
return /*#__PURE__*/jsx(Draggable, {
|
|
8279
8262
|
handle: "#draggable-area",
|
|
8280
8263
|
positionOffset: props.defaultPosition,
|
|
8281
|
-
children: jsx(Box$1, {
|
|
8264
|
+
children: /*#__PURE__*/jsx(Box$1, {
|
|
8282
8265
|
className: classes.container,
|
|
8283
8266
|
id: props.tabLocation == null ? "draggable-area" : null,
|
|
8284
8267
|
"data-testid": testIds.body,
|
|
8285
|
-
children: jsxs(Stack, {
|
|
8268
|
+
children: /*#__PURE__*/jsxs(Stack, {
|
|
8286
8269
|
className: classes.layoutBox,
|
|
8287
8270
|
"data-testid": testIds.layoutContainer,
|
|
8288
|
-
children: [props.tabLocation != null && jsx(Box$1, {
|
|
8271
|
+
children: [props.tabLocation != null && /*#__PURE__*/jsx(Box$1, {
|
|
8289
8272
|
id: "draggable-area",
|
|
8290
8273
|
className: classes.handleContainer,
|
|
8291
8274
|
"data-testid": testIds.handle,
|
|
8292
|
-
children: jsx(Box$1, {
|
|
8275
|
+
children: /*#__PURE__*/jsx(Box$1, {
|
|
8293
8276
|
className: classes.handle
|
|
8294
8277
|
})
|
|
8295
|
-
}), jsx(Box$1, {
|
|
8278
|
+
}), /*#__PURE__*/jsx(Box$1, {
|
|
8296
8279
|
flexGrow: 1,
|
|
8297
8280
|
children: props.children
|
|
8298
8281
|
})]
|
|
@@ -8317,8 +8300,8 @@ const useStyles$k = tss.withParams().create(({
|
|
|
8317
8300
|
border: `1px solid ${theme.palette.border.main}`,
|
|
8318
8301
|
backgroundColor: theme.palette.background.default,
|
|
8319
8302
|
padding: containerPadding,
|
|
8320
|
-
width: width
|
|
8321
|
-
height: height
|
|
8303
|
+
width: width != null ? width : "fit-content",
|
|
8304
|
+
height: height != null ? height : "fit-content",
|
|
8322
8305
|
boxShadow: "0px 4px 6px -1px rgba(2, 6, 23, 0.08)"
|
|
8323
8306
|
},
|
|
8324
8307
|
layoutBox: {
|
|
@@ -8387,21 +8370,22 @@ const testIds = {
|
|
|
8387
8370
|
layoutContainer: "draggable-layout-container"
|
|
8388
8371
|
};
|
|
8389
8372
|
|
|
8373
|
+
const _excluded$5 = ["value", "onChange", "largeThumb"];
|
|
8390
8374
|
const VentionSlider = props => {
|
|
8391
8375
|
const {
|
|
8392
8376
|
value,
|
|
8393
8377
|
onChange,
|
|
8394
8378
|
largeThumb
|
|
8395
8379
|
} = props,
|
|
8396
|
-
other =
|
|
8380
|
+
other = _objectWithoutPropertiesLoose(props, _excluded$5);
|
|
8397
8381
|
const {
|
|
8398
8382
|
classes
|
|
8399
8383
|
} = useStyles$j({
|
|
8400
8384
|
largeThumb
|
|
8401
8385
|
});
|
|
8402
|
-
return jsx("div", {
|
|
8386
|
+
return /*#__PURE__*/jsx("div", {
|
|
8403
8387
|
className: classes.root,
|
|
8404
|
-
children: jsx(Slider, Object.assign({
|
|
8388
|
+
children: /*#__PURE__*/jsx(Slider, Object.assign({
|
|
8405
8389
|
"data-testid": "slider",
|
|
8406
8390
|
value: value,
|
|
8407
8391
|
onChange: onChange
|
|
@@ -8489,7 +8473,7 @@ $$8({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
|
|
|
8489
8473
|
addToUnscopables('includes');
|
|
8490
8474
|
|
|
8491
8475
|
const VentionSwitch = props => {
|
|
8492
|
-
var
|
|
8476
|
+
var _props$variant, _props$disabled;
|
|
8493
8477
|
const {
|
|
8494
8478
|
checked,
|
|
8495
8479
|
size,
|
|
@@ -8502,8 +8486,8 @@ const VentionSwitch = props => {
|
|
|
8502
8486
|
} = useStyles$i({
|
|
8503
8487
|
checked,
|
|
8504
8488
|
size,
|
|
8505
|
-
variant: (
|
|
8506
|
-
disabled: (
|
|
8489
|
+
variant: (_props$variant = props.variant) != null ? _props$variant : "default",
|
|
8490
|
+
disabled: (_props$disabled = props.disabled) != null ? _props$disabled : false
|
|
8507
8491
|
});
|
|
8508
8492
|
const handleOnchange = () => {
|
|
8509
8493
|
if (disabled) return;
|
|
@@ -8511,7 +8495,7 @@ const VentionSwitch = props => {
|
|
|
8511
8495
|
onChange(checked === "off" ? "on" : "off");
|
|
8512
8496
|
}
|
|
8513
8497
|
};
|
|
8514
|
-
return jsxs("div", {
|
|
8498
|
+
return /*#__PURE__*/jsxs("div", {
|
|
8515
8499
|
role: "switch",
|
|
8516
8500
|
"aria-busy": checked === "loading" ? true : undefined,
|
|
8517
8501
|
"aria-checked": getAriaChecked(checked),
|
|
@@ -8519,14 +8503,14 @@ const VentionSwitch = props => {
|
|
|
8519
8503
|
className: classes.root,
|
|
8520
8504
|
"data-testid": "vention-switch-root",
|
|
8521
8505
|
onClick: handleOnchange,
|
|
8522
|
-
children: [checked === "mixed" ? jsx(IconMinus, {
|
|
8506
|
+
children: [checked === "mixed" ? /*#__PURE__*/jsx(IconMinus, {
|
|
8523
8507
|
"data-testid": "vention-switch-minus",
|
|
8524
8508
|
className: classes.iconMinus
|
|
8525
|
-
}) : null, checked === "loading" ? jsx(IconLoader2, {
|
|
8509
|
+
}) : null, checked === "loading" ? /*#__PURE__*/jsx(IconLoader2, {
|
|
8526
8510
|
"data-testid": "vention-switch-loading",
|
|
8527
8511
|
color: theme.palette.icon.tertiary,
|
|
8528
8512
|
className: classes.loader
|
|
8529
|
-
}) : null, (checked === "on" || checked === "off") && jsx("div", {
|
|
8513
|
+
}) : null, (checked === "on" || checked === "off") && /*#__PURE__*/jsx("div", {
|
|
8530
8514
|
className: classes.thumb,
|
|
8531
8515
|
"data-testid": "vention-switch-thumb"
|
|
8532
8516
|
})]
|
|
@@ -8540,7 +8524,7 @@ const useStyles$i = tss.withParams().create(({
|
|
|
8540
8524
|
disabled
|
|
8541
8525
|
}) => {
|
|
8542
8526
|
return {
|
|
8543
|
-
root: Object.assign(
|
|
8527
|
+
root: Object.assign({
|
|
8544
8528
|
backgroundColor: getBackgroundColor$1(theme, checked, variant),
|
|
8545
8529
|
display: "flex",
|
|
8546
8530
|
borderRadius: "999px",
|
|
@@ -8548,7 +8532,7 @@ const useStyles$i = tss.withParams().create(({
|
|
|
8548
8532
|
justifyContent: getRootJustifyContent(checked),
|
|
8549
8533
|
border: ["on", "off"].includes(checked) ? undefined : `${getThumbMarginSize(theme, size)} solid ${getRootBorderColor(theme, checked)}`,
|
|
8550
8534
|
boxSizing: "border-box"
|
|
8551
|
-
}, getTrackSize(theme, size)
|
|
8535
|
+
}, getTrackSize(theme, size), {
|
|
8552
8536
|
opacity: disabled ? 0.2 : 1
|
|
8553
8537
|
}),
|
|
8554
8538
|
iconMinus: {
|
|
@@ -8713,6 +8697,7 @@ const VentionPopover = props => {
|
|
|
8713
8697
|
top: 0,
|
|
8714
8698
|
left: 0
|
|
8715
8699
|
});
|
|
8700
|
+
|
|
8716
8701
|
/**
|
|
8717
8702
|
* Depending on the arrow position, calculate the position of the popover
|
|
8718
8703
|
* @param top The top position of the popover
|
|
@@ -8746,6 +8731,7 @@ const VentionPopover = props => {
|
|
|
8746
8731
|
};
|
|
8747
8732
|
}
|
|
8748
8733
|
}, [props.arrowPosition]);
|
|
8734
|
+
|
|
8749
8735
|
/**
|
|
8750
8736
|
* Determine the position of the popover to be center aligned with the target
|
|
8751
8737
|
* @param top Position of the target from the top
|
|
@@ -8773,7 +8759,7 @@ const VentionPopover = props => {
|
|
|
8773
8759
|
setPosition(calculatePositionFromArrow(centerPosition.top, centerPosition.left, popoverRef.current));
|
|
8774
8760
|
}
|
|
8775
8761
|
}, [pos2D, calculatePositionFromArrow]);
|
|
8776
|
-
return jsxs(Box$1, {
|
|
8762
|
+
return /*#__PURE__*/jsxs(Box$1, {
|
|
8777
8763
|
"data-testid": "popover",
|
|
8778
8764
|
ref: popoverRef,
|
|
8779
8765
|
className: classes.box,
|
|
@@ -8782,45 +8768,46 @@ const VentionPopover = props => {
|
|
|
8782
8768
|
left: position.left,
|
|
8783
8769
|
visibility: visible ? "visible" : "hidden"
|
|
8784
8770
|
},
|
|
8785
|
-
children: [jsxs(Card, {
|
|
8771
|
+
children: [/*#__PURE__*/jsxs(Card, {
|
|
8786
8772
|
className: classes.card,
|
|
8787
|
-
children: [image && jsx(CardMedia, {
|
|
8773
|
+
children: [image && /*#__PURE__*/jsx(CardMedia, {
|
|
8788
8774
|
className: classes.media,
|
|
8789
8775
|
image: image,
|
|
8790
8776
|
title: props.title
|
|
8791
|
-
}), jsxs(CardContent, {
|
|
8777
|
+
}), /*#__PURE__*/jsxs(CardContent, {
|
|
8792
8778
|
className: classes.cardContent,
|
|
8793
|
-
children: [jsxs(Box$1, {
|
|
8779
|
+
children: [/*#__PURE__*/jsxs(Box$1, {
|
|
8794
8780
|
display: "grid",
|
|
8795
8781
|
gap: 2,
|
|
8796
8782
|
gridTemplateColumns: "auto 1fr",
|
|
8797
|
-
children: [titleIcon && jsx("img", {
|
|
8783
|
+
children: [titleIcon && /*#__PURE__*/jsx("img", {
|
|
8798
8784
|
src: titleIcon,
|
|
8799
8785
|
alt: "icon"
|
|
8800
|
-
}), title && jsx(Typography, {
|
|
8786
|
+
}), title && /*#__PURE__*/jsx(Typography, {
|
|
8801
8787
|
variant: "heading16SemiBold",
|
|
8802
8788
|
component: "div",
|
|
8803
8789
|
children: title
|
|
8804
8790
|
})]
|
|
8805
|
-
}), description && jsx(Typography, {
|
|
8791
|
+
}), description && /*#__PURE__*/jsx(Typography, {
|
|
8806
8792
|
variant: "uiText14Regular",
|
|
8807
8793
|
className: classes.description,
|
|
8808
8794
|
children: description
|
|
8809
|
-
}), props.buttons && jsx(Stack, {
|
|
8795
|
+
}), props.buttons && /*#__PURE__*/jsx(Stack, {
|
|
8810
8796
|
direction: "row",
|
|
8811
8797
|
justifyContent: "flex-end",
|
|
8812
8798
|
spacing: 2,
|
|
8813
|
-
children: props.buttons.map((buttonProps, index) => jsx(VentionButton, Object.assign({}, buttonProps, {
|
|
8799
|
+
children: props.buttons.map((buttonProps, index) => /*#__PURE__*/jsx(VentionButton, Object.assign({}, buttonProps, {
|
|
8814
8800
|
className: classes.button
|
|
8815
8801
|
}), `popover_button_${index}`))
|
|
8816
8802
|
})]
|
|
8817
8803
|
})]
|
|
8818
|
-
}), jsx("div", {
|
|
8804
|
+
}), /*#__PURE__*/jsx("div", {
|
|
8819
8805
|
"data-testid": "popoverArrow",
|
|
8820
8806
|
className: `${classes.popoverArrow} ${props.arrowPosition}`
|
|
8821
8807
|
})]
|
|
8822
8808
|
});
|
|
8823
8809
|
};
|
|
8810
|
+
|
|
8824
8811
|
/**
|
|
8825
8812
|
* Get the styles for the arrow of the popover depending on the position provided
|
|
8826
8813
|
* @param arrowPos Position of the arrow
|
|
@@ -8860,7 +8847,7 @@ const getArrowStyles = arrowPos => {
|
|
|
8860
8847
|
}
|
|
8861
8848
|
}[arrowPos];
|
|
8862
8849
|
};
|
|
8863
|
-
return Object.assign(
|
|
8850
|
+
return Object.assign({}, getMainPosition(), {
|
|
8864
8851
|
borderWidth: getBorderWidth(),
|
|
8865
8852
|
borderColor: getBorderColor()
|
|
8866
8853
|
});
|
|
@@ -9056,11 +9043,11 @@ const VentionMenuChildItem = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9056
9043
|
size,
|
|
9057
9044
|
focused
|
|
9058
9045
|
});
|
|
9059
|
-
const shouldCloseMenuOnClick = closeMenuOnClick
|
|
9046
|
+
const shouldCloseMenuOnClick = closeMenuOnClick != null ? closeMenuOnClick : menuCloseMenuOnClick;
|
|
9060
9047
|
const variant = getTextVariantGivenSize(size);
|
|
9061
9048
|
const menuItemRef = useRef(null);
|
|
9062
9049
|
useImperativeHandle(ref, () => menuItemRef.current);
|
|
9063
|
-
return jsxs(MenuItem, {
|
|
9050
|
+
return /*#__PURE__*/jsxs(MenuItem, {
|
|
9064
9051
|
ref: menuItemRef,
|
|
9065
9052
|
"data-testid": dataTestId,
|
|
9066
9053
|
className: classes.root,
|
|
@@ -9068,26 +9055,26 @@ const VentionMenuChildItem = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9068
9055
|
disabled: disabled,
|
|
9069
9056
|
id: customID,
|
|
9070
9057
|
onClick: event => {
|
|
9071
|
-
onClick
|
|
9058
|
+
onClick == null || onClick(event);
|
|
9072
9059
|
if (shouldCloseMenuOnClick) {
|
|
9073
9060
|
closeMenu();
|
|
9074
9061
|
}
|
|
9075
9062
|
},
|
|
9076
|
-
children: [leftElement && jsx(ListItemIcon, {
|
|
9063
|
+
children: [leftElement && /*#__PURE__*/jsx(ListItemIcon, {
|
|
9077
9064
|
className: classes.icon,
|
|
9078
9065
|
children: leftElement
|
|
9079
|
-
}), jsx(ListItemText, {
|
|
9080
|
-
children: jsx(Typography, {
|
|
9066
|
+
}), /*#__PURE__*/jsx(ListItemText, {
|
|
9067
|
+
children: /*#__PURE__*/jsx(Typography, {
|
|
9081
9068
|
className: classes.clampedText,
|
|
9082
9069
|
variant: variant,
|
|
9083
9070
|
noWrap: true,
|
|
9084
9071
|
justifyContent: "start",
|
|
9085
|
-
children: labelText
|
|
9072
|
+
children: labelText != null ? labelText : children
|
|
9086
9073
|
})
|
|
9087
|
-
}), jsx(Typography, {
|
|
9074
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
9088
9075
|
variant: variant,
|
|
9089
9076
|
children: shortcutKey && shortcutKey
|
|
9090
|
-
}), hasSubMenu && jsx(VentionIcon, {
|
|
9077
|
+
}), hasSubMenu && /*#__PURE__*/jsx(VentionIcon, {
|
|
9091
9078
|
type: "chevron-right",
|
|
9092
9079
|
size: getIconSizeGivenMenuSize(size)
|
|
9093
9080
|
})]
|
|
@@ -9137,16 +9124,17 @@ const useStyles$g = tss.withParams().create(({
|
|
|
9137
9124
|
};
|
|
9138
9125
|
});
|
|
9139
9126
|
|
|
9127
|
+
const _excluded$4 = ["subMenuItems"];
|
|
9140
9128
|
/**
|
|
9141
9129
|
* This Component will render a menu item with its sub items as a nested VentionMenuList that is shown on hover.
|
|
9142
9130
|
*
|
|
9143
9131
|
* Any VentionMenuItem that has its `subMenuItems` prop defined will render this component instead of a `VentionMenuChildItem` directly.
|
|
9144
9132
|
*/
|
|
9145
|
-
const VentionMenuParentItem =
|
|
9146
|
-
|
|
9133
|
+
const VentionMenuParentItem = _ref => {
|
|
9134
|
+
let {
|
|
9147
9135
|
subMenuItems
|
|
9148
|
-
} =
|
|
9149
|
-
props =
|
|
9136
|
+
} = _ref,
|
|
9137
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$4);
|
|
9150
9138
|
const menuItemRef = useRef(null);
|
|
9151
9139
|
const {
|
|
9152
9140
|
size
|
|
@@ -9165,21 +9153,19 @@ const VentionMenuParentItem = _a => {
|
|
|
9165
9153
|
const handleMouseLeave = () => {
|
|
9166
9154
|
setOpen(false);
|
|
9167
9155
|
};
|
|
9168
|
-
return jsxs("div", {
|
|
9156
|
+
return /*#__PURE__*/jsxs("div", {
|
|
9169
9157
|
onMouseEnter: handleMouseEnter,
|
|
9170
9158
|
onMouseLeave: handleMouseLeave,
|
|
9171
|
-
children: [jsx(VentionMenuChildItem, Object.assign({
|
|
9159
|
+
children: [/*#__PURE__*/jsx(VentionMenuChildItem, Object.assign({
|
|
9172
9160
|
ref: menuItemRef,
|
|
9173
|
-
closeMenuOnClick: false
|
|
9161
|
+
closeMenuOnClick: false // defaults to false for a parent item, but can be overridden by the props
|
|
9174
9162
|
}, props, {
|
|
9175
9163
|
hasSubMenu: true,
|
|
9176
9164
|
focused: open
|
|
9177
|
-
})), jsx(Popover
|
|
9165
|
+
})), /*#__PURE__*/jsx(Popover
|
|
9178
9166
|
// Set pointer events to 'none' to prevent the invisible Popover div
|
|
9179
9167
|
// from capturing events for clicks and hovers
|
|
9180
9168
|
, {
|
|
9181
|
-
// Set pointer events to 'none' to prevent the invisible Popover div
|
|
9182
|
-
// from capturing events for clicks and hovers
|
|
9183
9169
|
sx: {
|
|
9184
9170
|
pointerEvents: "none"
|
|
9185
9171
|
},
|
|
@@ -9203,10 +9189,10 @@ const VentionMenuParentItem = _a => {
|
|
|
9203
9189
|
disableAutoFocus: true,
|
|
9204
9190
|
disableScrollLock: true,
|
|
9205
9191
|
disableRestoreFocus: true,
|
|
9206
|
-
children: jsx(VentionMenuList, {
|
|
9192
|
+
children: /*#__PURE__*/jsx(VentionMenuList, {
|
|
9207
9193
|
"data-testid": "menuItemSubMenu",
|
|
9208
9194
|
disableBoxShadow: true,
|
|
9209
|
-
children: jsx("div", {
|
|
9195
|
+
children: /*#__PURE__*/jsx("div", {
|
|
9210
9196
|
style: {
|
|
9211
9197
|
pointerEvents: "auto"
|
|
9212
9198
|
},
|
|
@@ -9230,12 +9216,13 @@ const useStyles$f = tss.withParams().create(({
|
|
|
9230
9216
|
};
|
|
9231
9217
|
});
|
|
9232
9218
|
|
|
9219
|
+
const _excluded$3 = ["subMenuItems"];
|
|
9233
9220
|
const VentionMenuItem = props => {
|
|
9234
9221
|
const {
|
|
9235
9222
|
subMenuItems
|
|
9236
9223
|
} = props,
|
|
9237
|
-
childItemProps =
|
|
9238
|
-
return subMenuItems !== undefined ? jsx(VentionMenuParentItem, Object.assign({}, props)) : jsx(VentionMenuChildItem, Object.assign({}, childItemProps));
|
|
9224
|
+
childItemProps = _objectWithoutPropertiesLoose(props, _excluded$3);
|
|
9225
|
+
return subMenuItems !== undefined ? /*#__PURE__*/jsx(VentionMenuParentItem, Object.assign({}, props)) : /*#__PURE__*/jsx(VentionMenuChildItem, Object.assign({}, childItemProps));
|
|
9239
9226
|
};
|
|
9240
9227
|
|
|
9241
9228
|
const VentionMenuList = ({
|
|
@@ -9244,7 +9231,7 @@ const VentionMenuList = ({
|
|
|
9244
9231
|
children,
|
|
9245
9232
|
disableBoxShadow: _disableBoxShadow = false
|
|
9246
9233
|
}) => {
|
|
9247
|
-
var
|
|
9234
|
+
var _menuOptionsInfo$map;
|
|
9248
9235
|
const {
|
|
9249
9236
|
size,
|
|
9250
9237
|
menuWidth
|
|
@@ -9257,12 +9244,12 @@ const VentionMenuList = ({
|
|
|
9257
9244
|
disableBoxShadow: _disableBoxShadow
|
|
9258
9245
|
});
|
|
9259
9246
|
const renderMenuItem = (ventionMenuItemProps, index) => {
|
|
9260
|
-
return jsx(VentionMenuItem, Object.assign({}, ventionMenuItemProps), index);
|
|
9247
|
+
return /*#__PURE__*/jsx(VentionMenuItem, Object.assign({}, ventionMenuItemProps), index);
|
|
9261
9248
|
};
|
|
9262
|
-
return jsx(MenuList, {
|
|
9249
|
+
return /*#__PURE__*/jsx(MenuList, {
|
|
9263
9250
|
"data-testid": dataTestId,
|
|
9264
9251
|
className: classes.root,
|
|
9265
|
-
children: (
|
|
9252
|
+
children: (_menuOptionsInfo$map = menuOptionsInfo == null ? void 0 : menuOptionsInfo.map(renderMenuItem)) != null ? _menuOptionsInfo$map : children
|
|
9266
9253
|
});
|
|
9267
9254
|
};
|
|
9268
9255
|
const useStyles$e = tss.withParams().create(({
|
|
@@ -9301,9 +9288,9 @@ const VentionMenuHeader = props => {
|
|
|
9301
9288
|
} = useStyles$d({
|
|
9302
9289
|
size
|
|
9303
9290
|
});
|
|
9304
|
-
return jsx("div", {
|
|
9291
|
+
return /*#__PURE__*/jsx("div", {
|
|
9305
9292
|
className: classes.root,
|
|
9306
|
-
children: jsx(VentionMenuChildItem, {
|
|
9293
|
+
children: /*#__PURE__*/jsx(VentionMenuChildItem, {
|
|
9307
9294
|
disabled: true,
|
|
9308
9295
|
labelText: labelText
|
|
9309
9296
|
})
|
|
@@ -9328,9 +9315,9 @@ const VentionMenuDivider = ({
|
|
|
9328
9315
|
} = useStyles$c({
|
|
9329
9316
|
size
|
|
9330
9317
|
});
|
|
9331
|
-
return jsx("div", {
|
|
9318
|
+
return /*#__PURE__*/jsx("div", {
|
|
9332
9319
|
className: classes.root,
|
|
9333
|
-
children: jsx(MenuItem, {
|
|
9320
|
+
children: /*#__PURE__*/jsx(MenuItem, {
|
|
9334
9321
|
divider: true,
|
|
9335
9322
|
className: classes.divider,
|
|
9336
9323
|
role: "separator"
|
|
@@ -9353,33 +9340,34 @@ const useStyles$c = tss.withParams().create(({
|
|
|
9353
9340
|
};
|
|
9354
9341
|
});
|
|
9355
9342
|
|
|
9356
|
-
const
|
|
9357
|
-
|
|
9343
|
+
const _excluded$2 = ["showMenu", "setShowMenu", "closeMenuOnClick", "size", "menuWidth", "children"];
|
|
9344
|
+
const VentionMenu = _ref => {
|
|
9345
|
+
let {
|
|
9358
9346
|
showMenu = true,
|
|
9359
9347
|
setShowMenu,
|
|
9360
9348
|
closeMenuOnClick = true,
|
|
9361
9349
|
size = "small",
|
|
9362
9350
|
menuWidth = "280px",
|
|
9363
9351
|
children
|
|
9364
|
-
} =
|
|
9365
|
-
ventionMenuListProps =
|
|
9352
|
+
} = _ref,
|
|
9353
|
+
ventionMenuListProps = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
9366
9354
|
const closeMenu = () => {
|
|
9367
9355
|
setShowMenu(false);
|
|
9368
9356
|
};
|
|
9369
|
-
return showMenu ? jsx(VentionMenuContext.Provider, {
|
|
9357
|
+
return showMenu ? /*#__PURE__*/jsx(VentionMenuContext.Provider, {
|
|
9370
9358
|
value: {
|
|
9371
9359
|
closeMenuOnClick,
|
|
9372
9360
|
size,
|
|
9373
9361
|
menuWidth,
|
|
9374
9362
|
closeMenu
|
|
9375
9363
|
},
|
|
9376
|
-
children: jsx(ClickAwayListener, {
|
|
9364
|
+
children: /*#__PURE__*/jsx(ClickAwayListener, {
|
|
9377
9365
|
onClickAway: closeMenu,
|
|
9378
|
-
children: jsx("div", {
|
|
9366
|
+
children: /*#__PURE__*/jsx("div", {
|
|
9379
9367
|
style: {
|
|
9380
9368
|
display: "inline-block"
|
|
9381
9369
|
},
|
|
9382
|
-
children: jsx(VentionMenuList, Object.assign({}, ventionMenuListProps, {
|
|
9370
|
+
children: /*#__PURE__*/jsx(VentionMenuList, Object.assign({}, ventionMenuListProps, {
|
|
9383
9371
|
children: children
|
|
9384
9372
|
}))
|
|
9385
9373
|
})
|
|
@@ -9422,13 +9410,13 @@ const VentionCollapsibleCaretButton = ({
|
|
|
9422
9410
|
isVisible,
|
|
9423
9411
|
isExpanded
|
|
9424
9412
|
});
|
|
9425
|
-
return jsx(Box$1, {
|
|
9413
|
+
return /*#__PURE__*/jsx(Box$1, {
|
|
9426
9414
|
component: "div",
|
|
9427
9415
|
className: classes.root,
|
|
9428
9416
|
onClick: onClick,
|
|
9429
9417
|
"data-testid": dataTestid,
|
|
9430
9418
|
"aria-expanded": isExpanded,
|
|
9431
|
-
children: jsx(IconCaretRightFilled, {
|
|
9419
|
+
children: /*#__PURE__*/jsx(IconCaretRightFilled, {
|
|
9432
9420
|
size: 16
|
|
9433
9421
|
})
|
|
9434
9422
|
});
|
|
@@ -9450,9 +9438,6 @@ const useStyles$b = tss.withParams().create(({
|
|
|
9450
9438
|
};
|
|
9451
9439
|
});
|
|
9452
9440
|
|
|
9453
|
-
/** This is the default height of the tree item. This value only changes if you stack multiple captionRight elements.
|
|
9454
|
-
* This is needed for Machinebuilder for virtualization.
|
|
9455
|
-
*/
|
|
9456
9441
|
const DEFAULT_VENTION_TREE_ITEM_HEIGHT = 32;
|
|
9457
9442
|
const hasAnyVisibleItem = (items, isHovering) => {
|
|
9458
9443
|
if (items === undefined || items.length === 0) return false;
|
|
@@ -9512,6 +9497,7 @@ const VentionTreeItem = /*#__PURE__*/forwardRef((inputProps, ref) => {
|
|
|
9512
9497
|
onRenaming(true);
|
|
9513
9498
|
}
|
|
9514
9499
|
};
|
|
9500
|
+
|
|
9515
9501
|
// Need this useEffect for now to be able to set the label outside of this component...
|
|
9516
9502
|
useEffect(() => {
|
|
9517
9503
|
setLabel(labelText);
|
|
@@ -9524,7 +9510,7 @@ const VentionTreeItem = /*#__PURE__*/forwardRef((inputProps, ref) => {
|
|
|
9524
9510
|
}
|
|
9525
9511
|
};
|
|
9526
9512
|
const handleRename = newLabel => {
|
|
9527
|
-
onLabelChange
|
|
9513
|
+
onLabelChange == null || onLabelChange(newLabel);
|
|
9528
9514
|
};
|
|
9529
9515
|
const hasVisibleTrailingOrActionItems = hasAnyVisibleItem(trailingElements, isHovering) || hasAnyVisibleItem(actionButtons, isHovering);
|
|
9530
9516
|
const handleTrailingElementClick = event => {
|
|
@@ -9532,51 +9518,51 @@ const VentionTreeItem = /*#__PURE__*/forwardRef((inputProps, ref) => {
|
|
|
9532
9518
|
};
|
|
9533
9519
|
const handleOnClick = event => {
|
|
9534
9520
|
event.stopPropagation();
|
|
9535
|
-
onClick
|
|
9521
|
+
onClick == null || onClick(event);
|
|
9536
9522
|
};
|
|
9537
9523
|
const isCaretVisible = Children.count(children) > 0;
|
|
9538
|
-
const testId = dataTestid
|
|
9539
|
-
return jsxs("div", {
|
|
9524
|
+
const testId = dataTestid != null ? dataTestid : "vention-tree-item";
|
|
9525
|
+
return /*#__PURE__*/jsxs("div", {
|
|
9540
9526
|
className: classes.root,
|
|
9541
9527
|
onClick: handleOnClick,
|
|
9542
9528
|
ref: ref,
|
|
9543
|
-
children: [jsxs("div", {
|
|
9529
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
9544
9530
|
"aria-selected": isSelected,
|
|
9545
9531
|
"data-testid": testId,
|
|
9546
9532
|
className: classes.mainContent,
|
|
9547
|
-
onContextMenu: event => onContextMenu
|
|
9533
|
+
onContextMenu: event => onContextMenu == null ? void 0 : onContextMenu(event),
|
|
9548
9534
|
onMouseEnter: event => {
|
|
9549
9535
|
if (!isSelected) {
|
|
9550
|
-
onMouseEnter
|
|
9536
|
+
onMouseEnter == null || onMouseEnter(event);
|
|
9551
9537
|
setIsHovering(true);
|
|
9552
9538
|
}
|
|
9553
9539
|
},
|
|
9554
9540
|
onMouseLeave: event => {
|
|
9555
9541
|
if (!isSelected) {
|
|
9556
|
-
onMouseLeave
|
|
9542
|
+
onMouseLeave == null || onMouseLeave(event);
|
|
9557
9543
|
setIsHovering(false);
|
|
9558
9544
|
}
|
|
9559
9545
|
},
|
|
9560
|
-
children: [jsxs("div", {
|
|
9546
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
9561
9547
|
className: classes.singleLineContainer,
|
|
9562
|
-
children: [collapsible && jsx(VentionCollapsibleCaretButton, {
|
|
9548
|
+
children: [collapsible && /*#__PURE__*/jsx(VentionCollapsibleCaretButton, {
|
|
9563
9549
|
isVisible: isCaretVisible,
|
|
9564
9550
|
isExpanded: isExpanded,
|
|
9565
9551
|
onClick: handleIsExpandedToggle,
|
|
9566
9552
|
dataTestid: `${testId}-collapseButton`
|
|
9567
|
-
}), jsx("div", {
|
|
9553
|
+
}), /*#__PURE__*/jsx("div", {
|
|
9568
9554
|
"data-testid": `${testId}-icon`,
|
|
9569
9555
|
className: classes.iconContainer,
|
|
9570
9556
|
children: icon
|
|
9571
|
-
}), jsx("div", {
|
|
9557
|
+
}), /*#__PURE__*/jsx("div", {
|
|
9572
9558
|
className: classes.labelContainer,
|
|
9573
9559
|
"data-testid": `${testId}-label`,
|
|
9574
9560
|
onDoubleClick: handleRenaming,
|
|
9575
|
-
children: jsx(Typography, {
|
|
9561
|
+
children: /*#__PURE__*/jsx(Typography, {
|
|
9576
9562
|
className: classes.label,
|
|
9577
9563
|
variant: "uiText12Regular",
|
|
9578
9564
|
title: label,
|
|
9579
|
-
children: isRenaming ? jsx(VentionTextInput, {
|
|
9565
|
+
children: isRenaming ? /*#__PURE__*/jsx(VentionTextInput, {
|
|
9580
9566
|
autoFocus: true,
|
|
9581
9567
|
value: label,
|
|
9582
9568
|
size: "small",
|
|
@@ -9595,20 +9581,20 @@ const VentionTreeItem = /*#__PURE__*/forwardRef((inputProps, ref) => {
|
|
|
9595
9581
|
}
|
|
9596
9582
|
}) : label
|
|
9597
9583
|
})
|
|
9598
|
-
}), hasVisibleTrailingOrActionItems && jsxs("div", {
|
|
9584
|
+
}), hasVisibleTrailingOrActionItems && /*#__PURE__*/jsxs("div", {
|
|
9599
9585
|
className: classes.actionButtonsContainer,
|
|
9600
9586
|
"data-testid": `${testId}-contextItems`,
|
|
9601
|
-
children: [trailingElements
|
|
9587
|
+
children: [trailingElements == null ? void 0 : trailingElements.map((trailingElement, index) => /*#__PURE__*/jsx("div", {
|
|
9602
9588
|
className: cx(classes.trailingElement, trailingElement.showOnHover && classes.trailingElementShowOnHover),
|
|
9603
9589
|
"data-testid": `${testId}-trailingElement-${index}`,
|
|
9604
9590
|
onClick: handleTrailingElementClick,
|
|
9605
9591
|
children: trailingElement.component
|
|
9606
|
-
}, index)), actionButtons
|
|
9592
|
+
}, index)), actionButtons == null ? void 0 : actionButtons.map((button, index) => {
|
|
9607
9593
|
const handleButtonOnClick = event => {
|
|
9608
9594
|
event.stopPropagation();
|
|
9609
9595
|
button.onClick(event);
|
|
9610
9596
|
};
|
|
9611
|
-
return jsx(VentionIconButton, {
|
|
9597
|
+
return /*#__PURE__*/jsx(VentionIconButton, {
|
|
9612
9598
|
variant: "shaded",
|
|
9613
9599
|
className: `${classes.actionButton} ${button.showOnHover ? classes.showOnHover : ""}`,
|
|
9614
9600
|
"data-testid": `${testId}-actionButton-${index}`,
|
|
@@ -9617,10 +9603,10 @@ const VentionTreeItem = /*#__PURE__*/forwardRef((inputProps, ref) => {
|
|
|
9617
9603
|
}, index);
|
|
9618
9604
|
})]
|
|
9619
9605
|
})]
|
|
9620
|
-
}), captionsRight && captionsRight.length > 0 && jsx("div", {
|
|
9606
|
+
}), captionsRight && captionsRight.length > 0 && /*#__PURE__*/jsx("div", {
|
|
9621
9607
|
className: classes.captionRightContainer,
|
|
9622
9608
|
"data-testid": `${testId}-captionRightContainer`,
|
|
9623
|
-
children: captionsRight.map((caption, index) => jsx("div", {
|
|
9609
|
+
children: captionsRight.map((caption, index) => /*#__PURE__*/jsx("div", {
|
|
9624
9610
|
className: cx(classes.captionRight, !!caption.onClick && classes.clickableCaptionRight),
|
|
9625
9611
|
onClick: caption.onClick ? event => {
|
|
9626
9612
|
event.stopPropagation();
|
|
@@ -9630,19 +9616,19 @@ const VentionTreeItem = /*#__PURE__*/forwardRef((inputProps, ref) => {
|
|
|
9630
9616
|
color: caption.color
|
|
9631
9617
|
},
|
|
9632
9618
|
"data-testid": `${testId}-captionRight-${index}`,
|
|
9633
|
-
children: jsx(Typography, {
|
|
9619
|
+
children: /*#__PURE__*/jsx(Typography, {
|
|
9634
9620
|
className: cx(classes.label, classes.captionRightLabel),
|
|
9635
9621
|
variant: "uiTableNumbers12Reg",
|
|
9636
9622
|
title: caption.text,
|
|
9637
9623
|
children: caption.text
|
|
9638
9624
|
})
|
|
9639
9625
|
}, index))
|
|
9640
|
-
}), hasWarning && jsx(IconAlertTriangleFilled, {
|
|
9626
|
+
}), hasWarning && /*#__PURE__*/jsx(IconAlertTriangleFilled, {
|
|
9641
9627
|
className: classes.alertIcon,
|
|
9642
9628
|
size: 16,
|
|
9643
9629
|
color: theme.palette.icon.warning
|
|
9644
9630
|
})]
|
|
9645
|
-
}), jsx("div", {
|
|
9631
|
+
}), /*#__PURE__*/jsx("div", {
|
|
9646
9632
|
className: classes.childrenItems,
|
|
9647
9633
|
children: children
|
|
9648
9634
|
})]
|
|
@@ -9665,6 +9651,7 @@ const useStyles$a = tss.withParams().withNestedSelectors().create(({
|
|
|
9665
9651
|
const invisibleBorder = `1px solid transparent`;
|
|
9666
9652
|
// 22 is padding per indent
|
|
9667
9653
|
const paddingLeft = indentLevel * 22 + 16;
|
|
9654
|
+
|
|
9668
9655
|
// Check if we have multiple captions
|
|
9669
9656
|
const hasMultipleCaptions = captionsRight && captionsRight.length > 1;
|
|
9670
9657
|
return {
|
|
@@ -9796,6 +9783,7 @@ const useStyles$a = tss.withParams().withNestedSelectors().create(({
|
|
|
9796
9783
|
};
|
|
9797
9784
|
});
|
|
9798
9785
|
|
|
9786
|
+
const _excluded$1 = ["onDrawerHandleClick", "dataTestid"];
|
|
9799
9787
|
const VentionDrawerWrapper = props => {
|
|
9800
9788
|
const {
|
|
9801
9789
|
classes
|
|
@@ -9804,10 +9792,10 @@ const VentionDrawerWrapper = props => {
|
|
|
9804
9792
|
anchor: props.anchor,
|
|
9805
9793
|
open: props.open
|
|
9806
9794
|
});
|
|
9807
|
-
return props.onDrawerHandleClick ? jsx("div", {
|
|
9795
|
+
return props.onDrawerHandleClick ? /*#__PURE__*/jsx("div", {
|
|
9808
9796
|
className: classes.drawerHandleWrapper,
|
|
9809
9797
|
children: props.children
|
|
9810
|
-
}) : jsx(Fragment, {
|
|
9798
|
+
}) : /*#__PURE__*/jsx(Fragment, {
|
|
9811
9799
|
children: props.children
|
|
9812
9800
|
});
|
|
9813
9801
|
};
|
|
@@ -9821,27 +9809,26 @@ const VentionDrawer = props => {
|
|
|
9821
9809
|
open: props.open
|
|
9822
9810
|
});
|
|
9823
9811
|
const {
|
|
9824
|
-
onDrawerHandleClick,
|
|
9825
9812
|
dataTestid
|
|
9826
9813
|
} = props,
|
|
9827
|
-
muiDrawerProps =
|
|
9814
|
+
muiDrawerProps = _objectWithoutPropertiesLoose(props, _excluded$1);
|
|
9828
9815
|
const isRightIconVisible = props.anchor === "right" && props.open || props.anchor === "left" && !props.open;
|
|
9829
9816
|
const isLeftIconVisible = props.anchor === "right" && !props.open || props.anchor === "left" && props.open;
|
|
9830
|
-
return jsx(VentionDrawerWrapper, Object.assign({}, props, {
|
|
9831
|
-
children: jsxs(Drawer, Object.assign({}, muiDrawerProps, {
|
|
9817
|
+
return /*#__PURE__*/jsx(VentionDrawerWrapper, Object.assign({}, props, {
|
|
9818
|
+
children: /*#__PURE__*/jsxs(Drawer, Object.assign({}, muiDrawerProps, {
|
|
9832
9819
|
variant: props.onDrawerHandleClick ? "permanent" : props.variant,
|
|
9833
9820
|
className: classes.root,
|
|
9834
|
-
children: [props.onDrawerHandleClick && jsxs("button", {
|
|
9821
|
+
children: [props.onDrawerHandleClick && /*#__PURE__*/jsxs("button", {
|
|
9835
9822
|
"aria-label": "drawer-handle",
|
|
9836
9823
|
className: classes.drawerHandle,
|
|
9837
9824
|
onClick: props.onDrawerHandleClick,
|
|
9838
9825
|
"data-testid": dataTestid,
|
|
9839
|
-
children: [isRightIconVisible && jsx(IconChevronsRight, {
|
|
9826
|
+
children: [isRightIconVisible && /*#__PURE__*/jsx(IconChevronsRight, {
|
|
9840
9827
|
className: classes.handleIcon
|
|
9841
|
-
}), isLeftIconVisible && jsx(IconChevronsLeft, {
|
|
9828
|
+
}), isLeftIconVisible && /*#__PURE__*/jsx(IconChevronsLeft, {
|
|
9842
9829
|
className: classes.handleIcon
|
|
9843
9830
|
})]
|
|
9844
|
-
}), jsx("div", {
|
|
9831
|
+
}), /*#__PURE__*/jsx("div", {
|
|
9845
9832
|
className: classes.drawerChildren,
|
|
9846
9833
|
children: props.children
|
|
9847
9834
|
})]
|
|
@@ -9920,7 +9907,7 @@ const defaultProps$1 = {
|
|
|
9920
9907
|
dotPosition: "left"
|
|
9921
9908
|
};
|
|
9922
9909
|
const VentionStatusIndicator = inputProps => {
|
|
9923
|
-
const props = Object.assign(
|
|
9910
|
+
const props = Object.assign({}, defaultProps$1, inputProps);
|
|
9924
9911
|
const {
|
|
9925
9912
|
classes,
|
|
9926
9913
|
theme
|
|
@@ -9931,16 +9918,16 @@ const VentionStatusIndicator = inputProps => {
|
|
|
9931
9918
|
});
|
|
9932
9919
|
const typographyVariant = getTypographyVariant(props.size);
|
|
9933
9920
|
const sizeStyles = sizeMapping(props.size, props.dotPosition, theme);
|
|
9934
|
-
return jsxs(Box$1, {
|
|
9921
|
+
return /*#__PURE__*/jsxs(Box$1, {
|
|
9935
9922
|
className: classes.root,
|
|
9936
|
-
children: [props.dotPosition === "left" && jsx(VentionStatusDot, {
|
|
9923
|
+
children: [props.dotPosition === "left" && /*#__PURE__*/jsx(VentionStatusDot, {
|
|
9937
9924
|
color: props.dotColor,
|
|
9938
9925
|
size: sizeStyles.dotSize
|
|
9939
|
-
}), jsx(Typography$1, {
|
|
9926
|
+
}), /*#__PURE__*/jsx(Typography$1, {
|
|
9940
9927
|
variant: typographyVariant,
|
|
9941
9928
|
className: classes.label,
|
|
9942
9929
|
children: props.label
|
|
9943
|
-
}), props.dotPosition === "right" && jsx(VentionStatusDot, {
|
|
9930
|
+
}), props.dotPosition === "right" && /*#__PURE__*/jsx(VentionStatusDot, {
|
|
9944
9931
|
color: props.dotColor,
|
|
9945
9932
|
size: sizeStyles.dotSize
|
|
9946
9933
|
})]
|
|
@@ -10108,28 +10095,28 @@ const VentionBanner = ({
|
|
|
10108
10095
|
color,
|
|
10109
10096
|
accent: _accent
|
|
10110
10097
|
});
|
|
10111
|
-
return jsxs(Box$1, {
|
|
10098
|
+
return /*#__PURE__*/jsxs(Box$1, {
|
|
10112
10099
|
className: classes.banner,
|
|
10113
10100
|
onClick: onClick,
|
|
10114
10101
|
role: "alert",
|
|
10115
10102
|
tabIndex: 0,
|
|
10116
10103
|
"data-testid": "banner-root",
|
|
10117
|
-
children: [startAdornment && jsx(Box$1, {
|
|
10104
|
+
children: [startAdornment && /*#__PURE__*/jsx(Box$1, {
|
|
10118
10105
|
className: classes.bannerIconContainer,
|
|
10119
10106
|
children: startAdornment
|
|
10120
|
-
}), jsx(Typography, {
|
|
10107
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
10121
10108
|
component: "span",
|
|
10122
10109
|
className: classes.bannerTitle,
|
|
10123
10110
|
title: title,
|
|
10124
10111
|
variant: "heading16SemiBold",
|
|
10125
10112
|
children: title
|
|
10126
|
-
}), description && jsx(Typography, {
|
|
10113
|
+
}), description && /*#__PURE__*/jsx(Typography, {
|
|
10127
10114
|
component: "span",
|
|
10128
10115
|
className: classes.bannerDescription,
|
|
10129
10116
|
title: description,
|
|
10130
10117
|
variant: "paragraph14Regular",
|
|
10131
10118
|
children: description
|
|
10132
|
-
}), endAdornment && jsx(Box$1, {
|
|
10119
|
+
}), endAdornment && /*#__PURE__*/jsx(Box$1, {
|
|
10133
10120
|
className: classes.endAdornment,
|
|
10134
10121
|
children: endAdornment
|
|
10135
10122
|
})]
|
|
@@ -10177,6 +10164,7 @@ const colorConfig = {
|
|
|
10177
10164
|
}
|
|
10178
10165
|
}
|
|
10179
10166
|
};
|
|
10167
|
+
|
|
10180
10168
|
/**
|
|
10181
10169
|
* Compute banner background and text color based on the `color` prop
|
|
10182
10170
|
*/
|
|
@@ -10269,8 +10257,8 @@ const VentionModalBanner = ({
|
|
|
10269
10257
|
});
|
|
10270
10258
|
const handleOpenModal = () => setIsModalOpen(true);
|
|
10271
10259
|
const handleCloseModal = () => setIsModalOpen(false);
|
|
10272
|
-
return jsxs(Fragment, {
|
|
10273
|
-
children: [jsx(VentionBanner, {
|
|
10260
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
10261
|
+
children: [/*#__PURE__*/jsx(VentionBanner, {
|
|
10274
10262
|
size: _size,
|
|
10275
10263
|
accent: _accent,
|
|
10276
10264
|
color: color,
|
|
@@ -10279,26 +10267,26 @@ const VentionModalBanner = ({
|
|
|
10279
10267
|
description: description,
|
|
10280
10268
|
endAdornment: endAdornment,
|
|
10281
10269
|
onClick: handleOpenModal
|
|
10282
|
-
}), jsx(Modal, {
|
|
10270
|
+
}), /*#__PURE__*/jsx(Modal, {
|
|
10283
10271
|
open: isModalOpen,
|
|
10284
10272
|
onClose: handleCloseModal,
|
|
10285
10273
|
className: classes.modal,
|
|
10286
|
-
children: jsx(Box$1, {
|
|
10274
|
+
children: /*#__PURE__*/jsx(Box$1, {
|
|
10287
10275
|
className: classes.modalBox,
|
|
10288
10276
|
"data-testid": "banner-modal",
|
|
10289
|
-
children: jsxs(Box$1, {
|
|
10277
|
+
children: /*#__PURE__*/jsxs(Box$1, {
|
|
10290
10278
|
className: classes.modalRowContainer,
|
|
10291
|
-
children: [icon && jsx(Box$1, {
|
|
10279
|
+
children: [icon && /*#__PURE__*/jsx(Box$1, {
|
|
10292
10280
|
className: classes.modalIconContainer,
|
|
10293
10281
|
children: icon
|
|
10294
|
-
}), jsxs(Box$1, {
|
|
10282
|
+
}), /*#__PURE__*/jsxs(Box$1, {
|
|
10295
10283
|
className: classes.modalTitleContainer,
|
|
10296
|
-
children: [jsx(Typography, {
|
|
10284
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
10297
10285
|
component: "span",
|
|
10298
10286
|
variant: "heading16SemiBold",
|
|
10299
10287
|
className: classes.modalTitle,
|
|
10300
10288
|
children: title
|
|
10301
|
-
}), description && jsx(Typography, {
|
|
10289
|
+
}), description && /*#__PURE__*/jsx(Typography, {
|
|
10302
10290
|
component: "span",
|
|
10303
10291
|
variant: "paragraph14Regular",
|
|
10304
10292
|
className: classes.modalDescription,
|
|
@@ -10365,7 +10353,7 @@ const VentionSidebarItem = props => {
|
|
|
10365
10353
|
state: props.state
|
|
10366
10354
|
});
|
|
10367
10355
|
const isDisabled = props.state === "disabled";
|
|
10368
|
-
return jsx(Button, {
|
|
10356
|
+
return /*#__PURE__*/jsx(Button, {
|
|
10369
10357
|
className: classes.sidebarItem,
|
|
10370
10358
|
onClick: props.onClick,
|
|
10371
10359
|
disabled: isDisabled,
|
|
@@ -10373,22 +10361,22 @@ const VentionSidebarItem = props => {
|
|
|
10373
10361
|
disableFocusRipple: true,
|
|
10374
10362
|
disableTouchRipple: true,
|
|
10375
10363
|
"data-testid": "vention-sidebar-item-button",
|
|
10376
|
-
children: jsxs(Stack, {
|
|
10364
|
+
children: /*#__PURE__*/jsxs(Stack, {
|
|
10377
10365
|
direction: "row",
|
|
10378
10366
|
alignItems: "center",
|
|
10379
10367
|
justifyContent: "space-between",
|
|
10380
10368
|
gap: 4,
|
|
10381
|
-
children: [jsxs("div", {
|
|
10382
|
-
children: [jsx(Typography, {
|
|
10369
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
10370
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
10383
10371
|
variant: "heading24SemiBold",
|
|
10384
10372
|
color: isDisabled ? `text.tertiary` : `text.primary`,
|
|
10385
10373
|
children: props.title
|
|
10386
|
-
}), jsx(Typography, {
|
|
10374
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
10387
10375
|
variant: "hmiText20Regular",
|
|
10388
10376
|
color: isDisabled ? `text.tertiary` : `text.secondary`,
|
|
10389
10377
|
children: props.subtitle
|
|
10390
10378
|
})]
|
|
10391
|
-
}), jsx(IconChevronRight, {
|
|
10379
|
+
}), /*#__PURE__*/jsx(IconChevronRight, {
|
|
10392
10380
|
className: classes.icon
|
|
10393
10381
|
})]
|
|
10394
10382
|
})
|
|
@@ -10949,7 +10937,7 @@ $({ target: 'Iterator', proto: true, real: true }, {
|
|
|
10949
10937
|
* />
|
|
10950
10938
|
*/
|
|
10951
10939
|
const VentionCombobox = props => {
|
|
10952
|
-
var
|
|
10940
|
+
var _options$find, _props$groups$reduce, _props$groups;
|
|
10953
10941
|
const {
|
|
10954
10942
|
options,
|
|
10955
10943
|
value,
|
|
@@ -10997,7 +10985,7 @@ const VentionCombobox = props => {
|
|
|
10997
10985
|
handleClose();
|
|
10998
10986
|
};
|
|
10999
10987
|
const isOptionEmpty = options.length === 0;
|
|
11000
|
-
const buttonLabel = value ? ((
|
|
10988
|
+
const buttonLabel = value ? ((_options$find = options.find(framework => framework.value === value)) == null ? void 0 : _options$find.label) || placeholder : placeholder;
|
|
11001
10989
|
const filteredOptions = options.filter(option => option.label.toLowerCase().includes(searchValue.toLowerCase()));
|
|
11002
10990
|
const isFilteredOptionEmpty = filteredOptions.length === 0;
|
|
11003
10991
|
const groupedOptions = filteredOptions.sort((a, b) => a.label.localeCompare(b.label, undefined, {
|
|
@@ -11010,18 +10998,19 @@ const VentionCombobox = props => {
|
|
|
11010
10998
|
accumulator[groupKey].push(option);
|
|
11011
10999
|
return accumulator;
|
|
11012
11000
|
}, {});
|
|
11001
|
+
|
|
11013
11002
|
/* Make sure to render ungrouped items before grouped sections */
|
|
11014
11003
|
const sortedGroupedOptions = Object.entries(groupedOptions).sort(([groupA], [groupB]) => {
|
|
11015
11004
|
if (groupA === "ungrouped") return -1;
|
|
11016
11005
|
if (groupB === "ungrouped") return 1;
|
|
11017
11006
|
return groupA.localeCompare(groupB);
|
|
11018
11007
|
});
|
|
11019
|
-
const groupLabels = (
|
|
11008
|
+
const groupLabels = (_props$groups$reduce = (_props$groups = props.groups) == null ? void 0 : _props$groups.reduce((accumulator, group) => {
|
|
11020
11009
|
accumulator[group.value] = group.label;
|
|
11021
11010
|
return accumulator;
|
|
11022
|
-
}, {}))
|
|
11023
|
-
return jsxs(Fragment, {
|
|
11024
|
-
children: [jsx(VentionButton, {
|
|
11011
|
+
}, {})) != null ? _props$groups$reduce : {};
|
|
11012
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
11013
|
+
children: [/*#__PURE__*/jsx(VentionButton, {
|
|
11025
11014
|
"data-testid": buttonDataTestId,
|
|
11026
11015
|
ref: buttonRef,
|
|
11027
11016
|
className: classes.button,
|
|
@@ -11030,23 +11019,23 @@ const VentionCombobox = props => {
|
|
|
11030
11019
|
onClick: handleClick,
|
|
11031
11020
|
labelText: buttonLabel,
|
|
11032
11021
|
title: buttonLabel,
|
|
11033
|
-
iconRight: jsxs("div", {
|
|
11022
|
+
iconRight: /*#__PURE__*/jsxs("div", {
|
|
11034
11023
|
className: classes.buttonEndItems,
|
|
11035
|
-
children: [value && props.isClearable && jsx("div", {
|
|
11024
|
+
children: [value && props.isClearable && /*#__PURE__*/jsx("div", {
|
|
11036
11025
|
className: classes.clearButton,
|
|
11037
11026
|
onClick: handleClear,
|
|
11038
11027
|
"data-testid": clearButtonDataTestId,
|
|
11039
|
-
children: jsx(VentionIcon, {
|
|
11028
|
+
children: /*#__PURE__*/jsx(VentionIcon, {
|
|
11040
11029
|
type: "close",
|
|
11041
11030
|
size: 14
|
|
11042
11031
|
})
|
|
11043
|
-
}), jsx(VentionIcon, {
|
|
11032
|
+
}), /*#__PURE__*/jsx(VentionIcon, {
|
|
11044
11033
|
type: "chevron-down",
|
|
11045
11034
|
size: 18
|
|
11046
11035
|
})]
|
|
11047
11036
|
}),
|
|
11048
11037
|
size: "small"
|
|
11049
|
-
}), jsx(Popover, {
|
|
11038
|
+
}), /*#__PURE__*/jsx(Popover, {
|
|
11050
11039
|
open: isOpen,
|
|
11051
11040
|
anchorEl: anchorEl,
|
|
11052
11041
|
onClose: handleClose,
|
|
@@ -11063,14 +11052,14 @@ const VentionCombobox = props => {
|
|
|
11063
11052
|
className: classes.popoverSlot
|
|
11064
11053
|
}
|
|
11065
11054
|
},
|
|
11066
|
-
children: jsxs("div", {
|
|
11055
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
11067
11056
|
className: classes.menuContainer,
|
|
11068
11057
|
style: {
|
|
11069
11058
|
width: menuWidth
|
|
11070
11059
|
},
|
|
11071
|
-
children: [jsx("div", {
|
|
11060
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
11072
11061
|
className: classes.inputContainer,
|
|
11073
|
-
children: jsx(VentionTextInput, {
|
|
11062
|
+
children: /*#__PURE__*/jsx(VentionTextInput, {
|
|
11074
11063
|
autoFocus: autoFocus,
|
|
11075
11064
|
"data-testid": inputDataTestId,
|
|
11076
11065
|
size: "small",
|
|
@@ -11078,10 +11067,10 @@ const VentionCombobox = props => {
|
|
|
11078
11067
|
placeholder: searchPlaceholder,
|
|
11079
11068
|
onChange: event => setSearchValue(event.target.value),
|
|
11080
11069
|
InputProps: {
|
|
11081
|
-
startAdornment: jsx(InputAdornment, {
|
|
11070
|
+
startAdornment: /*#__PURE__*/jsx(InputAdornment, {
|
|
11082
11071
|
position: "start",
|
|
11083
11072
|
className: classes.searchInputAdornment,
|
|
11084
|
-
children: jsx(VentionIcon, {
|
|
11073
|
+
children: /*#__PURE__*/jsx(VentionIcon, {
|
|
11085
11074
|
type: "search",
|
|
11086
11075
|
color: theme.palette.icon.primary,
|
|
11087
11076
|
size: 16
|
|
@@ -11089,37 +11078,37 @@ const VentionCombobox = props => {
|
|
|
11089
11078
|
})
|
|
11090
11079
|
}
|
|
11091
11080
|
})
|
|
11092
|
-
}), jsx("div", {
|
|
11081
|
+
}), /*#__PURE__*/jsx("div", {
|
|
11093
11082
|
className: classes.menuOptionsContainer,
|
|
11094
|
-
children: isOptionEmpty ? jsx(MenuMessage, {
|
|
11083
|
+
children: isOptionEmpty ? /*#__PURE__*/jsx(MenuMessage, {
|
|
11095
11084
|
label: noOptionsMessage
|
|
11096
|
-
}) : isFilteredOptionEmpty ? jsx(MenuMessage, {
|
|
11085
|
+
}) : isFilteredOptionEmpty ? /*#__PURE__*/jsx(MenuMessage, {
|
|
11097
11086
|
label: noItemsFoundMessage
|
|
11098
|
-
}) : sortedGroupedOptions.map(([groupKey, groupOptions]) => jsxs(Fragment$1, {
|
|
11099
|
-
children: [groupKey !== "ungrouped" && jsx("div", {
|
|
11087
|
+
}) : sortedGroupedOptions.map(([groupKey, groupOptions]) => /*#__PURE__*/jsxs(Fragment$1, {
|
|
11088
|
+
children: [groupKey !== "ungrouped" && /*#__PURE__*/jsx("div", {
|
|
11100
11089
|
className: classes.menuOptionContainer,
|
|
11101
|
-
children: jsx("div", {
|
|
11090
|
+
children: /*#__PURE__*/jsx("div", {
|
|
11102
11091
|
className: classes.menuGroup,
|
|
11103
|
-
children: jsx(Typography, {
|
|
11092
|
+
children: /*#__PURE__*/jsx(Typography, {
|
|
11104
11093
|
variant: "uiText12Regular",
|
|
11105
11094
|
className: classes.menuGroupLabel,
|
|
11106
11095
|
title: groupLabels[groupKey],
|
|
11107
11096
|
children: groupLabels[groupKey]
|
|
11108
11097
|
})
|
|
11109
11098
|
})
|
|
11110
|
-
}, groupKey), groupOptions.map((option, index) => jsx("div", {
|
|
11099
|
+
}, groupKey), groupOptions.map((option, index) => /*#__PURE__*/jsx("div", {
|
|
11111
11100
|
className: classes.menuOptionContainer,
|
|
11112
11101
|
"data-testid": `vention-combobox-option-${index}`,
|
|
11113
|
-
children: jsxs("div", {
|
|
11102
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
11114
11103
|
className: classes.menuOption,
|
|
11115
11104
|
onClick: () => handleOptionClick(option.value),
|
|
11116
11105
|
"data-testid": option.dataTestId,
|
|
11117
|
-
children: [jsx(Typography, {
|
|
11106
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
11118
11107
|
variant: "uiText12Medium",
|
|
11119
11108
|
className: classes.menuOptionLabel,
|
|
11120
11109
|
title: option.label,
|
|
11121
11110
|
children: option.label
|
|
11122
|
-
}), option.value === value && jsx(VentionIcon, {
|
|
11111
|
+
}), option.value === value && /*#__PURE__*/jsx(VentionIcon, {
|
|
11123
11112
|
type: "check",
|
|
11124
11113
|
size: 16,
|
|
11125
11114
|
color: theme.palette.icon.primary
|
|
@@ -11138,9 +11127,9 @@ const MenuMessage = ({
|
|
|
11138
11127
|
const {
|
|
11139
11128
|
classes
|
|
11140
11129
|
} = useStyles$4();
|
|
11141
|
-
return jsx("div", {
|
|
11130
|
+
return /*#__PURE__*/jsx("div", {
|
|
11142
11131
|
className: classes.menuMessageContainer,
|
|
11143
|
-
children: jsx(Typography, {
|
|
11132
|
+
children: /*#__PURE__*/jsx(Typography, {
|
|
11144
11133
|
variant: "uiText12Regular",
|
|
11145
11134
|
className: classes.menuMessageLabel,
|
|
11146
11135
|
children: label
|
|
@@ -11253,24 +11242,25 @@ const useStyles$4 = tss.withParams().create(({
|
|
|
11253
11242
|
};
|
|
11254
11243
|
});
|
|
11255
11244
|
|
|
11256
|
-
const
|
|
11257
|
-
|
|
11245
|
+
const _excluded = ["children", "arrow", "placement", "classes"];
|
|
11246
|
+
const VentionTooltip = _ref => {
|
|
11247
|
+
let {
|
|
11258
11248
|
children,
|
|
11259
11249
|
arrow = true,
|
|
11260
11250
|
placement = "top-end",
|
|
11261
11251
|
classes: classesOverrides
|
|
11262
|
-
} =
|
|
11263
|
-
props =
|
|
11252
|
+
} = _ref,
|
|
11253
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
11264
11254
|
const {
|
|
11265
11255
|
classes
|
|
11266
11256
|
} = useStyles$3({
|
|
11267
11257
|
classesOverrides
|
|
11268
11258
|
});
|
|
11269
|
-
return jsx(Tooltip, Object.assign({}, props, {
|
|
11259
|
+
return /*#__PURE__*/jsx(Tooltip, Object.assign({}, props, {
|
|
11270
11260
|
classes: classes,
|
|
11271
11261
|
arrow: arrow,
|
|
11272
11262
|
placement: placement,
|
|
11273
|
-
children: jsx("span", {
|
|
11263
|
+
children: /*#__PURE__*/jsx("span", {
|
|
11274
11264
|
children: children
|
|
11275
11265
|
})
|
|
11276
11266
|
}));
|
|
@@ -11302,16 +11292,16 @@ const VentionCheckboxIcon = ({
|
|
|
11302
11292
|
disabled,
|
|
11303
11293
|
colors
|
|
11304
11294
|
});
|
|
11305
|
-
return jsx(Box$1, {
|
|
11295
|
+
return /*#__PURE__*/jsx(Box$1, {
|
|
11306
11296
|
className: classes.root,
|
|
11307
|
-
children: checked && jsx(Box$1, {
|
|
11297
|
+
children: checked && /*#__PURE__*/jsx(Box$1, {
|
|
11308
11298
|
component: "svg",
|
|
11309
11299
|
width: "100%",
|
|
11310
11300
|
height: "100%",
|
|
11311
11301
|
viewBox: "0 0 24 24",
|
|
11312
11302
|
fill: "none",
|
|
11313
11303
|
className: classes.checkmark,
|
|
11314
|
-
children: jsx("path", {
|
|
11304
|
+
children: /*#__PURE__*/jsx("path", {
|
|
11315
11305
|
d: "M6 12l4 4 8-8",
|
|
11316
11306
|
stroke: "currentColor",
|
|
11317
11307
|
strokeWidth: "2.5",
|
|
@@ -11374,15 +11364,15 @@ const VentionCheckbox = checkboxProps => {
|
|
|
11374
11364
|
if (!props.labelText && !props.helperText) {
|
|
11375
11365
|
return null;
|
|
11376
11366
|
}
|
|
11377
|
-
return jsxs(Stack, {
|
|
11367
|
+
return /*#__PURE__*/jsxs(Stack, {
|
|
11378
11368
|
className: classes.textContainer,
|
|
11379
|
-
children: [props.labelText && jsx(Typography, {
|
|
11369
|
+
children: [props.labelText && /*#__PURE__*/jsx(Typography, {
|
|
11380
11370
|
variant: typographyVariant,
|
|
11381
11371
|
className: cx(classes.labelText, {
|
|
11382
11372
|
"Mui-disabled": props.disabled
|
|
11383
11373
|
}),
|
|
11384
11374
|
children: props.labelText
|
|
11385
|
-
}), props.labelText && props.helperText && jsx(Typography, {
|
|
11375
|
+
}), props.labelText && props.helperText && /*#__PURE__*/jsx(Typography, {
|
|
11386
11376
|
variant: typographyVariant,
|
|
11387
11377
|
className: cx(classes.helperText, {
|
|
11388
11378
|
"Mui-disabled": props.disabled
|
|
@@ -11391,11 +11381,11 @@ const VentionCheckbox = checkboxProps => {
|
|
|
11391
11381
|
})]
|
|
11392
11382
|
});
|
|
11393
11383
|
};
|
|
11394
|
-
return jsxs(Stack, {
|
|
11384
|
+
return /*#__PURE__*/jsxs(Stack, {
|
|
11395
11385
|
className: cx(classes.root, props.className),
|
|
11396
|
-
children: [jsx(Box$1, {
|
|
11386
|
+
children: [/*#__PURE__*/jsx(Box$1, {
|
|
11397
11387
|
className: classes.checkboxContainer,
|
|
11398
|
-
children: jsx(Checkbox, {
|
|
11388
|
+
children: /*#__PURE__*/jsx(Checkbox, {
|
|
11399
11389
|
className: classes.checkbox,
|
|
11400
11390
|
disabled: props.disabled,
|
|
11401
11391
|
checked: props.checked,
|
|
@@ -11404,13 +11394,13 @@ const VentionCheckbox = checkboxProps => {
|
|
|
11404
11394
|
value: props.value,
|
|
11405
11395
|
name: props.name,
|
|
11406
11396
|
"data-testid": props["data-testid"],
|
|
11407
|
-
icon: jsx(VentionCheckboxIcon, {
|
|
11397
|
+
icon: /*#__PURE__*/jsx(VentionCheckboxIcon, {
|
|
11408
11398
|
size: sizeStyle,
|
|
11409
11399
|
checked: false,
|
|
11410
11400
|
disabled: props.disabled,
|
|
11411
11401
|
colors: getCheckboxColors(props.variant, props.disabled)
|
|
11412
11402
|
}),
|
|
11413
|
-
checkedIcon: jsx(VentionCheckboxIcon, {
|
|
11403
|
+
checkedIcon: /*#__PURE__*/jsx(VentionCheckboxIcon, {
|
|
11414
11404
|
size: sizeStyle,
|
|
11415
11405
|
checked: true,
|
|
11416
11406
|
disabled: props.disabled,
|
|
@@ -11546,6 +11536,7 @@ const getCheckboxColors = (variant, disabled) => {
|
|
|
11546
11536
|
secondaryPressed: COLORS.blue[400],
|
|
11547
11537
|
secondaryPressedBg: COLORS.slate[200]
|
|
11548
11538
|
};
|
|
11539
|
+
|
|
11549
11540
|
// If disabled, return disabled colors regardless of variant
|
|
11550
11541
|
if (disabled) {
|
|
11551
11542
|
return {
|
|
@@ -11557,6 +11548,7 @@ const getCheckboxColors = (variant, disabled) => {
|
|
|
11557
11548
|
disabledColor: baseColors.disabled
|
|
11558
11549
|
};
|
|
11559
11550
|
}
|
|
11551
|
+
|
|
11560
11552
|
// Future proofing for handling different variants
|
|
11561
11553
|
switch (variant) {
|
|
11562
11554
|
case "outlined":
|
|
@@ -11625,6 +11617,7 @@ const STYLE_CONFIG = {
|
|
|
11625
11617
|
trashBackgroundColor: COLORS.slate[100]
|
|
11626
11618
|
}
|
|
11627
11619
|
};
|
|
11620
|
+
|
|
11628
11621
|
// Container styling
|
|
11629
11622
|
const getContainerBackgroundColor = style => {
|
|
11630
11623
|
return STYLE_CONFIG[style].backgroundColor;
|
|
@@ -11632,6 +11625,7 @@ const getContainerBackgroundColor = style => {
|
|
|
11632
11625
|
const getContainerBorder = style => {
|
|
11633
11626
|
return STYLE_CONFIG[style].border;
|
|
11634
11627
|
};
|
|
11628
|
+
|
|
11635
11629
|
// Layout properties
|
|
11636
11630
|
const getGap = size => {
|
|
11637
11631
|
return SIZE_CONFIG[size].gap;
|
|
@@ -11648,6 +11642,7 @@ const getBorderRadius = (size, style) => {
|
|
|
11648
11642
|
}
|
|
11649
11643
|
return SIZE_CONFIG[size].borderRadius;
|
|
11650
11644
|
};
|
|
11645
|
+
|
|
11651
11646
|
// Typography
|
|
11652
11647
|
const getFontSize = size => {
|
|
11653
11648
|
return SIZE_CONFIG[size].fontSize;
|
|
@@ -11655,6 +11650,7 @@ const getFontSize = size => {
|
|
|
11655
11650
|
const getNameHeight = size => {
|
|
11656
11651
|
return SIZE_CONFIG[size].nameHeight;
|
|
11657
11652
|
};
|
|
11653
|
+
|
|
11658
11654
|
// Trash icon styling
|
|
11659
11655
|
const getTrashBackgroundColor = style => {
|
|
11660
11656
|
return STYLE_CONFIG[style].trashBackgroundColor;
|
|
@@ -11666,9 +11662,6 @@ const getActionIconSize = size => {
|
|
|
11666
11662
|
return SIZE_CONFIG[size].trashIconSize;
|
|
11667
11663
|
};
|
|
11668
11664
|
|
|
11669
|
-
/**
|
|
11670
|
-
* A component that displays an uploaded file with its upload status, file name, file size, and a remove button.
|
|
11671
|
-
*/
|
|
11672
11665
|
function VentionUploadFile({
|
|
11673
11666
|
fileName,
|
|
11674
11667
|
fileSize,
|
|
@@ -11687,71 +11680,71 @@ function VentionUploadFile({
|
|
|
11687
11680
|
style,
|
|
11688
11681
|
state
|
|
11689
11682
|
});
|
|
11690
|
-
return jsxs(Grid, {
|
|
11683
|
+
return /*#__PURE__*/jsxs(Grid, {
|
|
11691
11684
|
container: true,
|
|
11692
11685
|
className: classes.container,
|
|
11693
|
-
children: [jsx(Grid, {
|
|
11686
|
+
children: [/*#__PURE__*/jsx(Grid, {
|
|
11694
11687
|
item: true,
|
|
11695
11688
|
xs: "auto",
|
|
11696
11689
|
className: classes.spinnerContainer,
|
|
11697
|
-
children: jsx(VentionSpinner, {
|
|
11690
|
+
children: /*#__PURE__*/jsx(VentionSpinner, {
|
|
11698
11691
|
type: state,
|
|
11699
11692
|
size: size
|
|
11700
11693
|
})
|
|
11701
|
-
}), jsx(Grid, {
|
|
11694
|
+
}), /*#__PURE__*/jsx(Grid, {
|
|
11702
11695
|
item: true,
|
|
11703
11696
|
xs: true,
|
|
11704
|
-
children: jsxs(Stack, {
|
|
11705
|
-
children: [jsx(Typography, {
|
|
11697
|
+
children: /*#__PURE__*/jsxs(Stack, {
|
|
11698
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
11706
11699
|
title: fileName,
|
|
11707
11700
|
className: classes.nameContainer,
|
|
11708
11701
|
"data-testid": "fileName",
|
|
11709
11702
|
noWrap: true,
|
|
11710
11703
|
children: fileName
|
|
11711
|
-
}), size === "large" && jsx(Typography, {
|
|
11704
|
+
}), size === "large" && /*#__PURE__*/jsx(Typography, {
|
|
11712
11705
|
className: classes.sizeContainer,
|
|
11713
11706
|
"data-testid": "fileSize",
|
|
11714
11707
|
children: fileSize
|
|
11715
|
-
}), state === "error" && errorMessage && jsx(Typography, {
|
|
11708
|
+
}), state === "error" && errorMessage && /*#__PURE__*/jsx(Typography, {
|
|
11716
11709
|
className: classes.errorMessage,
|
|
11717
11710
|
"data-testid": "errorMessage",
|
|
11718
11711
|
children: errorMessage
|
|
11719
11712
|
})]
|
|
11720
11713
|
})
|
|
11721
|
-
}), state === "error" && jsx(Grid, {
|
|
11714
|
+
}), state === "error" && /*#__PURE__*/jsx(Grid, {
|
|
11722
11715
|
item: true,
|
|
11723
11716
|
xs: "auto",
|
|
11724
11717
|
"data-testid": "retryButtonContainer",
|
|
11725
|
-
children: jsx(VentionIconButton, {
|
|
11718
|
+
children: /*#__PURE__*/jsx(VentionIconButton, {
|
|
11726
11719
|
onClick: onRetry,
|
|
11727
11720
|
variant: "outline",
|
|
11728
11721
|
size: size,
|
|
11729
11722
|
className: classes.actionButton,
|
|
11730
|
-
children: jsx(VentionIcon, {
|
|
11723
|
+
children: /*#__PURE__*/jsx(VentionIcon, {
|
|
11731
11724
|
type: "reload",
|
|
11732
11725
|
size: getActionIconSize(size)
|
|
11733
11726
|
})
|
|
11734
11727
|
})
|
|
11735
|
-
}), jsx(Grid, {
|
|
11728
|
+
}), /*#__PURE__*/jsx(Grid, {
|
|
11736
11729
|
item: true,
|
|
11737
11730
|
xs: "auto",
|
|
11738
|
-
children: state === "indeterminate" ? jsx(VentionIconButton, {
|
|
11731
|
+
children: state === "indeterminate" ? /*#__PURE__*/jsx(VentionIconButton, {
|
|
11739
11732
|
onClick: onCancel,
|
|
11740
11733
|
variant: "outline",
|
|
11741
11734
|
size: size,
|
|
11742
11735
|
className: classes.actionButton,
|
|
11743
11736
|
"data-testid": "cancelButton",
|
|
11744
|
-
children: jsx(VentionIcon, {
|
|
11737
|
+
children: /*#__PURE__*/jsx(VentionIcon, {
|
|
11745
11738
|
type: "close",
|
|
11746
11739
|
size: getActionIconSize(size)
|
|
11747
11740
|
})
|
|
11748
|
-
}) : jsx(VentionIconButton, {
|
|
11741
|
+
}) : /*#__PURE__*/jsx(VentionIconButton, {
|
|
11749
11742
|
onClick: onRemove,
|
|
11750
11743
|
variant: "outline",
|
|
11751
11744
|
size: size,
|
|
11752
11745
|
className: classes.actionButton,
|
|
11753
11746
|
"data-testid": "removeButton",
|
|
11754
|
-
children: jsx(VentionIcon, {
|
|
11747
|
+
children: /*#__PURE__*/jsx(VentionIcon, {
|
|
11755
11748
|
type: "trash",
|
|
11756
11749
|
size: getActionIconSize(size)
|
|
11757
11750
|
})
|
|
@@ -11763,13 +11756,13 @@ const useStyle$1 = tss$1.withParams().create(({
|
|
|
11763
11756
|
size,
|
|
11764
11757
|
style
|
|
11765
11758
|
}) => ({
|
|
11766
|
-
container: Object.assign(
|
|
11759
|
+
container: Object.assign({
|
|
11767
11760
|
flexDirection: "row",
|
|
11768
11761
|
gap: getGap(size),
|
|
11769
11762
|
padding: getPadding(size, style),
|
|
11770
11763
|
alignItems: "center",
|
|
11771
11764
|
backgroundColor: getContainerBackgroundColor(style)
|
|
11772
|
-
}, getContainerBorder(style)
|
|
11765
|
+
}, getContainerBorder(style), {
|
|
11773
11766
|
borderRadius: getBorderRadius(size, style),
|
|
11774
11767
|
width: "100%"
|
|
11775
11768
|
}),
|
|
@@ -11801,8 +11794,7 @@ const useStyle$1 = tss$1.withParams().create(({
|
|
|
11801
11794
|
}
|
|
11802
11795
|
}));
|
|
11803
11796
|
|
|
11804
|
-
|
|
11805
|
-
(function (DropZoneState) {
|
|
11797
|
+
let DropZoneState = /*#__PURE__*/function (DropZoneState) {
|
|
11806
11798
|
DropZoneState["Default"] = "Default";
|
|
11807
11799
|
DropZoneState["Hover"] = "Hover";
|
|
11808
11800
|
DropZoneState["Pressed"] = "Pressed";
|
|
@@ -11813,7 +11805,8 @@ var DropZoneState;
|
|
|
11813
11805
|
DropZoneState["MouseLeave"] = "MouseLeave";
|
|
11814
11806
|
DropZoneState["Drop"] = "Drop";
|
|
11815
11807
|
DropZoneState["FileChange"] = "FileChange";
|
|
11816
|
-
|
|
11808
|
+
return DropZoneState;
|
|
11809
|
+
}({});
|
|
11817
11810
|
const sizeProperties = {
|
|
11818
11811
|
large: {
|
|
11819
11812
|
minHeight: "72px",
|
|
@@ -11865,14 +11858,17 @@ function getDropZoneBorder(state, disabled, style) {
|
|
|
11865
11858
|
const borderLineStyle = state === DropZoneState.DraggedOver ? "solid" : borderStyle;
|
|
11866
11859
|
return `${borderWidth} ${borderLineStyle} ${borderColor}`;
|
|
11867
11860
|
}
|
|
11861
|
+
|
|
11868
11862
|
// Accessor functions for size-specific properties
|
|
11869
11863
|
function getDropZoneStyle(size, property) {
|
|
11870
11864
|
return sizeProperties[size][property];
|
|
11871
11865
|
}
|
|
11866
|
+
|
|
11872
11867
|
// Accessor functions for style-specific properties
|
|
11873
11868
|
function getDropZoneBackgroundColor(style) {
|
|
11874
11869
|
return styleProperties[style].backgroundColor;
|
|
11875
11870
|
}
|
|
11871
|
+
|
|
11876
11872
|
/**
|
|
11877
11873
|
* consolidates derivation of new drop zone status. should be re-used for testing purpose as well
|
|
11878
11874
|
*/
|
|
@@ -11899,6 +11895,7 @@ function getDropZoneStatus(type, hasErrorMessages) {
|
|
|
11899
11895
|
}
|
|
11900
11896
|
|
|
11901
11897
|
const UPLOAD_TITLE = "Drop to start uploading";
|
|
11898
|
+
|
|
11902
11899
|
/**
|
|
11903
11900
|
* Vention's custom dropzone component. Supports drag and drop as well as
|
|
11904
11901
|
* click to upload. Supports different sizes and styles along with a disabled state.
|
|
@@ -11990,7 +11987,7 @@ function VentionDropZone({
|
|
|
11990
11987
|
});
|
|
11991
11988
|
fileInputRef.current.click();
|
|
11992
11989
|
};
|
|
11993
|
-
return jsx(Box$1, {
|
|
11990
|
+
return /*#__PURE__*/jsx(Box$1, {
|
|
11994
11991
|
onMouseDown: handleMouseDown,
|
|
11995
11992
|
onMouseUp: handleMouseUp,
|
|
11996
11993
|
onMouseEnter: handleHover,
|
|
@@ -12005,41 +12002,41 @@ function VentionDropZone({
|
|
|
12005
12002
|
onDrop: handleDrop,
|
|
12006
12003
|
className: classes.dropZoneContainer,
|
|
12007
12004
|
"data-testid": "dropzoneContainer",
|
|
12008
|
-
children: jsxs(Grid, {
|
|
12005
|
+
children: /*#__PURE__*/jsxs(Grid, {
|
|
12009
12006
|
"data-testid": "dropzoneContents",
|
|
12010
12007
|
container: true,
|
|
12011
12008
|
className: classes.dropZoneContents,
|
|
12012
|
-
children: [jsx(Grid, {
|
|
12009
|
+
children: [/*#__PURE__*/jsx(Grid, {
|
|
12013
12010
|
item: true,
|
|
12014
12011
|
className: classes.dropZoneUploadIcon,
|
|
12015
|
-
children: jsx(VentionIcon, {
|
|
12012
|
+
children: /*#__PURE__*/jsx(VentionIcon, {
|
|
12016
12013
|
dataTestId: "dropzoneUploadIcon",
|
|
12017
12014
|
type: "circle-arrow-up",
|
|
12018
12015
|
size: getDropZoneStyle(size, "iconSize")
|
|
12019
12016
|
})
|
|
12020
|
-
}), jsxs(Grid, {
|
|
12017
|
+
}), /*#__PURE__*/jsxs(Grid, {
|
|
12021
12018
|
item: true,
|
|
12022
12019
|
className: classes.dropZoneTexts,
|
|
12023
|
-
children: [jsx("div", {
|
|
12020
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
12024
12021
|
"data-testid": "dropzoneTitle",
|
|
12025
12022
|
className: classes.dropTitle,
|
|
12026
12023
|
children: state.title
|
|
12027
|
-
}), state.dropZoneStatus !== DropZoneState.DraggedOver && jsxs(Fragment, {
|
|
12028
|
-
children: [jsx("div", {
|
|
12024
|
+
}), state.dropZoneStatus !== DropZoneState.DraggedOver && /*#__PURE__*/jsxs(Fragment, {
|
|
12025
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
12029
12026
|
"data-testid": "dropzoneCriteria",
|
|
12030
12027
|
className: classes.criteriaDescription,
|
|
12031
12028
|
children: fileCriteriaDescription
|
|
12032
|
-
}), jsx("div", {
|
|
12029
|
+
}), /*#__PURE__*/jsx("div", {
|
|
12033
12030
|
"data-testid": "dropzoneErrors",
|
|
12034
12031
|
children: state.errorMessages.map(error => {
|
|
12035
|
-
return jsxs("div", {
|
|
12032
|
+
return /*#__PURE__*/jsxs("div", {
|
|
12036
12033
|
className: classes.errorMessage,
|
|
12037
12034
|
children: ["\u26A0 ", error]
|
|
12038
12035
|
}, error);
|
|
12039
12036
|
})
|
|
12040
12037
|
})]
|
|
12041
12038
|
})]
|
|
12042
|
-
}), jsx("input", {
|
|
12039
|
+
}), /*#__PURE__*/jsx("input", {
|
|
12043
12040
|
onChange: handleFileInputChange,
|
|
12044
12041
|
"data-testid": "dropzoneFileInput",
|
|
12045
12042
|
disabled: disabled,
|
|
@@ -12058,7 +12055,7 @@ function dropZoneReducer(reducerState, {
|
|
|
12058
12055
|
title
|
|
12059
12056
|
}) {
|
|
12060
12057
|
const errorMessages = errors || reducerState.errorMessages;
|
|
12061
|
-
return Object.assign(
|
|
12058
|
+
return Object.assign({}, reducerState, {
|
|
12062
12059
|
errorMessages,
|
|
12063
12060
|
title,
|
|
12064
12061
|
dropZoneStatus: getDropZoneStatus(type, errorMessages.length > 0)
|
|
@@ -12131,7 +12128,7 @@ const VentionInputGroupLabel = ({
|
|
|
12131
12128
|
classes,
|
|
12132
12129
|
cx
|
|
12133
12130
|
} = useStyles();
|
|
12134
|
-
return jsx("div", {
|
|
12131
|
+
return /*#__PURE__*/jsx("div", {
|
|
12135
12132
|
className: cx(classes.root, variant === "shaded" && classes.variantShaded),
|
|
12136
12133
|
children: children
|
|
12137
12134
|
});
|
|
@@ -12157,6 +12154,12 @@ const useStyles = tss.create(({
|
|
|
12157
12154
|
}));
|
|
12158
12155
|
|
|
12159
12156
|
const POSITIONED_MENU_OFFSET = 3;
|
|
12157
|
+
|
|
12158
|
+
/**
|
|
12159
|
+
* Props for the positioned component.
|
|
12160
|
+
* Either position or anchorRect must be defined, but not both.
|
|
12161
|
+
*/
|
|
12162
|
+
|
|
12160
12163
|
/**
|
|
12161
12164
|
* Generic positioned component that can position any React component based on viewport constraints.
|
|
12162
12165
|
* It can be positioned relative to an anchor element or a specified position.
|
|
@@ -12194,6 +12197,7 @@ function VentionPositionedComponent({
|
|
|
12194
12197
|
top = calculatedPosition.top;
|
|
12195
12198
|
left = calculatedPosition.left;
|
|
12196
12199
|
}
|
|
12200
|
+
|
|
12197
12201
|
// Clamp to viewport
|
|
12198
12202
|
const maxLeft = Math.max(0, window.innerWidth - width);
|
|
12199
12203
|
const maxTop = Math.max(0, window.innerHeight - height);
|
|
@@ -12204,7 +12208,7 @@ function VentionPositionedComponent({
|
|
|
12204
12208
|
left
|
|
12205
12209
|
});
|
|
12206
12210
|
}, [position, anchorRect, placement, alignment, children]);
|
|
12207
|
-
return jsx("div", {
|
|
12211
|
+
return /*#__PURE__*/jsx("div", {
|
|
12208
12212
|
ref: ref,
|
|
12209
12213
|
style: {
|
|
12210
12214
|
position: "fixed",
|