Skip to content

Commit

Permalink
Introduce @plone/theming
Browse files Browse the repository at this point in the history
  • Loading branch information
sneridagh committed Nov 8, 2024
1 parent f512b88 commit 403d318
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 14 deletions.
4 changes: 2 additions & 2 deletions apps/rr7/app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import { flattenToAppURL } from './utils';
import config from '@plone/registry';
import './config';

import '@plone/theme/styles/main.css';
import '@plone/components/dist/basic.css';
import '@plone/theming/styles/main.css';
// import '@plone/components/dist/basic.css';
import '@plone/slots/main.css';

function useHrefLocal(to: string) {
Expand Down
2 changes: 1 addition & 1 deletion apps/rr7/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@plone/providers": "workspace:*",
"@plone/registry": "workspace:*",
"@plone/slots": "workspace:*",
"@plone/theme": "workspace:*",
"@plone/theming": "workspace:*",
"@react-router/dev": "7.0.0-pre.4",
"@types/react": "^18.3.9",
"@types/react-dom": "^18.3.0",
Expand Down
5 changes: 3 additions & 2 deletions packages/blocks/Image/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { BlocksFormData } from '@plone/types';
import { BlockViewProps } from '@plone/types';
import { usePloneProvider } from '@plone/providers';

const ImageBlockView = (props: BlocksFormData) => {
const ImageBlockView = (props: BlockViewProps) => {
console.log(props);
const flattenToAppURL = usePloneProvider().flattenToAppURL;
const { data } = props;
const url = data.image_scales
Expand Down
3 changes: 2 additions & 1 deletion packages/blocks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
"dependencies": {
"@plone/components": "workspace:*",
"@plone/registry": "workspace:*",
"@plone/providers": "workspace:*"
"@plone/providers": "workspace:*",
"clsx": "^2.1.1"
},
"devDependencies": {
"@plone/registry": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/slots/components/ContentArea.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RenderBlocks } from '@plone/components';
import RenderBlocks from '@plone/blocks/RenderBlocks/RenderBlocks';
import { SlotComponentProps } from '../SlotRenderer';
import config from '@plone/registry';

Expand Down
14 changes: 14 additions & 0 deletions packages/theming/.stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"extends": ["stylelint-config-idiomatic-order"],
"plugins": ["stylelint-prettier"],
"overrides": [
{
"files": ["**/*.scss"],
"customSyntax": "postcss-scss"
}
],
"rules": {
"prettier/prettier": true,
"order/properties-alphabetical-order": null
}
}
3 changes: 2 additions & 1 deletion packages/theming/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@plone/theme",
"name": "@plone/theming",
"description": "Plone base theming",
"maintainers": [
{
Expand Down Expand Up @@ -48,6 +48,7 @@
}
},
"dependencies": {
"@plone/components": "workspace:*",
"@plone/registry": "workspace:*",
"lightningcss": "1.28.1",
"lightningcss-cli": "1.28.1"
Expand Down
3 changes: 2 additions & 1 deletion packages/theming/styles/main.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@layer reset, components, layout, addons, theme;
@layer reset, plone-components, layout, addons, theme;
@import 'reset.css';
@import '@plone/components/dist/basic.css';
@import 'layout.css';
4 changes: 4 additions & 0 deletions packages/types/src/config/Blocks.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ export interface BlockConfigBase {
* The group of the block
*/
group: string;
/**
* The category of the block
*/
category: string;
/**
* The view mode component
*/
Expand Down
16 changes: 11 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 403d318

Please sign in to comment.