diff --git a/libs/@hashintel/ds-components/package.json b/libs/@hashintel/ds-components/package.json index 95f1bdf61fd..48115bd1df2 100644 --- a/libs/@hashintel/ds-components/package.json +++ b/libs/@hashintel/ds-components/package.json @@ -90,7 +90,6 @@ "@mantine/hooks": "8.3.5", "@playwright/test": "1.58.2", "@radix-ui/colors": "3.0.0", - "@svgr/rollup": "8.1.0", "@tanstack/react-virtual": "3.13.24", "@tsconfig/strictest": "^2.0.8", "@types/node": "22.18.13", @@ -101,6 +100,7 @@ "bumpp": "^10.3.2", "case-anything": "3.1.0", "colorjs.io": "0.6.1", + "esbuild-plugin-svgr": "3.1.1", "eslint": "9.39.4", "lorem-ipsum": "2.0.8", "lucide-react": "0.544.0", diff --git a/libs/@hashintel/ds-components/src/components/Button/button.tsx b/libs/@hashintel/ds-components/src/components/Button/button.tsx index 9973184cbfb..577c23eb2bf 100644 --- a/libs/@hashintel/ds-components/src/components/Button/button.tsx +++ b/libs/@hashintel/ds-components/src/components/Button/button.tsx @@ -65,10 +65,8 @@ type ButtonElementOnlyProps = { target?: never; download?: never; ref?: React.Ref; -} & RequireAtLeastOne<{ - onClick: React.ButtonHTMLAttributes["onClick"]; - type: "submit" | "reset"; -}>; + onClick?: React.ButtonHTMLAttributes["onClick"]; +}; export type AnchorElementOnlyProps = { href: string; diff --git a/libs/@hashintel/ds-components/src/components/Icon/icon.tsx b/libs/@hashintel/ds-components/src/components/Icon/icon.tsx index 865fe57cf3b..e1aec2e3109 100644 --- a/libs/@hashintel/ds-components/src/components/Icon/icon.tsx +++ b/libs/@hashintel/ds-components/src/components/Icon/icon.tsx @@ -2,22 +2,24 @@ import { cx } from "@hashintel/ds-helpers/css"; import type { DataAttributes } from "../../util/dom"; import ArrowDown from "./svgs/regular/arrow-down.svg"; -import ArrowDownLeftAndArrowUpRightToCenter from "./svgs/solid/arrow-down-left-and-arrow-up-right-to-center.svg"; +import ArrowDownLeftAndArrowUpRightToCenter from "./svgs/regular/arrow-down-left-and-arrow-up-right-to-center.svg"; +import ArrowDownWideShort from "./svgs/regular/arrow-down-wide-short.svg"; import ArrowLeft from "./svgs/regular/arrow-left.svg"; import ArrowPointer from "./svgs/regular/arrow-pointer.svg"; import ArrowRight from "./svgs/regular/arrow-right.svg"; +import ArrowRightToLine from "./svgs/regular/arrow-right-to-line.svg"; import ArrowRotateLeft from "./svgs/regular/arrow-rotate-left.svg"; import ArrowUp from "./svgs/regular/arrow-up.svg"; import ArrowUpRight from "./svgs/regular/arrow-up-right.svg"; -import ArrowUpRightAndArrowDownLeftFromCenter from "./svgs/solid/arrow-up-right-and-arrow-down-left-from-center.svg"; +import ArrowUpRightAndArrowDownLeftFromCenter from "./svgs/regular/arrow-up-right-and-arrow-down-left-from-center.svg"; import ArrowUpRightFromSquare from "./svgs/regular/arrow-up-right-from-square.svg"; -import ArrowUpWideShort from "./svgs/light/arrow-up-wide-short.svg"; +import ArrowUpWideShort from "./svgs/regular/arrow-up-wide-short.svg"; import ArrowsRotate from "./svgs/regular/arrows-rotate.svg"; import Asterisk from "./svgs/regular/asterisk.svg"; import At from "./svgs/regular/at.svg"; import Barcode from "./svgs/regular/barcode.svg"; import Bars from "./svgs/regular/bars.svg"; -import Bell from "./svgs/light/bell.svg"; +import Bell from "./svgs/regular/bell.svg"; import Bolt from "./svgs/regular/bolt.svg"; import BracketsCurly from "./svgs/regular/brackets-curly.svg"; import BracketsSquare from "./svgs/regular/brackets-square.svg"; @@ -26,6 +28,7 @@ import Bullseye from "./svgs/light/bullseye.svg"; import Calendar from "./svgs/regular/calendar.svg"; import CalendarClock from "./svgs/regular/calendar-clock.svg"; import CaretDown from "./svgs/solid/caret-down.svg"; +import ChartSimple from "./svgs/regular/chart-simple.svg"; import ChartColumn from "./svgs/regular/chart-column.svg"; import ChartLine from "./svgs/regular/chart-line.svg"; import Check from "./svgs/regular/check.svg"; @@ -33,12 +36,13 @@ import ChevronDown from "./svgs/regular/chevron-down.svg"; import ChevronLeft from "./svgs/regular/chevron-left.svg"; import ChevronRight from "./svgs/regular/chevron-right.svg"; import ChevronUp from "./svgs/regular/chevron-up.svg"; -import Circle from "./svgs/solid/circle.svg"; +import Circle from "./svgs/regular/circle.svg"; +import CircleSolid from "./svgs/solid/circle.svg"; import CircleCheck from "./svgs/regular/circle-check.svg"; import CircleEllipsis from "./svgs/regular/circle-ellipsis.svg"; -import CircleExclamation from "./svgs/solid/circle-exclamation.svg"; -import CircleInfo from "./svgs/solid/circle-info.svg"; -import CircleNodes from "./svgs/light/circle-nodes.svg"; +import CircleExclamation from "./svgs/regular/circle-exclamation.svg"; +import CircleInfo from "./svgs/regular/circle-info.svg"; +import CircleNodes from "./svgs/regular/circle-nodes.svg"; import CircleOne from "./svgs/regular/circle-1.svg"; import CirclePlus from "./svgs/regular/circle-plus.svg"; import Clock from "./svgs/regular/clock.svg"; @@ -47,7 +51,7 @@ import Code from "./svgs/regular/code.svg"; import Copy from "./svgs/regular/copy.svg"; import Cube from "./svgs/regular/cube.svg"; import Cubes from "./svgs/regular/cubes.svg"; -import DiagramNested from "./svgs/light/diagram-nested.svg"; +import DiagramNested from "./svgs/regular/diagram-nested.svg"; import DiagramProject from "./svgs/regular/diagram-project.svg"; import DiagramSubtask from "./svgs/regular/diagram-subtask.svg"; import Download from "./svgs/regular/download.svg"; @@ -60,52 +64,57 @@ import Feather from "./svgs/regular/feather.svg"; import File from "./svgs/regular/file.svg"; import FileSpreadsheet from "./svgs/regular/file-spreadsheet.svg"; import Flask from "./svgs/regular/flask.svg"; -import ForwardStep from "./svgs/solid/forward-step.svg"; +import ForwardStep from "./svgs/regular/forward-step.svg"; +import ForwardStepSolid from "./svgs/solid/forward-step.svg"; import FunctionSymbol from "./svgs/regular/function.svg"; import Gear from "./svgs/regular/gear.svg"; import Hand from "./svgs/regular/hand.svg"; import Image from "./svgs/regular/image.svg"; -import InfinityLoop from "./svgs/light/infinity.svg"; +import InfinityLoop from "./svgs/regular/infinity.svg"; import InputPipe from "./svgs/regular/input-pipe.svg"; import Lambda from "./svgs/regular/lambda.svg"; -import LayerGroup from "./svgs/regular/layer-group.svg"; +import Layer from "./svgs/regular/layer.svg"; import LightbulbOn from "./svgs/regular/lightbulb-on.svg"; import List from "./svgs/regular/list.svg"; import ListTree from "./svgs/regular/list-tree.svg"; +import LockKeyhole from "./svgs/regular/lock-keyhole.svg"; import MagnifyingGlass from "./svgs/regular/magnifying-glass.svg"; -import MagnifyingGlassMinus from "./svgs/light/magnifying-glass-minus.svg"; -import MagnifyingGlassPlus from "./svgs/light/magnifying-glass-plus.svg"; +import MagnifyingGlassMinus from "./svgs/regular/magnifying-glass-minus.svg"; +import MagnifyingGlassPlus from "./svgs/regular/magnifying-glass-plus.svg"; import MemoCircleCheck from "./svgs/regular/memo-circle-check.svg"; import Microscope from "./svgs/regular/microscope.svg"; import Minus from "./svgs/solid/minus.svg"; import OneHundred from "./svgs/regular/100.svg"; import Pause from "./svgs/regular/pause.svg"; +import PauseSolid from "./svgs/solid/pause.svg"; import Pen from "./svgs/regular/pen.svg"; -import PenToSquare from "./svgs/solid/pen-to-square.svg"; +import PenToSquare from "./svgs/regular/pen-to-square.svg"; import PersonRunning from "./svgs/regular/person-running.svg"; -import Play from "./svgs/solid/play.svg"; +import Play from "./svgs/regular/play.svg"; +import PlaySolid from "./svgs/solid/play.svg"; import Plug from "./svgs/regular/plug.svg"; import Plus from "./svgs/regular/plus.svg"; -import RightToLine from "./svgs/regular/right-to-line.svg"; import Rotate from "./svgs/regular/rotate.svg"; import Ruler from "./svgs/regular/ruler.svg"; import Scribble from "./svgs/regular/scribble.svg"; import Shapes from "./svgs/regular/shapes.svg"; import Sidebar from "./svgs/regular/sidebar.svg"; import Sliders from "./svgs/regular/sliders.svg"; -import Sparkles from "./svgs/light/sparkles.svg"; +import Sparkles from "./svgs/regular/sparkles.svg"; import Square from "./svgs/regular/square.svg"; import SquareCheck from "./svgs/regular/square-check.svg"; import SquarePlus from "./svgs/regular/square-plus.svg"; import Star from "./svgs/regular/star.svg"; +import StarSolid from "./svgs/solid/star.svg"; import Stop from "./svgs/solid/stop.svg"; import Table from "./svgs/light/table.svg"; -import Terminal from "./svgs/light/terminal.svg"; +import Terminal from "./svgs/regular/terminal.svg"; import Text from "./svgs/regular/text.svg"; -import ThoughtBubble from "./svgs/light/thought-bubble.svg"; -import ThreeCircles from "./svgs/solid/circles-overlap-3.svg"; +import ThoughtBubble from "./svgs/regular/thought-bubble.svg"; +import ThreeCircles from "./svgs/regular/circles-overlap-3.svg"; import TrashCan from "./svgs/regular/trash-can.svg"; -import TriangleExclamation from "./svgs/solid/triangle-exclamation.svg"; +import TriangleExclamation from "./svgs/regular/triangle-exclamation.svg"; +import UnlockKeyhole from "./svgs/regular/unlock-keyhole.svg"; import UserPlus from "./svgs/regular/user-plus.svg"; import WandMagicSparkles from "./svgs/regular/wand-magic-sparkles.svg"; import Xmark from "./svgs/regular/xmark.svg"; @@ -131,7 +140,8 @@ const IconMap = { calendar: Calendar, calendarClock: CalendarClock, caretDown: CaretDown, - chartColumn: ChartColumn, + chartBar: ChartColumn, + chartBarSimple: ChartSimple, chartLine: ChartLine, check: Check, chevronDown: ChevronDown, @@ -139,9 +149,9 @@ const IconMap = { chevronRight: ChevronRight, chevronUp: ChevronUp, circle: Circle, + circleFilled: CircleSolid, circleCheck: CircleCheck, circleEllipsis: CircleEllipsis, - circleNodes: CircleNodes, circleOne: CircleOne, circlePlus: CirclePlus, clock: Clock, @@ -157,6 +167,7 @@ const IconMap = { diagramNested: DiagramNested, diagramProject: DiagramProject, diagramSubtask: DiagramSubtask, + diagramNodes: CircleNodes, download: Download, edit: PenToSquare, ellipsis: Ellipsis, @@ -179,23 +190,27 @@ const IconMap = { info: CircleInfo, inputPipe: InputPipe, lambda: Lambda, - layerGroup: LayerGroup, + layer: Layer, lightbulbOn: LightbulbOn, lightning: Bolt, list: List, listTree: ListTree, + lockOpen: UnlockKeyhole, + lockClosed: LockKeyhole, magic: WandMagicSparkles, memoCircleCheck: MemoCircleCheck, microscope: Microscope, oneHundred: OneHundred, pause: Pause, + pauseFilled: PauseSolid, pencil: Pen, personRunning: PersonRunning, play: Play, + playFilled: PlaySolid, plug: Plug, plus: Plus, refresh: ArrowsRotate, - rightToLine: RightToLine, + rightToLine: ArrowRightToLine, rotate: Rotate, rotateLeft: ArrowRotateLeft, ruler: Ruler, @@ -204,14 +219,19 @@ const IconMap = { shapes: Shapes, sidebar: Sidebar, skipForward: ForwardStep, + skipForwardFilled: ForwardStepSolid, sliders: Sliders, + sortDown: ArrowDownWideShort, sortUp: ArrowUpWideShort, sparkles: Sparkles, square: Square, + squareFilled: Stop, squareCheck: SquareCheck, squarePlus: SquarePlus, star: Star, - stop: Stop, + starFilled: StarSolid, + stop: Square, + stopFilled: Stop, table: Table, terminal: Terminal, text: Text, diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/light/arrow-up-wide-short.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/light/arrow-up-wide-short.svg deleted file mode 100644 index e48599d6820..00000000000 --- a/libs/@hashintel/ds-components/src/components/Icon/svgs/light/arrow-up-wide-short.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/light/bell.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/light/bell.svg deleted file mode 100644 index a1ba389a291..00000000000 --- a/libs/@hashintel/ds-components/src/components/Icon/svgs/light/bell.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/light/circle-nodes.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/light/circle-nodes.svg deleted file mode 100644 index 4b75ca2eb4b..00000000000 --- a/libs/@hashintel/ds-components/src/components/Icon/svgs/light/circle-nodes.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/light/diagram-nested.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/light/diagram-nested.svg deleted file mode 100644 index 34fdda93cc6..00000000000 --- a/libs/@hashintel/ds-components/src/components/Icon/svgs/light/diagram-nested.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/light/infinity.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/light/infinity.svg deleted file mode 100644 index 276c809690a..00000000000 --- a/libs/@hashintel/ds-components/src/components/Icon/svgs/light/infinity.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/light/magnifying-glass-minus.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/light/magnifying-glass-minus.svg deleted file mode 100644 index 74b9f9c6770..00000000000 --- a/libs/@hashintel/ds-components/src/components/Icon/svgs/light/magnifying-glass-minus.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/light/magnifying-glass-plus.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/light/magnifying-glass-plus.svg deleted file mode 100644 index c0653aa469c..00000000000 --- a/libs/@hashintel/ds-components/src/components/Icon/svgs/light/magnifying-glass-plus.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/light/sparkles.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/light/sparkles.svg deleted file mode 100644 index 0d139780f22..00000000000 --- a/libs/@hashintel/ds-components/src/components/Icon/svgs/light/sparkles.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/light/terminal.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/light/terminal.svg deleted file mode 100644 index a7f1b7656f3..00000000000 --- a/libs/@hashintel/ds-components/src/components/Icon/svgs/light/terminal.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/light/thought-bubble.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/light/thought-bubble.svg deleted file mode 100644 index 629c9e8e20c..00000000000 --- a/libs/@hashintel/ds-components/src/components/Icon/svgs/light/thought-bubble.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/arrow-down-left-and-arrow-up-right-to-center.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/arrow-down-left-and-arrow-up-right-to-center.svg new file mode 100644 index 00000000000..131d9a61909 --- /dev/null +++ b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/arrow-down-left-and-arrow-up-right-to-center.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/arrow-down-wide-short.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/arrow-down-wide-short.svg new file mode 100644 index 00000000000..e01b92d46cb --- /dev/null +++ b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/arrow-down-wide-short.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/arrow-right-to-line.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/arrow-right-to-line.svg new file mode 100644 index 00000000000..676fcbc2623 --- /dev/null +++ b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/arrow-right-to-line.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/arrow-up-right-and-arrow-down-left-from-center.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/arrow-up-right-and-arrow-down-left-from-center.svg new file mode 100644 index 00000000000..2a7d9117f0b --- /dev/null +++ b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/arrow-up-right-and-arrow-down-left-from-center.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/arrow-up-wide-short.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/arrow-up-wide-short.svg new file mode 100644 index 00000000000..5d83e26a784 --- /dev/null +++ b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/arrow-up-wide-short.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/bell.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/bell.svg new file mode 100644 index 00000000000..e80851271c3 --- /dev/null +++ b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/bell.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/chart-simple.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/chart-simple.svg new file mode 100644 index 00000000000..c0dd95c01ea --- /dev/null +++ b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/chart-simple.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/circle-exclamation.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/circle-exclamation.svg new file mode 100644 index 00000000000..1113b2ddee4 --- /dev/null +++ b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/circle-exclamation.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/circle-info.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/circle-info.svg new file mode 100644 index 00000000000..1ebf5cc2986 --- /dev/null +++ b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/circle-info.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/circle-nodes.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/circle-nodes.svg new file mode 100644 index 00000000000..e768a7564af --- /dev/null +++ b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/circle-nodes.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/circle.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/circle.svg new file mode 100644 index 00000000000..bf1b2758410 --- /dev/null +++ b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/circle.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/circles-overlap-3.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/circles-overlap-3.svg new file mode 100644 index 00000000000..8def05a8fce --- /dev/null +++ b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/circles-overlap-3.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/diagram-nested.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/diagram-nested.svg new file mode 100644 index 00000000000..1fcd92c1b14 --- /dev/null +++ b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/diagram-nested.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/forward-step.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/forward-step.svg new file mode 100644 index 00000000000..e206e6ac64d --- /dev/null +++ b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/forward-step.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/infinity.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/infinity.svg new file mode 100644 index 00000000000..c882de5ecd8 --- /dev/null +++ b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/infinity.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/layer-group.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/layer-group.svg deleted file mode 100644 index fc9baba1f09..00000000000 --- a/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/layer-group.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/layer.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/layer.svg new file mode 100644 index 00000000000..7bf0d2651af --- /dev/null +++ b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/layer.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/lock-keyhole.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/lock-keyhole.svg new file mode 100644 index 00000000000..66893576156 --- /dev/null +++ b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/lock-keyhole.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/magnifying-glass-minus.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/magnifying-glass-minus.svg new file mode 100644 index 00000000000..6f37b5582be --- /dev/null +++ b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/magnifying-glass-minus.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/magnifying-glass-plus.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/magnifying-glass-plus.svg new file mode 100644 index 00000000000..f1643b95af4 --- /dev/null +++ b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/magnifying-glass-plus.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/pen-to-square.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/pen-to-square.svg new file mode 100644 index 00000000000..f3349f49c55 --- /dev/null +++ b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/pen-to-square.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/play.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/play.svg new file mode 100644 index 00000000000..f78b73191a8 --- /dev/null +++ b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/play.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/right-to-line.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/right-to-line.svg deleted file mode 100644 index 28d1cd8c1b2..00000000000 --- a/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/right-to-line.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/sparkles.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/sparkles.svg new file mode 100644 index 00000000000..2f8e5a928c6 --- /dev/null +++ b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/sparkles.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/terminal.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/terminal.svg new file mode 100644 index 00000000000..d29ffa365a0 --- /dev/null +++ b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/terminal.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/thought-bubble.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/thought-bubble.svg new file mode 100644 index 00000000000..1d358c04c52 --- /dev/null +++ b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/thought-bubble.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/triangle-exclamation.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/triangle-exclamation.svg new file mode 100644 index 00000000000..4f149ef6e27 --- /dev/null +++ b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/triangle-exclamation.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/unlock-keyhole.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/unlock-keyhole.svg new file mode 100644 index 00000000000..23913477105 --- /dev/null +++ b/libs/@hashintel/ds-components/src/components/Icon/svgs/regular/unlock-keyhole.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/solid/arrow-down-left-and-arrow-up-right-to-center.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/solid/arrow-down-left-and-arrow-up-right-to-center.svg deleted file mode 100644 index 4358171ba41..00000000000 --- a/libs/@hashintel/ds-components/src/components/Icon/svgs/solid/arrow-down-left-and-arrow-up-right-to-center.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/solid/arrow-up-right-and-arrow-down-left-from-center.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/solid/arrow-up-right-and-arrow-down-left-from-center.svg deleted file mode 100644 index f0ff1a1ea4d..00000000000 --- a/libs/@hashintel/ds-components/src/components/Icon/svgs/solid/arrow-up-right-and-arrow-down-left-from-center.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/solid/circle-exclamation.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/solid/circle-exclamation.svg deleted file mode 100644 index 7b0a735f782..00000000000 --- a/libs/@hashintel/ds-components/src/components/Icon/svgs/solid/circle-exclamation.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/solid/circle-info.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/solid/circle-info.svg deleted file mode 100644 index 39bb6f4acb8..00000000000 --- a/libs/@hashintel/ds-components/src/components/Icon/svgs/solid/circle-info.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/solid/circles-overlap-3.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/solid/circles-overlap-3.svg deleted file mode 100644 index fbedc90245d..00000000000 --- a/libs/@hashintel/ds-components/src/components/Icon/svgs/solid/circles-overlap-3.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/solid/pause.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/solid/pause.svg new file mode 100644 index 00000000000..526c2c7e099 --- /dev/null +++ b/libs/@hashintel/ds-components/src/components/Icon/svgs/solid/pause.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/solid/pen-to-square.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/solid/pen-to-square.svg deleted file mode 100644 index 105ceb1dce3..00000000000 --- a/libs/@hashintel/ds-components/src/components/Icon/svgs/solid/pen-to-square.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/solid/star.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/solid/star.svg new file mode 100644 index 00000000000..1715e2672af --- /dev/null +++ b/libs/@hashintel/ds-components/src/components/Icon/svgs/solid/star.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libs/@hashintel/ds-components/src/components/Icon/svgs/solid/triangle-exclamation.svg b/libs/@hashintel/ds-components/src/components/Icon/svgs/solid/triangle-exclamation.svg deleted file mode 100644 index 4f67c4e4767..00000000000 --- a/libs/@hashintel/ds-components/src/components/Icon/svgs/solid/triangle-exclamation.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/libs/@hashintel/ds-components/tsup.config.ts b/libs/@hashintel/ds-components/tsup.config.ts index 99290d06bc1..067773bd18a 100644 --- a/libs/@hashintel/ds-components/tsup.config.ts +++ b/libs/@hashintel/ds-components/tsup.config.ts @@ -1,6 +1,8 @@ import { globSync } from "node:fs"; import path from "node:path"; +import svgr from "esbuild-plugin-svgr"; + const componentEntries = Object.fromEntries( globSync("./src/components/*/*.tsx", { exclude: ["**/*.stories.tsx"] }).map( (file) => [`components/${path.basename(file, ".tsx")}`, file], @@ -16,6 +18,7 @@ export default { tokens: "./src/tokens.ts", ...componentEntries, }, + esbuildPlugins: [svgr()], format: ["esm"], outDir: "dist", platform: "neutral", diff --git a/libs/@hashintel/petrinaut/package.json b/libs/@hashintel/petrinaut/package.json index 58b12f408c0..d35a074ffb6 100644 --- a/libs/@hashintel/petrinaut/package.json +++ b/libs/@hashintel/petrinaut/package.json @@ -71,7 +71,6 @@ "immer": "10.1.3", "lodash-es": "4.18.1", "monaco-editor": "0.55.1", - "react-icons": "5.5.0", "react-resizable-panels": "4.6.5", "typescript": "5.9.3", "uplot": "1.6.32", diff --git a/libs/@hashintel/petrinaut/src/ui/components/arc-item.tsx b/libs/@hashintel/petrinaut/src/ui/components/arc-item.tsx index a91e21728bc..6d769b31c19 100644 --- a/libs/@hashintel/petrinaut/src/ui/components/arc-item.tsx +++ b/libs/@hashintel/petrinaut/src/ui/components/arc-item.tsx @@ -1,9 +1,9 @@ +import { Icon } from "@hashintel/ds-components"; import { css, cx } from "@hashintel/ds-helpers/css"; import type { ReactNode } from "react"; import { useMemo } from "react"; -import { FaChevronDown } from "react-icons/fa6"; -import { TbTrash } from "react-icons/tb"; +import { Button } from "./button"; import { NumberInput } from "./number-input"; import { Select, type SelectOption } from "./select"; @@ -99,10 +99,7 @@ const nameTextStyle = css({ }); const chevronStyle = css({ - flexShrink: 0, color: "[rgba(0, 0, 0, 0.3)]", - display: "flex", - alignItems: "center", }); const separatorContainerStyle = css({ @@ -196,18 +193,6 @@ const deleteContainerStyle = css({ justifyContent: "center", }); -const deleteButtonStyle = css({ - display: "flex", - alignItems: "center", - justifyContent: "center", - cursor: "pointer", - background: "[none]", - border: "none", - padding: "[0]", - color: "[#ef4444]", - height: "[100%]", -}); - // -- Select trigger style overrides for ArcItem ------------------------------- const selectRootOverrideStyle = css({ @@ -284,7 +269,7 @@ export const ArcItem = ({ style={{ backgroundColor: color ?? "#d4d4d4" }} /> {placeName} - + ); @@ -354,14 +339,16 @@ export const ArcItem = ({ /> {onDelete && !disabled && (
- + tooltip="Delete arc" + tooltipDisplay="inline" + iconName="trash" + />
)} diff --git a/libs/@hashintel/petrinaut/src/ui/components/button.tsx b/libs/@hashintel/petrinaut/src/ui/components/button.tsx index 8b6d48159d9..caf41e6f71d 100644 --- a/libs/@hashintel/petrinaut/src/ui/components/button.tsx +++ b/libs/@hashintel/petrinaut/src/ui/components/button.tsx @@ -2,9 +2,26 @@ import { Button as DsButton, type ButtonProps as DsButtonProps, } from "@hashintel/ds-components"; +import type { ComponentType } from "react"; import { withTooltip } from "./hoc/with-tooltip"; -export type ButtonProps = DsButtonProps; +/** + * Wrap the ds-components Button to: + * - Allow arbitrary `data-*` attributes (e.g. CSS hooks like `[data-row-action]`). + * - Relax the requirement that a ` + @@ -104,13 +46,9 @@ export const Default: Story = { - + - + @@ -122,9 +60,7 @@ export const WithDescription: Story = { render: () => ( - + @@ -140,13 +76,11 @@ export const WithDescription: Story = { - + - + @@ -158,9 +92,7 @@ export const WithoutFooter: Story = { render: () => ( - + @@ -184,13 +116,9 @@ const ControlledDialogExample = () => { return ( <> - + setOpen(details.open)} @@ -207,17 +135,11 @@ const ControlledDialogExample = () => { - + - + @@ -235,9 +157,7 @@ export const OpenByDefault: Story = { render: () => ( - + @@ -252,13 +172,9 @@ export const OpenByDefault: Story = { - + - + diff --git a/libs/@hashintel/petrinaut/src/ui/components/dialog.tsx b/libs/@hashintel/petrinaut/src/ui/components/dialog.tsx index 56ffe875d33..47cc85c2016 100644 --- a/libs/@hashintel/petrinaut/src/ui/components/dialog.tsx +++ b/libs/@hashintel/petrinaut/src/ui/components/dialog.tsx @@ -2,9 +2,9 @@ import { Dialog as ArkDialog } from "@ark-ui/react/dialog"; import { Portal } from "@ark-ui/react/portal"; import { css, cx } from "@hashintel/ds-helpers/css"; import type { ComponentProps, ReactNode } from "react"; -import { TbX } from "react-icons/tb"; import { usePortalContainerRef } from "../../react/state/portal-container-context"; +import { Button } from "./button"; import { Body, Card as PanelCard, @@ -85,8 +85,16 @@ const Content = ({ const Card = ({ children }: { children: ReactNode }) => ( - + + + /> } > {children} diff --git a/libs/@hashintel/petrinaut/src/ui/components/icon-button.tsx b/libs/@hashintel/petrinaut/src/ui/components/icon-button.tsx deleted file mode 100644 index e6743888c0c..00000000000 --- a/libs/@hashintel/petrinaut/src/ui/components/icon-button.tsx +++ /dev/null @@ -1,230 +0,0 @@ -import { cva } from "@hashintel/ds-helpers/css"; - -import { withTooltip } from "./hoc/with-tooltip"; - -// -- Styles (Figma: IconButton component) ------------------------------------- - -const iconButtonStyle = cva({ - base: { - display: "flex", - alignItems: "center", - justifyContent: "center", - padding: "0", - border: "none", - background: "[transparent]", - cursor: "pointer", - transition: "[all 0.15s ease]", - overflow: "clip", - }, - variants: { - size: { - xxs: { - width: "[20px]", - height: "[20px]", - borderRadius: "md", - fontSize: "xs", - }, - xs: { - width: "[24px]", - height: "[24px]", - borderRadius: "lg", - fontSize: "sm", - }, - sm: { - width: "[28px]", - height: "[28px]", - borderRadius: "lg", - fontSize: "base", - }, - md: { - width: "[32px]", - height: "[32px]", - borderRadius: "xl", - fontSize: "lg", - }, - lg: { - width: "[40px]", - height: "[40px]", - borderRadius: "xl", - fontSize: "xl", - }, - }, - variant: { - ghost: { - color: "neutral.s105", - _hover: { - backgroundColor: "neutral.bg.subtle.hover", - borderWidth: "[1px]", - borderStyle: "solid", - borderColor: "neutral.bd.subtle", - boxShadow: - "[0px 1px 2px 0px rgba(0, 0, 0, 0.12), 0px 0px 0px 0px rgba(0, 0, 0, 0.06)]", - }, - _active: { - backgroundColor: "neutral.bg.subtle", - boxShadow: "[inset 0px 2px 1px 0px rgba(0, 0, 0, 0.05)]", - }, - _focusVisible: { - boxShadow: "[0px 0px 0px 2px {colors.neutral.a30}]", - outline: "none", - }, - }, - outline: { - backgroundColor: "neutral.bg.subtle", - borderWidth: "[1px]", - borderStyle: "solid", - borderColor: "neutral.bd.subtle", - color: "neutral.s105", - _hover: { - backgroundColor: "neutral.bg.subtle.hover", - boxShadow: - "[0px 1px 2px 0px rgba(0, 0, 0, 0.12), 0px 0px 0px 1px rgba(0, 0, 0, 0.06)]", - }, - _active: { - boxShadow: "[inset 0px 2px 1px 0px rgba(0, 0, 0, 0.05)]", - }, - _focusVisible: { - boxShadow: "[0px 0px 0px 2px {colors.neutral.a30}]", - outline: "none", - }, - }, - subtle: { - backgroundColor: "neutral.bg.subtle.hover", - color: "neutral.s105", - _hover: { - borderWidth: "[1px]", - borderStyle: "solid", - borderColor: "neutral.bd.subtle", - boxShadow: - "[0px 1px 2px 0px rgba(0, 0, 0, 0.12), 0px 0px 0px 0px rgba(0, 0, 0, 0.06)]", - }, - _active: { - boxShadow: "[inset 0px 2px 1px 0px rgba(0, 0, 0, 0.05)]", - }, - _focusVisible: { - boxShadow: "[0px 0px 0px 2px {colors.neutral.a30}]", - outline: "none", - }, - }, - solid: { - backgroundColor: "neutral.s120", - color: "neutral.s00", - borderWidth: "[1px]", - borderStyle: "solid", - borderColor: "neutral.s125", - _hover: { - backgroundColor: "neutral.s115", - }, - _active: { - boxShadow: "[inset 0px 2px 1px 0px rgba(0, 0, 0, 0.2)]", - }, - _focusVisible: { - boxShadow: "[0px 0px 0px 2px {colors.neutral.a30}]", - outline: "none", - }, - }, - }, - colorScheme: { - gray: {}, - brand: {}, - red: {}, - }, - isDisabled: { - true: { - opacity: "[0.4]", - cursor: "not-allowed", - pointerEvents: "none", - }, - false: {}, - }, - }, - compoundVariants: [ - // brand + solid - { - variant: "solid", - colorScheme: "brand", - css: { - backgroundColor: "blue.s90", - borderColor: "blue.s110", - color: "neutral.s00", - boxShadow: - "[inset 0px -3px 2px 0px rgba(0, 0, 0, 0.1), inset 0px 2px 0.4px 0px rgba(255, 255, 255, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.1), 0px 2px 3px 0px rgba(0, 0, 0, 0.08)]", - _hover: { - backgroundColor: "blue.s100", - }, - }, - }, - // red + outline - { - variant: "outline", - colorScheme: "red", - css: { - borderColor: "neutral.a30", - color: "red.s90", - boxShadow: - "[0px 2px 3px 0px rgba(0, 0, 0, 0.03), 0px 2px 2px -1px rgba(0, 0, 0, 0.03)]", - _hover: { - backgroundColor: "red.bg.subtle.hover", - borderColor: "red.bd.subtle", - }, - }, - }, - // red + ghost - { - variant: "ghost", - colorScheme: "red", - css: { - color: "neutral.s105", - _hover: { - color: "red.s90", - backgroundColor: "red.bg.subtle.hover", - borderColor: "red.bd.subtle", - }, - }, - }, - ], - defaultVariants: { - size: "sm", - variant: "ghost", - colorScheme: "gray", - isDisabled: false, - }, -}); - -type IconButtonProps = React.ButtonHTMLAttributes & { - /** Size variant: xxs=20px, xs=24px, sm=28px (default), md=32px, lg=40px */ - size?: "xxs" | "xs" | "sm" | "md" | "lg"; - /** Style variant */ - variant?: "ghost" | "outline" | "subtle" | "solid"; - /** Color scheme */ - colorScheme?: "gray" | "brand" | "red"; - /** Icon content */ - children: React.ReactNode; - /** Accessibility label (required for icon-only buttons) */ - "aria-label": string; - /** Ref to the button element */ - ref?: React.Ref; -}; - -const IconButtonBase: React.FC = ({ - size = "sm", - variant = "ghost", - colorScheme = "gray", - disabled, - className, - children, - ref, - ...props -}) => ( - -); - -export const IconButton = withTooltip(IconButtonBase, "inline"); diff --git a/libs/@hashintel/petrinaut/src/ui/components/panel-primitives.tsx b/libs/@hashintel/petrinaut/src/ui/components/panel-primitives.tsx index 9e09329a868..e2509ae07fa 100644 --- a/libs/@hashintel/petrinaut/src/ui/components/panel-primitives.tsx +++ b/libs/@hashintel/petrinaut/src/ui/components/panel-primitives.tsx @@ -1,6 +1,7 @@ import { css, cx } from "@hashintel/ds-helpers/css"; import type { ReactNode } from "react"; -import { TbX } from "react-icons/tb"; + +import { Button } from "./button"; /** * Shared visual primitives used by Dialog and Drawer. @@ -46,21 +47,7 @@ export const closeButtonStyle = css({ position: "absolute", top: "2", right: "2", - display: "flex", - alignItems: "center", - justifyContent: "center", - width: "[30px]", - height: "[30px]", - fontSize: "base", - color: "neutral.s100", - backgroundColor: "[transparent]", - border: "[none]", - borderRadius: "lg", - cursor: "pointer", zIndex: "[3]", - _hover: { - backgroundColor: "neutral.bg.min.hover", - }, }); export const Card = ({ @@ -73,9 +60,15 @@ export const Card = ({
{children} {closeButton ?? ( - +
); diff --git a/libs/@hashintel/petrinaut/src/ui/components/popover.stories.tsx b/libs/@hashintel/petrinaut/src/ui/components/popover.stories.tsx index a46447c6b3a..9df6c2fa091 100644 --- a/libs/@hashintel/petrinaut/src/ui/components/popover.stories.tsx +++ b/libs/@hashintel/petrinaut/src/ui/components/popover.stories.tsx @@ -1,6 +1,7 @@ import { css } from "@hashintel/ds-helpers/css"; import type { Meta, StoryObj } from "@storybook/react-vite"; +import { Button } from "./button"; import { Popover } from "./popover"; const meta = { @@ -14,47 +15,14 @@ export default meta; type Story = StoryObj; -const triggerButtonStyle = css({ - display: "inline-flex", - alignItems: "center", - justifyContent: "center", - height: "[32px]", - paddingX: "[12px]", - fontSize: "[14px]", - fontWeight: "medium", - color: "neutral.s120", - backgroundColor: "[white]", - border: "[1px solid]", - borderColor: "neutral.s30", - borderRadius: "[8px]", - cursor: "pointer", - _hover: { - backgroundColor: "neutral.s10", - }, -}); - const contentWidthStyle = css({ width: "[240px]", }); const itemStyle = css({ - display: "flex", - alignItems: "center", - gap: "[8px]", width: "[100%]", - height: "[28px]", - paddingX: "[8px]", - borderRadius: "[8px]", - fontSize: "[14px]", - fontWeight: "medium", - color: "neutral.s120", - backgroundColor: "[transparent]", - border: "none", - cursor: "pointer", + justifyContent: "flex-start", textAlign: "left", - _hover: { - backgroundColor: "neutral.s10", - }, }); export const Default: Story = { @@ -62,24 +30,22 @@ export const Default: Story = { render: () => ( - + Settings Options - - + - + + @@ -92,32 +58,30 @@ export const MultipleSections: Story = { render: () => ( - + Preferences Display - - + + Language - - + + @@ -130,21 +94,19 @@ export const TopPlacement: Story = { render: () => ( - + Info Details - - + + @@ -157,18 +119,16 @@ export const OpenByDefault: Story = { render: () => ( - + Popover Content - + diff --git a/libs/@hashintel/petrinaut/src/ui/components/popover.tsx b/libs/@hashintel/petrinaut/src/ui/components/popover.tsx index 44b25004491..46bc26556d3 100644 --- a/libs/@hashintel/petrinaut/src/ui/components/popover.tsx +++ b/libs/@hashintel/petrinaut/src/ui/components/popover.tsx @@ -2,10 +2,9 @@ import { Popover as ArkPopover } from "@ark-ui/react/popover"; import { Portal } from "@ark-ui/react/portal"; import { css, cx } from "@hashintel/ds-helpers/css"; import type { ComponentProps, ReactNode } from "react"; -import { TbX } from "react-icons/tb"; import { usePortalContainerRef } from "../../react/state/portal-container-context"; -import { IconButton } from "./icon-button"; +import { Button } from "./button"; // -- Styles ------------------------------------------------------------------ @@ -40,23 +39,6 @@ const titleStyle = css({ letterSpacing: "[0.48px]", }); -const closeButtonStyle = css({ - display: "flex", - alignItems: "center", - justifyContent: "center", - width: "[24px]", - height: "[24px]", - fontSize: "sm", - color: "neutral.s100", - backgroundColor: "[transparent]", - border: "none", - borderRadius: "md", - cursor: "pointer", - _hover: { - backgroundColor: "neutral.bg.min.hover", - }, -}); - const sectionStyle = css({ paddingX: "1", paddingBottom: "1", @@ -113,14 +95,14 @@ const Header = ({ children }: { children: ReactNode }) => (
{children} - - - + iconName="close" + tooltip="Close" + tooltipDisplay="inline" + />
); diff --git a/libs/@hashintel/petrinaut/src/ui/components/section.stories.tsx b/libs/@hashintel/petrinaut/src/ui/components/section.stories.tsx index c72802a938b..3aaa5acf815 100644 --- a/libs/@hashintel/petrinaut/src/ui/components/section.stories.tsx +++ b/libs/@hashintel/petrinaut/src/ui/components/section.stories.tsx @@ -1,5 +1,6 @@ import type { Meta, StoryObj } from "@storybook/react-vite"; +import { Button } from "./button"; import { Section, SectionList } from "./section"; const meta = { @@ -82,19 +83,9 @@ export const WithHeaderAction: Story = {
( - + )} > diff --git a/libs/@hashintel/petrinaut/src/ui/components/section.tsx b/libs/@hashintel/petrinaut/src/ui/components/section.tsx index 3e80e76ee84..e851cd382a3 100644 --- a/libs/@hashintel/petrinaut/src/ui/components/section.tsx +++ b/libs/@hashintel/petrinaut/src/ui/components/section.tsx @@ -1,10 +1,9 @@ import { Collapsible } from "@ark-ui/react/collapsible"; import { css, cx } from "@hashintel/ds-helpers/css"; import { type ReactNode, use } from "react"; -import { FaChevronUp } from "react-icons/fa6"; import { UserSettingsContext } from "../../react/state/user-settings-context"; -import { IconButton } from "./icon-button"; +import { Button } from "./button"; import { InfoIconTooltip } from "./tooltip"; // -- SectionList (wrapper) -------------------------------------------------- @@ -188,9 +187,14 @@ export const Section = ({ {headerLeft} {renderHeaderAction &&
{renderHeaderAction()}
} - - - + - - +
@@ -270,16 +270,17 @@ export const PlaybackSettingsMenu = () => { {speedRows.map((row) => (
{row.map((speed) => ( - + ))}
))} @@ -291,8 +292,9 @@ export const PlaybackSettingsMenu = () => { Stopping conditions - - +
diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/components/BottomBar/simulation-controls.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/components/BottomBar/simulation-controls.tsx index 3e8d462bfba..33282bb915e 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/components/BottomBar/simulation-controls.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/components/BottomBar/simulation-controls.tsx @@ -1,7 +1,6 @@ +import { Icon } from "@hashintel/ds-components"; import { css } from "@hashintel/ds-helpers/css"; import { use } from "react"; -import { IoMdPause, IoMdPlay } from "react-icons/io"; -import { MdRotateLeft } from "react-icons/md"; import { PlaybackContext } from "../../../../../react/playback/context"; import { SimulationContext } from "../../../../../react/simulation/context"; @@ -171,7 +170,7 @@ export const SimulationControls: React.FC = ({ disabled={isDisabled} ariaLabel="Reset simulation" > - + @@ -184,7 +183,11 @@ export const SimulationControls: React.FC = ({ disabled={isPlayDisabled} ariaLabel={getPlayPauseAriaLabel()} > - {isPlaybackPlaying ? : } + {isPlaybackPlaying ? ( + + ) : ( + + )} {/* Frame controls - only visible when simulation exists */} diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/components/BottomBar/toolbar-modes.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/components/BottomBar/toolbar-modes.tsx index e7c8acaacde..6c1a8b4653a 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/components/BottomBar/toolbar-modes.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/components/BottomBar/toolbar-modes.tsx @@ -1,7 +1,5 @@ +import { Icon } from "@hashintel/ds-components"; import { css, cva } from "@hashintel/ds-helpers/css"; -import { FaChevronDown, FaRegHand } from "react-icons/fa6"; -import { LuMousePointerClick } from "react-icons/lu"; -import { TbCirclePlus2, TbSquarePlus2 } from "react-icons/tb"; import { Menu, type MenuItem } from "../../../../components/menu"; import type { @@ -74,7 +72,7 @@ const CursorModeDropdown: React.FC<{ const items: MenuItem[] = [ { id: "select", - icon: , + icon: , label: "Select", suffix: "V", selected: cursorMode === "select", @@ -82,7 +80,7 @@ const CursorModeDropdown: React.FC<{ }, { id: "pan", - icon: , + icon: , label: "Pan", suffix: "H", selected: cursorMode === "pan", @@ -99,11 +97,11 @@ const CursorModeDropdown: React.FC<{ aria-label="Cursor mode" > {cursorMode === "pan" ? ( - + ) : ( - + )} - + } items={items} @@ -151,7 +149,7 @@ export const ToolbarModes: React.FC = ({ event.dataTransfer.setData("application/reactflow", "place"); }} > - + = ({ event.dataTransfer.setData("application/reactflow", "transition"); }} > - + )} diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/components/TopBar/mode-selector.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/components/TopBar/mode-selector.tsx index df37bce271e..f12a7841687 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/components/TopBar/mode-selector.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/components/TopBar/mode-selector.tsx @@ -1,4 +1,4 @@ -import { TbCategory, TbCircleFilled, TbPlayerPlay } from "react-icons/tb"; +import { Icon } from "@hashintel/ds-components"; import type { SegmentOption } from "../../../../components/segment-group"; import { SegmentGroup } from "../../../../components/segment-group"; @@ -12,17 +12,17 @@ const options: SegmentOption[] = [ { label: "Edit", value: "edit", - icon: , + icon: , }, { label: "Simulate", value: "simulate", - icon: , + icon: , }, { label: "Actual", value: "actual", - icon: , + icon: , disabled: true, tooltip: "Actual mode is not yet available.", }, diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/components/TopBar/top-bar.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/components/TopBar/top-bar.tsx index d69befbce96..e9cce919bf2 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/components/TopBar/top-bar.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/components/TopBar/top-bar.tsx @@ -1,12 +1,7 @@ import { css } from "@hashintel/ds-helpers/css"; import { use } from "react"; -import { FaBars } from "react-icons/fa6"; -import { - TbLayoutSidebarLeftCollapse, - TbLayoutSidebarRightCollapse, -} from "react-icons/tb"; -import { IconButton } from "../../../../components/icon-button"; +import { Button } from "../../../../components/button"; import { Menu, type MenuItem } from "../../../../components/menu"; import { EditorContext, @@ -73,8 +68,8 @@ export const TopBar: React.FC = ({ return (
- { setLeftSidebarOpen(!isLeftSidebarOpen); @@ -83,19 +78,21 @@ export const TopBar: React.FC = ({ } }} aria-label={isLeftSidebarOpen ? "Collapse sidebar" : "Expand sidebar"} - > - {isLeftSidebarOpen ? ( - - ) : ( - - )} - + tooltip={isLeftSidebarOpen ? "Collapse sidebar" : "Expand sidebar"} + tooltipDisplay="inline" + iconName="sidebar" + /> - - +
diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/BottomPanel/subviews/diagnostics.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/BottomPanel/subviews/diagnostics.tsx index a455cf667d7..d861194f6ab 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/BottomPanel/subviews/diagnostics.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/BottomPanel/subviews/diagnostics.tsx @@ -1,7 +1,6 @@ +import { Icon, Button } from "@hashintel/ds-components"; import { css } from "@hashintel/ds-helpers/css"; import { use, useCallback, useMemo, useState } from "react"; -import { FaChevronDown, FaChevronRight } from "react-icons/fa6"; -import { TbArrowRight } from "react-icons/tb"; import type { Diagnostic } from "vscode-languageserver-types"; import type { SubView } from "../../../../../components/sub-view/types"; @@ -118,25 +117,10 @@ const simulationErrorTextStyle = css({ }); const editButtonStyle = css({ - fontSize: "[11px]", - paddingY: "1", - paddingX: "2", - border: "[1px solid rgba(211, 47, 47, 0.3)]", - borderRadius: "sm", - backgroundColor: "neutral.s00", - cursor: "pointer", - color: "red.s60", - display: "inline-flex", - alignItems: "center", - gap: "1", marginTop: "1", alignSelf: "flex-start", }); -const editButtonIconStyle = css({ - fontSize: "xs", -}); - type EntityType = "transition" | "differential-equation"; interface GroupedDiagnostics { @@ -261,8 +245,7 @@ const DiagnosticsContent: React.FC = () => {
{simulationError}
{errorItemId && ( - + )}
)} @@ -296,9 +283,9 @@ const DiagnosticsContent: React.FC = () => { className={entityButtonStyle} > {isExpanded ? ( - + ) : ( - + )} {entityLabel} diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/BottomPanel/subviews/simulation-settings.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/BottomPanel/subviews/simulation-settings.tsx index 2836c0b0033..963addb5bc8 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/BottomPanel/subviews/simulation-settings.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/BottomPanel/subviews/simulation-settings.tsx @@ -1,8 +1,8 @@ +import { Icon } from "@hashintel/ds-components"; import { css } from "@hashintel/ds-helpers/css"; import { use, useState } from "react"; -import { TbList, TbMinus, TbPencil, TbPlus } from "react-icons/tb"; -import { IconButton } from "../../../../../components/icon-button"; +import { Button } from "../../../../../components/button"; import { NumberInput } from "../../../../../components/number-input"; import { Select } from "../../../../../components/select"; import { Slider } from "../../../../../components/slider"; @@ -238,7 +238,11 @@ const SimulationSettingsContent: React.FC = () => { renderItem={(option) => ( {option.value === NO_SCENARIO && ( - + )} {option.label} @@ -246,34 +250,34 @@ const SimulationSettingsContent: React.FC = () => { />
{selectedScenario && ( - setIsViewScenarioOpen(true)} - > - - + /> )} - setIsCreateScenarioOpen(true)} - > - - - +
{
{selectedMetric && ( - setIsViewOpen(true)} - > - - + /> )} - setIsCreateOpen(true)} - > - - - +
{ const isReadOnly = useIsReadOnly(); return ( - { const name = `Equation ${differentialEquations.length + 1}`; const id = uuidv4(); @@ -45,9 +50,7 @@ export const DifferentialEquationsSectionHeaderAction: React.FC = () => { }); selectItem({ type: "differentialEquation", id }); }} - > - - + /> ); }; @@ -61,7 +64,7 @@ const DiffEqRowMenu: React.FC<{ item: { id: string } }> = ({ item }) => { { id: "delete", label: "Delete", - icon: , + icon: , destructive: true, disabled: isReadOnly, onClick: () => removeDifferentialEquation(item.id), diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/entities-tree.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/entities-tree.tsx index f439d73e342..35eafdd3fec 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/entities-tree.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/entities-tree.tsx @@ -1,7 +1,7 @@ +import { Icon } from "@hashintel/ds-components"; import { css } from "@hashintel/ds-helpers/css"; import type { ComponentType } from "react"; import { use } from "react"; -import { TbTrash } from "react-icons/tb"; import type { SubView } from "../../../../../components/sub-view/types"; import { @@ -82,7 +82,7 @@ const EntityRowMenu: React.FC<{ item: EntityTreeItem }> = ({ item }) => { { id: "delete", label: "Delete", - icon: , + icon: , destructive: true, disabled: isReadOnly, onClick: deleteAction, diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/filterable-list-sub-view.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/filterable-list-sub-view.tsx index ccde5e0dd9d..86a1757227c 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/filterable-list-sub-view.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/filterable-list-sub-view.tsx @@ -1,10 +1,9 @@ +import { Icon } from "@hashintel/ds-components"; import { css, cva } from "@hashintel/ds-helpers/css"; import type { ComponentType, ReactNode } from "react"; import { Fragment, use, useEffect, useRef, useState } from "react"; -import { LuChevronRight, LuSearch } from "react-icons/lu"; -import { TbDots } from "react-icons/tb"; -import { IconButton } from "../../../../../components/icon-button"; +import { Button } from "../../../../../components/button"; import type { MenuItem } from "../../../../../components/menu"; import { Menu } from "../../../../../components/menu"; import type { @@ -158,7 +157,6 @@ const chevronStyle = cva({ }, }); -const CHEVRON_SIZE = 10; const NESTING_INDENT = 16; const emptyMessageStyle = css({ @@ -203,13 +201,15 @@ const FilterHeaderAction: React.FC<{ return ( <> - setSearchOpen(true)} - > - - + /> {renderExtraAction?.()} ); @@ -228,14 +228,16 @@ export const RowMenu: React.FC<{ items: MenuItem[] }> = ({ items }) => { event.stopPropagation()} - > - - + /> } items={items} placement="bottom-end" @@ -567,7 +569,7 @@ const FilterableListContent = ({
{isItemGroup && ( - + )} {item.icon && ( diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/parameters-list.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/parameters-list.tsx index fa5284404c1..40ed10a95f8 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/parameters-list.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/parameters-list.tsx @@ -1,9 +1,9 @@ +import { Icon } from "@hashintel/ds-components"; import { css } from "@hashintel/ds-helpers/css"; import { use } from "react"; -import { TbPlus, TbTrash } from "react-icons/tb"; import { v4 as uuidv4 } from "uuid"; -import { IconButton } from "../../../../../components/icon-button"; +import { Button } from "../../../../../components/button"; import type { SubView } from "../../../../../components/sub-view/types"; import { ParameterIcon } from "../../../../../constants/entity-icons"; import { UI_MESSAGES } from "../../../../../constants/ui-messages"; @@ -50,15 +50,16 @@ export const ParametersHeaderAction: React.FC = () => { }; return ( - - - + /> ); }; @@ -77,7 +78,7 @@ const ParameterRowMenu: React.FC<{ item: { id: string } }> = ({ item }) => { { id: "delete", label: "Delete", - icon: , + icon: , destructive: true, disabled: isReadOnly, onClick: () => removeParameter(item.id), diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/search-panel.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/search-panel.tsx index 211690d5001..55a81e7f5a2 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/search-panel.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/search-panel.tsx @@ -1,10 +1,12 @@ +import { Icon } from "@hashintel/ds-components"; import { css, cva } from "@hashintel/ds-helpers/css"; import fuzzysort from "fuzzysort"; import type { ComponentType, ReactNode } from "react"; import { use, useEffect, useRef, useState } from "react"; -import { LuSearch } from "react-icons/lu"; -import { IconButton } from "../../../../../components/icon-button"; +const SearchIcon = () => ; + +import { Button } from "../../../../../components/button"; import type { SubView } from "../../../../../components/sub-view/types"; import { DifferentialEquationIcon, @@ -421,20 +423,22 @@ const SearchHeaderAction: React.FC = () => { const { setSearchOpen } = use(EditorContext); return ( - setSearchOpen(false)} - > - ✕ - + /> ); }; export const searchSubView: SubView = { id: "search", title: "Search", - icon: LuSearch, + icon: SearchIcon, component: SearchContent, renderTitle: () => , renderHeaderAction: () => , diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/types-list.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/types-list.tsx index 1c81f6b7442..513553d8908 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/types-list.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/LeftSideBar/subviews/types-list.tsx @@ -1,7 +1,7 @@ +import { Icon } from "@hashintel/ds-components"; import { use } from "react"; -import { TbPlus, TbTrash } from "react-icons/tb"; -import { IconButton } from "../../../../../components/icon-button"; +import { Button } from "../../../../../components/button"; import type { SubView } from "../../../../../components/sub-view/types"; import { TokenTypeIcon } from "../../../../../constants/entity-icons"; import { UI_MESSAGES } from "../../../../../constants/ui-messages"; @@ -71,11 +71,14 @@ export const TypesSectionHeaderAction: React.FC = () => { const isReadOnly = useIsReadOnly(); return ( - { const existingColors = types.map((type) => type.displayColor); const existingNames = types.map((type) => type.name); @@ -99,9 +102,7 @@ export const TypesSectionHeaderAction: React.FC = () => { addType(newType); selectItem({ type: "type", id }); }} - > - - + /> ); }; @@ -115,7 +116,7 @@ const TypeRowMenu: React.FC<{ item: { id: string } }> = ({ item }) => { { id: "delete", label: "Delete", - icon: , + icon: , destructive: true, disabled: isReadOnly, onClick: () => removeType(item.id), diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/arc-properties/main.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/arc-properties/main.tsx index c7579973681..e1331afc190 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/arc-properties/main.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/arc-properties/main.tsx @@ -1,9 +1,10 @@ +import { Icon } from "@hashintel/ds-components"; import { css } from "@hashintel/ds-helpers/css"; import { createContext, use } from "react"; -import { PiScribbleLoopBold } from "react-icons/pi"; -import { TbTrash } from "react-icons/tb"; -import { IconButton } from "../../../../../components/icon-button"; +import { Button } from "../../../../../components/button"; + +const ArcIcon = () => ; import { NumberInput } from "../../../../../components/number-input"; import { Section, SectionList } from "../../../../../components/section"; import { Select } from "../../../../../components/select"; @@ -138,26 +139,27 @@ const DeleteArcAction: React.FC = () => { const isReadOnly = useIsReadOnly(); return ( - { removeArc(transitionId, arcDirection, placeId); clearSelection(); }} disabled={isReadOnly} tooltip={isReadOnly ? UI_MESSAGES.READ_ONLY_MODE : "Delete"} - > - - + tooltipDisplay="inline" + /> ); }; const arcMainContentSubView: SubView = { id: "arc-main-content", title: "Arc", - icon: PiScribbleLoopBold, + icon: ArcIcon, main: true, component: ArcMainContent, renderHeaderAction: () => , diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/differential-equation-properties/subviews/main.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/differential-equation-properties/subviews/main.tsx index 13695d5d558..09ff752c6cd 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/differential-equation-properties/subviews/main.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/differential-equation-properties/subviews/main.tsx @@ -1,9 +1,8 @@ +import { Icon } from "@hashintel/ds-components"; import { css } from "@hashintel/ds-helpers/css"; import { useState } from "react"; -import { TbDotsVertical, TbSparkles } from "react-icons/tb"; import { Button } from "../../../../../../components/button"; -import { IconButton } from "../../../../../../components/icon-button"; import { Input } from "../../../../../../components/input"; import { Menu } from "../../../../../../components/menu"; import { Section, SectionList } from "../../../../../../components/section"; @@ -86,10 +85,6 @@ const aiMenuItemStyle = css({ gap: "[6px]", }); -const aiIconStyle = css({ - fontSize: "base", -}); - const DiffEqMainContent: React.FC = () => { const { differentialEquation, types, places, updateDifferentialEquation } = useDiffEqPropertiesContext(); @@ -295,9 +290,14 @@ const DiffEqCodeAction: React.FC = () => { - - + @@ -303,7 +301,7 @@ const PlaceMainContent: React.FC = () => { }); } }} - suffix={} + suffix={} > Jump to Differential Equation @@ -344,16 +342,17 @@ const DeletePlaceAction: React.FC = () => { const { removePlace } = use(MutationContext); return ( - removePlace(place.id)} disabled={isReadOnly} tooltip={isReadOnly ? UI_MESSAGES.READ_ONLY_MODE : "Delete"} - > - - + tooltipDisplay="inline" + /> ); }; diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/place-properties/subviews/place-initial-state/subview.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/place-properties/subviews/place-initial-state/subview.tsx index d5308e48110..b7eae102a18 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/place-properties/subviews/place-initial-state/subview.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/place-properties/subviews/place-initial-state/subview.tsx @@ -1,8 +1,8 @@ +import { Icon } from "@hashintel/ds-components"; import { css } from "@hashintel/ds-helpers/css"; import { use } from "react"; -import { LuLayers2 } from "react-icons/lu"; -import { TbTrash } from "react-icons/tb"; +import { Button } from "../../../../../../../components/button"; import { NumberInput } from "../../../../../../../components/number-input"; import type { SubView } from "../../../../../../../components/sub-view/types"; import { UI_MESSAGES } from "../../../../../../../constants/ui-messages"; @@ -23,22 +23,6 @@ const simpleStateContainerStyle = css({ gap: "[8px]", }); -const clearButtonStyle = css({ - fontSize: "[10px]", - padding: "[1px 4px]", - border: "[1px solid rgba(0, 0, 0, 0.2)]", - borderRadius: "[3px]", - backgroundColor: "neutral.s00", - cursor: "pointer", - color: "[#666]", - display: "flex", - alignItems: "center", - gap: "[4px]", - _hover: { - backgroundColor: "[rgba(0, 0, 0, 0.03)]", - }, -}); - const scenarioInfoStyle = css({ display: "flex", alignItems: "center", @@ -67,7 +51,7 @@ const ClearStateHeaderAction: React.FC = () => { if (selectedScenarioId) { return (
- + Defined by scenario
); @@ -86,10 +70,15 @@ const ClearStateHeaderAction: React.FC = () => { }; return ( - + ); }; diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/place-properties/subviews/place-visualizer/subview.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/place-properties/subviews/place-visualizer/subview.tsx index aa90453ecd8..eb7cc0b2825 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/place-properties/subviews/place-visualizer/subview.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/PropertiesPanel/place-properties/subviews/place-visualizer/subview.tsx @@ -1,8 +1,8 @@ +import { Icon } from "@hashintel/ds-components"; import { css } from "@hashintel/ds-helpers/css"; import { use, useEffect, useMemo, useState } from "react"; -import { TbDotsVertical, TbSparkles } from "react-icons/tb"; -import { IconButton } from "../../../../../../../components/icon-button"; +import { Button } from "../../../../../../../components/button"; import { Menu } from "../../../../../../../components/menu"; import { SegmentGroup } from "../../../../../../../components/segment-group"; import type { SubView } from "../../../../../../../components/sub-view/types"; @@ -71,10 +71,6 @@ const aiMenuItemStyle = css({ gap: "[6px]", }); -const aiIconStyle = css({ - fontSize: "base", -}); - /** * Renders the visualizer preview for the current place, * using simulation frame data or initial marking. @@ -267,9 +263,14 @@ const VisualizerHeaderAction: React.FC = () => { - - +
))} diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/create-experiment-drawer.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/create-experiment-drawer.tsx index 43225d9973f..3d469114abe 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/create-experiment-drawer.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/create-experiment-drawer.tsx @@ -1,6 +1,6 @@ +import { Icon } from "@hashintel/ds-components"; import { css } from "@hashintel/ds-helpers/css"; import { use, useState } from "react"; -import { TbPlayerPlay } from "react-icons/tb"; import { Button } from "../../../../components/button"; import { Drawer } from "../../../../components/drawer"; @@ -205,7 +205,7 @@ export const CreateExperimentDrawer = ({ variant="solid" tone="neutral" size="sm" - prefix={} + prefix={} onClick={() => {}} > Play diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/scenario-form.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/scenario-form.tsx index 63588390658..1ac2ebed82f 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/scenario-form.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/scenario-form.tsx @@ -1,9 +1,8 @@ import { css } from "@hashintel/ds-helpers/css"; import { useForm, useStore } from "@tanstack/react-form"; import { use, useEffect, useRef, useState } from "react"; -import { TbPlus, TbTrash } from "react-icons/tb"; -import { IconButton } from "../../../../components/icon-button"; +import { Button } from "../../../../components/button"; import { Input } from "../../../../components/input"; import { Section, SectionList } from "../../../../components/section"; import { Select } from "../../../../components/select"; @@ -633,14 +632,15 @@ const ScenarioFormSections = ({ collapsible defaultOpen renderHeaderAction={() => ( - - - + /> )} > @@ -720,15 +720,16 @@ const ScenarioFormSections = ({ /> )} - removeScenarioParam(param._key)} - > - - + /> )) )} diff --git a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/simulate-view.tsx b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/simulate-view.tsx index 6d8848e0a07..e2a35e62661 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/simulate-view.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/simulate-view.tsx @@ -1,8 +1,6 @@ +import { Icon } from "@hashintel/ds-components"; import { css } from "@hashintel/ds-helpers/css"; import { use, useState } from "react"; -import { LuLayers2 } from "react-icons/lu"; -import { PiFlaskBold } from "react-icons/pi"; -import { TbChartBar, TbPlus } from "react-icons/tb"; import { Button } from "../../../../components/button"; import type { SegmentOption } from "../../../../components/segment-group"; @@ -170,21 +168,21 @@ const modeOptions: SegmentOption[] = [ { value: "scenarios", label: "Scenarios", - icon: , + icon: , hideLabel: true, tooltip: "Scenarios", }, { value: "metrics", label: "Metrics", - icon: , + icon: , hideLabel: true, tooltip: "Metrics", }, { value: "experiments", label: "Experiments", - icon: , + icon: , hideLabel: true, tooltip: "Experiments not yet available", disabled: true, @@ -343,7 +341,7 @@ export const SimulateView = () => { variant="ghost" tone="neutral" size="xs" - prefix={} + prefix={} onClick={() => setDrawer({ type: "create-scenario" })} > Create scenario @@ -354,7 +352,7 @@ export const SimulateView = () => { variant="ghost" tone="neutral" size="xs" - prefix={} + prefix={} onClick={() => setDrawer({ type: "create-metric" })} > Create metric @@ -365,7 +363,7 @@ export const SimulateView = () => { variant="ghost" tone="neutral" size="xs" - prefix={} + prefix={} onClick={() => setDrawer({ type: "create-experiment" })} > Create experiment diff --git a/libs/@hashintel/petrinaut/src/ui/views/SDCPN/components/classic-place-node.tsx b/libs/@hashintel/petrinaut/src/ui/views/SDCPN/components/classic-place-node.tsx index 40b7e7c4cfb..be6fa73ff5e 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/SDCPN/components/classic-place-node.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/SDCPN/components/classic-place-node.tsx @@ -1,7 +1,7 @@ +import { Icon } from "@hashintel/ds-components"; import { css, cva } from "@hashintel/ds-helpers/css"; import { Handle, type NodeProps, Position } from "@xyflow/react"; import { use } from "react"; -import { TbMathFunction } from "react-icons/tb"; import { hexToHsl } from "../../../lib/hsl-color"; import { splitPascalCase } from "../../../lib/split-pascal-case"; @@ -176,7 +176,7 @@ export const ClassicPlaceNode: React.FC> = ({ > {data.dynamicsEnabled && (
- +
)}
{label}
diff --git a/libs/@hashintel/petrinaut/src/ui/views/SDCPN/components/classic-transition-node.tsx b/libs/@hashintel/petrinaut/src/ui/views/SDCPN/components/classic-transition-node.tsx index 5cb924cb9b4..54e7387f77d 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/SDCPN/components/classic-transition-node.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/SDCPN/components/classic-transition-node.tsx @@ -1,7 +1,7 @@ +import { Icon } from "@hashintel/ds-components"; import { css, cva } from "@hashintel/ds-helpers/css"; import { Handle, type NodeProps, Position } from "@xyflow/react"; import { use, useEffect, useRef } from "react"; -import { TbBolt, TbLambda } from "react-icons/tb"; import { EditorContext } from "../../../../react/state/editor-context"; import { useFiringDelta } from "../hooks/use-firing-delta"; @@ -214,12 +214,12 @@ export const ClassicTransitionNode: React.FC> = ({ > {data.lambdaType === "stochastic" && (
- +
)}
{label}
- +
> = ({ className={`${iconContainerBaseStyle} ${placeIconContainerStyle}`} style={{ color: typeColorBorder }} > - + {data.dynamicsEnabled && (
- +
)} diff --git a/libs/@hashintel/petrinaut/src/ui/views/SDCPN/components/transition-node.tsx b/libs/@hashintel/petrinaut/src/ui/views/SDCPN/components/transition-node.tsx index 3febc40fe10..f14948375b7 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/SDCPN/components/transition-node.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/SDCPN/components/transition-node.tsx @@ -1,7 +1,7 @@ +import { Icon } from "@hashintel/ds-components"; import { css } from "@hashintel/ds-helpers/css"; import type { NodeProps } from "@xyflow/react"; import { use, useEffect, useRef } from "react"; -import { TbBolt, TbLambda, TbSquareFilled } from "react-icons/tb"; import { EditorContext } from "../../../../react/state/editor-context"; import { useFiringDelta } from "../hooks/use-firing-delta"; @@ -146,10 +146,10 @@ export const TransitionNode: React.FC> = ({
- + {data.lambdaType === "stochastic" && (
- +
)}
@@ -158,7 +158,7 @@ export const TransitionNode: React.FC> = ({ subtitle={subtitle} badge={
- +
} isConnectable={isConnectable} diff --git a/libs/@hashintel/petrinaut/src/ui/views/SDCPN/components/viewport-controls.tsx b/libs/@hashintel/petrinaut/src/ui/views/SDCPN/components/viewport-controls.tsx index 28ef11c2cd9..e0b969f8d21 100644 --- a/libs/@hashintel/petrinaut/src/ui/views/SDCPN/components/viewport-controls.tsx +++ b/libs/@hashintel/petrinaut/src/ui/views/SDCPN/components/viewport-controls.tsx @@ -1,15 +1,8 @@ import { css, cva } from "@hashintel/ds-helpers/css"; import { useReactFlow } from "@xyflow/react"; import { use, useState } from "react"; -import { - TbLockOpen, - TbMaximize, - TbMinus, - TbPlus, - TbSettings, -} from "react-icons/tb"; -import { IconButton } from "../../../components/icon-button"; +import { Button } from "../../../components/button"; import { PANEL_MARGIN } from "../../../constants/ui"; import { EditorContext } from "../../../../react/state/editor-context"; import type { ViewportAction } from "../../../types/viewport-action"; @@ -62,73 +55,73 @@ export const ViewportControls: React.FC<{ className={`${containerStyle} ${animatingStyle({ animating: isPanelAnimating })}`} style={{ right: rightOffset, bottom: bottomOffset }} > - zoomIn()} - > - - - +