From 49069a717e9e8cace85c94e6ac5619da902159a1 Mon Sep 17 00:00:00 2001 From: Jake Laderman Date: Tue, 5 Nov 2024 19:11:42 -0500 Subject: [PATCH] feat: various updates (#661) --- package.json | 2 +- src/components/Date.tsx | 8 ++++---- src/components/ModalWrapper.tsx | 5 +++-- src/components/icons/EKSIcon.tsx | 6 +++--- src/components/icons/GKEIcon.tsx | 10 +++++----- src/components/icons/TerraformIcon.tsx | 17 ----------------- src/components/icons/TerraformLogoIcon.tsx | 15 +++++++-------- src/icons.ts | 1 - src/index.ts | 1 - yarn.lock | 16 ++++++++-------- 10 files changed, 31 insertions(+), 50 deletions(-) delete mode 100644 src/components/icons/TerraformIcon.tsx diff --git a/package.json b/package.json index 019aa775..db319c49 100644 --- a/package.json +++ b/package.json @@ -48,11 +48,11 @@ "babel-plugin-styled-components": "2.1.4", "chroma-js": "2.4.2", "classnames": "2.3.2", + "dayjs": "1.11.13", "highlight.js": "11.9.0", "honorable-recipe-mapper": "0.2.0", "immer": "10.0.3", "lodash-es": "4.17.21", - "moment": "2.29.4", "react-animate-height": "3.2.3", "react-aria": "3.34.3", "react-embed": "3.7.0", diff --git a/src/components/Date.tsx b/src/components/Date.tsx index 4e0895c3..4e0fcced 100644 --- a/src/components/Date.tsx +++ b/src/components/Date.tsx @@ -1,6 +1,6 @@ import { Span } from 'honorable' -import moment from 'moment' +import dayjs from 'dayjs' import styled from 'styled-components' const Wrap = styled.div({ @@ -19,13 +19,13 @@ const T = styled.span(({ theme }) => ({ whiteSpace: 'nowrap', })) -export default function Date({ date }: { date: moment.MomentInput }) { +export default function Date({ date }: { date: dayjs.ConfigType }) { if (!date) return n/a return ( - {moment(date).format('ll')} - {moment(date).format('h:mm A')} + {dayjs(date).format('MMM D, YYYY')} + {dayjs(date).format('h:mm A')} ) } diff --git a/src/components/ModalWrapper.tsx b/src/components/ModalWrapper.tsx index c39ef325..52939aab 100644 --- a/src/components/ModalWrapper.tsx +++ b/src/components/ModalWrapper.tsx @@ -58,10 +58,11 @@ function ModalWrapperRef( ) } -const ContentSC = styled(Dialog.Content)({ +const ContentSC = styled(Dialog.Content)(({ theme }) => ({ display: 'flex', flexDirection: 'column', overflow: 'auto', + boxShadow: theme.boxShadows.modal, '@keyframes popIn': { from: { transform: 'scale(0.8)' }, to: { transform: 'scale(1)' }, @@ -76,7 +77,7 @@ const ContentSC = styled(Dialog.Content)({ '&[data-state="closed"]': { animation: `popOut ${ANIMATION_SPEED} ease-out`, }, -}) +})) const OverlaySC = styled(Dialog.Overlay)(({ theme }) => ({ display: 'flex', diff --git a/src/components/icons/EKSIcon.tsx b/src/components/icons/EKSIcon.tsx index d2e64669..2cd95efc 100644 --- a/src/components/icons/EKSIcon.tsx +++ b/src/components/icons/EKSIcon.tsx @@ -1,6 +1,6 @@ import createIcon from './createIcon' -export default createIcon(({ size }) => ( +export default createIcon(({ size, color, fullColor }) => ( ( y2="7.00024" gradientUnits="userSpaceOnUse" > - + diff --git a/src/components/icons/GKEIcon.tsx b/src/components/icons/GKEIcon.tsx index 9db2480f..1eb6082c 100644 --- a/src/components/icons/GKEIcon.tsx +++ b/src/components/icons/GKEIcon.tsx @@ -1,6 +1,6 @@ import createIcon from './createIcon' -export default createIcon(({ size }) => ( +export default createIcon(({ size, color, fullColor }) => ( ( diff --git a/src/components/icons/TerraformIcon.tsx b/src/components/icons/TerraformIcon.tsx deleted file mode 100644 index 03f03185..00000000 --- a/src/components/icons/TerraformIcon.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import createIcon from './createIcon' - -export default createIcon(({ size, color }) => ( - - - - - - - - -)) diff --git a/src/components/icons/TerraformLogoIcon.tsx b/src/components/icons/TerraformLogoIcon.tsx index cab479c3..1c741ce5 100644 --- a/src/components/icons/TerraformLogoIcon.tsx +++ b/src/components/icons/TerraformLogoIcon.tsx @@ -1,21 +1,20 @@ import createIcon from './createIcon' -export default createIcon(({ size, color }) => ( +export default createIcon(({ size, color, fullColor }) => ( )) diff --git a/src/icons.ts b/src/icons.ts index 3a11efe2..42b392dd 100644 --- a/src/icons.ts +++ b/src/icons.ts @@ -197,7 +197,6 @@ export { default as SuitcaseIcon } from './components/icons/SuitcaseIcon' export { default as TableIcon } from './components/icons/TableIcon' export { default as TagIcon } from './components/icons/TagIcon' export { default as TerminalIcon } from './components/icons/TerminalIcon' -export { default as TerraformIcon } from './components/icons/TerraformIcon' export { default as TerraformLogoIcon } from './components/icons/TerraformLogoIcon' export { default as TestTubeIcon } from './components/icons/TestTubeIcon' export { default as ThumbsUpFilledIcon } from './components/icons/ThumbsUpFilledIcon' diff --git a/src/index.ts b/src/index.ts index 4ea3e4c7..331c5e23 100644 --- a/src/index.ts +++ b/src/index.ts @@ -123,7 +123,6 @@ export type { } from './components/AppList' export { AppList } from './components/AppList' export { default as Slider } from './components/Slider' -export { default as Layer } from './components/Layer' export { Breadcrumbs } from './components/Breadcrumbs' export { DatePicker } from './components/DatePicker' export { Switch } from './components/Switch' diff --git a/yarn.lock b/yarn.lock index 5fc17ae3..c10d975b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2616,6 +2616,7 @@ __metadata: chroma-js: 2.4.2 classnames: 2.3.2 conventional-changelog-conventionalcommits: 6.1.0 + dayjs: 1.11.13 eslint: 8.55.0 eslint-config-prettier: 9.1.0 eslint-plugin-import: 2.29.1 @@ -2638,7 +2639,6 @@ __metadata: jsdom: 23.0.1 lint-staged: 15.2.0 lodash-es: 4.17.21 - moment: 2.29.4 npm-run-all: 4.1.5 prettier: 3.0.3 react: 18.3.1 @@ -8078,6 +8078,13 @@ __metadata: languageName: node linkType: hard +"dayjs@npm:1.11.13": + version: 1.11.13 + resolution: "dayjs@npm:1.11.13" + checksum: f388db88a6aa93956c1f6121644e783391c7b738b73dbc54485578736565c8931bdfba4bb94e9b1535c6e509c97d5deb918bbe1ae6b34358d994de735055cca9 + languageName: node + linkType: hard + "debounce@npm:^1.2.1": version: 1.2.1 resolution: "debounce@npm:1.2.1" @@ -13551,13 +13558,6 @@ __metadata: languageName: node linkType: hard -"moment@npm:2.29.4": - version: 2.29.4 - resolution: "moment@npm:2.29.4" - checksum: 0ec3f9c2bcba38dc2451b1daed5daded747f17610b92427bebe1d08d48d8b7bdd8d9197500b072d14e326dd0ccf3e326b9e3d07c5895d3d49e39b6803b76e80e - languageName: node - linkType: hard - "morgan@npm:^1.10.0, morgan@npm:^1.8.2": version: 1.10.0 resolution: "morgan@npm:1.10.0"