From 91d1ca8f23c5fd42e3677e74b3e29138a2b0668d Mon Sep 17 00:00:00 2001 From: "heykd.eth" <65736142+thekidnamedkd@users.noreply.github.com> Date: Wed, 23 Oct 2024 01:25:33 -0700 Subject: [PATCH] feat(APP-3714): Rename ODS library to gov-ui-kit (#313) --- .storybook/manager.ts | 4 +- .storybook/preview.tsx | 8 +- .storybook/theme.ts | 2 +- CHANGELOG.md | 6 +- README.md | 18 +- docs/codingGuidelines/libraryDependencies.mdx | 6 +- docs/installation.mdx | 30 +- package.json | 12 +- src/core/assets/copy/coreCopy.ts | 2 +- .../human/accessories/buddha.svg | 2 +- .../human/accessories/earrings-circle.svg | 2 +- .../human/accessories/earrings-hoops.svg | 2 +- .../human/accessories/earrings-rhombus.svg | 2 +- .../human/accessories/earrings-skull.svg | 2 +- .../human/accessories/earrings-thunder.svg | 2 +- .../human/accessories/expression.svg | 2 +- .../human/accessories/flushed.svg | 2 +- .../human/accessories/head-flower.svg | 2 +- .../human/accessories/piercings-tattoo.svg | 2 +- .../human/accessories/piercings.svg | 2 +- .../illustrations/human/bodies/aragon.svg | 2 +- .../illustrations/human/bodies/blocks.svg | 2 +- .../illustrations/human/bodies/chart.svg | 2 +- .../human/bodies/computer-correct.svg | 2 +- .../illustrations/human/bodies/computer.svg | 2 +- .../illustrations/human/bodies/correct.svg | 2 +- .../human/bodies/double-correct.svg | 2 +- .../illustrations/human/bodies/elevating.svg | 2 +- .../illustrations/human/bodies/relaxed.svg | 2 +- .../human/bodies/sending-love.svg | 2 +- .../illustrations/human/bodies/voting.svg | 2 +- .../illustrations/human/expressions/angry.svg | 2 +- .../human/expressions/casual.svg | 2 +- .../human/expressions/crying.svg | 2 +- .../human/expressions/decided.svg | 2 +- .../human/expressions/excited.svg | 2 +- .../human/expressions/sad-left.svg | 2 +- .../human/expressions/sad-right.svg | 2 +- .../human/expressions/smile-wink.svg | 2 +- .../illustrations/human/expressions/smile.svg | 2 +- .../human/expressions/surprised.svg | 2 +- .../human/expressions/suspecting.svg | 2 +- .../assets/illustrations/human/hairs/afro.svg | 2 +- .../assets/illustrations/human/hairs/bald.svg | 2 +- .../assets/illustrations/human/hairs/bun.svg | 2 +- .../assets/illustrations/human/hairs/cool.svg | 2 +- .../illustrations/human/hairs/curly-bangs.svg | 2 +- .../illustrations/human/hairs/curly.svg | 2 +- .../illustrations/human/hairs/informal.svg | 2 +- .../assets/illustrations/human/hairs/long.svg | 2 +- .../illustrations/human/hairs/middle.svg | 2 +- .../illustrations/human/hairs/oldschool.svg | 2 +- .../assets/illustrations/human/hairs/punk.svg | 2 +- .../illustrations/human/hairs/short.svg | 2 +- .../human/sunglasses/big-rounded.svg | 2 +- .../human/sunglasses/big-semirounded.svg | 2 +- .../human/sunglasses/large-stylized-xl.svg | 2 +- .../human/sunglasses/large-stylized.svg | 2 +- .../illustrations/human/sunglasses/pirate.svg | 2 +- .../human/sunglasses/small-intellectual.svg | 2 +- .../human/sunglasses/small-sympathetic.svg | 2 +- .../human/sunglasses/small-weird-one.svg | 2 +- .../human/sunglasses/small-weird-two.svg | 2 +- .../human/sunglasses/thuglife-rounded.svg | 2 +- .../human/sunglasses/thuglife.svg | 2 +- .../assets/illustrations/objects/action.svg | 2 +- src/core/assets/illustrations/objects/app.svg | 2 +- .../assets/illustrations/objects/archive.svg | 2 +- .../assets/illustrations/objects/book.svg | 2 +- .../assets/illustrations/objects/build.svg | 2 +- .../assets/illustrations/objects/chain.svg | 2 +- .../assets/illustrations/objects/database.svg | 2 +- .../assets/illustrations/objects/error.svg | 2 +- .../assets/illustrations/objects/explore.svg | 2 +- src/core/assets/illustrations/objects/gas.svg | 2 +- .../assets/illustrations/objects/goal.svg | 2 +- .../assets/illustrations/objects/labels.svg | 2 +- .../illustrations/objects/lightbulb.svg | 2 +- .../objects/magnifying-glass.svg | 2 +- .../illustrations/objects/not-found.svg | 2 +- .../assets/illustrations/objects/security.svg | 2 +- .../assets/illustrations/objects/settings.svg | 2 +- .../illustrations/objects/smart-contract.svg | 2 +- .../assets/illustrations/objects/success.svg | 2 +- .../assets/illustrations/objects/users.svg | 2 +- .../assets/illustrations/objects/wagmi.svg | 2 +- .../assets/illustrations/objects/wallet.svg | 2 +- .../assets/illustrations/objects/warning.svg | 2 +- src/core/components/avatars/avatar/avatar.tsx | 2 +- src/core/components/avatars/avatar/index.css | 2 +- .../avatars/avatarBase/avatarBase.stories.tsx | 4 +- .../avatars/avatarBase/avatarBase.test.tsx | 10 +- .../avatars/avatarBase/avatarBase.tsx | 4 +- .../components/collapsible/collapsible.tsx | 2 +- src/core/components/collapsible/index.css | 2 +- .../dataListFilter/dataListFilter.tsx | 4 +- .../dataListFilter/dataListFilterStatus.tsx | 4 +- .../dataListPagination/dataListPagination.tsx | 4 +- .../dialogs/dialog/dialogRoot/dialogRoot.tsx | 4 +- .../dialogs/dialog/dialogRoot/index.css | 4 +- .../dialogAlertRoot/dialogAlertRoot.tsx | 4 +- .../dialogAlert/dialogAlertRoot/index.css | 4 +- .../dropdownContainer/dropdownContainer.tsx | 2 +- .../dropdown/dropdownContainer/index.css | 2 +- .../forms/inputContainer/inputContainer.tsx | 4 +- .../forms/inputNumberMax/inputNumberMax.tsx | 4 +- .../forms/textAreaRichText/index.css | 2 +- .../textAreaRichText/textAreaRichText.tsx | 2 +- .../gukCoreProvider.mdx} | 18 +- .../gukCoreProvider.test.tsx} | 32 +- .../gukCoreProvider.tsx} | 14 +- src/core/components/gukCoreProvider/index.ts | 6 + src/core/components/icon/icon.stories.tsx | 2 +- src/core/components/illustrations/index.css | 4 +- src/core/components/index.ts | 2 +- .../link/linkBase/linkBase.stories.tsx | 4 +- .../link/linkBase/linkBase.test.tsx | 10 +- .../components/link/linkBase/linkBase.tsx | 4 +- src/core/components/odsCoreProvider/index.ts | 6 - src/core/index.mdx | 4 +- .../utils/formatterUtils/formatterUtils.mdx | 4 +- src/modules/assets/copy/modulesCopy.ts | 2 +- .../addressInput/addressInput.test.tsx | 6 +- .../address/addressInput/addressInput.tsx | 4 +- .../assetDataListItemStructure.tsx | 4 +- .../assetTransfer/assetTransfer.test.tsx | 6 +- .../assetTransferAddress.test.tsx | 6 +- .../gukModulesProvider.mdx} | 18 +- .../gukModulesProvider.test.tsx} | 22 +- .../gukModulesProvider.tsx} | 24 +- .../components/gukModulesProvider/index.ts | 6 + src/modules/components/index.ts | 2 +- .../memberDataListItemStructure.tsx | 4 +- .../components/odsModulesProvider/index.ts | 6 - .../proposalActionChangeMembers.tsx | 4 +- .../proposalActionChangeSettings.tsx | 4 +- .../proposalActionTokenMint.test.tsx | 6 +- .../proposalActions/proposalActions.test.tsx | 6 +- .../proposalActions/proposalActions.tsx | 4 +- .../proposalActionsAction.tsx | 4 +- .../proposalActionsActionDecodedView.tsx | 4 +- .../proposalActionsActionRawView.tsx | 4 +- .../proposalActionsActionViewAsMenu.tsx | 4 +- .../approvalThresholdResult.tsx | 4 +- .../majorityVotingResult.tsx | 4 +- .../proposalDataListItemStatus.tsx | 4 +- .../proposalDataListItemStructure.tsx | 4 +- .../proposalVotingBreakdownMultisig.tsx | 4 +- .../proposalVotingBreakdownToken.tsx | 4 +- .../proposalVotingDetails.tsx | 4 +- .../proposalVotingStage.tsx | 4 +- .../proposalVotingStageStatus.tsx | 4 +- .../proposalVotingTabs/proposalVotingTabs.tsx | 4 +- .../voteDataListItemStructure.tsx | 4 +- .../voteProposalDataListItemStructure.tsx | 4 +- src/modules/components/wallet/wallet.test.tsx | 6 +- src/modules/components/wallet/wallet.tsx | 4 +- src/modules/index.mdx | 14 +- src/theme/index.mdx | 6 +- src/theme/tokens/index.mdx | 13 +- src/theme/tokens/primitives/borderRadius.css | 14 +- src/theme/tokens/primitives/colors.css | 116 +++---- src/theme/tokens/primitives/colors.mdx | 4 +- src/theme/tokens/primitives/shadows.css | 74 ++--- src/theme/tokens/primitives/shadows.mdx | 12 +- src/theme/tokens/primitives/spacing.css | 70 ++-- src/theme/tokens/primitives/typography.css | 30 +- tailwind.config.js | 312 +++++++++--------- yarn.lock | 4 +- 169 files changed, 654 insertions(+), 649 deletions(-) rename src/core/components/{odsCoreProvider/odsCoreProvider.mdx => gukCoreProvider/gukCoreProvider.mdx} (69%) rename src/core/components/{odsCoreProvider/odsCoreProvider.test.tsx => gukCoreProvider/gukCoreProvider.test.tsx} (63%) rename src/core/components/{odsCoreProvider/odsCoreProvider.tsx => gukCoreProvider/gukCoreProvider.tsx} (76%) create mode 100644 src/core/components/gukCoreProvider/index.ts delete mode 100644 src/core/components/odsCoreProvider/index.ts rename src/modules/components/{odsModulesProvider/odsModulesProvider.mdx => gukModulesProvider/gukModulesProvider.mdx} (61%) rename src/modules/components/{odsModulesProvider/odsModulesProvider.test.tsx => gukModulesProvider/gukModulesProvider.test.tsx} (74%) rename src/modules/components/{odsModulesProvider/odsModulesProvider.tsx => gukModulesProvider/gukModulesProvider.tsx} (80%) create mode 100644 src/modules/components/gukModulesProvider/index.ts delete mode 100644 src/modules/components/odsModulesProvider/index.ts diff --git a/.storybook/manager.ts b/.storybook/manager.ts index 303831a7b..0b943b47a 100644 --- a/.storybook/manager.ts +++ b/.storybook/manager.ts @@ -1,6 +1,6 @@ import { addons } from '@storybook/manager-api'; -import aragonOdsTheme from './theme'; +import aragonGukTheme from './theme'; addons.setConfig({ - theme: aragonOdsTheme, + theme: aragonGukTheme, }); diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx index a2899ec21..63b6e8dc1 100644 --- a/.storybook/preview.tsx +++ b/.storybook/preview.tsx @@ -1,6 +1,6 @@ import type { Preview } from '@storybook/react'; import '../index.css'; -import { OdsModulesProvider } from '../src/modules'; +import { GukModulesProvider } from '../src/modules'; import './style.css'; const preview: Preview = { @@ -31,7 +31,7 @@ const preview: Preview = { values: [ { name: 'neutral-50', - value: 'var(--ods-color-neutral-50)', + value: 'var(--guk-color-neutral-50)', }, ], }, @@ -39,11 +39,11 @@ const preview: Preview = { decorators: [ (Story) => ( - +
-
+ ), ], diff --git a/.storybook/theme.ts b/.storybook/theme.ts index aff23933f..9b10966f7 100644 --- a/.storybook/theme.ts +++ b/.storybook/theme.ts @@ -2,7 +2,7 @@ import { create } from '@storybook/theming'; export default create({ base: 'light', - brandTitle: 'Aragon ODS', + brandTitle: 'Aragon Governance UI Kit', brandUrl: 'https://aragon.org', brandImage: 'https://i.postimg.cc/RVVSGThD/logo.png', brandTarget: '_blank', diff --git a/CHANGELOG.md b/CHANGELOG.md index 540798d84..a49b4684b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,8 +7,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] -### Chhanged +### Changed +- Convert ODS repo & package to Governance UI Kit brand name + docs +- Update name of `OdsCoreProvider` to `GukCoreProvider` to match new naming scheme +- Update name of `OdsModulesProvider` to `GukModulesProvider` to match new naming scheme +- Update all `--ods-*` CSS variables to `--guk-*` to match new naming scheme - Bump `eslint-plugin-react-hooks` from 4.6.2 to 5.0.0 - Bump `secp256k1` from 5.0.0 to 5.0.1 - Update minor and patch NPM dependencies diff --git a/README.md b/README.md index e86098e0f..d372ebb30 100644 --- a/README.md +++ b/README.md @@ -12,25 +12,25 @@
-# Aragon ODS +# Aragon Governance UI Kit 🎨 -The Aragon Open Design System (ODS) is an open source and human-centric design system specifically designed for the +The Aragon Governance UI Kit (GovKit) is an open source and human-centric design system specifically designed for the Aragon App. It provides a unified and easy-to-use framework for creating visually consistent and engaging interfaces, prioritizing user experience throughout the Aragon ecosystem. -**NOTE**: The Aragon ODS library is currently in pre-alpha stage; breaking changes are likely to occur. +**NOTE**: The Aragon Governance UI Kit library is currently in pre-alpha stage; breaking changes are likely to occur. -## Usage +## Usage 📀 -Visit the [Installation documentation page](https://aragon.github.io/ods/?path=/docs/docs-installation) to correctly -install, setup and use the library. +Visit the [Installation documentation page](https://aragon.github.io/gov-ui-kit/?path=/docs/docs-installation) to +correctly install, setup and use the library. -## Contributing +## Contributing 🏗️ Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate. -## License +## License 📜 -[GPL-V3](./LICENSE) +The Aragon Governance UI Kit is released under the [GPL-V3 License](./LICENSE). diff --git a/docs/codingGuidelines/libraryDependencies.mdx b/docs/codingGuidelines/libraryDependencies.mdx index e666552c8..5ee7348fa 100644 --- a/docs/codingGuidelines/libraryDependencies.mdx +++ b/docs/codingGuidelines/libraryDependencies.mdx @@ -6,9 +6,9 @@ import { Meta } from '@storybook/blocks'; ## Dependencies -The `@aragon/ods` library relies on the dependencies listed under the `dependencies` section to function correctly. -These dependencies are not bundled with the library, but when you add `@aragon/ods` to your application, the package -manager will install them if they are missing in the current project. +The `@aragon/gov-ui-kit` library relies on the dependencies listed under the `dependencies` section to function +correctly. These dependencies are not bundled with the library, but when you add `@aragon/gov-ui-kit` to your +application, the package manager will install them if they are missing in the current project. ## Peer Dependencies diff --git a/docs/installation.mdx b/docs/installation.mdx index 154f95a9c..ef94d56ab 100644 --- a/docs/installation.mdx +++ b/docs/installation.mdx @@ -4,24 +4,24 @@ import { Meta } from '@storybook/blocks'; # Installation -Install the `@aragon/ods` library and using Yarn or npm: +Install the `@aragon/gov-ui-kit` library and using Yarn or npm: -Yarn: +yarn: ```shell -yarn add @aragon/ods +yarn add @aragon/gov-ui-kit ``` -Npm: +npm: ```shell -npm install @aragon/ods +npm install @aragon/gov-ui-kit ``` # Setup -You can setup the Aragon ODS library in your project with [Taildwind CSS](https://tailwindcss.com) or as a standalone -library: +You can setup the Aragon Governance UI Kit library in your project with [Taildwind CSS](https://tailwindcss.com) or as a +standalone library: - Follow the [Setup with TailwindCSS](#setup-with-tailwindcss) guide if you are using or planning to use `Tailwind CSS` for your project. @@ -48,32 +48,32 @@ library: ```javascript module.exports = { - presets: [require('@aragon/ods/tailwind.config')], - content: ['./src/**/*.{jsx,tsx,html}', './node_modules/@aragon/ods/**/*.js'], + presets: [require('@aragon/gov-ui-kit/tailwind.config')], + content: ['./src/**/*.{jsx,tsx,html}', './node_modules/@aragon/gov-ui-kit/**/*.js'], }; ``` -- Import the Aragon ODS styles in your project entry file (e.g. `src/index.js` or `App.js`): +- Import the Aragon Governance UI Kit styles in your project entry file (e.g. `src/index.js` or `App.js`): ```typescript - import '@aragon/ods/index.css'; + import '@aragon/gov-ui-kit/index.css'; ``` ## Standalone Setup -- Import the Aragon ODS stylesheet bundle in your project entry file (e.g. `src/index.js` or `App.js`): +- Import the Aragon Governance UI Kit stylesheet bundle in your project entry file (e.g. `src/index.js` or `App.js`): ```typescript - import '@aragon/ods/build.css'; + import '@aragon/gov-ui-kit/build.css'; ``` # Usage -Import the `@aragon/ods` library on your application and start using the components: +Import the `@aragon/gov-ui-kit` library on your application and start using the components: ```typescript import React from 'react'; -import { Button } from '@aragon/ods'; +import { Button } from '@aragon/gov-ui-kit'; export const App: React.FC = () => (
diff --git a/package.json b/package.json index 1e02a884b..4ebac1a32 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "@aragon/ods", + "name": "@aragon/gov-ui-kit", "version": "1.0.49", - "description": "Implementation of the Aragon's Open Design System", + "description": "Implementation of the Aragon's Governance UI Kit", "main": "dist/index.es.js", "types": "dist/types/src/index.d.ts", "license": "GPL-3.0", @@ -31,12 +31,12 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/aragon/ods.git" + "url": "git+https://github.com/aragon/gov-ui-kit.git" }, "keywords": [ "aragon", "design-system", - "open-design-system", + "governance-ui-kit", "react", "tailwind" ], @@ -148,9 +148,9 @@ "wagmi": "^2.12.20" }, "bugs": { - "url": "https://github.com/aragon/ods/issues" + "url": "https://github.com/aragon/gov-ui-kit/issues" }, - "homepage": "https://github.com/aragon/ods#readme", + "homepage": "https://github.com/aragon/gov-ui-kit#readme", "engines": { "node": ">=20.0.0" }, diff --git a/src/core/assets/copy/coreCopy.ts b/src/core/assets/copy/coreCopy.ts index 230a22703..6a18a60bb 100644 --- a/src/core/assets/copy/coreCopy.ts +++ b/src/core/assets/copy/coreCopy.ts @@ -1,5 +1,5 @@ /** - * Object representing the structure of copy texts used in various parts of the ODS Core package. + * Object representing the structure of copy texts used in various parts of the GovKit Core package. * Each property in the object corresponds to a specific component or feature, containing the necessary * text labels or functions that return text strings. */ diff --git a/src/core/assets/illustrations/human/accessories/buddha.svg b/src/core/assets/illustrations/human/accessories/buddha.svg index 1ddadb63d..e477a0c1c 100644 --- a/src/core/assets/illustrations/human/accessories/buddha.svg +++ b/src/core/assets/illustrations/human/accessories/buddha.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/accessories/earrings-circle.svg b/src/core/assets/illustrations/human/accessories/earrings-circle.svg index de670c7d3..9d11121f1 100644 --- a/src/core/assets/illustrations/human/accessories/earrings-circle.svg +++ b/src/core/assets/illustrations/human/accessories/earrings-circle.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/accessories/earrings-hoops.svg b/src/core/assets/illustrations/human/accessories/earrings-hoops.svg index 85e205a14..c474d5669 100644 --- a/src/core/assets/illustrations/human/accessories/earrings-hoops.svg +++ b/src/core/assets/illustrations/human/accessories/earrings-hoops.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/accessories/earrings-rhombus.svg b/src/core/assets/illustrations/human/accessories/earrings-rhombus.svg index 5cdcd6646..776842b0e 100644 --- a/src/core/assets/illustrations/human/accessories/earrings-rhombus.svg +++ b/src/core/assets/illustrations/human/accessories/earrings-rhombus.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/accessories/earrings-skull.svg b/src/core/assets/illustrations/human/accessories/earrings-skull.svg index fca255993..6159ccaaa 100644 --- a/src/core/assets/illustrations/human/accessories/earrings-skull.svg +++ b/src/core/assets/illustrations/human/accessories/earrings-skull.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/accessories/earrings-thunder.svg b/src/core/assets/illustrations/human/accessories/earrings-thunder.svg index 916ee68e2..dc29c2d1b 100644 --- a/src/core/assets/illustrations/human/accessories/earrings-thunder.svg +++ b/src/core/assets/illustrations/human/accessories/earrings-thunder.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/accessories/expression.svg b/src/core/assets/illustrations/human/accessories/expression.svg index 175c8582d..158c1b5f7 100644 --- a/src/core/assets/illustrations/human/accessories/expression.svg +++ b/src/core/assets/illustrations/human/accessories/expression.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/accessories/flushed.svg b/src/core/assets/illustrations/human/accessories/flushed.svg index 85291aee7..4b64313a9 100644 --- a/src/core/assets/illustrations/human/accessories/flushed.svg +++ b/src/core/assets/illustrations/human/accessories/flushed.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/accessories/head-flower.svg b/src/core/assets/illustrations/human/accessories/head-flower.svg index 026b514a5..6fb028008 100644 --- a/src/core/assets/illustrations/human/accessories/head-flower.svg +++ b/src/core/assets/illustrations/human/accessories/head-flower.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/accessories/piercings-tattoo.svg b/src/core/assets/illustrations/human/accessories/piercings-tattoo.svg index 9de568dd1..161f57d4c 100644 --- a/src/core/assets/illustrations/human/accessories/piercings-tattoo.svg +++ b/src/core/assets/illustrations/human/accessories/piercings-tattoo.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/accessories/piercings.svg b/src/core/assets/illustrations/human/accessories/piercings.svg index c045fabc8..69393b87d 100644 --- a/src/core/assets/illustrations/human/accessories/piercings.svg +++ b/src/core/assets/illustrations/human/accessories/piercings.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/bodies/aragon.svg b/src/core/assets/illustrations/human/bodies/aragon.svg index 9c4b2b957..90fe65a80 100644 --- a/src/core/assets/illustrations/human/bodies/aragon.svg +++ b/src/core/assets/illustrations/human/bodies/aragon.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/bodies/blocks.svg b/src/core/assets/illustrations/human/bodies/blocks.svg index 240a44fa4..2d2746677 100644 --- a/src/core/assets/illustrations/human/bodies/blocks.svg +++ b/src/core/assets/illustrations/human/bodies/blocks.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/bodies/chart.svg b/src/core/assets/illustrations/human/bodies/chart.svg index bf80d6193..472153ed0 100644 --- a/src/core/assets/illustrations/human/bodies/chart.svg +++ b/src/core/assets/illustrations/human/bodies/chart.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/bodies/computer-correct.svg b/src/core/assets/illustrations/human/bodies/computer-correct.svg index 970e30841..a29c058ee 100644 --- a/src/core/assets/illustrations/human/bodies/computer-correct.svg +++ b/src/core/assets/illustrations/human/bodies/computer-correct.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/bodies/computer.svg b/src/core/assets/illustrations/human/bodies/computer.svg index 5adff843e..575d9c9b4 100644 --- a/src/core/assets/illustrations/human/bodies/computer.svg +++ b/src/core/assets/illustrations/human/bodies/computer.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/bodies/correct.svg b/src/core/assets/illustrations/human/bodies/correct.svg index 3f17bbea7..83cc77555 100644 --- a/src/core/assets/illustrations/human/bodies/correct.svg +++ b/src/core/assets/illustrations/human/bodies/correct.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/bodies/double-correct.svg b/src/core/assets/illustrations/human/bodies/double-correct.svg index 98438fbb1..d3a083674 100644 --- a/src/core/assets/illustrations/human/bodies/double-correct.svg +++ b/src/core/assets/illustrations/human/bodies/double-correct.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/bodies/elevating.svg b/src/core/assets/illustrations/human/bodies/elevating.svg index 1986d8516..8e8e0b37f 100644 --- a/src/core/assets/illustrations/human/bodies/elevating.svg +++ b/src/core/assets/illustrations/human/bodies/elevating.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/bodies/relaxed.svg b/src/core/assets/illustrations/human/bodies/relaxed.svg index 5b6cc4039..e951e69b6 100644 --- a/src/core/assets/illustrations/human/bodies/relaxed.svg +++ b/src/core/assets/illustrations/human/bodies/relaxed.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/bodies/sending-love.svg b/src/core/assets/illustrations/human/bodies/sending-love.svg index 733d05e3b..b16731919 100644 --- a/src/core/assets/illustrations/human/bodies/sending-love.svg +++ b/src/core/assets/illustrations/human/bodies/sending-love.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/bodies/voting.svg b/src/core/assets/illustrations/human/bodies/voting.svg index af026544e..744e0a167 100644 --- a/src/core/assets/illustrations/human/bodies/voting.svg +++ b/src/core/assets/illustrations/human/bodies/voting.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/expressions/angry.svg b/src/core/assets/illustrations/human/expressions/angry.svg index 8eb91f20f..f8715d28d 100644 --- a/src/core/assets/illustrations/human/expressions/angry.svg +++ b/src/core/assets/illustrations/human/expressions/angry.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/expressions/casual.svg b/src/core/assets/illustrations/human/expressions/casual.svg index 5d7fd1002..488fd4063 100644 --- a/src/core/assets/illustrations/human/expressions/casual.svg +++ b/src/core/assets/illustrations/human/expressions/casual.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/expressions/crying.svg b/src/core/assets/illustrations/human/expressions/crying.svg index a9f693d8a..99a6fefa0 100644 --- a/src/core/assets/illustrations/human/expressions/crying.svg +++ b/src/core/assets/illustrations/human/expressions/crying.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/expressions/decided.svg b/src/core/assets/illustrations/human/expressions/decided.svg index 6c4234b9f..23d5dfcc7 100644 --- a/src/core/assets/illustrations/human/expressions/decided.svg +++ b/src/core/assets/illustrations/human/expressions/decided.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/expressions/excited.svg b/src/core/assets/illustrations/human/expressions/excited.svg index 9a2a39289..b8ee7eaeb 100644 --- a/src/core/assets/illustrations/human/expressions/excited.svg +++ b/src/core/assets/illustrations/human/expressions/excited.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/expressions/sad-left.svg b/src/core/assets/illustrations/human/expressions/sad-left.svg index 0e9c68cfa..66e0d1eee 100644 --- a/src/core/assets/illustrations/human/expressions/sad-left.svg +++ b/src/core/assets/illustrations/human/expressions/sad-left.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/expressions/sad-right.svg b/src/core/assets/illustrations/human/expressions/sad-right.svg index bab91ea09..00ef61406 100644 --- a/src/core/assets/illustrations/human/expressions/sad-right.svg +++ b/src/core/assets/illustrations/human/expressions/sad-right.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/expressions/smile-wink.svg b/src/core/assets/illustrations/human/expressions/smile-wink.svg index 887a7dc1d..b7c63829e 100644 --- a/src/core/assets/illustrations/human/expressions/smile-wink.svg +++ b/src/core/assets/illustrations/human/expressions/smile-wink.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/expressions/smile.svg b/src/core/assets/illustrations/human/expressions/smile.svg index ec1bacbc3..54ca3c57d 100644 --- a/src/core/assets/illustrations/human/expressions/smile.svg +++ b/src/core/assets/illustrations/human/expressions/smile.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/expressions/surprised.svg b/src/core/assets/illustrations/human/expressions/surprised.svg index e786827c3..c83fbb394 100644 --- a/src/core/assets/illustrations/human/expressions/surprised.svg +++ b/src/core/assets/illustrations/human/expressions/surprised.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/expressions/suspecting.svg b/src/core/assets/illustrations/human/expressions/suspecting.svg index 998ad157a..fd27ee7d2 100644 --- a/src/core/assets/illustrations/human/expressions/suspecting.svg +++ b/src/core/assets/illustrations/human/expressions/suspecting.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/hairs/afro.svg b/src/core/assets/illustrations/human/hairs/afro.svg index 5f26b07ff..c26f26278 100644 --- a/src/core/assets/illustrations/human/hairs/afro.svg +++ b/src/core/assets/illustrations/human/hairs/afro.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/hairs/bald.svg b/src/core/assets/illustrations/human/hairs/bald.svg index 3911ac18f..47a76d01b 100644 --- a/src/core/assets/illustrations/human/hairs/bald.svg +++ b/src/core/assets/illustrations/human/hairs/bald.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/hairs/bun.svg b/src/core/assets/illustrations/human/hairs/bun.svg index 3a8d51b4b..310e353fc 100644 --- a/src/core/assets/illustrations/human/hairs/bun.svg +++ b/src/core/assets/illustrations/human/hairs/bun.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/hairs/cool.svg b/src/core/assets/illustrations/human/hairs/cool.svg index 39b661209..72291f105 100644 --- a/src/core/assets/illustrations/human/hairs/cool.svg +++ b/src/core/assets/illustrations/human/hairs/cool.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/hairs/curly-bangs.svg b/src/core/assets/illustrations/human/hairs/curly-bangs.svg index d59fd56a7..388eb0c97 100644 --- a/src/core/assets/illustrations/human/hairs/curly-bangs.svg +++ b/src/core/assets/illustrations/human/hairs/curly-bangs.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/hairs/curly.svg b/src/core/assets/illustrations/human/hairs/curly.svg index f1eef3a15..4a08a548d 100644 --- a/src/core/assets/illustrations/human/hairs/curly.svg +++ b/src/core/assets/illustrations/human/hairs/curly.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/hairs/informal.svg b/src/core/assets/illustrations/human/hairs/informal.svg index 77b5bc04c..9be47b07e 100644 --- a/src/core/assets/illustrations/human/hairs/informal.svg +++ b/src/core/assets/illustrations/human/hairs/informal.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/hairs/long.svg b/src/core/assets/illustrations/human/hairs/long.svg index b3af1779c..3ebb5be2a 100644 --- a/src/core/assets/illustrations/human/hairs/long.svg +++ b/src/core/assets/illustrations/human/hairs/long.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/hairs/middle.svg b/src/core/assets/illustrations/human/hairs/middle.svg index ddb7b09de..47f52701d 100644 --- a/src/core/assets/illustrations/human/hairs/middle.svg +++ b/src/core/assets/illustrations/human/hairs/middle.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/hairs/oldschool.svg b/src/core/assets/illustrations/human/hairs/oldschool.svg index 1250daa59..a3bac20e4 100644 --- a/src/core/assets/illustrations/human/hairs/oldschool.svg +++ b/src/core/assets/illustrations/human/hairs/oldschool.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/hairs/punk.svg b/src/core/assets/illustrations/human/hairs/punk.svg index edac2aff7..76eb035ec 100644 --- a/src/core/assets/illustrations/human/hairs/punk.svg +++ b/src/core/assets/illustrations/human/hairs/punk.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/hairs/short.svg b/src/core/assets/illustrations/human/hairs/short.svg index 90f9d33c6..52ff970e1 100644 --- a/src/core/assets/illustrations/human/hairs/short.svg +++ b/src/core/assets/illustrations/human/hairs/short.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/sunglasses/big-rounded.svg b/src/core/assets/illustrations/human/sunglasses/big-rounded.svg index c1c59b8fd..1078cf413 100644 --- a/src/core/assets/illustrations/human/sunglasses/big-rounded.svg +++ b/src/core/assets/illustrations/human/sunglasses/big-rounded.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/sunglasses/big-semirounded.svg b/src/core/assets/illustrations/human/sunglasses/big-semirounded.svg index 520f630a4..30f1f0fca 100644 --- a/src/core/assets/illustrations/human/sunglasses/big-semirounded.svg +++ b/src/core/assets/illustrations/human/sunglasses/big-semirounded.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/sunglasses/large-stylized-xl.svg b/src/core/assets/illustrations/human/sunglasses/large-stylized-xl.svg index 9b5fbf62e..07d2baeb8 100644 --- a/src/core/assets/illustrations/human/sunglasses/large-stylized-xl.svg +++ b/src/core/assets/illustrations/human/sunglasses/large-stylized-xl.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/sunglasses/large-stylized.svg b/src/core/assets/illustrations/human/sunglasses/large-stylized.svg index a1a357819..779f32e0e 100644 --- a/src/core/assets/illustrations/human/sunglasses/large-stylized.svg +++ b/src/core/assets/illustrations/human/sunglasses/large-stylized.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/sunglasses/pirate.svg b/src/core/assets/illustrations/human/sunglasses/pirate.svg index 406ce6949..e68ba03f7 100644 --- a/src/core/assets/illustrations/human/sunglasses/pirate.svg +++ b/src/core/assets/illustrations/human/sunglasses/pirate.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/sunglasses/small-intellectual.svg b/src/core/assets/illustrations/human/sunglasses/small-intellectual.svg index 189dc68bf..30f85975e 100644 --- a/src/core/assets/illustrations/human/sunglasses/small-intellectual.svg +++ b/src/core/assets/illustrations/human/sunglasses/small-intellectual.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/sunglasses/small-sympathetic.svg b/src/core/assets/illustrations/human/sunglasses/small-sympathetic.svg index d2e4e27a9..6e9ba6b51 100644 --- a/src/core/assets/illustrations/human/sunglasses/small-sympathetic.svg +++ b/src/core/assets/illustrations/human/sunglasses/small-sympathetic.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/sunglasses/small-weird-one.svg b/src/core/assets/illustrations/human/sunglasses/small-weird-one.svg index 32dd6f6d4..187a7728a 100644 --- a/src/core/assets/illustrations/human/sunglasses/small-weird-one.svg +++ b/src/core/assets/illustrations/human/sunglasses/small-weird-one.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/sunglasses/small-weird-two.svg b/src/core/assets/illustrations/human/sunglasses/small-weird-two.svg index 9cc3bbe59..2ec39d210 100644 --- a/src/core/assets/illustrations/human/sunglasses/small-weird-two.svg +++ b/src/core/assets/illustrations/human/sunglasses/small-weird-two.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/sunglasses/thuglife-rounded.svg b/src/core/assets/illustrations/human/sunglasses/thuglife-rounded.svg index 1c2ef886a..77b72bf15 100644 --- a/src/core/assets/illustrations/human/sunglasses/thuglife-rounded.svg +++ b/src/core/assets/illustrations/human/sunglasses/thuglife-rounded.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/human/sunglasses/thuglife.svg b/src/core/assets/illustrations/human/sunglasses/thuglife.svg index 50b1e3ee1..72e68f011 100644 --- a/src/core/assets/illustrations/human/sunglasses/thuglife.svg +++ b/src/core/assets/illustrations/human/sunglasses/thuglife.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/objects/action.svg b/src/core/assets/illustrations/objects/action.svg index 271c205fb..177e5f08d 100644 --- a/src/core/assets/illustrations/objects/action.svg +++ b/src/core/assets/illustrations/objects/action.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/objects/app.svg b/src/core/assets/illustrations/objects/app.svg index 6961b8390..89eb3ae63 100644 --- a/src/core/assets/illustrations/objects/app.svg +++ b/src/core/assets/illustrations/objects/app.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/objects/archive.svg b/src/core/assets/illustrations/objects/archive.svg index 434848c0e..cc7ab3ca0 100644 --- a/src/core/assets/illustrations/objects/archive.svg +++ b/src/core/assets/illustrations/objects/archive.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/objects/book.svg b/src/core/assets/illustrations/objects/book.svg index 283723eb6..2f0bb164e 100644 --- a/src/core/assets/illustrations/objects/book.svg +++ b/src/core/assets/illustrations/objects/book.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/objects/build.svg b/src/core/assets/illustrations/objects/build.svg index 35c16ea4f..d35d5089e 100644 --- a/src/core/assets/illustrations/objects/build.svg +++ b/src/core/assets/illustrations/objects/build.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/objects/chain.svg b/src/core/assets/illustrations/objects/chain.svg index 28f5b6bab..2b6facd8a 100644 --- a/src/core/assets/illustrations/objects/chain.svg +++ b/src/core/assets/illustrations/objects/chain.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/objects/database.svg b/src/core/assets/illustrations/objects/database.svg index 66c96a3dd..1d43f6f40 100644 --- a/src/core/assets/illustrations/objects/database.svg +++ b/src/core/assets/illustrations/objects/database.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/objects/error.svg b/src/core/assets/illustrations/objects/error.svg index cf6aa827b..0db0813cd 100644 --- a/src/core/assets/illustrations/objects/error.svg +++ b/src/core/assets/illustrations/objects/error.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/objects/explore.svg b/src/core/assets/illustrations/objects/explore.svg index 858235ae3..fccb93281 100644 --- a/src/core/assets/illustrations/objects/explore.svg +++ b/src/core/assets/illustrations/objects/explore.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/objects/gas.svg b/src/core/assets/illustrations/objects/gas.svg index 22fb1ad70..18ff19bb9 100644 --- a/src/core/assets/illustrations/objects/gas.svg +++ b/src/core/assets/illustrations/objects/gas.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/objects/goal.svg b/src/core/assets/illustrations/objects/goal.svg index ec307aa64..548f3045e 100644 --- a/src/core/assets/illustrations/objects/goal.svg +++ b/src/core/assets/illustrations/objects/goal.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/objects/labels.svg b/src/core/assets/illustrations/objects/labels.svg index 3ac8a064e..1ca93c501 100644 --- a/src/core/assets/illustrations/objects/labels.svg +++ b/src/core/assets/illustrations/objects/labels.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/objects/lightbulb.svg b/src/core/assets/illustrations/objects/lightbulb.svg index 9a02f23ab..a1f82d2d2 100644 --- a/src/core/assets/illustrations/objects/lightbulb.svg +++ b/src/core/assets/illustrations/objects/lightbulb.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/objects/magnifying-glass.svg b/src/core/assets/illustrations/objects/magnifying-glass.svg index 09772bb54..ea9edb4a5 100644 --- a/src/core/assets/illustrations/objects/magnifying-glass.svg +++ b/src/core/assets/illustrations/objects/magnifying-glass.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/objects/not-found.svg b/src/core/assets/illustrations/objects/not-found.svg index 875b69cbe..09124a17a 100644 --- a/src/core/assets/illustrations/objects/not-found.svg +++ b/src/core/assets/illustrations/objects/not-found.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/objects/security.svg b/src/core/assets/illustrations/objects/security.svg index 062a98356..8e683dc95 100644 --- a/src/core/assets/illustrations/objects/security.svg +++ b/src/core/assets/illustrations/objects/security.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/objects/settings.svg b/src/core/assets/illustrations/objects/settings.svg index 1ca3271d9..e2e35d7ca 100644 --- a/src/core/assets/illustrations/objects/settings.svg +++ b/src/core/assets/illustrations/objects/settings.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/objects/smart-contract.svg b/src/core/assets/illustrations/objects/smart-contract.svg index e0325dec3..247df4203 100644 --- a/src/core/assets/illustrations/objects/smart-contract.svg +++ b/src/core/assets/illustrations/objects/smart-contract.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/objects/success.svg b/src/core/assets/illustrations/objects/success.svg index 05cc76e91..b17a23916 100644 --- a/src/core/assets/illustrations/objects/success.svg +++ b/src/core/assets/illustrations/objects/success.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/objects/users.svg b/src/core/assets/illustrations/objects/users.svg index f856c95c7..f4941830e 100644 --- a/src/core/assets/illustrations/objects/users.svg +++ b/src/core/assets/illustrations/objects/users.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/objects/wagmi.svg b/src/core/assets/illustrations/objects/wagmi.svg index f97adcbec..016758a9e 100644 --- a/src/core/assets/illustrations/objects/wagmi.svg +++ b/src/core/assets/illustrations/objects/wagmi.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/objects/wallet.svg b/src/core/assets/illustrations/objects/wallet.svg index ebc49cf60..a2b91ca43 100644 --- a/src/core/assets/illustrations/objects/wallet.svg +++ b/src/core/assets/illustrations/objects/wallet.svg @@ -1 +1 @@ - + diff --git a/src/core/assets/illustrations/objects/warning.svg b/src/core/assets/illustrations/objects/warning.svg index 6d63c91ee..443cf0ae2 100644 --- a/src/core/assets/illustrations/objects/warning.svg +++ b/src/core/assets/illustrations/objects/warning.svg @@ -1 +1 @@ - + diff --git a/src/core/components/avatars/avatar/avatar.tsx b/src/core/components/avatars/avatar/avatar.tsx index 324a39661..5ece93015 100644 --- a/src/core/components/avatars/avatar/avatar.tsx +++ b/src/core/components/avatars/avatar/avatar.tsx @@ -84,7 +84,7 @@ export const Avatar: React.FC = (props) => { const [imgLoading, setImgLoading] = useState(true); const containerClassNames = classNames( - 'flex shrink-0 items-center justify-center overflow-hidden rounded-full [position:var(--ods-avatar-container-position)]', + 'flex shrink-0 items-center justify-center overflow-hidden rounded-full [position:var(--guk-avatar-container-position)]', responsiveUtils.generateClassNames(size, responsiveSize, responsiveSizeClasses), className, ); diff --git a/src/core/components/avatars/avatar/index.css b/src/core/components/avatars/avatar/index.css index 0ea48da5c..ff1b84bca 100644 --- a/src/core/components/avatars/avatar/index.css +++ b/src/core/components/avatars/avatar/index.css @@ -1,4 +1,4 @@ :root { /* Position property of the avatar container */ - --ods-avatar-container-position: static; + --guk-avatar-container-position: static; } diff --git a/src/core/components/avatars/avatarBase/avatarBase.stories.tsx b/src/core/components/avatars/avatarBase/avatarBase.stories.tsx index 4d12373bd..b101a6492 100644 --- a/src/core/components/avatars/avatarBase/avatarBase.stories.tsx +++ b/src/core/components/avatars/avatarBase/avatarBase.stories.tsx @@ -9,8 +9,8 @@ const meta: Meta = { type Story = StoryObj; /** - * AvatarBase is a basic component that renders an image based on the component set in the OdsCoreModules context. - * It must be used in all ODS components whenever an image needs to be rendered. + * AvatarBase is a basic component that renders an image based on the component set in the GukCoreModules context. + * It must be used in all GovKit components whenever an image needs to be rendered. */ export const Default: Story = { args: { diff --git a/src/core/components/avatars/avatarBase/avatarBase.test.tsx b/src/core/components/avatars/avatarBase/avatarBase.test.tsx index dac33c455..1a6f6aafa 100644 --- a/src/core/components/avatars/avatarBase/avatarBase.test.tsx +++ b/src/core/components/avatars/avatarBase/avatarBase.test.tsx @@ -1,19 +1,19 @@ import { render, screen } from '@testing-library/react'; -import { OdsCoreProvider, type IOdsCoreContext } from '../../odsCoreProvider'; +import { GukCoreProvider, type IGukCoreContext } from '../../gukCoreProvider'; import { AvatarBase, type IAvatarBaseProps } from './avatarBase'; describe(' component', () => { - const createTestComponent = (props?: Partial, context?: Partial) => { + const createTestComponent = (props?: Partial, context?: Partial) => { const completeProps: IAvatarBaseProps = { ...props }; return ( - + - + ); }; - it('renders the image component set on the OdsCoreProvider', () => { + it('renders the image component set on the GukCoreProvider', () => { const Img = (props: object) => test; const context = { Img }; const props = { src: 'https://test.com/' }; diff --git a/src/core/components/avatars/avatarBase/avatarBase.tsx b/src/core/components/avatars/avatarBase/avatarBase.tsx index 2b870d3f8..8cc920f73 100644 --- a/src/core/components/avatars/avatarBase/avatarBase.tsx +++ b/src/core/components/avatars/avatarBase/avatarBase.tsx @@ -1,10 +1,10 @@ import { forwardRef, type ComponentPropsWithoutRef } from 'react'; -import { useOdsCoreContext } from '../../odsCoreProvider'; +import { useGukCoreContext } from '../../gukCoreProvider'; export interface IAvatarBaseProps extends ComponentPropsWithoutRef<'img'> {} export const AvatarBase = forwardRef((props, ref) => { - const { Img } = useOdsCoreContext(); + const { Img } = useGukCoreContext(); return ; }); diff --git a/src/core/components/collapsible/collapsible.tsx b/src/core/components/collapsible/collapsible.tsx index 11b4c6754..49682d9fa 100644 --- a/src/core/components/collapsible/collapsible.tsx +++ b/src/core/components/collapsible/collapsible.tsx @@ -73,7 +73,7 @@ export const Collapsible: React.FC = ({ const footerClassName = classNames( { - 'left-0 z-[var(--ods-collapsible-overlay-z-index)] flex w-full items-end bg-gradient-to-t from-neutral-0 from-40% to-transparent': + 'left-0 z-[var(--guk-collapsible-overlay-z-index)] flex w-full items-end bg-gradient-to-t from-neutral-0 from-40% to-transparent': showOverlay, }, { 'absolute bottom-0 h-28 md:h-32': !isOpen && showOverlay }, diff --git a/src/core/components/collapsible/index.css b/src/core/components/collapsible/index.css index 7ee7f265a..30b4f1953 100644 --- a/src/core/components/collapsible/index.css +++ b/src/core/components/collapsible/index.css @@ -1,4 +1,4 @@ :root { /* Z-index property of the collapsible overlay */ - --ods-collapsible-overlay-z-index: auto; + --guk-collapsible-overlay-z-index: auto; } diff --git a/src/core/components/dataList/dataListFilter/dataListFilter.tsx b/src/core/components/dataList/dataListFilter/dataListFilter.tsx index 7a9d05205..2a8ad529f 100644 --- a/src/core/components/dataList/dataListFilter/dataListFilter.tsx +++ b/src/core/components/dataList/dataListFilter/dataListFilter.tsx @@ -2,8 +2,8 @@ import classNames from 'classnames'; import { useState, type ChangeEvent, type ComponentProps } from 'react'; import { AvatarIcon } from '../../avatars'; import { Button } from '../../button'; +import { useGukCoreContext } from '../../gukCoreProvider'; import { Icon, IconType } from '../../icon'; -import { useOdsCoreContext } from '../../odsCoreProvider'; import { Spinner } from '../../spinner'; import { useDataListContext } from '../dataListContext'; import { DataListFilterSort } from './dataListFilterSort'; @@ -77,7 +77,7 @@ export const DataListFilter: React.FC = (props) => { const { state } = useDataListContext(); - const { copy } = useOdsCoreContext(); + const { copy } = useGukCoreContext(); const handleInputFocus = () => setIsFocused(true); const handleInputBlur = () => setIsFocused(false); diff --git a/src/core/components/dataList/dataListFilter/dataListFilterStatus.tsx b/src/core/components/dataList/dataListFilter/dataListFilterStatus.tsx index 52ca45a32..4cb18513f 100644 --- a/src/core/components/dataList/dataListFilter/dataListFilterStatus.tsx +++ b/src/core/components/dataList/dataListFilter/dataListFilterStatus.tsx @@ -1,6 +1,6 @@ import classNames from 'classnames'; import { Button } from '../../button'; -import { useOdsCoreContext } from '../../odsCoreProvider'; +import { useGukCoreContext } from '../../gukCoreProvider'; import { useDataListContext } from '../dataListContext'; export interface IDataListFilterStatusProps { @@ -13,7 +13,7 @@ export interface IDataListFilterStatusProps { export const DataListFilterStatus: React.FC = ({ onResetFiltersClick }) => { const { state, itemsCount = 0, entityLabel } = useDataListContext(); - const { copy } = useOdsCoreContext(); + const { copy } = useGukCoreContext(); const isInitialLoading = state === 'initialLoading'; const isLoading = state === 'loading'; diff --git a/src/core/components/dataList/dataListPagination/dataListPagination.tsx b/src/core/components/dataList/dataListPagination/dataListPagination.tsx index 1ee56b70a..bae6b82dd 100644 --- a/src/core/components/dataList/dataListPagination/dataListPagination.tsx +++ b/src/core/components/dataList/dataListPagination/dataListPagination.tsx @@ -1,8 +1,8 @@ import classNames from 'classnames'; import type { ComponentProps } from 'react'; import { Button } from '../../button'; +import { useGukCoreContext } from '../../gukCoreProvider'; import { IconType } from '../../icon'; -import { useOdsCoreContext } from '../../odsCoreProvider'; import { Progress } from '../../progress'; import { useDataListContext } from '../dataListContext'; @@ -21,7 +21,7 @@ export const DataListPagination: React.FC = (props) => entityLabel, } = useDataListContext(); - const { copy } = useOdsCoreContext(); + const { copy } = useGukCoreContext(); const currentlyDisplayed = Math.min(pageSize * (currentPage + 1), childrenItemCount); diff --git a/src/core/components/dialogs/dialog/dialogRoot/dialogRoot.tsx b/src/core/components/dialogs/dialog/dialogRoot/dialogRoot.tsx index b7a62d70c..20745a5cc 100644 --- a/src/core/components/dialogs/dialog/dialogRoot/dialogRoot.tsx +++ b/src/core/components/dialogs/dialog/dialogRoot/dialogRoot.tsx @@ -77,14 +77,14 @@ export const DialogRoot: React.FC = (props) => { const overlayClassNames = classNames( 'fixed inset-0 bg-modal-overlay backdrop-blur-md', - 'z-[var(--ods-dialog-overlay-z-index)]', + 'z-[var(--guk-dialog-overlay-z-index)]', overlayClassName, ); const containerClassNames = classNames( 'fixed inset-x-2 bottom-2 mx-auto max-h-[calc(100vh-80px)] lg:bottom-auto lg:top-[120px] lg:max-h-[calc(100vh-200px)]', 'flex max-w-[480px] flex-col rounded-xl border border-neutral-100 bg-neutral-0 shadow-neutral-md md:min-w-[480px]', - 'z-[var(--ods-dialog-content-z-index)]', + 'z-[var(--guk-dialog-content-z-index)]', containerClassName, ); diff --git a/src/core/components/dialogs/dialog/dialogRoot/index.css b/src/core/components/dialogs/dialog/dialogRoot/index.css index 81cd0e91a..89275742a 100644 --- a/src/core/components/dialogs/dialog/dialogRoot/index.css +++ b/src/core/components/dialogs/dialog/dialogRoot/index.css @@ -1,7 +1,7 @@ :root { /* Z-index property of the dialog overlay */ - --ods-dialog-overlay-z-index: auto; + --guk-dialog-overlay-z-index: auto; /* Z-index property of the dialog content */ - --ods-dialog-content-z-index: auto; + --guk-dialog-content-z-index: auto; } diff --git a/src/core/components/dialogs/dialogAlert/dialogAlertRoot/dialogAlertRoot.tsx b/src/core/components/dialogs/dialogAlert/dialogAlertRoot/dialogAlertRoot.tsx index bcc5d05fc..4b2b14310 100644 --- a/src/core/components/dialogs/dialogAlert/dialogAlertRoot/dialogAlertRoot.tsx +++ b/src/core/components/dialogs/dialogAlert/dialogAlertRoot/dialogAlertRoot.tsx @@ -76,14 +76,14 @@ export const DialogAlertRoot: React.FC = (props) => { const overlayClassNames = classNames( 'fixed inset-0 bg-modal-overlay backdrop-blur-md', - 'z-[var(--ods-dialog-alert-overlay-z-index)]', + 'z-[var(--guk-dialog-alert-overlay-z-index)]', overlayClassName, ); const containerClassNames = classNames( 'fixed inset-x-2 bottom-2 mx-auto max-h-[calc(100vh-80px)] lg:bottom-auto lg:top-[120px] lg:max-h-[calc(100vh-200px)]', 'flex max-w-[480px] flex-col rounded-xl border border-neutral-100 bg-neutral-0 shadow-neutral-md md:min-w-[480px]', - 'z-[var(--ods-dialog-alert-content-z-index)]', + 'z-[var(--guk-dialog-alert-content-z-index)]', containerClassName, ); diff --git a/src/core/components/dialogs/dialogAlert/dialogAlertRoot/index.css b/src/core/components/dialogs/dialogAlert/dialogAlertRoot/index.css index 24807e29f..fafb3d889 100644 --- a/src/core/components/dialogs/dialogAlert/dialogAlertRoot/index.css +++ b/src/core/components/dialogs/dialogAlert/dialogAlertRoot/index.css @@ -1,7 +1,7 @@ :root { /* Z-index property of the dialog overlay */ - --ods-dialog-alert-overlay-z-index: auto; + --guk-dialog-alert-overlay-z-index: auto; /* Z-index property of the dialog content */ - --ods-dialog-alert-content-z-index: auto; + --guk-dialog-alert-content-z-index: auto; } diff --git a/src/core/components/dropdown/dropdownContainer/dropdownContainer.tsx b/src/core/components/dropdown/dropdownContainer/dropdownContainer.tsx index f9df46294..a81f0ef27 100644 --- a/src/core/components/dropdown/dropdownContainer/dropdownContainer.tsx +++ b/src/core/components/dropdown/dropdownContainer/dropdownContainer.tsx @@ -119,7 +119,7 @@ export const DropdownContainer: React.FC = (props) => { = { * including `label`, `helpText` and more. */ export const InputContainer = forwardRef((props, ref) => { - const { copy } = useOdsCoreContext(); + const { copy } = useGukCoreContext(); const { label, variant = 'default', diff --git a/src/core/components/forms/inputNumberMax/inputNumberMax.tsx b/src/core/components/forms/inputNumberMax/inputNumberMax.tsx index 04217f54c..f7d777a66 100644 --- a/src/core/components/forms/inputNumberMax/inputNumberMax.tsx +++ b/src/core/components/forms/inputNumberMax/inputNumberMax.tsx @@ -1,6 +1,6 @@ import classNames from 'classnames'; import { Button } from '../../button'; -import { useOdsCoreContext } from '../../odsCoreProvider'; +import { useGukCoreContext } from '../../gukCoreProvider'; import { useInputProps, useNumberMask, type IUseNumberMaskProps } from '../hooks'; import { InputContainer, type IInputComponentProps } from '../inputContainer'; @@ -24,7 +24,7 @@ export const InputNumberMax: React.FC = (props) => { const { ref, setUnmaskedValue } = useNumberMask({ min, max, value, onChange }); - const { copy } = useOdsCoreContext(); + const { copy } = useGukCoreContext(); const handleMaxClick = () => setUnmaskedValue(max.toString()); diff --git a/src/core/components/forms/textAreaRichText/index.css b/src/core/components/forms/textAreaRichText/index.css index 124831cd2..5af2f1693 100644 --- a/src/core/components/forms/textAreaRichText/index.css +++ b/src/core/components/forms/textAreaRichText/index.css @@ -1,4 +1,4 @@ :root { /* Z-index property of the TextAreaRichText component when expanded */ - --ods-text-area-rich-text-expanded-z-index: auto; + --guk-text-area-rich-text-expanded-z-index: auto; } diff --git a/src/core/components/forms/textAreaRichText/textAreaRichText.tsx b/src/core/components/forms/textAreaRichText/textAreaRichText.tsx index 8aa9f24b1..095143ccb 100644 --- a/src/core/components/forms/textAreaRichText/textAreaRichText.tsx +++ b/src/core/components/forms/textAreaRichText/textAreaRichText.tsx @@ -106,7 +106,7 @@ export const TextAreaRichText: React.FC = (props) => { label]:hidden': + 'fixed left-0 top-0 z-[var(--guk-text-area-rich-text-expanded-z-index)] h-screen w-full [&>label]:hidden': isExpanded, })} wrapperClassName={classNames('grow overflow-hidden', { '!rounded-none': isExpanded })} diff --git a/src/core/components/odsCoreProvider/odsCoreProvider.mdx b/src/core/components/gukCoreProvider/gukCoreProvider.mdx similarity index 69% rename from src/core/components/odsCoreProvider/odsCoreProvider.mdx rename to src/core/components/gukCoreProvider/gukCoreProvider.mdx index 18ee03f02..6175b127c 100644 --- a/src/core/components/odsCoreProvider/odsCoreProvider.mdx +++ b/src/core/components/gukCoreProvider/gukCoreProvider.mdx @@ -1,12 +1,12 @@ import { ArgTypes, Meta, Description, Title, Subtitle } from '@storybook/blocks'; -import { OdsCoreProvider } from './odsCoreProvider'; +import { GukCoreProvider } from './gukCoreProvider'; - + -OdsCoreProvider +GukCoreProvider -The `` is a React context that defines the image, link elements, and copy texts to be rendered across -all the ODS components, defaulting such values to ``, `` tags, and a default set of copy texts. +The `` is a React context that defines the image, link elements, and copy texts to be rendered across +all the GovKit components, defaulting such values to ``, `` tags, and a default set of copy texts. The provider becomes particularly useful when an application needs to employ framework-specific images or links, such as the `` and `` components from Next.js, or when specific copy texts need to be customized. @@ -14,7 +14,7 @@ the `` and `` components from Next.js, or when specific copy te **Usage example** ```typescript -import { OdsCoreProvider } from '@aragon-ods'; +import { GukCoreProvider } from '@aragon/gov-ui-kit'; import NextImage from 'next/image'; import NextLink from 'next/link'; @@ -30,13 +30,13 @@ const coreProviderValues = { Img: CustomImage, Link: CustomLink }; export const Application = () => { return ( - + /* Your application */ - + ) } ``` Refer to the component's properties below for more details on the default configuration objects used for each provider. - + diff --git a/src/core/components/odsCoreProvider/odsCoreProvider.test.tsx b/src/core/components/gukCoreProvider/gukCoreProvider.test.tsx similarity index 63% rename from src/core/components/odsCoreProvider/odsCoreProvider.test.tsx rename to src/core/components/gukCoreProvider/gukCoreProvider.test.tsx index a88be8012..5e54870cb 100644 --- a/src/core/components/odsCoreProvider/odsCoreProvider.test.tsx +++ b/src/core/components/gukCoreProvider/gukCoreProvider.test.tsx @@ -2,22 +2,22 @@ import { render, renderHook, screen } from '@testing-library/react'; import type { ReactNode } from 'react'; import { coreCopy, type CoreCopy } from '../../assets'; import { - OdsCoreProvider, - useOdsCoreContext, - type IOdsCoreContext, - type IOdsCoreProviderProps, -} from './odsCoreProvider'; + GukCoreProvider, + useGukCoreContext, + type IGukCoreContext, + type IGukCoreProviderProps, +} from './gukCoreProvider'; -describe(' component', () => { - const createTestComponent = (props?: IOdsCoreProviderProps) => { - const completeProps: IOdsCoreProviderProps = { ...props }; +describe(' component', () => { + const createTestComponent = (props?: IGukCoreProviderProps) => { + const completeProps: IGukCoreProviderProps = { ...props }; - return ; + return ; }; - const createHookWrapper = (context?: Partial) => + const createHookWrapper = (context?: Partial) => function hookWrapper(props: { children: ReactNode }) { - return {props.children}; + return {props.children}; }; it('renders the children property', () => { @@ -35,20 +35,20 @@ describe(' component', () => { }, }; const context = { Img: () => 'img', Link: () => 'link', copy: customCopy }; - const { result } = renderHook(() => useOdsCoreContext(), { wrapper: createHookWrapper(context) }); + const { result } = renderHook(() => useGukCoreContext(), { wrapper: createHookWrapper(context) }); expect(result.current).toEqual(context); }); it('fallbacks to the default values when some context values are not set', () => { const context = { Link: () => 'link' }; - const { result } = renderHook(() => useOdsCoreContext(), { wrapper: createHookWrapper(context) }); + const { result } = renderHook(() => useGukCoreContext(), { wrapper: createHookWrapper(context) }); expect(result.current.Link).toEqual(context.Link); expect(result.current.Img).toEqual('img'); }); - describe('useOdsCoreContext', () => { - it('returns default values when not used inside a OdsCoreProvider', () => { - const { result } = renderHook(() => useOdsCoreContext()); + describe('useGukCoreContext', () => { + it('returns default values when not used inside a GukCoreProvider', () => { + const { result } = renderHook(() => useGukCoreContext()); expect(result.current.Img).toEqual('img'); expect(result.current.Link).toEqual('a'); }); diff --git a/src/core/components/odsCoreProvider/odsCoreProvider.tsx b/src/core/components/gukCoreProvider/gukCoreProvider.tsx similarity index 76% rename from src/core/components/odsCoreProvider/odsCoreProvider.tsx rename to src/core/components/gukCoreProvider/gukCoreProvider.tsx index 75a419803..234f67abb 100644 --- a/src/core/components/odsCoreProvider/odsCoreProvider.tsx +++ b/src/core/components/gukCoreProvider/gukCoreProvider.tsx @@ -1,7 +1,7 @@ import { createContext, useContext, useMemo, type ReactNode } from 'react'; import { coreCopy, type CoreCopy } from '../../assets'; -export interface IOdsCoreContext { +export interface IGukCoreContext { /** * Image component to be used for images. * @default 'img' @@ -18,26 +18,26 @@ export interface IOdsCoreContext { copy: CoreCopy; } -export interface IOdsCoreProviderProps { +export interface IGukCoreProviderProps { /** * Context provider values. */ - values?: Partial; + values?: Partial; /** * Children of the context provider. */ children?: ReactNode; } -const odsCoreContextDefaults: IOdsCoreContext = { +const odsCoreContextDefaults: IGukCoreContext = { Img: 'img', Link: 'a', copy: coreCopy, }; -const odsCoreContext = createContext(odsCoreContextDefaults); +const odsCoreContext = createContext(odsCoreContextDefaults); -export const OdsCoreProvider: React.FC = (props) => { +export const GukCoreProvider: React.FC = (props) => { const { values, children } = props; const contextValues = useMemo( @@ -52,7 +52,7 @@ export const OdsCoreProvider: React.FC = (props) => { return {children}; }; -export const useOdsCoreContext = (): Required => { +export const useGukCoreContext = (): Required => { const values = useContext(odsCoreContext); return values; diff --git a/src/core/components/gukCoreProvider/index.ts b/src/core/components/gukCoreProvider/index.ts new file mode 100644 index 000000000..9b26bf87c --- /dev/null +++ b/src/core/components/gukCoreProvider/index.ts @@ -0,0 +1,6 @@ +export { + GukCoreProvider, + useGukCoreContext, + type IGukCoreContext, + type IGukCoreProviderProps, +} from './gukCoreProvider'; diff --git a/src/core/components/icon/icon.stories.tsx b/src/core/components/icon/icon.stories.tsx index a76059c60..584b72bf2 100644 --- a/src/core/components/icon/icon.stories.tsx +++ b/src/core/components/icon/icon.stories.tsx @@ -25,7 +25,7 @@ export const Default: Story = { }; /** - * All available icons of the ODS library. + * All available icons of the GovKit library. */ export const AvailableIcons: Story = { render: () => { diff --git a/src/core/components/illustrations/index.css b/src/core/components/illustrations/index.css index cd08998cf..27932560d 100644 --- a/src/core/components/illustrations/index.css +++ b/src/core/components/illustrations/index.css @@ -1,7 +1,7 @@ :root { /* Accent color for the illustrations */ - --ods-illustration-accent-color: var(--ods-color-primary-400); + --guk-illustration-accent-color: var(--guk-color-primary-400); /* Primary color for the illustrations */ - --ods-illustration-primary-color: var(--ods-color-primary-900); + --guk-illustration-primary-color: var(--guk-color-primary-900); } diff --git a/src/core/components/index.ts b/src/core/components/index.ts index 431539075..1ae7f8e8d 100644 --- a/src/core/components/index.ts +++ b/src/core/components/index.ts @@ -11,11 +11,11 @@ export * from './dialogs'; export * from './documentParser'; export * from './dropdown'; export * from './forms'; +export * from './gukCoreProvider'; export * from './heading'; export * from './icon'; export * from './illustrations'; export * from './link'; -export * from './odsCoreProvider'; export * from './progress'; export * from './rerender'; export * from './spinner'; diff --git a/src/core/components/link/linkBase/linkBase.stories.tsx b/src/core/components/link/linkBase/linkBase.stories.tsx index 05c7cf332..9408f4bd2 100644 --- a/src/core/components/link/linkBase/linkBase.stories.tsx +++ b/src/core/components/link/linkBase/linkBase.stories.tsx @@ -9,8 +9,8 @@ const meta: Meta = { type Story = StoryObj; /** - * LinkBase is a basic component that renders a link based on the component set in the OdsCoreModules context. - * It must be used in all ODS components whenever a link needs to be rendered. + * LinkBase is a basic component that renders a link based on the component set in the GukCoreModules context. + * It must be used in all GovKit components whenever a link needs to be rendered. */ export const Default: Story = { args: { diff --git a/src/core/components/link/linkBase/linkBase.test.tsx b/src/core/components/link/linkBase/linkBase.test.tsx index 96f660a55..964dc0bf8 100644 --- a/src/core/components/link/linkBase/linkBase.test.tsx +++ b/src/core/components/link/linkBase/linkBase.test.tsx @@ -1,19 +1,19 @@ import { render, screen } from '@testing-library/react'; -import { OdsCoreProvider, type IOdsCoreContext } from '../../odsCoreProvider'; +import { GukCoreProvider, type IGukCoreContext } from '../../gukCoreProvider'; import { LinkBase, type ILinkBaseProps } from './linkBase'; describe(' component', () => { - const createTestComponent = (props?: Partial, context?: Partial) => { + const createTestComponent = (props?: Partial, context?: Partial) => { const completeProps: ILinkBaseProps = { ...props }; return ( - + - + ); }; - it('renders the link component set on the OdsCoreProvider', () => { + it('renders the link component set on the GukCoreProvider', () => { const Link = (props: object) => ( Link diff --git a/src/core/components/link/linkBase/linkBase.tsx b/src/core/components/link/linkBase/linkBase.tsx index 9df91e7e9..fc16cd5a4 100644 --- a/src/core/components/link/linkBase/linkBase.tsx +++ b/src/core/components/link/linkBase/linkBase.tsx @@ -1,10 +1,10 @@ import { forwardRef, type ComponentPropsWithoutRef } from 'react'; -import { useOdsCoreContext } from '../../odsCoreProvider'; +import { useGukCoreContext } from '../../gukCoreProvider'; export interface ILinkBaseProps extends ComponentPropsWithoutRef<'a'> {} export const LinkBase = forwardRef((props, ref) => { - const { Link } = useOdsCoreContext(); + const { Link } = useGukCoreContext(); return ; }); diff --git a/src/core/components/odsCoreProvider/index.ts b/src/core/components/odsCoreProvider/index.ts deleted file mode 100644 index 8b390ba0d..000000000 --- a/src/core/components/odsCoreProvider/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export { - OdsCoreProvider, - useOdsCoreContext, - type IOdsCoreContext, - type IOdsCoreProviderProps, -} from './odsCoreProvider'; diff --git a/src/core/index.mdx b/src/core/index.mdx index 8d4e34f4b..23da6a726 100644 --- a/src/core/index.mdx +++ b/src/core/index.mdx @@ -5,8 +5,8 @@ import LinkTo from '@storybook/addon-links/react'; # Core -The `Core` package of the Aragon ODS library includes all the basic components and utilties needed to build a web2 -application. +The `Core` package of the Aragon Governance UI Kit library includes all the basic components and utilties needed to +build a web2 application. Check the documentation and usage of the core components and utilities under the `/components` and `/utilities` sub-folders. diff --git a/src/core/utils/formatterUtils/formatterUtils.mdx b/src/core/utils/formatterUtils/formatterUtils.mdx index a1db5d7b0..888684195 100644 --- a/src/core/utils/formatterUtils/formatterUtils.mdx +++ b/src/core/utils/formatterUtils/formatterUtils.mdx @@ -49,7 +49,7 @@ formatted: Import the `formatterUtils` utility and start using it as follows: ```typescript -import { NumberFormat, formatterUtils } from '@aragon/ods'; +import { NumberFormat, formatterUtils } from '@aragon/gov-ui-kit'; const formattedQuantity = formatterUtils.formatNumber(amount, { format: NumberFormat.TOKEN_AMOUNT_SHORT }); ``` @@ -129,7 +129,7 @@ The `formatDate` utility currently supports 5 formats to format dates across you Import the `formatterUtils` utility and start using it as follows: ```typescript -import { DateFormat, formatterUtils } from '@aragon/ods'; +import { DateFormat, formatterUtils } from '@aragon/gov-ui-kit'; const formattedDate = formatterUtils.formatDate(date, { format: DateFormat.YEAR_MONTH }); ``` diff --git a/src/modules/assets/copy/modulesCopy.ts b/src/modules/assets/copy/modulesCopy.ts index 303e798a6..22cf4ec58 100644 --- a/src/modules/assets/copy/modulesCopy.ts +++ b/src/modules/assets/copy/modulesCopy.ts @@ -1,5 +1,5 @@ /** - * Object representing the structure of copy texts used in various parts of the ODS Modules package. + * Object representing the structure of copy texts used in various parts of the GovKit Modules package. * Each property in the object corresponds to a specific component or feature, containing the necessary * text labels or functions that return text strings. */ diff --git a/src/modules/components/address/addressInput/addressInput.test.tsx b/src/modules/components/address/addressInput/addressInput.test.tsx index 56c381682..828c3fde7 100644 --- a/src/modules/components/address/addressInput/addressInput.test.tsx +++ b/src/modules/components/address/addressInput/addressInput.test.tsx @@ -6,7 +6,7 @@ import type { UseEnsAddressReturnType, UseEnsNameReturnType } from 'wagmi'; import * as wagmi from 'wagmi'; import { IconType, clipboardUtils } from '../../../../core'; import { addressUtils } from '../../../utils'; -import { OdsModulesProvider } from '../../odsModulesProvider'; +import { GukModulesProvider } from '../../gukModulesProvider'; import { AddressInput, type IAddressInputProps } from './addressInput'; jest.mock('../../member', () => ({ @@ -50,9 +50,9 @@ describe(' component', () => { }; return ( - + - + ); }; diff --git a/src/modules/components/address/addressInput/addressInput.tsx b/src/modules/components/address/addressInput/addressInput.tsx index 3ae54b362..0bf5ed034 100644 --- a/src/modules/components/address/addressInput/addressInput.tsx +++ b/src/modules/components/address/addressInput/addressInput.tsx @@ -18,8 +18,8 @@ import { import { ChainEntityType, useBlockExplorer } from '../../../hooks'; import type { IWeb3ComponentProps } from '../../../types'; import { addressUtils, ensUtils } from '../../../utils'; +import { useGukModulesContext } from '../../gukModulesProvider'; import { MemberAvatar } from '../../member'; -import { useOdsModulesContext } from '../../odsModulesProvider'; export interface IAddressInputResolvedValue { /** @@ -75,7 +75,7 @@ export const AddressInput = forwardRef( const [debouncedValue, setDebouncedValue] = useDebouncedValue(value, { delay: 300 }); const [isFocused, setIsFocused] = useState(false); - const { copy } = useOdsModulesContext(); + const { copy } = useGukModulesContext(); const isDebouncedValueValidEns = ensUtils.isEnsName(debouncedValue); const isDebouncedValueValidAddress = addressUtils.isAddress(debouncedValue); diff --git a/src/modules/components/asset/assetDataListItem/assetDataListItemStructure/assetDataListItemStructure.tsx b/src/modules/components/asset/assetDataListItem/assetDataListItemStructure/assetDataListItemStructure.tsx index 9d247d7be..46bfe1c3d 100644 --- a/src/modules/components/asset/assetDataListItem/assetDataListItemStructure/assetDataListItemStructure.tsx +++ b/src/modules/components/asset/assetDataListItem/assetDataListItemStructure/assetDataListItemStructure.tsx @@ -2,7 +2,7 @@ import classNames from 'classnames'; import type React from 'react'; import { useMemo } from 'react'; import { Avatar, DataList, NumberFormat, Tag, formatterUtils, type IDataListItemProps } from '../../../../../core'; -import { useOdsModulesContext } from '../../../odsModulesProvider'; +import { useGukModulesContext } from '../../../gukModulesProvider'; export type IAssetDataListItemStructureProps = IDataListItemProps & { /** @@ -35,7 +35,7 @@ export type IAssetDataListItemStructureProps = IDataListItemProps & { export const AssetDataListItemStructure: React.FC = (props) => { const { logoSrc, name, amount, symbol, fiatPrice, priceChange = 0, ...otherProps } = props; - const { copy } = useOdsModulesContext(); + const { copy } = useGukModulesContext(); const fiatAmount = Number(amount) * Number(fiatPrice ?? 0); diff --git a/src/modules/components/asset/assetTransfer/assetTransfer.test.tsx b/src/modules/components/asset/assetTransfer/assetTransfer.test.tsx index 8b68f6d4f..470627b9c 100644 --- a/src/modules/components/asset/assetTransfer/assetTransfer.test.tsx +++ b/src/modules/components/asset/assetTransfer/assetTransfer.test.tsx @@ -1,5 +1,5 @@ import { render, screen } from '@testing-library/react'; -import { OdsModulesProvider } from '../../odsModulesProvider'; +import { GukModulesProvider } from '../../gukModulesProvider'; import { AssetTransfer, type IAssetTransferProps } from './assetTransfer'; jest.mock('./assetTransferAddress', () => ({ @@ -19,9 +19,9 @@ describe(' component', () => { }; return ( - + - + ); }; diff --git a/src/modules/components/asset/assetTransfer/assetTransferAddress/assetTransferAddress.test.tsx b/src/modules/components/asset/assetTransfer/assetTransferAddress/assetTransferAddress.test.tsx index ff086743a..dea536331 100644 --- a/src/modules/components/asset/assetTransfer/assetTransferAddress/assetTransferAddress.test.tsx +++ b/src/modules/components/asset/assetTransfer/assetTransferAddress/assetTransferAddress.test.tsx @@ -1,6 +1,6 @@ import '@testing-library/jest-dom'; import { render, screen } from '@testing-library/react'; -import { OdsModulesProvider } from '../../../odsModulesProvider'; +import { GukModulesProvider } from '../../../gukModulesProvider'; import { AssetTransferAddress, type IAssetTransferAddressProps } from './assetTransferAddress'; jest.mock('../../../member/', () => ({ MemberAvatar: () =>
})); @@ -15,9 +15,9 @@ describe(' component', () => { ...props, }; return ( - + - + ); }; diff --git a/src/modules/components/odsModulesProvider/odsModulesProvider.mdx b/src/modules/components/gukModulesProvider/gukModulesProvider.mdx similarity index 61% rename from src/modules/components/odsModulesProvider/odsModulesProvider.mdx rename to src/modules/components/gukModulesProvider/gukModulesProvider.mdx index 8430f4d99..3f398ec08 100644 --- a/src/modules/components/odsModulesProvider/odsModulesProvider.mdx +++ b/src/modules/components/gukModulesProvider/gukModulesProvider.mdx @@ -1,27 +1,27 @@ import { ArgTypes, Meta, Description, Title, Subtitle } from '@storybook/blocks'; -import { OdsModulesProvider } from './odsModulesProvider'; +import { GukModulesProvider } from './gukModulesProvider'; - + -OdsModulesProvider +GukModulesProvider -The `` is a React context that, beside providing some customisations for the modules components, +The `` is a React context that, beside providing some customisations for the modules components, renders the `` and `` React Context providers from the [wagmi](https://wagmi.sh/) and [@tanstack/react-query](https://tanstack.com/query) libraries. -The two providers are needed for the ODS Modules component using the hooks from wagmi (e.g. +The two providers are needed for the GovKit Modules component using the hooks from wagmi (e.g. [useEnsName](https://wagmi.sh/react/api/hooks/useEnsName)): - ``: needed to know which chain and RPC endpoint to use when fetching blockchain data; - ``: needed to cache the data fetched from the blockchain; -Additionally, `` renders the `` and passes values from the `coreProviderValues` +Additionally, `` renders the `` and passes values from the `coreProviderValues` prop. -The `` provides the following customisations for modules components: +The `` provides the following customisations for modules components: -- `copy`: Object of type `IOdsModulesCopy` to customize the text labels used within the modules components. +- `copy`: Object of type `IGukModulesCopy` to customize the text labels used within the modules components. Refer to the component's properties below for more details on the default configuration objects used for each provider. - + diff --git a/src/modules/components/odsModulesProvider/odsModulesProvider.test.tsx b/src/modules/components/gukModulesProvider/gukModulesProvider.test.tsx similarity index 74% rename from src/modules/components/odsModulesProvider/odsModulesProvider.test.tsx rename to src/modules/components/gukModulesProvider/gukModulesProvider.test.tsx index 50ecc845e..f59c938fd 100644 --- a/src/modules/components/odsModulesProvider/odsModulesProvider.test.tsx +++ b/src/modules/components/gukModulesProvider/gukModulesProvider.test.tsx @@ -2,11 +2,11 @@ import { render, renderHook, screen } from '@testing-library/react'; import type { ReactNode } from 'react'; import { modulesCopy, type ModulesCopy } from '../../assets'; import { - OdsModulesProvider, - useOdsModulesContext, - type IOdsModulesContext, - type IOdsModulesProviderProps, -} from './odsModulesProvider'; + GukModulesProvider, + useGukModulesContext, + type IGukModulesContext, + type IGukModulesProviderProps, +} from './gukModulesProvider'; jest.mock('@tanstack/react-query', () => ({ ...jest.requireActual('@tanstack/react-query'), @@ -20,18 +20,18 @@ jest.mock('wagmi', () => ({ WagmiProvider: (props: { children: ReactNode }) =>
{props.children}
, })); -describe(' component', () => { - const createTestComponent = (props?: Partial) => { +describe(' component', () => { + const createTestComponent = (props?: Partial) => { const completeProps = { ...props, }; - return ; + return ; }; - const createHookWrapper = (context?: Partial) => + const createHookWrapper = (context?: Partial) => function hookWrapper(props: { children: ReactNode }) { - return {props.children}; + return {props.children}; }; it('renders the wagmi and react-query providers with default configs', () => { @@ -51,7 +51,7 @@ describe(' component', () => { }, }; const context = { copy: customCopy }; - const { result } = renderHook(() => useOdsModulesContext(), { wrapper: createHookWrapper(context) }); + const { result } = renderHook(() => useGukModulesContext(), { wrapper: createHookWrapper(context) }); expect(result.current).toEqual(context); }); }); diff --git a/src/modules/components/odsModulesProvider/odsModulesProvider.tsx b/src/modules/components/gukModulesProvider/gukModulesProvider.tsx similarity index 80% rename from src/modules/components/odsModulesProvider/odsModulesProvider.tsx rename to src/modules/components/gukModulesProvider/gukModulesProvider.tsx index fc0505246..34ee42974 100644 --- a/src/modules/components/odsModulesProvider/odsModulesProvider.tsx +++ b/src/modules/components/gukModulesProvider/gukModulesProvider.tsx @@ -3,10 +3,10 @@ import { createContext, useContext, useMemo, type ReactNode } from 'react'; import { createClient, http } from 'viem'; import { WagmiProvider, createConfig, type Config, type State } from 'wagmi'; import { arbitrum, arbitrumSepolia, base, baseSepolia, mainnet, polygon, polygonAmoy, sepolia } from 'wagmi/chains'; -import { OdsCoreProvider, type IOdsCoreProviderProps } from '../../../core'; +import { GukCoreProvider, type IGukCoreProviderProps } from '../../../core'; import { modulesCopy, type ModulesCopy } from '../../assets'; -export interface IOdsModulesContext { +export interface IGukModulesContext { /** * Copy for the modules components. */ @@ -27,7 +27,7 @@ const defaultQueryClient = new QueryClient({ }, }); -export interface IOdsModulesProviderProps { +export interface IGukModulesProviderProps { /** * Wagmi configurations to be forwarded to the WagmiProvider. The default configurations support some basic chains * (ethereum, base, polygon, arbitrum) and their related testnets and uses open RPC endpoints, @see defaultWagmiConfig @@ -45,27 +45,27 @@ export interface IOdsModulesProviderProps { */ queryClient?: QueryClient; /** - * Values for the OdsCoreProvider context. - * @see IOdsCoreContext + * Values for the GukCoreProvider context. + * @see IGukCoreContext */ - coreProviderValues?: IOdsCoreProviderProps['values']; + coreProviderValues?: IGukCoreProviderProps['values']; /** * Context provider values. */ - values?: Partial; + values?: Partial; /** * Children of the provider. */ children?: ReactNode; } -const odsModulesContextDefaults: IOdsModulesContext = { +const odsModulesContextDefaults: IGukModulesContext = { copy: modulesCopy, }; -const odsModulesContext = createContext(odsModulesContextDefaults); +const odsModulesContext = createContext(odsModulesContextDefaults); -export const OdsModulesProvider: React.FC = (props) => { +export const GukModulesProvider: React.FC = (props) => { const { queryClient = defaultQueryClient, wagmiConfig = defaultWagmiConfig, @@ -86,14 +86,14 @@ export const OdsModulesProvider: React.FC = (props) => - {children} + {children} ); }; -export const useOdsModulesContext = (): IOdsModulesContext => { +export const useGukModulesContext = (): IGukModulesContext => { const values = useContext(odsModulesContext); return values; diff --git a/src/modules/components/gukModulesProvider/index.ts b/src/modules/components/gukModulesProvider/index.ts new file mode 100644 index 000000000..703367589 --- /dev/null +++ b/src/modules/components/gukModulesProvider/index.ts @@ -0,0 +1,6 @@ +export { + GukModulesProvider, + useGukModulesContext, + type IGukModulesContext, + type IGukModulesProviderProps, +} from './gukModulesProvider'; diff --git a/src/modules/components/index.ts b/src/modules/components/index.ts index be6368902..35d1bb75f 100644 --- a/src/modules/components/index.ts +++ b/src/modules/components/index.ts @@ -1,8 +1,8 @@ export * from './address'; export * from './asset'; export * from './dao'; +export * from './gukModulesProvider'; export * from './member'; -export * from './odsModulesProvider'; export * from './proposal'; export * from './transaction'; export * from './vote'; diff --git a/src/modules/components/member/memberDataListItem/memberDataListItemStructure/memberDataListItemStructure.tsx b/src/modules/components/member/memberDataListItem/memberDataListItemStructure/memberDataListItemStructure.tsx index e17dff06a..a324dd434 100644 --- a/src/modules/components/member/memberDataListItem/memberDataListItemStructure/memberDataListItemStructure.tsx +++ b/src/modules/components/member/memberDataListItem/memberDataListItemStructure/memberDataListItemStructure.tsx @@ -2,7 +2,7 @@ import classNames from 'classnames'; import { useAccount } from 'wagmi'; import { DataList, Heading, NumberFormat, Tag, formatterUtils, type IDataListItemProps } from '../../../../../core'; import { addressUtils } from '../../../../utils'; -import { useOdsModulesContext } from '../../../odsModulesProvider'; +import { useGukModulesContext } from '../../../gukModulesProvider'; import { MemberAvatar } from '../../memberAvatar'; export type IMemberDataListItemProps = IDataListItemProps & { @@ -55,7 +55,7 @@ export const MemberDataListItemStructure: React.FC = ( const { address: currentUserAddress, isConnected } = useAccount(); - const { copy } = useOdsModulesContext(); + const { copy } = useGukModulesContext(); const isCurrentUser = isConnected && address && addressUtils.isAddressEqual(currentUserAddress, address); diff --git a/src/modules/components/odsModulesProvider/index.ts b/src/modules/components/odsModulesProvider/index.ts deleted file mode 100644 index 5dd4c9f92..000000000 --- a/src/modules/components/odsModulesProvider/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export { - OdsModulesProvider, - useOdsModulesContext, - type IOdsModulesContext, - type IOdsModulesProviderProps, -} from './odsModulesProvider'; diff --git a/src/modules/components/proposal/proposalActions/actions/proposalActionChangeMembers/proposalActionChangeMembers.tsx b/src/modules/components/proposal/proposalActions/actions/proposalActionChangeMembers/proposalActionChangeMembers.tsx index 4ec11632e..de620dcbd 100644 --- a/src/modules/components/proposal/proposalActions/actions/proposalActionChangeMembers/proposalActionChangeMembers.tsx +++ b/src/modules/components/proposal/proposalActions/actions/proposalActionChangeMembers/proposalActionChangeMembers.tsx @@ -1,6 +1,6 @@ import { DefinitionList, Heading } from '../../../../../../core'; +import { useGukModulesContext } from '../../../../gukModulesProvider'; import { MemberDataListItem } from '../../../../member'; -import { useOdsModulesContext } from '../../../../odsModulesProvider'; import { ProposalActionType, type IProposalActionChangeMembers, @@ -12,7 +12,7 @@ export interface IProposalActionChangeMembersProps export const ProposalActionChangeMembers: React.FC = (props) => { const { action } = props; - const { copy } = useOdsModulesContext(); + const { copy } = useGukModulesContext(); return (
diff --git a/src/modules/components/proposal/proposalActions/actions/proposalActionChangeSettings/proposalActionChangeSettings.tsx b/src/modules/components/proposal/proposalActions/actions/proposalActionChangeSettings/proposalActionChangeSettings.tsx index b3d35fe9b..27bd6f770 100644 --- a/src/modules/components/proposal/proposalActions/actions/proposalActionChangeSettings/proposalActionChangeSettings.tsx +++ b/src/modules/components/proposal/proposalActions/actions/proposalActionChangeSettings/proposalActionChangeSettings.tsx @@ -1,6 +1,6 @@ import { useState } from 'react'; import { DefinitionList, Toggle, ToggleGroup } from '../../../../../../core'; -import { useOdsModulesContext } from '../../../../odsModulesProvider'; +import { useGukModulesContext } from '../../../../gukModulesProvider'; import { type IProposalActionChangeSettings, type IProposalActionComponentProps } from '../../proposalActionsTypes'; export interface IProposalActionChangeSettingsProps @@ -9,7 +9,7 @@ export interface IProposalActionChangeSettingsProps export const ProposalActionChangeSettings: React.FC = (props) => { const { action } = props; - const { copy } = useOdsModulesContext(); + const { copy } = useGukModulesContext(); const [toggleValue, setToggleValue] = useState('existingSettings'); diff --git a/src/modules/components/proposal/proposalActions/actions/proposalActionTokenMint/proposalActionTokenMint.test.tsx b/src/modules/components/proposal/proposalActions/actions/proposalActionTokenMint/proposalActionTokenMint.test.tsx index fa1ef935e..78a34fd12 100644 --- a/src/modules/components/proposal/proposalActions/actions/proposalActionTokenMint/proposalActionTokenMint.test.tsx +++ b/src/modules/components/proposal/proposalActions/actions/proposalActionTokenMint/proposalActionTokenMint.test.tsx @@ -1,5 +1,5 @@ import { render, screen } from '@testing-library/react'; -import { OdsModulesProvider } from '../../../../odsModulesProvider'; +import { GukModulesProvider } from '../../../../gukModulesProvider'; import { generateProposalActionTokenMint } from '../generators'; import { ProposalActionTokenMint, type IProposalActionTokenMintProps } from './proposalActionTokenMint'; @@ -18,9 +18,9 @@ describe(' component', () => { }; return ( - + - + ); }; diff --git a/src/modules/components/proposal/proposalActions/proposalActions/proposalActions.test.tsx b/src/modules/components/proposal/proposalActions/proposalActions/proposalActions.test.tsx index 146f62e41..233f95ca0 100644 --- a/src/modules/components/proposal/proposalActions/proposalActions/proposalActions.test.tsx +++ b/src/modules/components/proposal/proposalActions/proposalActions/proposalActions.test.tsx @@ -1,7 +1,7 @@ import { render, screen } from '@testing-library/react'; import { userEvent } from '@testing-library/user-event'; import { modulesCopy } from '../../../../assets'; -import { OdsModulesProvider } from '../../../odsModulesProvider'; +import { GukModulesProvider } from '../../../gukModulesProvider'; import { generateProposalAction } from '../actions/generators/proposalAction'; import { generateProposalActionWithdrawToken } from '../actions/generators/proposalActionWithdrawToken'; import { ProposalActionType, type IProposalAction } from '../proposalActionsTypes'; @@ -25,9 +25,9 @@ describe(' component', () => { }; return ( - + - + ); }; diff --git a/src/modules/components/proposal/proposalActions/proposalActions/proposalActions.tsx b/src/modules/components/proposal/proposalActions/proposalActions/proposalActions.tsx index eecc2da98..d6a3440f6 100644 --- a/src/modules/components/proposal/proposalActions/proposalActions/proposalActions.tsx +++ b/src/modules/components/proposal/proposalActions/proposalActions/proposalActions.tsx @@ -1,7 +1,7 @@ import classNames from 'classnames'; import { useRef, useState } from 'react'; import { Accordion, Button, Card, EmptyState } from '../../../../../core'; -import { useOdsModulesContext } from '../../../odsModulesProvider'; +import { useGukModulesContext } from '../../../gukModulesProvider'; import { ProposalActionsAction } from '../proposalActionsAction'; import type { IProposalAction } from '../proposalActionsTypes'; import type { IProposalActionsProps } from './proposalActions.api'; @@ -23,7 +23,7 @@ export const ProposalActions = (['0']); - const { copy } = useOdsModulesContext(); + const { copy } = useGukModulesContext(); const actionsContainerRef = useRef(null); diff --git a/src/modules/components/proposal/proposalActions/proposalActionsAction/proposalActionsAction.tsx b/src/modules/components/proposal/proposalActions/proposalActionsAction/proposalActionsAction.tsx index 53dda9a12..1e90f9aa9 100644 --- a/src/modules/components/proposal/proposalActions/proposalActionsAction/proposalActionsAction.tsx +++ b/src/modules/components/proposal/proposalActions/proposalActionsAction/proposalActionsAction.tsx @@ -1,7 +1,7 @@ import { useMemo, useRef, useState } from 'react'; import { Accordion, AlertCard, Button, Dropdown, Heading, Icon, IconType } from '../../../../../core'; import type { IWeb3ComponentProps } from '../../../../types'; -import { useOdsModulesContext } from '../../../odsModulesProvider'; +import { useGukModulesContext } from '../../../gukModulesProvider'; import { ProposalActionChangeMembers, ProposalActionChangeSettings, @@ -49,7 +49,7 @@ export const ProposalActionsAction = { const { action, index, name, CustomComponent, dropdownItems, ...web3Props } = props; - const { copy } = useOdsModulesContext(); + const { copy } = useGukModulesContext(); const contentRef = useRef(null); const itemRef = useRef(null); diff --git a/src/modules/components/proposal/proposalActions/proposalActionsAction/proposalActionsActionDecodedView/proposalActionsActionDecodedView.tsx b/src/modules/components/proposal/proposalActions/proposalActionsAction/proposalActionsActionDecodedView/proposalActionsActionDecodedView.tsx index 75449e32c..3860d8353 100644 --- a/src/modules/components/proposal/proposalActions/proposalActionsAction/proposalActionsActionDecodedView/proposalActionsActionDecodedView.tsx +++ b/src/modules/components/proposal/proposalActions/proposalActionsAction/proposalActionsActionDecodedView/proposalActionsActionDecodedView.tsx @@ -1,5 +1,5 @@ import { InputText } from '../../../../../../core'; -import { useOdsModulesContext } from '../../../../odsModulesProvider'; +import { useGukModulesContext } from '../../../../gukModulesProvider'; import type { IProposalAction } from '../../proposalActionsTypes'; export interface IProposalActionsActionDecodedViewProps { @@ -11,7 +11,7 @@ export interface IProposalActionsActionDecodedViewProps { export const ProposalActionsActionDecodedView: React.FC = (props) => { const { action } = props; - const { copy } = useOdsModulesContext(); + const { copy } = useGukModulesContext(); return (
diff --git a/src/modules/components/proposal/proposalActions/proposalActionsAction/proposalActionsActionRawView/proposalActionsActionRawView.tsx b/src/modules/components/proposal/proposalActions/proposalActionsAction/proposalActionsActionRawView/proposalActionsActionRawView.tsx index 0b4603837..d3e469f5d 100644 --- a/src/modules/components/proposal/proposalActions/proposalActionsAction/proposalActionsActionRawView/proposalActionsActionRawView.tsx +++ b/src/modules/components/proposal/proposalActions/proposalActionsAction/proposalActionsActionRawView/proposalActionsActionRawView.tsx @@ -1,5 +1,5 @@ import { Button, clipboardUtils, InputText, TextArea } from '../../../../../../core'; -import { useOdsModulesContext } from '../../../../odsModulesProvider'; +import { useGukModulesContext } from '../../../../gukModulesProvider'; import type { IProposalAction } from '../../proposalActionsTypes'; export interface IProposalActionsActionRawViewProps { @@ -12,7 +12,7 @@ export interface IProposalActionsActionRawViewProps { export const ProposalActionsActionRawView: React.FC = (props) => { const { action } = props; - const { copy } = useOdsModulesContext(); + const { copy } = useGukModulesContext(); return (
diff --git a/src/modules/components/proposal/proposalActions/proposalActionsAction/proposalActionsActionViewAsMenu/proposalActionsActionViewAsMenu.tsx b/src/modules/components/proposal/proposalActions/proposalActionsAction/proposalActionsActionViewAsMenu/proposalActionsActionViewAsMenu.tsx index 3c667fd7d..1228dc771 100644 --- a/src/modules/components/proposal/proposalActions/proposalActionsAction/proposalActionsActionViewAsMenu/proposalActionsActionViewAsMenu.tsx +++ b/src/modules/components/proposal/proposalActions/proposalActionsAction/proposalActionsActionViewAsMenu/proposalActionsActionViewAsMenu.tsx @@ -1,5 +1,5 @@ import { Dropdown } from '../../../../../../core'; -import { useOdsModulesContext } from '../../../../odsModulesProvider'; +import { useGukModulesContext } from '../../../../gukModulesProvider'; import { ProposalActionViewMode } from '../../proposalActionsTypes'; export interface IProposalActionsActionViewAsMenuProps { @@ -24,7 +24,7 @@ export interface IProposalActionsActionViewAsMenuProps { export const ProposalActionsActionViewAsMenu: React.FC = (props) => { const { viewMode, disableBasic, disableDecoded, onViewModeChange } = props; - const { copy } = useOdsModulesContext(); + const { copy } = useGukModulesContext(); return ( diff --git a/src/modules/components/proposal/proposalDataListItem/approvalThresholdResult/approvalThresholdResult.tsx b/src/modules/components/proposal/proposalDataListItem/approvalThresholdResult/approvalThresholdResult.tsx index caa542ffa..3ed1a724b 100644 --- a/src/modules/components/proposal/proposalDataListItem/approvalThresholdResult/approvalThresholdResult.tsx +++ b/src/modules/components/proposal/proposalDataListItem/approvalThresholdResult/approvalThresholdResult.tsx @@ -1,5 +1,5 @@ import { NumberFormat, Progress, formatterUtils } from '../../../../../core'; -import { useOdsModulesContext } from '../../../odsModulesProvider'; +import { useGukModulesContext } from '../../../gukModulesProvider'; import { type IApprovalThresholdResult } from '../proposalDataListItemStructure'; export interface IApprovalThresholdResultProps extends IApprovalThresholdResult {} @@ -11,7 +11,7 @@ export const ApprovalThresholdResult: React.FC = const { approvalAmount, approvalThreshold, stage } = props; const percentage = approvalThreshold !== 0 ? (approvalAmount / approvalThreshold) * 100 : 100; - const { copy } = useOdsModulesContext(); + const { copy } = useGukModulesContext(); const formattedApprovalThreshold = formatterUtils.formatNumber(approvalThreshold, { format: NumberFormat.GENERIC_SHORT, diff --git a/src/modules/components/proposal/proposalDataListItem/majorityVotingResult/majorityVotingResult.tsx b/src/modules/components/proposal/proposalDataListItem/majorityVotingResult/majorityVotingResult.tsx index ef5f6b5d9..2c26e22f3 100644 --- a/src/modules/components/proposal/proposalDataListItem/majorityVotingResult/majorityVotingResult.tsx +++ b/src/modules/components/proposal/proposalDataListItem/majorityVotingResult/majorityVotingResult.tsx @@ -1,5 +1,5 @@ import { Progress } from '../../../../../core'; -import { useOdsModulesContext } from '../../../odsModulesProvider'; +import { useGukModulesContext } from '../../../gukModulesProvider'; import { type IMajorityVotingResult } from '../proposalDataListItemStructure'; export interface IMajorityVotingResultProps extends IMajorityVotingResult {} @@ -10,7 +10,7 @@ export interface IMajorityVotingResultProps extends IMajorityVotingResult {} export const MajorityVotingResult: React.FC = (props) => { const { option, stage, voteAmount, votePercentage } = props; - const { copy } = useOdsModulesContext(); + const { copy } = useGukModulesContext(); return (
diff --git a/src/modules/components/proposal/proposalDataListItem/proposalDataListItemStatus/proposalDataListItemStatus.tsx b/src/modules/components/proposal/proposalDataListItem/proposalDataListItemStatus/proposalDataListItemStatus.tsx index 662f2c039..be65c935c 100644 --- a/src/modules/components/proposal/proposalDataListItem/proposalDataListItemStatus/proposalDataListItemStatus.tsx +++ b/src/modules/components/proposal/proposalDataListItem/proposalDataListItemStatus/proposalDataListItemStatus.tsx @@ -10,7 +10,7 @@ import { type StatePingAnimationVariant, } from '../../../../../core'; import type { ModulesCopy } from '../../../../assets'; -import { useOdsModulesContext } from '../../../odsModulesProvider'; +import { useGukModulesContext } from '../../../gukModulesProvider'; import { ProposalStatus, proposalStatusToTagVariant } from '../../proposalUtils'; import { type IProposalDataListItemStructureProps } from '../proposalDataListItemStructure'; import { proposalDataListItemUtils } from '../proposalDataListItemUtils'; @@ -40,7 +40,7 @@ export const ProposalDataListItemStatus: React.FC diff --git a/src/modules/components/proposal/proposalDataListItem/proposalDataListItemStructure/proposalDataListItemStructure.tsx b/src/modules/components/proposal/proposalDataListItem/proposalDataListItemStructure/proposalDataListItemStructure.tsx index 5cfebe973..7a974e2fc 100644 --- a/src/modules/components/proposal/proposalDataListItem/proposalDataListItemStructure/proposalDataListItemStructure.tsx +++ b/src/modules/components/proposal/proposalDataListItem/proposalDataListItemStructure/proposalDataListItemStructure.tsx @@ -2,7 +2,7 @@ import classNames from 'classnames'; import { useAccount } from 'wagmi'; import { DataList, Link, Tag } from '../../../../../core'; import { addressUtils } from '../../../../utils/addressUtils'; -import { useOdsModulesContext } from '../../../odsModulesProvider'; +import { useGukModulesContext } from '../../../gukModulesProvider'; import { ApprovalThresholdResult } from '../approvalThresholdResult'; import { MajorityVotingResult } from '../majorityVotingResult'; import { ProposalDataListItemStatus } from '../proposalDataListItemStatus'; @@ -40,7 +40,7 @@ export const ProposalDataListItemStructure: React.FC = (props) => { const { approvalsAmount, minApprovals, children, ...otherProps } = props; - const { copy } = useOdsModulesContext(); + const { copy } = useGukModulesContext(); invariant(minApprovals > 0, 'ProposalVotingBreakdownMultisig: minApprovals property must be a positive number'); diff --git a/src/modules/components/proposal/proposalVoting/proposalVotingBreakdownToken/proposalVotingBreakdownToken.tsx b/src/modules/components/proposal/proposalVoting/proposalVotingBreakdownToken/proposalVotingBreakdownToken.tsx index bab6516e2..ca2cb7b23 100644 --- a/src/modules/components/proposal/proposalVoting/proposalVotingBreakdownToken/proposalVotingBreakdownToken.tsx +++ b/src/modules/components/proposal/proposalVoting/proposalVotingBreakdownToken/proposalVotingBreakdownToken.tsx @@ -1,6 +1,6 @@ import classNames from 'classnames'; import { type ITabsContentProps, NumberFormat, Tabs, formatterUtils, invariant } from '../../../../../core'; -import { useOdsModulesContext } from '../../../odsModulesProvider'; +import { useGukModulesContext } from '../../../gukModulesProvider'; import { ProposalVotingTab } from '../proposalVotingDefinitions'; import { ProposalVotingProgress } from '../proposalVotingProgress'; @@ -49,7 +49,7 @@ export const ProposalVotingBreakdownToken: React.FC = (props) => { const { className, settings, ...otherProps } = props; - const { copy } = useOdsModulesContext(); + const { copy } = useGukModulesContext(); const { startDate, endDate } = useProposalVotingStageContext(); const formattedStartDate = formatterUtils.formatDate(startDate, { format: DateFormat.YEAR_MONTH_DAY_TIME }); diff --git a/src/modules/components/proposal/proposalVoting/proposalVotingStage/proposalVotingStage.tsx b/src/modules/components/proposal/proposalVoting/proposalVotingStage/proposalVotingStage.tsx index de833454a..b7236313d 100644 --- a/src/modules/components/proposal/proposalVoting/proposalVotingStage/proposalVotingStage.tsx +++ b/src/modules/components/proposal/proposalVoting/proposalVotingStage/proposalVotingStage.tsx @@ -1,7 +1,7 @@ import classNames from 'classnames'; import { useMemo, useRef, type ComponentProps } from 'react'; import { Accordion, invariant } from '../../../../../core'; -import { useOdsModulesContext } from '../../../odsModulesProvider'; +import { useGukModulesContext } from '../../../gukModulesProvider'; import { ProposalVotingStatus } from '../../proposalUtils'; import { ProposalVotingTab } from '../proposalVotingDefinitions'; import { ProposalVotingStageContextProvider } from '../proposalVotingStageContext'; @@ -59,7 +59,7 @@ export const ProposalVotingStage: React.FC = (props) ...otherProps } = props; - const { copy } = useOdsModulesContext(); + const { copy } = useGukModulesContext(); const stateDefaultTab = [ProposalVotingStatus.PENDING, ProposalVotingStatus.UNREACHED].includes(status) ? ProposalVotingTab.DETAILS diff --git a/src/modules/components/proposal/proposalVoting/proposalVotingStageStatus/proposalVotingStageStatus.tsx b/src/modules/components/proposal/proposalVoting/proposalVotingStageStatus/proposalVotingStageStatus.tsx index 0f3dd25cb..e6152571f 100644 --- a/src/modules/components/proposal/proposalVoting/proposalVotingStageStatus/proposalVotingStageStatus.tsx +++ b/src/modules/components/proposal/proposalVoting/proposalVotingStageStatus/proposalVotingStageStatus.tsx @@ -11,7 +11,7 @@ import { StatePingAnimation, } from '../../../../../core'; import type { ModulesCopy } from '../../../../assets'; -import { useOdsModulesContext } from '../../../odsModulesProvider'; +import { useGukModulesContext } from '../../../gukModulesProvider'; import { ProposalVotingStatus } from '../../proposalUtils'; export interface IProposalVotingStageStatusProps extends ComponentProps<'div'> { @@ -57,7 +57,7 @@ const statusToIcon: Map = (props) => { const { status = ProposalVotingStatus.PENDING, endDate, isMultiStage, className, ...otherProps } = props; - const { copy } = useOdsModulesContext(); + const { copy } = useGukModulesContext(); const mainText = getStatusText(status, copy, isMultiStage); const secondaryText = statusToSecondaryText(copy)[status]; diff --git a/src/modules/components/proposal/proposalVoting/proposalVotingTabs/proposalVotingTabs.tsx b/src/modules/components/proposal/proposalVoting/proposalVotingTabs/proposalVotingTabs.tsx index e327bfab3..9bf625125 100644 --- a/src/modules/components/proposal/proposalVoting/proposalVotingTabs/proposalVotingTabs.tsx +++ b/src/modules/components/proposal/proposalVoting/proposalVotingTabs/proposalVotingTabs.tsx @@ -1,6 +1,6 @@ import { useRef, type RefObject } from 'react'; import { Tabs, type ITabsRootProps } from '../../../../../core'; -import { useOdsModulesContext } from '../../../odsModulesProvider'; +import { useGukModulesContext } from '../../../gukModulesProvider'; import { ProposalVotingStatus } from '../../proposalUtils'; import { ProposalVotingTab } from '../proposalVotingDefinitions'; @@ -23,7 +23,7 @@ export interface IProposalVotingTabsProps extends ITabsRootProps { export const ProposalVotingTabs: React.FC = (props) => { const { defaultValue = ProposalVotingTab.BREAKDOWN, accordionRef, children, status, ...otherProps } = props; - const { copy } = useOdsModulesContext(); + const { copy } = useGukModulesContext(); const contentRef = useRef(null); diff --git a/src/modules/components/vote/voteDataListItem/voteDataListItemStructure/voteDataListItemStructure.tsx b/src/modules/components/vote/voteDataListItem/voteDataListItemStructure/voteDataListItemStructure.tsx index d9e051c3b..5d9fd5b11 100644 --- a/src/modules/components/vote/voteDataListItem/voteDataListItemStructure/voteDataListItemStructure.tsx +++ b/src/modules/components/vote/voteDataListItem/voteDataListItemStructure/voteDataListItemStructure.tsx @@ -3,8 +3,8 @@ import { useAccount } from 'wagmi'; import { DataList, NumberFormat, Tag, formatterUtils, type IDataListItemProps } from '../../../../../core'; import { type ICompositeAddress } from '../../../../types'; import { addressUtils } from '../../../../utils'; +import { useGukModulesContext } from '../../../gukModulesProvider'; import { MemberAvatar } from '../../../member'; -import { useOdsModulesContext } from '../../../odsModulesProvider'; import { voteIndicatorToTagVariant, type VoteIndicator } from '../../voteUtils'; export type IVoteDataListItemStructureProps = IDataListItemProps & { @@ -34,7 +34,7 @@ export const VoteDataListItemStructure: React.FC = (props) => { const { proposalTitle, proposalId, voteIndicator, date, confirmationLabel, className, ...otherProps } = props; - const { copy } = useOdsModulesContext(); + const { copy } = useGukModulesContext(); return ( ({ @@ -25,9 +25,9 @@ describe(' component', () => { }; return ( - + - + ); }; diff --git a/src/modules/components/wallet/wallet.tsx b/src/modules/components/wallet/wallet.tsx index f986ec7ac..05165689c 100644 --- a/src/modules/components/wallet/wallet.tsx +++ b/src/modules/components/wallet/wallet.tsx @@ -3,8 +3,8 @@ import { useEnsName } from 'wagmi'; import { StateSkeletonBar } from '../../../core'; import { type ICompositeAddress, type IWeb3ComponentProps } from '../../types'; import { addressUtils } from '../../utils'; +import { useGukModulesContext } from '../gukModulesProvider'; import { MemberAvatar } from '../member'; -import { useOdsModulesContext } from '../odsModulesProvider'; export interface IWalletProps extends React.ButtonHTMLAttributes, IWeb3ComponentProps { /** @@ -16,7 +16,7 @@ export interface IWalletProps extends React.ButtonHTMLAttributes = (props) => { const { user, className, chainId, wagmiConfig, ...otherProps } = props; - const { copy } = useOdsModulesContext(); + const { copy } = useGukModulesContext(); const { data: ensName, isLoading: isEnsLoading } = useEnsName({ address: user != null ? addressUtils.getChecksum(user.address) : undefined, diff --git a/src/modules/index.mdx b/src/modules/index.mdx index 718b04c3c..8129bc2d2 100644 --- a/src/modules/index.mdx +++ b/src/modules/index.mdx @@ -5,15 +5,15 @@ import LinkTo from '@storybook/addon-links/react'; # Modules -The `Modules` package of the Aragon ODS library includes all the components and utilties that are web3 specific and / or -handle DAO business logic. +The `Modules` package of the Aragon Governance UI Kit library includes all the components and utilties that are web3 +specific and / or handle DAO business logic. Check the documentation and usage of the modules components and utilities under the `/components` and `/utilities` sub-folders. ## Usage -In order to use the ODS Modules components, make sure to: +In order to use the GovKit Modules components, make sure to: - Install the required packages: @@ -27,15 +27,15 @@ In order to use the ODS Modules components, make sure to: npm install viem wagmi @tanstack/reat-query ``` -- Wrap your application using the `` React Context Provider: +- Wrap your application using the `` React Context Provider: ```tsx - import { OdsModulesProvider } from '@aragon/ods'; + import { GukModulesProvider } from '@aragon/gov-ui-kit'; function App() { - return {/** ... */}; + return {/** ... */}; } ``` - Refer to the [OdsModulesProvider doc](/docs/modules-components-odsmodulesprovider--docs) for further details about + Refer to the [GukModulesProvider doc](/docs/modules-components-gukmodulesprovider--docs) for further details about the provider. diff --git a/src/theme/index.mdx b/src/theme/index.mdx index b33ddc9d9..40013a696 100644 --- a/src/theme/index.mdx +++ b/src/theme/index.mdx @@ -5,10 +5,10 @@ import LinkTo from '@storybook/addon-links/react'; # Theme -The `Theme` package of the Aragon ODS library includes all the assets and design tokens needed to build the Aragon -theme. +The `Theme` package of the Aragon Governance UI Kit library includes all the assets and design tokens needed to build +the Aragon theme. -Explore the following pages to learn how to use and customise the theme of the Aragon ODS library: +Explore the following pages to learn how to use and customise the theme of the Aragon Governance UI Kit library: - [Design tokens](/docs/theme-tokens-documentation--docs) - Fonts (SOON) diff --git a/src/theme/tokens/index.mdx b/src/theme/tokens/index.mdx index 44e7c66f3..77cfc810a 100644 --- a/src/theme/tokens/index.mdx +++ b/src/theme/tokens/index.mdx @@ -4,7 +4,7 @@ import { Meta } from '@storybook/blocks'; # Tokens -The design tokens in the `@aragon/ods` UI library serve as the foundational elements for creating consistent and +The design tokens in the `@aragon/gov-ui-kit` UI library serve as the foundational elements for creating consistent and visually appealing interfaces. These tokens are implemented using [CSS custom variables](https://developer.mozilla.org/en-US/docs/Web/CSS/--*) and, when integrated with Tailwind CSS, they can be conveniently accessed through Tailwind classes. When used as a standalone library, design tokens should be @@ -14,8 +14,8 @@ used as CSS custom properties. ### With Tailwind CSS -In projects using both `@aragon/ods` and `Tailwind CSS`, design tokens are readily available as Tailwind classes. For -instance: +In projects using both `@aragon/gov-ui-kit` and `Tailwind CSS`, design tokens are readily available as Tailwind classes. +For instance: ```html
@@ -25,12 +25,13 @@ instance: ### Standalone Usage -When using `@aragon/ods` as a standalone library, design tokens are applied as CSS custom properties. For example: +When using `@aragon/gov-ui-kit` as a standalone library, design tokens are applied as CSS custom properties. For +example: ```css .my-section { - margin-top: var(--ods-space-2); - color: var(--ods-color-primary-500); + margin-top: var(--guk-space-2); + color: var(--guk-color-primary-500); } ``` diff --git a/src/theme/tokens/primitives/borderRadius.css b/src/theme/tokens/primitives/borderRadius.css index 7482a25a0..115901d53 100644 --- a/src/theme/tokens/primitives/borderRadius.css +++ b/src/theme/tokens/primitives/borderRadius.css @@ -1,9 +1,9 @@ :root { - --ods-border-rounded: 4px; - --ods-border-rounded-lg: 8px; - --ods-border-rounded-xl: 12px; - --ods-border-rounded-2xl: 16px; - --ods-border-rounded-3xl: 24px; - --ods-border-rounded-full: 9999px; - --ods-border-rounded-none: none; + --guk-border-rounded: 4px; + --guk-border-rounded-lg: 8px; + --guk-border-rounded-xl: 12px; + --guk-border-rounded-2xl: 16px; + --guk-border-rounded-3xl: 24px; + --guk-border-rounded-full: 9999px; + --guk-border-rounded-none: none; } diff --git a/src/theme/tokens/primitives/colors.css b/src/theme/tokens/primitives/colors.css index 9b8fdfd08..a74ab3bb2 100644 --- a/src/theme/tokens/primitives/colors.css +++ b/src/theme/tokens/primitives/colors.css @@ -1,73 +1,73 @@ :root { /* Primary */ - --ods-color-primary-50: #f5f8ff; - --ods-color-primary-100: #c4d7ff; - --ods-color-primary-200: #93b2ff; - --ods-color-primary-300: #628cfe; - --ods-color-primary-400: #3164fa; - --ods-color-primary-500: #003bf5; - --ods-color-primary-600: #0037d2; - --ods-color-primary-700: #0031ad; - --ods-color-primary-800: #002985; - --ods-color-primary-900: #001f5c; + --guk-color-primary-50: #f5f8ff; + --guk-color-primary-100: #c4d7ff; + --guk-color-primary-200: #93b2ff; + --guk-color-primary-300: #628cfe; + --guk-color-primary-400: #3164fa; + --guk-color-primary-500: #003bf5; + --guk-color-primary-600: #0037d2; + --guk-color-primary-700: #0031ad; + --guk-color-primary-800: #002985; + --guk-color-primary-900: #001f5c; /* Neutral */ - --ods-color-neutral-0: #ffffff; - --ods-color-neutral-50: #f5f7fa; - --ods-color-neutral-100: #e4e7eb; - --ods-color-neutral-200: #cbd2d9; - --ods-color-neutral-300: #9aa5b1; - --ods-color-neutral-400: #7b8794; - --ods-color-neutral-500: #616e7c; - --ods-color-neutral-600: #52606d; - --ods-color-neutral-700: #3e4c59; - --ods-color-neutral-800: #323f4b; - --ods-color-neutral-900: #1f2933; + --guk-color-neutral-0: #ffffff; + --guk-color-neutral-50: #f5f7fa; + --guk-color-neutral-100: #e4e7eb; + --guk-color-neutral-200: #cbd2d9; + --guk-color-neutral-300: #9aa5b1; + --guk-color-neutral-400: #7b8794; + --guk-color-neutral-500: #616e7c; + --guk-color-neutral-600: #52606d; + --guk-color-neutral-700: #3e4c59; + --guk-color-neutral-800: #323f4b; + --guk-color-neutral-900: #1f2933; /* Info */ - --ods-color-info-100: #d1fdfa; - --ods-color-info-200: #a4f9fb; - --ods-color-info-300: #75e8f3; - --ods-color-info-400: #52cfe7; - --ods-color-info-500: #1eadd8; - --ods-color-info-600: #1588b9; - --ods-color-info-700: #0f669b; - --ods-color-info-800: #09497d; - --ods-color-info-900: #053467; + --guk-color-info-100: #d1fdfa; + --guk-color-info-200: #a4f9fb; + --guk-color-info-300: #75e8f3; + --guk-color-info-400: #52cfe7; + --guk-color-info-500: #1eadd8; + --guk-color-info-600: #1588b9; + --guk-color-info-700: #0f669b; + --guk-color-info-800: #09497d; + --guk-color-info-900: #053467; /* Success */ - --ods-color-success-100: #f3fccc; - --ods-color-success-200: #e4f99a; - --ods-color-success-300: #ccef66; - --ods-color-success-400: #b2e040; - --ods-color-success-500: #8ecc0a; - --ods-color-success-600: #74af07; - --ods-color-success-700: #5c9205; - --ods-color-success-800: #467603; - --ods-color-success-900: #366101; + --guk-color-success-100: #f3fccc; + --guk-color-success-200: #e4f99a; + --guk-color-success-300: #ccef66; + --guk-color-success-400: #b2e040; + --guk-color-success-500: #8ecc0a; + --guk-color-success-600: #74af07; + --guk-color-success-700: #5c9205; + --guk-color-success-800: #467603; + --guk-color-success-900: #366101; /* Warning */ - --ods-color-warning-100: #fff3d6; - --ods-color-warning-200: #ffe4ad; - --ods-color-warning-300: #ffd083; - --ods-color-warning-400: #ffbe65; - --ods-color-warning-500: #ff9f32; - --ods-color-warning-600: #db7d24; - --ods-color-warning-700: #b75e19; - --ods-color-warning-800: #93430f; - --ods-color-warning-900: #7a3009; + --guk-color-warning-100: #fff3d6; + --guk-color-warning-200: #ffe4ad; + --guk-color-warning-300: #ffd083; + --guk-color-warning-400: #ffbe65; + --guk-color-warning-500: #ff9f32; + --guk-color-warning-600: #db7d24; + --guk-color-warning-700: #b75e19; + --guk-color-warning-800: #93430f; + --guk-color-warning-900: #7a3009; /* Critical */ - --ods-color-critical-100: #fee4d6; - --ods-color-critical-200: #fec3ae; - --ods-color-critical-300: #fd9a86; - --ods-color-critical-400: #fb7467; - --ods-color-critical-500: #f93636; - --ods-color-critical-600: #d62736; - --ods-color-critical-700: #b31b35; - --ods-color-critical-800: #901132; - --ods-color-critical-900: #770a30; + --guk-color-critical-100: #fee4d6; + --guk-color-critical-200: #fec3ae; + --guk-color-critical-300: #fd9a86; + --guk-color-critical-400: #fb7467; + --guk-color-critical-500: #f93636; + --guk-color-critical-600: #d62736; + --guk-color-critical-700: #b31b35; + --guk-color-critical-800: #901132; + --guk-color-critical-900: #770a30; /* Transparent */ - --ods-color-transparent: transparent; + --guk-color-transparent: transparent; } diff --git a/src/theme/tokens/primitives/colors.mdx b/src/theme/tokens/primitives/colors.mdx index a5be64904..abd80037b 100644 --- a/src/theme/tokens/primitives/colors.mdx +++ b/src/theme/tokens/primitives/colors.mdx @@ -10,7 +10,7 @@ export const getColorConfig = (colorGroupName) => { const rootStyles = getComputedStyle(document.documentElement); return shades - .map((shade) => ({ shade, value: rootStyles.getPropertyValue(`--ods-color-${colorGroupName}-${shade}`) })) + .map((shade) => ({ shade, value: rootStyles.getPropertyValue(`--guk-color-${colorGroupName}-${shade}`) })) .filter((shade) => shade.value.trim() !== ''); } @@ -38,7 +38,7 @@ export const ColorSwatch = ({ colorGroupName }) => {
{shade}
diff --git a/src/theme/tokens/primitives/shadows.css b/src/theme/tokens/primitives/shadows.css index 83670e91b..c18c0af15 100644 --- a/src/theme/tokens/primitives/shadows.css +++ b/src/theme/tokens/primitives/shadows.css @@ -1,52 +1,52 @@ :root { /* Neutral */ - --ods-shadow-neutral-sm: 0px 1px 2px 0px rgba(97, 110, 124, 0.05); - --ods-shadow-neutral: 0px 1px 3px 0px rgba(97, 110, 124, 0.1), 0px 1px 2px -1px rgba(97, 110, 124, 0.1); - --ods-shadow-neutral-md: 0px 4px 6px -1px rgba(82, 96, 109, 0.1), 0px 2px 4px -2px rgba(82, 96, 109, 0.1); - --ods-shadow-neutral-lg: 0px 10px 15px -3px rgba(82, 96, 109, 0.1), 0px 4px 6px -4px rgba(82, 96, 109, 0.1); - --ods-shadow-neutral-xl: 0px 20px 25px -5px rgba(82, 96, 109, 0.1), 0px 8px 10px -6px rgba(82, 96, 109, 0.1); - --ods-shadow-neutral-2xl: 0px 25px 50px -12px rgba(82, 96, 109, 0.24); + --guk-shadow-neutral-sm: 0px 1px 2px 0px rgba(97, 110, 124, 0.05); + --guk-shadow-neutral: 0px 1px 3px 0px rgba(97, 110, 124, 0.1), 0px 1px 2px -1px rgba(97, 110, 124, 0.1); + --guk-shadow-neutral-md: 0px 4px 6px -1px rgba(82, 96, 109, 0.1), 0px 2px 4px -2px rgba(82, 96, 109, 0.1); + --guk-shadow-neutral-lg: 0px 10px 15px -3px rgba(82, 96, 109, 0.1), 0px 4px 6px -4px rgba(82, 96, 109, 0.1); + --guk-shadow-neutral-xl: 0px 20px 25px -5px rgba(82, 96, 109, 0.1), 0px 8px 10px -6px rgba(82, 96, 109, 0.1); + --guk-shadow-neutral-2xl: 0px 25px 50px -12px rgba(82, 96, 109, 0.24); /* Primary */ - --ods-shadow-primary-sm: 0px 1px 2px 0px rgba(0, 59, 245, 0.05); - --ods-shadow-primary: 0px 1px 3px 0px rgba(0, 59, 245, 0.1), 0px 1px 2px -1px rgba(0, 59, 245, 0.1); - --ods-shadow-primary-md: 0px 4px 6px -1px rgba(0, 59, 245, 0.1), 0px 2px 4px -2px rgba(0, 59, 245, 0.1); - --ods-shadow-primary-lg: 0px 10px 15px -3px rgba(0, 59, 245, 0.1), 0px 4px 6px -4px rgba(0, 59, 245, 0.1); - --ods-shadow-primary-xl: 0px 20px 25px -5px rgba(0, 59, 245, 0.1), 0px 8px 10px -6px rgba(0, 59, 245, 0.1); - --ods-shadow-primary-2xl: 0px 25px 50px -12px rgba(0, 59, 245, 0.24); + --guk-shadow-primary-sm: 0px 1px 2px 0px rgba(0, 59, 245, 0.05); + --guk-shadow-primary: 0px 1px 3px 0px rgba(0, 59, 245, 0.1), 0px 1px 2px -1px rgba(0, 59, 245, 0.1); + --guk-shadow-primary-md: 0px 4px 6px -1px rgba(0, 59, 245, 0.1), 0px 2px 4px -2px rgba(0, 59, 245, 0.1); + --guk-shadow-primary-lg: 0px 10px 15px -3px rgba(0, 59, 245, 0.1), 0px 4px 6px -4px rgba(0, 59, 245, 0.1); + --guk-shadow-primary-xl: 0px 20px 25px -5px rgba(0, 59, 245, 0.1), 0px 8px 10px -6px rgba(0, 59, 245, 0.1); + --guk-shadow-primary-2xl: 0px 25px 50px -12px rgba(0, 59, 245, 0.24); /* Success */ - --ods-shadow-success-sm: 0px 1px 2px 0px rgba(116, 175, 7, 0.05); - --ods-shadow-success: 0px 1px 3px 0px rgba(116, 175, 7, 0.1), 0px 1px 2px -1px rgba(116, 175, 7, 0.1); - --ods-shadow-success-md: 0px 4px 6px -1px rgba(116, 175, 7, 0.1), 0px 2px 4px -2px rgba(116, 175, 7, 0.1); - --ods-shadow-success-lg: 0px 10px 15px -3px rgba(116, 175, 7, 0.1), 0px 4px 6px -4px rgba(116, 175, 7, 0.1); - --ods-shadow-success-xl: 0px 20px 25px -5px rgba(116, 175, 7, 0.1), 0px 8px 10px -6px rgba(116, 175, 7, 0.1); - --ods-shadow-success-2xl: 0px 25px 50px -12px rgba(116, 175, 7, 0.24); + --guk-shadow-success-sm: 0px 1px 2px 0px rgba(116, 175, 7, 0.05); + --guk-shadow-success: 0px 1px 3px 0px rgba(116, 175, 7, 0.1), 0px 1px 2px -1px rgba(116, 175, 7, 0.1); + --guk-shadow-success-md: 0px 4px 6px -1px rgba(116, 175, 7, 0.1), 0px 2px 4px -2px rgba(116, 175, 7, 0.1); + --guk-shadow-success-lg: 0px 10px 15px -3px rgba(116, 175, 7, 0.1), 0px 4px 6px -4px rgba(116, 175, 7, 0.1); + --guk-shadow-success-xl: 0px 20px 25px -5px rgba(116, 175, 7, 0.1), 0px 8px 10px -6px rgba(116, 175, 7, 0.1); + --guk-shadow-success-2xl: 0px 25px 50px -12px rgba(116, 175, 7, 0.24); /* Warning */ - --ods-shadow-warning-sm: 0px 1px 2px 0px rgba(219, 125, 36, 0.05); - --ods-shadow-warning: 0px 1px 3px 0px rgba(219, 125, 36, 0.1), 0px 1px 2px -1px rgba(219, 125, 36, 0.1); - --ods-shadow-warning-md: 0px 4px 6px -1px rgba(219, 125, 36, 0.1), 0px 2px 4px -2px rgba(219, 125, 36, 0.1); - --ods-shadow-warning-lg: 0px 10px 15px -3px rgba(219, 125, 36, 0.1), 0px 4px 6px -4px rgba(219, 125, 36, 0.1); - --ods-shadow-warning-xl: 0px 20px 25px -5px rgba(219, 125, 36, 0.1), 0px 8px 10px -6px rgba(219, 125, 36, 0.1); - --ods-shadow-warning-2xl: 0px 25px 50px -12px rgba(219, 125, 36, 0.24); + --guk-shadow-warning-sm: 0px 1px 2px 0px rgba(219, 125, 36, 0.05); + --guk-shadow-warning: 0px 1px 3px 0px rgba(219, 125, 36, 0.1), 0px 1px 2px -1px rgba(219, 125, 36, 0.1); + --guk-shadow-warning-md: 0px 4px 6px -1px rgba(219, 125, 36, 0.1), 0px 2px 4px -2px rgba(219, 125, 36, 0.1); + --guk-shadow-warning-lg: 0px 10px 15px -3px rgba(219, 125, 36, 0.1), 0px 4px 6px -4px rgba(219, 125, 36, 0.1); + --guk-shadow-warning-xl: 0px 20px 25px -5px rgba(219, 125, 36, 0.1), 0px 8px 10px -6px rgba(219, 125, 36, 0.1); + --guk-shadow-warning-2xl: 0px 25px 50px -12px rgba(219, 125, 36, 0.24); /* Critical */ - --ods-shadow-critical-sm: 0px 1px 2px 0px rgba(214, 39, 54, 0.05); - --ods-shadow-critical: 0px 1px 3px 0px rgba(214, 39, 54, 0.1), 0px 1px 2px -1px rgba(214, 39, 54, 0.1); - --ods-shadow-critical-md: 0px 4px 6px -1px rgba(214, 39, 54, 0.1), 0px 2px 4px -2px rgba(214, 39, 54, 0.1); - --ods-shadow-critical-lg: 0px 10px 15px -3px rgba(214, 39, 54, 0.1), 0px 4px 6px -4px rgba(214, 39, 54, 0.1); - --ods-shadow-critical-xl: 0px 20px 25px -5px rgba(214, 39, 54, 0.1), 0px 8px 10px -6px rgba(214, 39, 54, 0.1); - --ods-shadow-critical-2xl: 0px 25px 50px -12px rgba(214, 39, 54, 0.24); + --guk-shadow-critical-sm: 0px 1px 2px 0px rgba(214, 39, 54, 0.05); + --guk-shadow-critical: 0px 1px 3px 0px rgba(214, 39, 54, 0.1), 0px 1px 2px -1px rgba(214, 39, 54, 0.1); + --guk-shadow-critical-md: 0px 4px 6px -1px rgba(214, 39, 54, 0.1), 0px 2px 4px -2px rgba(214, 39, 54, 0.1); + --guk-shadow-critical-lg: 0px 10px 15px -3px rgba(214, 39, 54, 0.1), 0px 4px 6px -4px rgba(214, 39, 54, 0.1); + --guk-shadow-critical-xl: 0px 20px 25px -5px rgba(214, 39, 54, 0.1), 0px 8px 10px -6px rgba(214, 39, 54, 0.1); + --guk-shadow-critical-2xl: 0px 25px 50px -12px rgba(214, 39, 54, 0.24); /* Info */ - --ods-shadow-info-sm: 0px 1px 2px 0px rgba(21, 136, 185, 0.05); - --ods-shadow-info: 0px 1px 3px 0px rgba(21, 136, 185, 0.1), 0px 1px 2px -1px rgba(21, 136, 185, 0.1); - --ods-shadow-info-md: 0px 4px 6px -1px rgba(21, 136, 185, 0.1), 0px 2px 4px -2px rgba(21, 136, 185, 0.1); - --ods-shadow-info-lg: 0px 10px 15px -3px rgba(21, 136, 185, 0.1), 0px 4px 6px -4px rgba(21, 136, 185, 0.1); - --ods-shadow-info-xl: 0px 20px 25px -5px rgba(21, 136, 185, 0.1), 0px 8px 10px -6px rgba(21, 136, 185, 0.1); - --ods-shadow-info-2xl: 0px 25px 50px -12px rgba(21, 136, 185, 0.24); + --guk-shadow-info-sm: 0px 1px 2px 0px rgba(21, 136, 185, 0.05); + --guk-shadow-info: 0px 1px 3px 0px rgba(21, 136, 185, 0.1), 0px 1px 2px -1px rgba(21, 136, 185, 0.1); + --guk-shadow-info-md: 0px 4px 6px -1px rgba(21, 136, 185, 0.1), 0px 2px 4px -2px rgba(21, 136, 185, 0.1); + --guk-shadow-info-lg: 0px 10px 15px -3px rgba(21, 136, 185, 0.1), 0px 4px 6px -4px rgba(21, 136, 185, 0.1); + --guk-shadow-info-xl: 0px 20px 25px -5px rgba(21, 136, 185, 0.1), 0px 8px 10px -6px rgba(21, 136, 185, 0.1); + --guk-shadow-info-2xl: 0px 25px 50px -12px rgba(21, 136, 185, 0.24); /* None */ - --ods-shadow-none: 0px 0px #0000; + --guk-shadow-none: 0px 0px #0000; } diff --git a/src/theme/tokens/primitives/shadows.mdx b/src/theme/tokens/primitives/shadows.mdx index 26ca872ae..485cce8f8 100644 --- a/src/theme/tokens/primitives/shadows.mdx +++ b/src/theme/tokens/primitives/shadows.mdx @@ -34,13 +34,13 @@ export const shadowVariants = { let textColor; if (variant === "primary") { - backgroundColor = `var(--ods-color-${variant}-400)`; - textColor = `var(--ods-color-${variant}-50)`; + backgroundColor = `var(--guk-color-${variant}-400)`; + textColor = `var(--guk-color-${variant}-50)`; }else if (variant === 'neutral') { - backgroundColor = `var(--ods-color-${variant}-0)`; + backgroundColor = `var(--guk-color-${variant}-0)`; }else { - backgroundColor = `var(--ods-color-${variant}-100)`; - textColor = `var(--ods-color-${variant}-800)`; + backgroundColor = `var(--guk-color-${variant}-100)`; + textColor = `var(--guk-color-${variant}-800)`; } return ( @@ -57,7 +57,7 @@ export const shadowVariants = { {` color-${variant}-600`}

- + {shadows.map(([name, style]) => { const displayName = name.replace(variant, 'shadow'); return ( diff --git a/src/theme/tokens/primitives/spacing.css b/src/theme/tokens/primitives/spacing.css index 5e2f2e518..eef43a4f2 100644 --- a/src/theme/tokens/primitives/spacing.css +++ b/src/theme/tokens/primitives/spacing.css @@ -1,37 +1,37 @@ :root { - --ods-space-base: 4px; - --ods-space-0: calc(var(--ods-space-base) * 0); - --ods-space-0-25: calc(var(--ods-space-base) * 0.25); - --ods-space-0-5: calc(var(--ods-space-base) * 0.5); - --ods-space-1-5: calc(var(--ods-space-base) * 1.5); - --ods-space-2: calc(var(--ods-space-base) * 2); - --ods-space-2-5: calc(var(--ods-space-base) * 2.5); - --ods-space-3: calc(var(--ods-space-base) * 3); - --ods-space-3-5: calc(var(--ods-space-base) * 3.5); - --ods-space-4: calc(var(--ods-space-base) * 4); - --ods-space-5: calc(var(--ods-space-base) * 5); - --ods-space-6: calc(var(--ods-space-base) * 6); - --ods-space-7: calc(var(--ods-space-base) * 7); - --ods-space-8: calc(var(--ods-space-base) * 8); - --ods-space-9: calc(var(--ods-space-base) * 9); - --ods-space-10: calc(var(--ods-space-base) * 10); - --ods-space-11: calc(var(--ods-space-base) * 11); - --ods-space-12: calc(var(--ods-space-base) * 12); - --ods-space-14: calc(var(--ods-space-base) * 14); - --ods-space-16: calc(var(--ods-space-base) * 16); - --ods-space-20: calc(var(--ods-space-base) * 20); - --ods-space-24: calc(var(--ods-space-base) * 24); - --ods-space-28: calc(var(--ods-space-base) * 28); - --ods-space-32: calc(var(--ods-space-base) * 32); - --ods-space-36: calc(var(--ods-space-base) * 36); - --ods-space-40: calc(var(--ods-space-base) * 40); - --ods-space-44: calc(var(--ods-space-base) * 44); - --ods-space-48: calc(var(--ods-space-base) * 48); - --ods-space-52: calc(var(--ods-space-base) * 52); - --ods-space-56: calc(var(--ods-space-base) * 56); - --ods-space-60: calc(var(--ods-space-base) * 60); - --ods-space-64: calc(var(--ods-space-base) * 64); - --ods-space-72: calc(var(--ods-space-base) * 72); - --ods-space-80: calc(var(--ods-space-base) * 80); - --ods-space-96: calc(var(--ods-space-base) * 96); + --guk-space-base: 4px; + --guk-space-0: calc(var(--guk-space-base) * 0); + --guk-space-0-25: calc(var(--guk-space-base) * 0.25); + --guk-space-0-5: calc(var(--guk-space-base) * 0.5); + --guk-space-1-5: calc(var(--guk-space-base) * 1.5); + --guk-space-2: calc(var(--guk-space-base) * 2); + --guk-space-2-5: calc(var(--guk-space-base) * 2.5); + --guk-space-3: calc(var(--guk-space-base) * 3); + --guk-space-3-5: calc(var(--guk-space-base) * 3.5); + --guk-space-4: calc(var(--guk-space-base) * 4); + --guk-space-5: calc(var(--guk-space-base) * 5); + --guk-space-6: calc(var(--guk-space-base) * 6); + --guk-space-7: calc(var(--guk-space-base) * 7); + --guk-space-8: calc(var(--guk-space-base) * 8); + --guk-space-9: calc(var(--guk-space-base) * 9); + --guk-space-10: calc(var(--guk-space-base) * 10); + --guk-space-11: calc(var(--guk-space-base) * 11); + --guk-space-12: calc(var(--guk-space-base) * 12); + --guk-space-14: calc(var(--guk-space-base) * 14); + --guk-space-16: calc(var(--guk-space-base) * 16); + --guk-space-20: calc(var(--guk-space-base) * 20); + --guk-space-24: calc(var(--guk-space-base) * 24); + --guk-space-28: calc(var(--guk-space-base) * 28); + --guk-space-32: calc(var(--guk-space-base) * 32); + --guk-space-36: calc(var(--guk-space-base) * 36); + --guk-space-40: calc(var(--guk-space-base) * 40); + --guk-space-44: calc(var(--guk-space-base) * 44); + --guk-space-48: calc(var(--guk-space-base) * 48); + --guk-space-52: calc(var(--guk-space-base) * 52); + --guk-space-56: calc(var(--guk-space-base) * 56); + --guk-space-60: calc(var(--guk-space-base) * 60); + --guk-space-64: calc(var(--guk-space-base) * 64); + --guk-space-72: calc(var(--guk-space-base) * 72); + --guk-space-80: calc(var(--guk-space-base) * 80); + --guk-space-96: calc(var(--guk-space-base) * 96); } diff --git a/src/theme/tokens/primitives/typography.css b/src/theme/tokens/primitives/typography.css index db88f0363..350398ff0 100644 --- a/src/theme/tokens/primitives/typography.css +++ b/src/theme/tokens/primitives/typography.css @@ -1,26 +1,26 @@ :root { /******* Font Weight *******/ - --ods-font-weight-normal: 500; - --ods-font-weight-semibold: 600; + --guk-font-weight-normal: 500; + --guk-font-weight-semibold: 600; /******* Font Size *******/ - --ods-font-size-xs: 0.75rem; - --ods-font-size-sm: 0.875rem; - --ods-font-size-base: 1rem; - --ods-font-size-lg: 1.125rem; - --ods-font-size-xl: 1.25rem; - --ods-font-size-2xl: 1.5rem; - --ods-font-size-3xl: 1.875rem; - --ods-font-size-4xl: 2.25rem; - --ods-font-size-5xl: 3rem; + --guk-font-size-xs: 0.75rem; + --guk-font-size-sm: 0.875rem; + --guk-font-size-base: 1rem; + --guk-font-size-lg: 1.125rem; + --guk-font-size-xl: 1.25rem; + --guk-font-size-2xl: 1.5rem; + --guk-font-size-3xl: 1.875rem; + --guk-font-size-4xl: 2.25rem; + --guk-font-size-5xl: 3rem; /******* Line Height *******/ - --ods-line-height-normal: 1.5; - --ods-line-height-tight: 1.25; - --ods-line-height-relaxed: 1.65; + --guk-line-height-normal: 1.5; + --guk-line-height-tight: 1.25; + --guk-line-height-relaxed: 1.65; /******* Font Family *******/ - --ods-font-family: "Manrope", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, + --guk-font-family: "Manrope", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; } diff --git a/tailwind.config.js b/tailwind.config.js index b4c0d58eb..114b947f6 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -4,178 +4,178 @@ module.exports = { theme: { colors: { primary: { - 50: 'var(--ods-color-primary-50)', - 100: 'var(--ods-color-primary-100)', - 200: 'var(--ods-color-primary-200)', - 300: 'var(--ods-color-primary-300)', - 400: 'var(--ods-color-primary-400)', - 500: 'var(--ods-color-primary-500)', - 600: 'var(--ods-color-primary-600)', - 700: 'var(--ods-color-primary-700)', - 800: 'var(--ods-color-primary-800)', - 900: 'var(--ods-color-primary-900)', + 50: 'var(--guk-color-primary-50)', + 100: 'var(--guk-color-primary-100)', + 200: 'var(--guk-color-primary-200)', + 300: 'var(--guk-color-primary-300)', + 400: 'var(--guk-color-primary-400)', + 500: 'var(--guk-color-primary-500)', + 600: 'var(--guk-color-primary-600)', + 700: 'var(--guk-color-primary-700)', + 800: 'var(--guk-color-primary-800)', + 900: 'var(--guk-color-primary-900)', }, neutral: { - 0: 'var(--ods-color-neutral-0)', - 50: 'var(--ods-color-neutral-50)', - 100: 'var(--ods-color-neutral-100)', - 200: 'var(--ods-color-neutral-200)', - 300: 'var(--ods-color-neutral-300)', - 400: 'var(--ods-color-neutral-400)', - 500: 'var(--ods-color-neutral-500)', - 600: 'var(--ods-color-neutral-600)', - 700: 'var(--ods-color-neutral-700)', - 800: 'var(--ods-color-neutral-800)', - 900: 'var(--ods-color-neutral-900)', + 0: 'var(--guk-color-neutral-0)', + 50: 'var(--guk-color-neutral-50)', + 100: 'var(--guk-color-neutral-100)', + 200: 'var(--guk-color-neutral-200)', + 300: 'var(--guk-color-neutral-300)', + 400: 'var(--guk-color-neutral-400)', + 500: 'var(--guk-color-neutral-500)', + 600: 'var(--guk-color-neutral-600)', + 700: 'var(--guk-color-neutral-700)', + 800: 'var(--guk-color-neutral-800)', + 900: 'var(--guk-color-neutral-900)', }, info: { - 100: 'var(--ods-color-info-100)', - 200: 'var(--ods-color-info-200)', - 300: 'var(--ods-color-info-300)', - 400: 'var(--ods-color-info-400)', - 500: 'var(--ods-color-info-500)', - 600: 'var(--ods-color-info-600)', - 700: 'var(--ods-color-info-700)', - 800: 'var(--ods-color-info-800)', - 900: 'var(--ods-color-info-900)', + 100: 'var(--guk-color-info-100)', + 200: 'var(--guk-color-info-200)', + 300: 'var(--guk-color-info-300)', + 400: 'var(--guk-color-info-400)', + 500: 'var(--guk-color-info-500)', + 600: 'var(--guk-color-info-600)', + 700: 'var(--guk-color-info-700)', + 800: 'var(--guk-color-info-800)', + 900: 'var(--guk-color-info-900)', }, success: { - 100: 'var(--ods-color-success-100)', - 200: 'var(--ods-color-success-200)', - 300: 'var(--ods-color-success-300)', - 400: 'var(--ods-color-success-400)', - 500: 'var(--ods-color-success-500)', - 600: 'var(--ods-color-success-600)', - 700: 'var(--ods-color-success-700)', - 800: 'var(--ods-color-success-800)', - 900: 'var(--ods-color-success-900)', + 100: 'var(--guk-color-success-100)', + 200: 'var(--guk-color-success-200)', + 300: 'var(--guk-color-success-300)', + 400: 'var(--guk-color-success-400)', + 500: 'var(--guk-color-success-500)', + 600: 'var(--guk-color-success-600)', + 700: 'var(--guk-color-success-700)', + 800: 'var(--guk-color-success-800)', + 900: 'var(--guk-color-success-900)', }, warning: { - 100: 'var(--ods-color-warning-100)', - 200: 'var(--ods-color-warning-200)', - 300: 'var(--ods-color-warning-300)', - 400: 'var(--ods-color-warning-400)', - 500: 'var(--ods-color-warning-500)', - 600: 'var(--ods-color-warning-600)', - 700: 'var(--ods-color-warning-700)', - 800: 'var(--ods-color-warning-800)', - 900: 'var(--ods-color-warning-900)', + 100: 'var(--guk-color-warning-100)', + 200: 'var(--guk-color-warning-200)', + 300: 'var(--guk-color-warning-300)', + 400: 'var(--guk-color-warning-400)', + 500: 'var(--guk-color-warning-500)', + 600: 'var(--guk-color-warning-600)', + 700: 'var(--guk-color-warning-700)', + 800: 'var(--guk-color-warning-800)', + 900: 'var(--guk-color-warning-900)', }, critical: { - 100: 'var(--ods-color-critical-100)', - 200: 'var(--ods-color-critical-200)', - 300: 'var(--ods-color-critical-300)', - 400: 'var(--ods-color-critical-400)', - 500: 'var(--ods-color-critical-500)', - 600: 'var(--ods-color-critical-600)', - 700: 'var(--ods-color-critical-700)', - 800: 'var(--ods-color-critical-800)', - 900: 'var(--ods-color-critical-900)', + 100: 'var(--guk-color-critical-100)', + 200: 'var(--guk-color-critical-200)', + 300: 'var(--guk-color-critical-300)', + 400: 'var(--guk-color-critical-400)', + 500: 'var(--guk-color-critical-500)', + 600: 'var(--guk-color-critical-600)', + 700: 'var(--guk-color-critical-700)', + 800: 'var(--guk-color-critical-800)', + 900: 'var(--guk-color-critical-900)', }, - transparent: 'var(--ods-color-transparent)', + transparent: 'var(--guk-color-transparent)', }, spacing: { - 0: 'var(--ods-space-0)', // 0px - 0.25: 'var(--ods-space-0-25)', // 1px - 0.5: 'var(--ods-space-0-5)', // 2px - 1: 'var(--ods-space-base)', // 4px - 1.5: 'var(--ods-space-1-5)', // 6px - 2: 'var(--ods-space-2)', // 8px - 2.5: 'var(--ods-space-2-5)', // 10px - 3: 'var(--ods-space-3)', // 12px - 3.5: 'var(--ods-space-3-5)', // 14px - 4: 'var(--ods-space-4)', // 16px - 5: 'var(--ods-space-5)', // 20px - 6: 'var(--ods-space-6)', // 24px - 7: 'var(--ods-space-7)', // 28px - 8: 'var(--ods-space-8)', // 32px - 9: 'var(--ods-space-9)', // 36px - 10: 'var(--ods-space-10)', // 40px - 11: 'var(--ods-space-11)', // 44px - 12: 'var(--ods-space-12)', // 48px - 14: 'var(--ods-space-14)', // 56px - 16: 'var(--ods-space-16)', // 64px - 20: 'var(--ods-space-20)', // 80px - 24: 'var(--ods-space-24)', // 96px - 28: 'var(--ods-space-28)', // 112px - 32: 'var(--ods-space-32)', // 128px - 36: 'var(--ods-space-36)', // 144px - 40: 'var(--ods-space-40)', // 160px - 44: 'var(--ods-space-44)', // 176px - 48: 'var(--ods-space-48)', // 192px - 52: 'var(--ods-space-52)', // 208px - 56: 'var(--ods-space-56)', // 224px - 60: 'var(--ods-space-60)', // 240px - 64: 'var(--ods-space-64)', // 256px - 72: 'var(--ods-space-72)', // 288px - 80: 'var(--ods-space-80)', // 320px - 96: 'var(--ods-space-96)', // 384px + 0: 'var(--guk-space-0)', // 0px + 0.25: 'var(--guk-space-0-25)', // 1px + 0.5: 'var(--guk-space-0-5)', // 2px + 1: 'var(--guk-space-base)', // 4px + 1.5: 'var(--guk-space-1-5)', // 6px + 2: 'var(--guk-space-2)', // 8px + 2.5: 'var(--guk-space-2-5)', // 10px + 3: 'var(--guk-space-3)', // 12px + 3.5: 'var(--guk-space-3-5)', // 14px + 4: 'var(--guk-space-4)', // 16px + 5: 'var(--guk-space-5)', // 20px + 6: 'var(--guk-space-6)', // 24px + 7: 'var(--guk-space-7)', // 28px + 8: 'var(--guk-space-8)', // 32px + 9: 'var(--guk-space-9)', // 36px + 10: 'var(--guk-space-10)', // 40px + 11: 'var(--guk-space-11)', // 44px + 12: 'var(--guk-space-12)', // 48px + 14: 'var(--guk-space-14)', // 56px + 16: 'var(--guk-space-16)', // 64px + 20: 'var(--guk-space-20)', // 80px + 24: 'var(--guk-space-24)', // 96px + 28: 'var(--guk-space-28)', // 112px + 32: 'var(--guk-space-32)', // 128px + 36: 'var(--guk-space-36)', // 144px + 40: 'var(--guk-space-40)', // 160px + 44: 'var(--guk-space-44)', // 176px + 48: 'var(--guk-space-48)', // 192px + 52: 'var(--guk-space-52)', // 208px + 56: 'var(--guk-space-56)', // 224px + 60: 'var(--guk-space-60)', // 240px + 64: 'var(--guk-space-64)', // 256px + 72: 'var(--guk-space-72)', // 288px + 80: 'var(--guk-space-80)', // 320px + 96: 'var(--guk-space-96)', // 384px }, ringWidth: { DEFAULT: '3px', }, ringColor: { - primary: 'var(--ods-color-primary-200)', - success: 'var(--ods-color-success-200)', - warning: 'var(--ods-color-warning-200)', - critical: 'var(--ods-color-critical-200)', + primary: 'var(--guk-color-primary-200)', + success: 'var(--guk-color-success-200)', + warning: 'var(--guk-color-warning-200)', + critical: 'var(--guk-color-critical-200)', }, ringOffsetWidth: { DEFAULT: '2px', }, borderRadius: { - DEFAULT: 'var(--ods-border-rounded)', - lg: 'var(--ods-border-rounded-lg)', - xl: 'var(--ods-border-rounded-xl)', - '2xl': 'var(--ods-border-rounded-2xl)', - '3xl': 'var(--ods-border-rounded-3xl)', - full: 'var(--ods-border-rounded-full)', - none: 'var(--ods-border-rounded-none)', + DEFAULT: 'var(--guk-border-rounded)', + lg: 'var(--guk-border-rounded-lg)', + xl: 'var(--guk-border-rounded-xl)', + '2xl': 'var(--guk-border-rounded-2xl)', + '3xl': 'var(--guk-border-rounded-3xl)', + full: 'var(--guk-border-rounded-full)', + none: 'var(--guk-border-rounded-none)', }, boxShadow: { - 'neutral-sm': 'var(--ods-shadow-neutral-sm)', - neutral: 'var(--ods-shadow-neutral)', - 'neutral-md': 'var(--ods-shadow-neutral-md)', - 'neutral-ld': 'var(--ods-shadow-neutral-lg)', - 'neutral-xl': 'var(--ods-shadow-neutral-xl)', - 'neutral-2xl': 'var(--ods-shadow-neutral-2xl)', + 'neutral-sm': 'var(--guk-shadow-neutral-sm)', + neutral: 'var(--guk-shadow-neutral)', + 'neutral-md': 'var(--guk-shadow-neutral-md)', + 'neutral-ld': 'var(--guk-shadow-neutral-lg)', + 'neutral-xl': 'var(--guk-shadow-neutral-xl)', + 'neutral-2xl': 'var(--guk-shadow-neutral-2xl)', - 'primary-sm': 'var(--ods-shadow-primary-sm)', - primary: 'var(--ods-shadow-primary)', - 'primary-md': 'var(--ods-shadow-primary-md)', - 'primary-lg': 'var(--ods-shadow-primary-lg)', - 'primary-xl': 'var(--ods-shadow-primary-xl)', - 'primary-2xl': 'var(--ods-shadow-primary-2xl)', + 'primary-sm': 'var(--guk-shadow-primary-sm)', + primary: 'var(--guk-shadow-primary)', + 'primary-md': 'var(--guk-shadow-primary-md)', + 'primary-lg': 'var(--guk-shadow-primary-lg)', + 'primary-xl': 'var(--guk-shadow-primary-xl)', + 'primary-2xl': 'var(--guk-shadow-primary-2xl)', - 'success-sm': 'var(--ods-shadow-success-sm)', - success: 'var(--ods-shadow-success)', - 'success-md': 'var(--ods-shadow-success-md)', - 'success-lg': 'var(--ods-shadow-success-lg)', - 'success-xl': 'var(--ods-shadow-success-xl)', - 'success-2xl': 'var(--ods-shadow-success-2xl)', + 'success-sm': 'var(--guk-shadow-success-sm)', + success: 'var(--guk-shadow-success)', + 'success-md': 'var(--guk-shadow-success-md)', + 'success-lg': 'var(--guk-shadow-success-lg)', + 'success-xl': 'var(--guk-shadow-success-xl)', + 'success-2xl': 'var(--guk-shadow-success-2xl)', - 'warning-sm': 'var(--ods-shadow-warning-sm)', - warning: 'var(--ods-shadow-warning)', - 'warning-md': 'var(--ods-shadow-warning-md)', - 'warning-lg': 'var(--ods-shadow-warning-lg)', - 'warning-xl': 'var(--ods-shadow-warning-xl)', - 'warning-2xl': 'var(--ods-shadow-warning-2xl)', + 'warning-sm': 'var(--guk-shadow-warning-sm)', + warning: 'var(--guk-shadow-warning)', + 'warning-md': 'var(--guk-shadow-warning-md)', + 'warning-lg': 'var(--guk-shadow-warning-lg)', + 'warning-xl': 'var(--guk-shadow-warning-xl)', + 'warning-2xl': 'var(--guk-shadow-warning-2xl)', - 'critical-sm': 'var(--ods-shadow-critical-sm)', - critical: 'var(--ods-shadow-critical)', - 'critical-md': 'var(--ods-shadow-critical-md)', - 'critical-lg': 'var(--ods-shadow-critical-lg)', - 'critical-xl': 'var(--ods-shadow-critical-xl)', - 'critical-2xl': 'var(--ods-shadow-critical-2xl)', + 'critical-sm': 'var(--guk-shadow-critical-sm)', + critical: 'var(--guk-shadow-critical)', + 'critical-md': 'var(--guk-shadow-critical-md)', + 'critical-lg': 'var(--guk-shadow-critical-lg)', + 'critical-xl': 'var(--guk-shadow-critical-xl)', + 'critical-2xl': 'var(--guk-shadow-critical-2xl)', - 'info-sm': 'var(--ods-shadow-info-sm)', - info: 'var(--ods-shadow-info)', - 'info-md': 'var(--ods-shadow-info-md)', - 'info-lg': 'var(--ods-shadow-info-lg)', - 'info-xl': 'var(--ods-shadow-info-xl)', - 'info-2xl': 'var(--ods-shadow-info-2xl)', + 'info-sm': 'var(--guk-shadow-info-sm)', + info: 'var(--guk-shadow-info)', + 'info-md': 'var(--guk-shadow-info-md)', + 'info-lg': 'var(--guk-shadow-info-lg)', + 'info-xl': 'var(--guk-shadow-info-xl)', + 'info-2xl': 'var(--guk-shadow-info-2xl)', - none: 'var(--ods-shadow-none)', + none: 'var(--guk-shadow-none)', }, screens: { sm: '640px', @@ -185,27 +185,27 @@ module.exports = { '2xl': '1536px', }, fontFamily: { - sans: [`var(--ods-font-family)`], + sans: [`var(--guk-font-family)`], }, fontSize: { - xs: 'var(--ods-font-size-xs)', - sm: 'var(--ods-font-size-sm)', - base: 'var(--ods-font-size-base)', - lg: 'var(--ods-font-size-lg)', - xl: 'var(--ods-font-size-xl)', - '2xl': 'var(--ods-font-size-2xl)', - '3xl': 'var(--ods-font-size-3xl)', - '4xl': 'var(--ods-font-size-4xl)', - '5xl': 'var(--ods-font-size-5xl)', + xs: 'var(--guk-font-size-xs)', + sm: 'var(--guk-font-size-sm)', + base: 'var(--guk-font-size-base)', + lg: 'var(--guk-font-size-lg)', + xl: 'var(--guk-font-size-xl)', + '2xl': 'var(--guk-font-size-2xl)', + '3xl': 'var(--guk-font-size-3xl)', + '4xl': 'var(--guk-font-size-4xl)', + '5xl': 'var(--guk-font-size-5xl)', }, fontWeight: { - normal: 'var(--ods-font-weight-normal)', - semibold: 'var(--ods-font-weight-semibold)', + normal: 'var(--guk-font-weight-normal)', + semibold: 'var(--guk-font-weight-semibold)', }, lineHeight: { - normal: 'var(--ods-line-height-normal)', - tight: 'var(--ods-line-height-tight)', - relaxed: 'var(--ods-line-height-relaxed)', + normal: 'var(--guk-line-height-normal)', + tight: 'var(--guk-line-height-tight)', + relaxed: 'var(--guk-line-height-relaxed)', }, extend: { animation: { diff --git a/yarn.lock b/yarn.lock index f7d6d4ae7..cbb840d33 100644 --- a/yarn.lock +++ b/yarn.lock @@ -36,9 +36,9 @@ __metadata: languageName: node linkType: hard -"@aragon/ods@workspace:.": +"@aragon/gov-ui-kit@workspace:.": version: 0.0.0-use.local - resolution: "@aragon/ods@workspace:." + resolution: "@aragon/gov-ui-kit@workspace:." dependencies: "@babel/core": "npm:^7.25.8" "@babel/preset-env": "npm:^7.25.8"