From 49dcf4e0b72053a8c0feb5983a0f5eec663832c4 Mon Sep 17 00:00:00 2001 From: buchananwill <139961977+buchananwill@users.noreply.github.com> Date: Fri, 29 Mar 2024 23:30:25 +0000 Subject: [PATCH] Changing every btn to Button. --- app/build-metrics/[schedule]/page.tsx | 55 +++++++++++-------- .../class-hierarchy/[yearGroup]/page.tsx | 2 +- .../[yearGroup]/bundles/bundle-editor.tsx | 16 ++++-- .../[yearGroup]/bundles/page.tsx | 2 +- .../add-new-curriculum-model-card.tsx | 19 ++++--- .../curriculum-delivery-model.tsx | 19 +++---- app/generic/components/buttons/pagination.tsx | 16 +++++- .../components/buttons/two-stage-click.tsx | 20 ++++--- .../calendar/range/choose-calendar-range.tsx | 37 +++++++------ .../disclosure-that-grows-open.tsx | 9 +-- .../components/dropdown/filter-dropdown.tsx | 1 - .../components/dropdown/tuple-selector.tsx | 12 ++-- .../components/overlays/deleted-overlay.tsx | 13 +++-- .../selective-context-range-slider.tsx | 21 ++++--- .../components/tab-layouts/tab-styled.tsx | 16 ++++-- .../components/tables/big-table-card.tsx | 2 +- .../rating/rated-element-row-header.tsx | 10 ++-- .../tool-card/right-hand-tool-card.tsx | 2 +- .../components/tool-card/tool-card.tsx | 2 +- .../components/graph-view-options.tsx | 9 +-- .../components/node-detail-wrapper.tsx | 43 ++++++++------- .../curriculum-delivery-graph.tsx | 2 +- app/navbar/protected-navigation.tsx | 20 +++---- app/playground/page.tsx | 2 +- .../some-button-to-control-gary.tsx | 6 +- .../apply-search-params.tsx | 1 - .../asset-suitability-table-wrapper.tsx | 2 +- app/premises/classroom-suitability/page.tsx | 2 +- .../search-params-filter-group.tsx | 2 +- .../add-teacher-form/add-teacher-form.tsx | 17 +++--- .../teachers/skills/skill-table-wrapper.tsx | 2 +- .../color-context-button.tsx | 14 +++-- .../knowledge-domain-dependencies.tsx | 8 +-- .../knowledge-domain-name-cell.tsx | 5 +- .../knowledge-domain-table-editor.tsx | 4 +- .../new-knowledge-domain-button.tsx | 21 ++++--- .../knowledge-level-dependencies.tsx | 8 +-- .../knowledge-level-name-cell.tsx | 5 +- .../knowledge-level-table-editor.tsx | 2 +- .../new-knowledge-level-button.tsx | 9 ++- .../[schedule]/data-not-found-card.tsx | 4 +- tailwind.config.ts | 2 +- 42 files changed, 266 insertions(+), 198 deletions(-) diff --git a/app/build-metrics/[schedule]/page.tsx b/app/build-metrics/[schedule]/page.tsx index 3d7697a..09f2a86 100644 --- a/app/build-metrics/[schedule]/page.tsx +++ b/app/build-metrics/[schedule]/page.tsx @@ -1,4 +1,5 @@ -import { Button, Card, Text, Title } from '@tremor/react'; +import { Button, Text, Title } from '@tremor/react'; +import { Card, CardBody } from '@nextui-org/react'; import { BuildMetricsChart } from './buildMetricsChart'; import MetricsContextProvider from './metrics-context-provider'; @@ -27,34 +28,40 @@ export default async function BuildMetricsOverview({ const buildMetricDto = buildMetricDtoResponse.data; if (buildMetricDto === undefined) { console.log(buildMetricDtoResponse.message); - return No data found!; + return ( + + No data found! + + ); } return ( -
- - Build Metric Overview, Schedule {scheduleId} - - - - - -
- - Total allocation loops: {buildMetricDto.totalAllocationLoops} - - Final State: {buildMetricDto.finalState} - + +
+ + Build Metric Overview, Schedule {scheduleId} + + + + + +
+ + Total allocation loops: {buildMetricDto.totalAllocationLoops} + + Final State: {buildMetricDto.finalState} + +
); diff --git a/app/curriculum/class-hierarchy/[yearGroup]/page.tsx b/app/curriculum/class-hierarchy/[yearGroup]/page.tsx index f135e71..0e3cc55 100644 --- a/app/curriculum/class-hierarchy/[yearGroup]/page.tsx +++ b/app/curriculum/class-hierarchy/[yearGroup]/page.tsx @@ -4,7 +4,7 @@ import { getOrganizationGraphByOrganizationType, getSchemasByIdList } from '../../../api/actions/curriculum-delivery-model'; -import { Card } from '@tremor/react'; +import { Card } from '@nextui-org/react'; import ForceGraphPage from '../../../graphing/force-graph-page'; diff --git a/app/curriculum/delivery-models/[yearGroup]/bundles/bundle-editor.tsx b/app/curriculum/delivery-models/[yearGroup]/bundles/bundle-editor.tsx index ec449e5..db6a685 100644 --- a/app/curriculum/delivery-models/[yearGroup]/bundles/bundle-editor.tsx +++ b/app/curriculum/delivery-models/[yearGroup]/bundles/bundle-editor.tsx @@ -39,6 +39,7 @@ import { UnsavedBundleEdits } from '../../../../selective-context/keys/work-series-schema-bundle-keys'; import { RenameModalWrapperContextKey } from '../../../../selective-context/keys/modal-keys'; +import { Button } from '@nextui-org/react'; function bundleSort( bun1: WorkSeriesSchemaBundleLeanDto, @@ -215,11 +216,11 @@ export function BundleEditor({
Current Tab: - deleteBundle(activeBundleAndId.id)}> + deleteBundle(activeBundleAndId.id)}> @@ -258,12 +259,15 @@ export function BundleEditor({
- + {sortedBundleList.map(({ id }, index) => ( diff --git a/app/curriculum/delivery-models/[yearGroup]/bundles/page.tsx b/app/curriculum/delivery-models/[yearGroup]/bundles/page.tsx index 4bbc471..9bb52fb 100644 --- a/app/curriculum/delivery-models/[yearGroup]/bundles/page.tsx +++ b/app/curriculum/delivery-models/[yearGroup]/bundles/page.tsx @@ -3,7 +3,7 @@ import { getCurriculumDeliveryModelSchemasByKnowledgeLevel } from '../../../../api/actions/curriculum-delivery-model'; import { normalizeQueryParamToNumber } from '../../../../api/utils'; -import { Card } from '@tremor/react'; +import { Card } from '@nextui-org/react'; import { BundleEditor } from './bundle-editor'; import { BundleItemsContextProvider } from '../../contexts/bundle-items-context-provider'; import { BundleAssignmentsProvider } from '../../contexts/bundle-assignments-provider'; diff --git a/app/curriculum/delivery-models/add-new-curriculum-model-card.tsx b/app/curriculum/delivery-models/add-new-curriculum-model-card.tsx index f566e7a..06eee38 100644 --- a/app/curriculum/delivery-models/add-new-curriculum-model-card.tsx +++ b/app/curriculum/delivery-models/add-new-curriculum-model-card.tsx @@ -1,5 +1,5 @@ 'use client'; -import { Card } from '@tremor/react'; +import { Button, Card } from '@nextui-org/react'; import { PlusCircleIcon } from '@heroicons/react/24/outline'; import React, { useMemo, useState } from 'react'; @@ -28,6 +28,7 @@ import { useModal } from '../../generic/components/modals/confirm-action-modal'; import TupleSelector from '../../generic/components/dropdown/tuple-selector'; +import { isNotNull } from '../../api/main'; const noTaskType: NameIdStringTuple = { name: 'No Type Selected', id: 'n/a' }; @@ -55,7 +56,8 @@ export function AddNewCurriculumModelCard({ const { isOpen, closeModal, openModal } = useModal(); const { workTaskTypeMap } = useWorkTaskTypeContext(); const { dispatch, curriculumModelsMap } = useCurriculumModelContext(); - const [newModelTaskType, setNewModelTaskType] = useState(noTaskType); + const [newModelTaskType, setNewModelTaskType] = + useState(null); const [nextModelId, setNextModelId] = useState(crypto.randomUUID()); const [revertUnsaved, setRevertUnsaved] = useState(true); const appRouterInstance = useRouter(); @@ -99,12 +101,13 @@ export function AddNewCurriculumModelCard({ } setNextModelId(crypto.randomUUID()); setNewModelTaskType( - taskTypeSelectionList.length > 0 ? taskTypeSelectionList[0] : noTaskType + taskTypeSelectionList.length > 0 ? taskTypeSelectionList[0] : null ); closeModal(); }; const handleAddNewModel = () => { + if (!isNotNull(newModelTaskType)) return; const unsavedModel: WorkProjectSeriesSchemaDto = { ...curriculumModelsMap[nextModelId], id: nextModelId, @@ -129,12 +132,14 @@ export function AddNewCurriculumModelCard({ return ( <> - +
- + {' '} - +
Periods diff --git a/app/generic/components/buttons/pagination.tsx b/app/generic/components/buttons/pagination.tsx index dc06f46..fd8962e 100644 --- a/app/generic/components/buttons/pagination.tsx +++ b/app/generic/components/buttons/pagination.tsx @@ -10,7 +10,9 @@ import { useEffect, useState, useTransition } from 'react'; import ProtectedNavigation from '../../../navbar/protected-navigation'; import { zeroIndexToOneIndex } from '../../../api/utils'; -const buttonClassName = 'btn relative btn-primary btn-outline'; +import { ButtonProps } from '@nextui-org/react'; +const buttonClassName = ' relative '; + const svgClassName = 'h-5 w-5 '; /** @@ -72,6 +74,9 @@ export function Pagination({
{!!lastPage && ( )} handleClick(false)} @@ -95,6 +103,9 @@ export function Pagination({ handleClick(true)} disabled={last || pending} @@ -106,6 +117,9 @@ export function Pagination({ {!!lastPage && ( (undefined); const { refs, floatingStyles } = useFloating({ @@ -24,9 +26,9 @@ export function TwoStageClick({ middleware: [offset({ mainAxis: 10 })] }); - const guardClick = (e: React.MouseEvent) => { - if (clickPrimed && onClick) { - onClick(e); + const guardClick = (e: PressEvent) => { + if (clickPrimed && isNotUndefined(onPress)) { + onPress(e); setClickPrimed(false); if (timeoutRef.current !== undefined) clearTimeout(timeoutRef.current); } else { @@ -43,7 +45,7 @@ export function TwoStageClick({ color={clickPrimed ? primedAppearance : 'default'} variant={standardAppearance} size={'sm'} - onClick={guardClick} + onPress={guardClick} > {children} @@ -51,9 +53,9 @@ export function TwoStageClick({
- + {primedMessage}
diff --git a/app/generic/components/calendar/range/choose-calendar-range.tsx b/app/generic/components/calendar/range/choose-calendar-range.tsx index 1370cce..4341a4f 100644 --- a/app/generic/components/calendar/range/choose-calendar-range.tsx +++ b/app/generic/components/calendar/range/choose-calendar-range.tsx @@ -17,6 +17,7 @@ import { ChevronLeftIcon } from '@heroicons/react/24/solid'; import ZoomBothAxes from '../../zoom/zoom-both-axes'; import { Tooltip, TooltipTrigger } from '../../tooltips/tooltip'; import { StandardTooltipContent } from '../../tooltips/standard-tooltip-content'; +import { Button } from '@nextui-org/react'; type TooltipOptions = | 'minusWeek' | 'minusDay' @@ -87,21 +88,23 @@ export function ChooseCalendarRange() {
- + - + @@ -124,20 +127,22 @@ export function ChooseCalendarRange() {
- + - +
diff --git a/app/generic/components/disclosures/disclosure-that-grows-open.tsx b/app/generic/components/disclosures/disclosure-that-grows-open.tsx index 105b9e3..71e153b 100644 --- a/app/generic/components/disclosures/disclosure-that-grows-open.tsx +++ b/app/generic/components/disclosures/disclosure-that-grows-open.tsx @@ -1,5 +1,6 @@ import { ChevronDownIcon } from '@heroicons/react/20/solid'; import { PropsWithChildren, useState } from 'react'; +import { Button } from '@nextui-org/react'; export function DisclosureThatGrowsOpen({ children, @@ -15,9 +16,9 @@ export function DisclosureThatGrowsOpen({ return (
- +
; @@ -62,11 +63,14 @@ export default function TupleSelector({ - + {show && ( - + + )} diff --git a/app/generic/components/range-input/selective-context-range-slider.tsx b/app/generic/components/range-input/selective-context-range-slider.tsx index a1c41b6..65a5652 100644 --- a/app/generic/components/range-input/selective-context-range-slider.tsx +++ b/app/generic/components/range-input/selective-context-range-slider.tsx @@ -1,6 +1,7 @@ 'use client'; import React from 'react'; import { useSelectiveContextControllerNumber } from '../../../selective-context/components/typed/selective-context-manager-number'; +import { Slider } from '@nextui-org/react'; export function SelectiveContextRangeSlider({ contextKey, @@ -22,19 +23,25 @@ export function SelectiveContextRangeSlider({ }); return ( - { + onChange={(value) => { + const singleValue = Array.isArray(value) ? value[0] : value; + dispatchUpdate({ contextKey: contextKey, - value: parseInt(event.target.value) + value: singleValue }); }} - > + > ); } diff --git a/app/generic/components/tab-layouts/tab-styled.tsx b/app/generic/components/tab-layouts/tab-styled.tsx index 3e39f52..26c7326 100644 --- a/app/generic/components/tab-layouts/tab-styled.tsx +++ b/app/generic/components/tab-layouts/tab-styled.tsx @@ -1,17 +1,21 @@ -import React from 'react'; +import React, { Fragment } from 'react'; import { Tab } from '@headlessui/react'; +import { Button } from '@nextui-org/react'; +import { isFragment } from 'preact/compat'; export function TabStyled({ children }: { children: string }) { return ( - - {({ selected }) => ( - + )} ); diff --git a/app/generic/components/tables/big-table-card.tsx b/app/generic/components/tables/big-table-card.tsx index a34830c..16070f5 100644 --- a/app/generic/components/tables/big-table-card.tsx +++ b/app/generic/components/tables/big-table-card.tsx @@ -1,4 +1,4 @@ -import { Card } from '@tremor/react'; +import { Card } from '@nextui-org/react'; import React from 'react'; export default function BigTableCard({ diff --git a/app/generic/components/tables/rating/rated-element-row-header.tsx b/app/generic/components/tables/rating/rated-element-row-header.tsx index eb706b5..2ba2236 100644 --- a/app/generic/components/tables/rating/rated-element-row-header.tsx +++ b/app/generic/components/tables/rating/rated-element-row-header.tsx @@ -7,6 +7,7 @@ import { EmptyArray, isNotUndefined } from '../../../../api/main'; import { useUnsavedListContext } from '../../../../selective-context/hooks/derived/use-unsaved-list-context'; import { RatingStepper } from '../../buttons/rating-stepper'; import { ArrowRightIcon, PencilSquareIcon } from '@heroicons/react/20/solid'; +import { Button } from '@nextui-org/react'; export function RatedElementRowHeader({ elementWithRating @@ -57,17 +58,18 @@ export function RatedElementRowHeader({ return ( <> - + - +
({ label, @@ -29,17 +30,18 @@ export function NodeDetailWrapper({ <>
-
- + - - {label} - - + + {({ open }) => ( + + )} ); } diff --git a/app/graphing/graph-types/organization/curriculum-delivery-graph.tsx b/app/graphing/graph-types/organization/curriculum-delivery-graph.tsx index 763cb0e..6c3e356 100644 --- a/app/graphing/graph-types/organization/curriculum-delivery-graph.tsx +++ b/app/graphing/graph-types/organization/curriculum-delivery-graph.tsx @@ -5,7 +5,7 @@ import { GraphDtoPutRequestBody } from '../../../api/zod-mods'; import React, { PropsWithChildren, useEffect, useMemo } from 'react'; -import { Card } from '@tremor/react'; +import { Card } from '@nextui-org/react'; import CurriculumDeliveryDetails from './curriculum-delivery-details'; import { NodePayload } from '../../force-graph-page'; import { WorkSeriesBundleDeliveryDto } from '../../../api/dtos/WorkSeriesBundleDeliveryDtoSchema'; diff --git a/app/navbar/protected-navigation.tsx b/app/navbar/protected-navigation.tsx index 8150c06..f307882 100644 --- a/app/navbar/protected-navigation.tsx +++ b/app/navbar/protected-navigation.tsx @@ -11,14 +11,11 @@ import { useSelectiveContextDispatchBoolean, useSelectiveContextListenerBoolean } from '../selective-context/components/typed/selective-context-manager-boolean'; +import { Button, ButtonProps } from '@nextui-org/react'; const paginationUnsavedListenerKey = ':pagination'; -export interface ProtectedNavigationProps - extends React.DetailedHTMLProps< - React.ButtonHTMLAttributes, - HTMLButtonElement - > { +export interface ProtectedNavigationProps extends ButtonProps { onConfirm: () => void; children: ReactNode; isActive?: boolean; @@ -49,7 +46,8 @@ const ProtectedNavigation = forwardRef< unsavedContextKey, unsavedListenerKey: listenerKeyProp, className, - disabled + disabled, + ...buttonProps } = props; let [isOpen, setIsOpen] = useState(false); @@ -86,9 +84,9 @@ const ProtectedNavigation = forwardRef< return ( <> - + diff --git a/app/playground/page.tsx b/app/playground/page.tsx index 2e68368..4f0276e 100644 --- a/app/playground/page.tsx +++ b/app/playground/page.tsx @@ -1,5 +1,5 @@ import SomeComponent from './some-component'; -import { Card } from '@tremor/react'; +import { Card } from '@nextui-org/react'; import SelectiveContextManagerGlobal from '../selective-context/components/global/selective-context-manager-global'; import SomeButtonToControlGary from './some-button-to-control-gary'; import SomeComponentInterestedInGary from './some-component-interested-in-gary'; diff --git a/app/playground/some-button-to-control-gary.tsx b/app/playground/some-button-to-control-gary.tsx index 46f5d6e..2ed788b 100644 --- a/app/playground/some-button-to-control-gary.tsx +++ b/app/playground/some-button-to-control-gary.tsx @@ -3,6 +3,7 @@ import { useSelectiveContextAnyDispatch } from '../selective-context/components/ import { NameIdStringTuple } from '../api/dtos/NameIdStringTupleSchema'; import { ObjectPlaceholder } from '../selective-context/components/typed/selective-context-manager-function'; import { parseTen } from '../api/date-and-time'; +import { Button } from '@nextui-org/react'; export default function SomeButtonToControlGary() { const { dispatchWithoutControl, currentState } = @@ -13,8 +14,7 @@ export default function SomeButtonToControlGary() { }); return ( - + ); } diff --git a/app/premises/classroom-suitability/apply-search-params.tsx b/app/premises/classroom-suitability/apply-search-params.tsx index 36db651..a20e283 100644 --- a/app/premises/classroom-suitability/apply-search-params.tsx +++ b/app/premises/classroom-suitability/apply-search-params.tsx @@ -34,7 +34,6 @@ export function ApplySearchParams({ return ( diff --git a/app/premises/classroom-suitability/asset-suitability-table-wrapper.tsx b/app/premises/classroom-suitability/asset-suitability-table-wrapper.tsx index 96b7ec2..6cc482e 100644 --- a/app/premises/classroom-suitability/asset-suitability-table-wrapper.tsx +++ b/app/premises/classroom-suitability/asset-suitability-table-wrapper.tsx @@ -4,7 +4,7 @@ import { IdStringFromNumberAccessor } from './rating-table-accessor-functions'; import { useWorkTaskTypeContext } from '../../curriculum/delivery-models/contexts/use-work-task-type-context'; import { useSelectiveContextControllerNumberList } from '../../selective-context/components/typed/selective-context-manager-number-list'; import { useAssetStringMapContext } from '../asset-string-map-context-creator'; -import { Card } from '@tremor/react'; +import { Card } from '@nextui-org/react'; import { RatingTableBody } from '../../generic/components/tables/rating/rating-table-body'; import { useMemoizedSelectionFromListAndStringMap } from './use-memoized-selection-from-list-and-string-map'; import { EmptyArray } from '../../api/main'; diff --git a/app/premises/classroom-suitability/page.tsx b/app/premises/classroom-suitability/page.tsx index 3dd1e3f..e704ac1 100644 --- a/app/premises/classroom-suitability/page.tsx +++ b/app/premises/classroom-suitability/page.tsx @@ -6,7 +6,7 @@ import { getPremises, getPremisesWithRoot } from '../../api/actions/premises'; -import { Card } from '@tremor/react'; +import { Card } from '@nextui-org/react'; import { AssetSuitabilityTableWrapper } from './asset-suitability-table-wrapper'; import { getWorkTaskTypes } from '../../api/actions/work-task-types'; import { isNotUndefined } from '../../api/main'; diff --git a/app/premises/classroom-suitability/search-params-filter-group.tsx b/app/premises/classroom-suitability/search-params-filter-group.tsx index a50f3f1..95cd4bf 100644 --- a/app/premises/classroom-suitability/search-params-filter-group.tsx +++ b/app/premises/classroom-suitability/search-params-filter-group.tsx @@ -1,5 +1,5 @@ 'use client'; -import { Card } from '@tremor/react'; +import { Card } from '@nextui-org/react'; import { AccessorFunction } from '../../generic/components/tables/rating/rating-table'; import SearchParamsContextProvider from '../../contexts/string-map-context/search-params-context-provider'; import { ApplySearchParams } from './apply-search-params'; diff --git a/app/staffroom/add-teacher-form/add-teacher-form.tsx b/app/staffroom/add-teacher-form/add-teacher-form.tsx index 59dce13..9fc3357 100644 --- a/app/staffroom/add-teacher-form/add-teacher-form.tsx +++ b/app/staffroom/add-teacher-form/add-teacher-form.tsx @@ -24,6 +24,7 @@ import { createTeacher } from '../../api/actions/provider-roles'; import { useServiceCategoryContext } from '../../work-types/lessons/use-service-category-context'; import { useProviderRoleStringMapContext } from '../contexts/providerRoles/provider-role-string-map-context-creator'; import { Overlay } from '../../generic/components/overlays/overlay'; +import { Button, Card, CardBody, CardFooter } from '@nextui-org/react'; const partyData: PersonDto[] = [ { @@ -110,10 +111,10 @@ export default function AddTeacherForm() { ); } return ( - <> + {!serverAvailable && Server not available.}
-
+ Form to add a teacher.
Use existing person:
@@ -261,7 +262,7 @@ export default function AddTeacherForm() { {domainArray.map((knowledgeDomain) => ( @@ -294,11 +295,11 @@ export default function AddTeacherForm() { )} />
-
- -
-
+ + + +
- +
); } diff --git a/app/staffroom/teachers/skills/skill-table-wrapper.tsx b/app/staffroom/teachers/skills/skill-table-wrapper.tsx index 6c6ea46..7381adb 100644 --- a/app/staffroom/teachers/skills/skill-table-wrapper.tsx +++ b/app/staffroom/teachers/skills/skill-table-wrapper.tsx @@ -2,7 +2,7 @@ import RatingTable from '../../../generic/components/tables/rating/rating-table'; import { RatingTableBody } from '../../../generic/components/tables/rating/rating-table-body'; import { IdStringFromNumberAccessor } from '../../../premises/classroom-suitability/rating-table-accessor-functions'; -import { Card } from '@tremor/react'; +import { Card } from '@nextui-org/react'; import { useProviderRoleStringMapContext } from '../../contexts/providerRoles/provider-role-string-map-context-creator'; import { useSelectiveContextControllerNumberList } from '../../../selective-context/components/typed/selective-context-manager-number-list'; import { ProviderRoleSelectionList } from '../provider-role-disclosure-list-panel/provider-role-button-cluster'; diff --git a/app/staffroom/workshop-job-modal/color-context-button.tsx b/app/staffroom/workshop-job-modal/color-context-button.tsx index 8fc15f0..b02790f 100644 --- a/app/staffroom/workshop-job-modal/color-context-button.tsx +++ b/app/staffroom/workshop-job-modal/color-context-button.tsx @@ -2,9 +2,9 @@ import { ButtonHTMLAttributes, useContext } from 'react'; import { RunnableContext } from './runnable-context'; import { ColorCoding } from '../../generic/components/color/color-coding-context'; +import { Button, ButtonProps } from '@nextui-org/react'; -interface ColorContextButtonProps - extends ButtonHTMLAttributes { +interface ColorContextButtonProps extends ButtonProps { contextKey: string; } @@ -20,14 +20,16 @@ export function ColorContextButton({ const hue = colorCodingContextElement?.hue; const id = hue?.id || 'gray'; return ( - + ); } diff --git a/app/teaching-categories/[categoryIdentifier]/knowledge-domain/knowledge-domain-dependencies.tsx b/app/teaching-categories/[categoryIdentifier]/knowledge-domain/knowledge-domain-dependencies.tsx index d84e3e6..9c8f163 100644 --- a/app/teaching-categories/[categoryIdentifier]/knowledge-domain/knowledge-domain-dependencies.tsx +++ b/app/teaching-categories/[categoryIdentifier]/knowledge-domain/knowledge-domain-dependencies.tsx @@ -20,10 +20,9 @@ export function KnowledgeDomainDependencies({ workTaskTypeCount ) } - standardAppearance={'btn-ghost'} - primedAppearance={'btn-primary'} + standardAppearance={'light'} + primedAppearance={'primary'} primedMessage={'Go to dependencies?'} - className={'btn-sm'} > {workTaskTypeCount} @@ -32,8 +31,7 @@ export function KnowledgeDomainDependencies({ onClick={() => { deleteKnowledgeDomain(kd).then(() => appRouterInstance.refresh()); }} - standardAppearance={'btn-ghost'} - className={'btn-sm'} + standardAppearance={'light'} > {workTaskTypeCount} diff --git a/app/teaching-categories/[categoryIdentifier]/knowledge-domain/knowledge-domain-name-cell.tsx b/app/teaching-categories/[categoryIdentifier]/knowledge-domain/knowledge-domain-name-cell.tsx index 1d3210f..d6f8024 100644 --- a/app/teaching-categories/[categoryIdentifier]/knowledge-domain/knowledge-domain-name-cell.tsx +++ b/app/teaching-categories/[categoryIdentifier]/knowledge-domain/knowledge-domain-name-cell.tsx @@ -9,6 +9,7 @@ import { useRouter } from 'next/navigation'; import { useValidationUniqueNonEmpty } from '../knowledge-level/knowledge-level-name-cell'; import { useModal } from '../../../generic/components/modals/confirm-action-modal'; import { RenameModal } from '../../../generic/components/modals/rename-modal'; +import { Button } from '@nextui-org/react'; export function KnowledgeDomainNameCell({ kd, @@ -43,9 +44,9 @@ export function KnowledgeDomainNameCell({ return ( <> - + {name} - Work Task Types +
Work Task Types
diff --git a/app/teaching-categories/[categoryIdentifier]/knowledge-domain/new-knowledge-domain-button.tsx b/app/teaching-categories/[categoryIdentifier]/knowledge-domain/new-knowledge-domain-button.tsx index bf9423c..28fef0b 100644 --- a/app/teaching-categories/[categoryIdentifier]/knowledge-domain/new-knowledge-domain-button.tsx +++ b/app/teaching-categories/[categoryIdentifier]/knowledge-domain/new-knowledge-domain-button.tsx @@ -23,10 +23,11 @@ import { ConfirmActionModal, useModal } from '../../../generic/components/modals/confirm-action-modal'; +import { Button, ButtonProps } from '@nextui-org/react'; const NewKnowledgeDomainContextKey = 'new-knowledge-domain-name'; -type NewKnowledgeDomainButtonProps = Omit & { +type NewKnowledgeDomainButtonProps = Omit & { serviceCategory: ServiceCategoryDto; knowledgeDomainServiceCategoryNameList: string[]; }; @@ -70,7 +71,8 @@ function NewKnowledgeDomainPanel({ export function NewKnowledgeDomainButton({ serviceCategory, className, - knowledgeDomainServiceCategoryNameList + knowledgeDomainServiceCategoryNameList, + ...buttonProps }: NewKnowledgeDomainButtonProps) { const [pending, startTransition] = useTransition(); const appRouterInstance = useRouter(); @@ -133,20 +135,25 @@ export function NewKnowledgeDomainButton({ return ( <> - + + New + console.log('Number of tasks associated:', workTaskTypeCount) } - standardAppearance={'btn-ghost'} - primedAppearance={'btn-primary'} + standardAppearance={'light'} + primedAppearance={'primary'} primedMessage={'Go to dependencies?'} - className={'btn-sm'} > {workTaskTypeCount} @@ -25,8 +24,7 @@ export function KnowledgeLevelDependencies({ kl }: { kl: KnowledgeLevelDto }) { onClick={() => { deleteKnowledgeLevel(kl).then(() => appRouterInstance.refresh()); }} - standardAppearance={'btn-ghost'} - className={'btn-sm'} + standardAppearance={'light'} > {workTaskTypeCount} diff --git a/app/teaching-categories/[categoryIdentifier]/knowledge-level/knowledge-level-name-cell.tsx b/app/teaching-categories/[categoryIdentifier]/knowledge-level/knowledge-level-name-cell.tsx index d511624..39c9a08 100644 --- a/app/teaching-categories/[categoryIdentifier]/knowledge-level/knowledge-level-name-cell.tsx +++ b/app/teaching-categories/[categoryIdentifier]/knowledge-level/knowledge-level-name-cell.tsx @@ -10,6 +10,7 @@ import { ServiceCategoryDto } from '../../../api/dtos/ServiceCategoryDtoSchema'; import { useEffect, useState } from 'react'; import { useModal } from '../../../generic/components/modals/confirm-action-modal'; import { RenameModal } from '../../../generic/components/modals/rename-modal'; +import { Button } from '@nextui-org/react'; export function useValidationUniqueNonEmpty( proposedName: string, @@ -62,9 +63,9 @@ export function KnowledgeLevelNameCell({ return (
- + {name} {category.knowledgeLevelDescriptor} diff --git a/app/teaching-categories/[categoryIdentifier]/knowledge-level/new-knowledge-level-button.tsx b/app/teaching-categories/[categoryIdentifier]/knowledge-level/new-knowledge-level-button.tsx index fb5d0b9..437ca29 100644 --- a/app/teaching-categories/[categoryIdentifier]/knowledge-level/new-knowledge-level-button.tsx +++ b/app/teaching-categories/[categoryIdentifier]/knowledge-level/new-knowledge-level-button.tsx @@ -22,6 +22,7 @@ import { ConfirmActionModal, useModal } from '../../../generic/components/modals/confirm-action-modal'; +import { Button } from '@nextui-org/react'; const NewKnowledgeLevelContextKey = 'new-knowledge-Level-name'; @@ -154,20 +155,22 @@ export function NewKnowledgeLevelButton({ return ( <> - + {children}; -} \ No newline at end of file +} diff --git a/tailwind.config.ts b/tailwind.config.ts index ee63674..5f6f63a 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -54,7 +54,7 @@ export default { }, content: { subtle: '#9ca3af', // gray-400 - DEFAULT: '#d6d6d6', + DEFAULT: '#989898', emphasis: '#374151', // gray-700 strong: '#111827', // gray-900 inverted: '#ffffff' // white