From cdba677775b256684151881175af66871b1b5287 Mon Sep 17 00:00:00 2001 From: DerekAgility Date: Mon, 16 Dec 2024 15:40:41 -0500 Subject: [PATCH 1/3] New Plenum component DropdownWithMultiSelect --- .github/workflows/run_unit_test.yml | 2 +- .github/workflows/type-check.yml | 2 +- package.json | 9 +- .../buttons/Button/tests/Button.test.tsx | 11 +- stories/atoms/icons/TablerIcon.tsx | 21 +- stories/index.ts | 26 +- .../inputs/InputLabel/InputLabel.tsx | 6 +- .../molecules/inputs/checkbox/Checkbox.tsx | 64 +- .../molecules/inputs/combobox/ComboBox.tsx | 78 +- .../DropdownWithMultiSelect/DropdownItems.ts | 252 + .../DropdownWithMultiSelect.stories.tsx | 28 + .../DropdownWithMultiSelect.tsx | 58 + .../tests/DropdownWithMultiSelect.test.tsx | 69 + stories/organisms/index.ts | 27 +- tsconfig.json | 4 +- vitest.config.js | 6 + yarn.lock | 9687 +++++++++-------- 17 files changed, 5577 insertions(+), 4773 deletions(-) create mode 100644 stories/organisms/DropdownWithMultiSelect/DropdownItems.ts create mode 100644 stories/organisms/DropdownWithMultiSelect/DropdownWithMultiSelect.stories.tsx create mode 100644 stories/organisms/DropdownWithMultiSelect/DropdownWithMultiSelect.tsx create mode 100644 stories/organisms/DropdownWithMultiSelect/tests/DropdownWithMultiSelect.test.tsx diff --git a/.github/workflows/run_unit_test.yml b/.github/workflows/run_unit_test.yml index 89494f3c..96536a21 100644 --- a/.github/workflows/run_unit_test.yml +++ b/.github/workflows/run_unit_test.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v3 with: - node-version: "18" # Specify the Node.js version you want + node-version: "20" # Specify the Node.js version you want - name: Install dependencies run: yarn install # Installs dependencies using Yarn diff --git a/.github/workflows/type-check.yml b/.github/workflows/type-check.yml index dfd51556..72bef8a7 100644 --- a/.github/workflows/type-check.yml +++ b/.github/workflows/type-check.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v3 with: - node-version: "18" # Specify the Node.js version you want + node-version: "20" # Specify the Node.js version you want - name: Install dependencies run: yarn install # Or `npm install` if you're using npm diff --git a/package.json b/package.json index 25ae4af3..b4f0593c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@agility/plenum-ui", - "version": "2.1.18", + "version": "2.1.20-rc6", "license": "MIT", "main": "dist/index.js", "module": "dist/index.js", @@ -29,8 +29,8 @@ }, "dependencies": { "@floating-ui/react": "^0.25.0", - "@headlessui/react": "^1.7.10", - "@headlessui/tailwindcss": "^0.1.2", + "@headlessui/react": "2.1", + "@headlessui/tailwindcss": "0.2.1", "@heroicons/react": "^1.0.5", "@next/font": "^13.4.12", "@tabler/icons": "^2.26.0", @@ -62,7 +62,8 @@ "@testing-library/jest-dom": "^6.6.2", "@testing-library/react": "^16.0.1", "@types/jest": "^29.5.14", - "@types/node": "18.11.18", + "@types/node": "^22.10.2", + "@types/react": "^18.2.0", "autoprefixer": "^10.4.13", "esbuild": "^0.18.19", "eslint": "8.32.0", diff --git a/stories/atoms/buttons/Button/tests/Button.test.tsx b/stories/atoms/buttons/Button/tests/Button.test.tsx index 728248be..9c31b504 100644 --- a/stories/atoms/buttons/Button/tests/Button.test.tsx +++ b/stories/atoms/buttons/Button/tests/Button.test.tsx @@ -1,3 +1,4 @@ +import { vi } from "vitest"; import Button from "../Button"; import { render, screen, fireEvent } from "@testing-library/react"; @@ -58,28 +59,28 @@ describe("