Skip to content

Commit

Permalink
Added a customizable PopoverTimepicker (#2781)
Browse files Browse the repository at this point in the history
* feat: daily plan compare estimated logic

* fix: cspell error

* fix: cspell error

* feat: daily plan compare estimated logic

* fix: cspell error

* feat: customize time picker

* fix: error

* fix: error

* fix: errors

* fix: CSpell errors

* fix: errors

* fix: DeepScan errors

---------

Co-authored-by: cedric karungu <[email protected]>
  • Loading branch information
Innocent-Akim and Cedric921 authored Jul 22, 2024
1 parent 4973610 commit f0282ec
Show file tree
Hide file tree
Showing 6 changed files with 328 additions and 83 deletions.
57 changes: 29 additions & 28 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
"Accordian",
"adipiscing",
"aliqua",
"tblr",
"conver",
"amet",
"Andross",
"animatable",
Expand All @@ -23,6 +21,7 @@
"arrowleft",
"asel",
"Authentificate",
"authjs",
"barcodes",
"billrate",
"binutils",
Expand All @@ -48,6 +47,7 @@
"choos",
"ciphertext",
"classpath",
"Clik",
"cloc",
"clockcircleo",
"cloudinary",
Expand All @@ -62,13 +62,21 @@
"combx",
"commitlint",
"comparision",
"comparization",
"compodoc",
"consectetur",
"containerd",
"contaniner",
"conver",
"creatoe",
"dailyplan",
"Darkmode",
"datas",
"dataToDisplay",
"dearmor",
"deepscan",
"Defaul",
"Desabled",
"Descrption",
"deserunt",
"dimesions",
Expand All @@ -79,6 +87,7 @@
"domutils",
"DONT",
"dotenv",
"dpkg",
"Dropown",
"dropwdown",
"dummyimage",
Expand All @@ -90,6 +99,7 @@
"embla",
"Enderbury",
"endregion",
"Entra",
"Entypo",
"envalid",
"errr",
Expand All @@ -115,6 +125,7 @@
"gauzystage",
"gcloud",
"Gitter",
"GlobalSkeleton",
"gradlew",
"graphicsmagick",
"greenkeeper",
Expand Down Expand Up @@ -170,9 +181,11 @@
"kanban",
"Kanbanboard",
"kanbandata",
"keyrings",
"Kiritimati",
"Kolkata",
"Kosrae",
"Koyeb",
"labore",
"Lask",
"lastest",
Expand All @@ -191,6 +204,7 @@
"mathieudutour",
"Mazen",
"Metral",
"MICROSOFTENTRAID",
"miliseconds",
"millisencods",
"mobx",
Expand All @@ -200,7 +214,11 @@
"nextjs",
"nimg",
"nocheck",
"nodesource",
"nodistro",
"noreferrer",
"Northflank",
"Notif",
"Opena",
"opentelemetry",
"Ordereds",
Expand All @@ -220,10 +238,12 @@
"phraseapp",
"pkill",
"Plaholder",
"plan",
"plasmo",
"plasmohq",
"popperjs",
"Pourtcent",
"prebuild",
"precommit",
"Pressable",
"Pressible",
Expand All @@ -236,6 +256,7 @@
"RECAPTCHA",
"recieve",
"Reconds",
"Relationnal",
"Repobeats",
"RESERVERD",
"Rickert",
Expand All @@ -249,6 +270,7 @@
"Settingfilter",
"setuptools",
"setwin",
"setwork",
"shadcn",
"shandow",
"signin",
Expand All @@ -259,9 +281,8 @@
"skey",
"smalltext",
"snyk",
"Sonner",
"sonner",
"Notif",
"Sonner",
"stackoverflow",
"statsus",
"statut",
Expand All @@ -270,8 +291,8 @@
"stylelint",
"stylesheet",
"subsquently",
"svgs",
"svgr",
"svgs",
"Swith",
"Syle",
"Synk",
Expand All @@ -281,6 +302,7 @@
"tanstack",
"taskid",
"taskstatus",
"tblr",
"teamtask",
"tempor",
"testid",
Expand All @@ -290,6 +312,7 @@
"tinvitations",
"tnode",
"Togger",
"tomorow",
"Tongatapu",
"tota",
"TRANSFERT",
Expand Down Expand Up @@ -326,29 +349,7 @@
"Xlarge",
"xlcard",
"xlight",
"yellowbox",
"Desabled",
"keyrings",
"dearmor",
"dpkg",
"containerd",
"nodistro",
"nodesource",
"Koyeb",
"Northflank",
"prebuild",
"dataToDisplay",
"GlobalSkeleton",
"dailyplan",
"tomorow",
"comparization",
"plan",
"setwork",
"Clik",
"Relationnal",
"authjs",
"MICROSOFTENTRAID",
"Entra"
"yellowbox"
],
"useGitignore": true,
"ignorePaths": [
Expand Down
82 changes: 41 additions & 41 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
{
"importSorter.generalConfiguration.sortOnBeforeSave": false,
"importSorter.sortConfiguration.joinImportPaths": false,
"cSpell.userWords": [],
"cSpell.enabled": true,
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"npm.packageManager": "yarn",
"prettier.trailingComma": "none",
"prettier.singleQuote": true,
"editor.formatOnSave": true,
"eslint.format.enable": true,
"editor.tabSize": 4,
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": true,
"editor.codeActionsOnSave": {
"source.fixAll": "explicit",
"source.organizeImports": "never",
"source.sortMembers": "never",
"organizeImports": "never"
},
"vsicons.presets.angular": true,
"deepscan.enable": true,
"cSpell.words": [],
"files.exclude": {
"**/.git": true,
"**/.DS_Store": true,
"**/node_modules": false,
"**/public/**/*.png": false,
"**/public/**/*.jpg": false,
"**/public/**/*.pdf": true
},
"search.exclude": {
"**/node_modules": true,
"**/.idea": true,
"**/.idea/**/*.{xml,iml}": true,
"**/.iml": true,
"**/.yarn": true,
"**/yarn.lock": true
},
"docwriter.style": "Auto-detect"
"importSorter.generalConfiguration.sortOnBeforeSave": false,
"importSorter.sortConfiguration.joinImportPaths": false,
"cSpell.userWords": [],
"cSpell.enabled": true,
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"npm.packageManager": "yarn",
"prettier.trailingComma": "none",
"prettier.singleQuote": true,
"editor.formatOnSave": true,
"eslint.format.enable": true,
"editor.tabSize": 4,
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": true,
"editor.codeActionsOnSave": {
"source.fixAll": "explicit",
"source.organizeImports": "never",
"source.sortMembers": "never",
"organizeImports": "never"
},
"vsicons.presets.angular": true,
"deepscan.enable": true,
"cSpell.words": ["Timepicker"],
"files.exclude": {
"**/.git": true,
"**/.DS_Store": true,
"**/node_modules": false,
"**/public/**/*.png": false,
"**/public/**/*.jpg": false,
"**/public/**/*.pdf": true
},
"search.exclude": {
"**/node_modules": true,
"**/.idea": true,
"**/.idea/**/*.{xml,iml}": true,
"**/.iml": true,
"**/.yarn": true,
"**/yarn.lock": true
},
"docwriter.style": "Auto-detect"
}
46 changes: 46 additions & 0 deletions apps/web/components/ui/scroll-area.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import * as React from "react"
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area"

import { cn } from "lib/utils"

const ScrollArea = React.forwardRef<
React.ElementRef<typeof ScrollAreaPrimitive.Root>,
React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>
>(({ className, children, ...props }, ref) => (
<ScrollAreaPrimitive.Root
ref={ref}
className={cn("relative overflow-hidden", className)}
{...props}
>
<ScrollAreaPrimitive.Viewport className="h-full w-full rounded-[inherit]">
{children}
</ScrollAreaPrimitive.Viewport>
<ScrollBar />
<ScrollAreaPrimitive.Corner />
</ScrollAreaPrimitive.Root>
))
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName

const ScrollBar = React.forwardRef<
React.ElementRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>,
React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>
>(({ className, orientation = "vertical", ...props }, ref) => (
<ScrollAreaPrimitive.ScrollAreaScrollbar
ref={ref}
orientation={orientation}
className={cn(
"flex touch-none select-none transition-colors",
orientation === "vertical" &&
"h-full w-2.5 border-l border-l-transparent p-[1px]",
orientation === "horizontal" &&
"h-2.5 flex-col border-t border-t-transparent p-[1px]",
className
)}
{...props}
>
<ScrollAreaPrimitive.ScrollAreaThumb className="relative flex-1 rounded-full bg-border" />
</ScrollAreaPrimitive.ScrollAreaScrollbar>
))
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName

export { ScrollArea, ScrollBar }
1 change: 1 addition & 0 deletions apps/web/lib/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export * from './separator';
export * from './color-picker';
export * from './no-data';
export * from './pagination';
export * from './time-picker'

export * from './inputs/input';
export * from './inputs/auth-code-input';
Expand Down
Loading

0 comments on commit f0282ec

Please sign in to comment.