diff --git a/src/globals.css b/src/globals.css index 67b9ea9..4d34b17 100644 --- a/src/globals.css +++ b/src/globals.css @@ -327,3 +327,89 @@ body { opacity: 1; } } + +/* Radix Select */ +.SelectTrigger { + display: inline-flex; + align-items: center; + justify-content: center; + border-radius: 4px; + padding: 0 15px; + font-size: 13px; + line-height: 1; + height: 35px; + gap: 5px; + background-color: white; +} +.SelectTrigger:hover { + background-color: var(--mauve-3); +} +.SelectTrigger:focus { + box-shadow: 0 0 0 2px black; +} +.SelectTrigger[data-placeholder] { +} + +.SelectIcon { +} + +.SelectContent { + overflow: hidden; + background-color: white; + border-radius: 6px; + box-shadow: + 0px 10px 38px -10px rgba(22, 23, 24, 0.35), + 0px 10px 20px -15px rgba(22, 23, 24, 0.2); +} + +.SelectViewport { + padding: 5px; +} + +.SelectItem { + font-size: 13px; + line-height: 1; + border-radius: 3px; + display: flex; + align-items: center; + height: 25px; + padding: 0 35px 0 25px; + position: relative; + user-select: none; + background-color: white; +} +.SelectItem[data-disabled] { + pointer-events: none; +} +.SelectItem[data-highlighted] { + outline: none; +} + +.SelectLabel { + padding: 0 25px; + font-size: 12px; + line-height: 25px; +} + +.SelectSeparator { + height: 1px; + margin: 5px; +} + +.SelectItemIndicator { + position: absolute; + left: 0; + width: 25px; + display: inline-flex; + align-items: center; + justify-content: center; +} + +.SelectScrollButton { + display: flex; + align-items: center; + justify-content: center; + height: 25px; + background-color: white; + cursor: default; +} diff --git a/src/routes/protected/pages/add-pages.tsx b/src/routes/protected/pages/add-pages.tsx index 9b586e6..5dd6736 100644 --- a/src/routes/protected/pages/add-pages.tsx +++ b/src/routes/protected/pages/add-pages.tsx @@ -1,5 +1,5 @@ import { useState } from 'react'; -import { ChevronDownIcon } from '@radix-ui/react-icons'; +import { ChevronDownIcon, ChevronUpIcon } from '@radix-ui/react-icons'; import * as Select from '@radix-ui/react-select'; import * as Separator from '@radix-ui/react-separator'; import * as Tabs from '@radix-ui/react-tabs'; @@ -78,6 +78,7 @@ const AddPages = () => { const { register, control, handleSubmit, reset, watch } = useForm({ defaultValues: { urls: [{ url: '' }], + sitemapUrl: '', property: '', }, }); @@ -104,33 +105,37 @@ const AddPages = () => { className="mt-7 space-y-6 rounded-lg bg-white p-6 shadow" aria-live="polite" > - - - - By URL - - + + - By Sitemap - - - By CSV - - - - URL - + + By URL + + + By Sitemap + + + By CSV + + + + {/******* + URL Input tab Content + **********/} + URL + {fields.map((item, index) => { return ( @@ -138,7 +143,9 @@ const AddPages = () => { { + return true; + }, // TODO conditional on current tab })} /> @@ -162,68 +169,31 @@ const AddPages = () => { > Add URL - - ( - - - - - - - - - - - - - None - - {initialProperties.map((item, index) => ( - - {item.name} - - ))} - - - - - - - )} + + + {/******* + Sitemap Input tab Content + **********/} + Sitemap URL + { + return true; + }, // TODO conditional on current tab + })} /> - - - reset({ - urls: [{ url: '' }], - }) - } - > - reset - - - - - - Sitemap - - - CSV - - - + + + {/******* + CSV Input tab Content + **********/} + CSV + + + - {/* navigate(-1)} @@ -231,6 +201,63 @@ const AddPages = () => { > Cancel */} + + ( + + + + + + + + + + + + + + + None + + {initialProperties.map((item, index) => ( + + {item.name} + + ))} + + + + + + + + )} + /> + + + + + reset({ + urls: [{ url: '' }], + }) + } + > + reset + + + > );
URL
Sitemap URL
Sitemap
CSV