Skip to content
Draft
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
6737547
chore: remove comments
felipefialho Nov 25, 2024
eba046f
chore: bump ionic to 8.4.0
felipefialho Nov 25, 2024
5dc8389
chore: add exclude components
felipefialho Nov 25, 2024
08ea1d0
Merge branch 'main' of github.com:juntossomosmais/atomium into feat/u…
felipefialho Nov 25, 2024
fd1adaf
chore: bump stencil to 4.22.3
felipefialho Nov 25, 2024
f6999bc
chore: bump react-output-target to 0.7.4
felipefialho Nov 26, 2024
15f3eb5
chore: update configs for react-output-target
felipefialho Nov 26, 2024
d769404
fix: adjust path to main file
felipefialho Nov 26, 2024
f0a6559
Merge branch 'main' of github.com:juntossomosmais/atomium into feat/u…
felipefialho Mar 5, 2025
e276f0f
chore: bump vue-output-target and react-output-target
felipefialho Mar 5, 2025
4a22b45
feat: change module resolution to vue-output-target
felipefialho Mar 5, 2025
060ddb4
chore: revert vue-output-target
felipefialho Mar 5, 2025
b97f1aa
chore: update @stencil/react-output-target
felipefialho May 21, 2025
d78af5f
Merge branch 'main' of github.com:juntossomosmais/atomium into feat/u…
felipefialho May 21, 2025
1ba4b2e
chore: update components
felipefialho May 21, 2025
2356ae9
feat: improve react output configs
felipefialho Jun 2, 2025
a13f419
Merge branch 'main' of github.com:juntossomosmais/atomium into feat/u…
felipefialho Nov 4, 2025
590490a
chore: bump react-output-target to 1.2.0
felipefialho Nov 4, 2025
a2390af
chore: add react-output-target as explicit dep
felipefialho Nov 4, 2025
94b0a3e
fix: add correct typescript type
felipefialho Nov 4, 2025
60a37a0
feat(core): update react output target configuration
felipefialho Nov 4, 2025
6990c1c
refactor(react): update to use new generated structure
felipefialho Nov 4, 2025
f7150bf
fix(core): export named function for global script
felipefialho Nov 4, 2025
66a0389
feat(react): add path mappings for monorepo resolution
felipefialho Nov 4, 2025
3d5793a
docs(react): update documentation for new runtime approach
felipefialho Nov 4, 2025
ce3b10f
docs(adr): add adr for react output target update
felipefialho Nov 4, 2025
42704d0
chore: add build script to ensure built before docs
felipefialho Nov 4, 2025
60506c5
test: no longer renders the `part` attribute on certain components
felipefialho Nov 4, 2025
6b8f8db
ci: add react and vue packages as nx build dependencies
felipefialho Nov 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3,451 changes: 784 additions & 2,667 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
"tokens:build": "nx build @juntossomosmais/atomium-tokens"
},
"dependencies": {
"@ionic/core": "^7.8.6",
"@ionic/core": "^8.4.0",
"@popperjs/core": "^2.11.8",
"@stencil/core": "~4.17.2"
"@stencil/core": "~4.22.3"
},
"devDependencies": {
"@babel/core": "^7.25.2",
Expand All @@ -44,15 +44,15 @@
"@juntossomosmais/linters": "^0.21.0",
"@nrwl/workspace": "19.6.4",
"@rollup/plugin-typescript": "^11.1.6",
"@stencil/react-output-target": "^0.5.3",
"@stencil/react-output-target": "^0.7.4",
"@stencil/sass": "^3.0.12",
"@stencil/vue-output-target": "^0.8.9",
"@storybook/addon-a11y": "^7.6.17",
"@storybook/addon-docs": "^7.6.17",
"@storybook/addon-essentials": "^7.6.17",
"@storybook/addon-mdx-gfm": "^7.6.17",
"@storybook/addons": "^7.6.17",
"@storybook/preset-typescript": "^3.0.0",
"@storybook/preset-typescript": "^2.1.0",
"@storybook/react": "^7.6.17",
"@storybook/react-webpack5": "^7.6.17",
"@storybook/theming": "^7.6.17",
Expand Down
4 changes: 1 addition & 3 deletions packages/core/loader/cdn.js
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@

module.exports = require('../dist/cjs/loader.cjs.js');
module.exports.applyPolyfills = function() { return Promise.resolve() };
module.exports = require('../dist/cjs/loader.cjs.js');
4 changes: 1 addition & 3 deletions packages/core/loader/index.cjs.js
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@

module.exports = require('../dist/cjs/loader.cjs.js');
module.exports.applyPolyfills = function() { return Promise.resolve() };
module.exports = require('../dist/cjs/loader.cjs.js');
3 changes: 3 additions & 0 deletions packages/core/loader/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ export interface CustomElementsDefineOptions {
rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
}
export declare function defineCustomElements(win?: Window, opts?: CustomElementsDefineOptions): void;
/**
* @deprecated
*/
export declare function applyPolyfills(): Promise<void>;

/**
Expand Down
4 changes: 1 addition & 3 deletions packages/core/loader/index.es2017.js
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@

export * from '../dist/esm/polyfills/index.js';
export * from '../dist/esm/loader.js';
export * from '../dist/esm/loader.js';
4 changes: 1 addition & 3 deletions packages/core/loader/index.js

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

10 changes: 4 additions & 6 deletions packages/core/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
import { HTMLStencilElement, JSXBase } from "@stencil/core/internal";
import { IconProps } from "./icons";
import { Mode, TextFieldTypes } from "@ionic/core";
import { IonTypes } from "@ionic/core/dist/types/components";
import { LocalJSX as IonTypes } from "@ionic/core/dist/types/components";
export { IconProps } from "./icons";
export { Mode, TextFieldTypes } from "@ionic/core";
export { IonTypes } from "@ionic/core/dist/types/components";
export { LocalJSX as IonTypes } from "@ionic/core/dist/types/components";
export namespace Components {
interface AtomAlert {
"actionText"?: string;
Expand Down Expand Up @@ -195,13 +195,12 @@ export namespace Components {
"value"?: IonTypes.IonSelect['value'];
}
interface AtomStepsModal {
"cancelButtonText"?: string;
"closeOnFinish"?: boolean;
"currentStep": number;
"customInitialStep"?: number;
"disablePrimaryButton"?: boolean;
"disableSecondaryButton"?: boolean;
"isOpen": boolean;
"lockedInitialStep"?: number;
"primaryButtonTextsByStep": string;
"secondaryButtonTextsByStep": string;
"steps": number;
Expand Down Expand Up @@ -827,13 +826,12 @@ declare namespace LocalJSX {
"value"?: IonTypes.IonSelect['value'];
}
interface AtomStepsModal {
"cancelButtonText"?: string;
"closeOnFinish"?: boolean;
"currentStep"?: number;
"customInitialStep"?: number;
"disablePrimaryButton"?: boolean;
"disableSecondaryButton"?: boolean;
"isOpen"?: boolean;
"lockedInitialStep"?: number;
"onAtomCancel"?: (event: AtomStepsModalCustomEvent<any>) => void;
"onAtomCloseClick"?: (event: AtomStepsModalCustomEvent<any>) => void;
"onAtomDidDismiss"?: (event: AtomStepsModalCustomEvent<any>) => void;
Expand Down
3 changes: 0 additions & 3 deletions packages/core/src/global/global.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
:root {
/* Set the background of the entire app */
--ion-background-color: white;

/* Set the font family of the entire app */
--ion-font-family: var(--font-family);

--ion-color-primary: var(--color-brand-primary-regular);
Expand Down
61 changes: 32 additions & 29 deletions packages/core/stencil.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ import { reactOutputTarget } from '@stencil/react-output-target'
import { sass } from '@stencil/sass'
import { vueOutputTarget } from '@stencil/vue-output-target'

import { reactBooleanFixOutputTarget } from './output-target/react-boolean'

// Since Ionic components are imported in `global.ts`
// we need to exclude them here to avoid unnecessary imports in the React and Vue output module
const excludeComponents = [
'ion-accordion',
'ion-accordion-group',
'ion-accordion',
'ion-action-sheet',
'ion-alert',
'ion-app',
Expand All @@ -22,77 +20,84 @@ const excludeComponents = [
'ion-breadcrumbs',
'ion-button',
'ion-buttons',
'ion-card',
'ion-card-content',
'ion-card-header',
'ion-card-subtitle',
'ion-card-title',
'ion-card',
'ion-checkbox',
'ion-chip',
'ion-col',
'ion-content',
'ion-datetime',
'ion-datetime-button',
'ion-fab',
'ion-datetime',
'ion-fab-button',
'ion-fab-list',
'ion-fab',
'ion-footer',
'ion-grid',
'ion-header',
'ion-icon',
'ion-img',
'ion-infinite-scroll',
'ion-infinite-scroll-content',
'ion-infinite-scroll',
'ion-input-password-toggle',
'ion-input',
'ion-item',
'ion-item-divider',
'ion-item-group',
'ion-item-option',
'ion-item-options',
'ion-item-sliding',
'ion-item',
'ion-label',
'ion-list',
'ion-list-header',
'ion-list',
'ion-loading',
'ion-menu',
'ion-menu-button',
'ion-menu-toggle',
'ion-menu',
'ion-modal',
'ion-nav',
'ion-nav-link',
'ion-nav',
'ion-note',
'ion-picker',
'ion-picker-column',
'ion-picker-column-internal',
'ion-picker-column-option',
'ion-picker-column',
'ion-picker-internal',
'ion-picker-legacy-column',
'ion-picker-legacy',
'ion-picker',
'ion-popover',
'ion-progress-bar',
'ion-radio',
'ion-radio-group',
'ion-radio',
'ion-range',
'ion-refresher',
'ion-refresher-content',
'ion-reorder',
'ion-refresher',
'ion-reorder-group',
'ion-reorder',
'ion-ripple-effect',
'ion-route',
'ion-route-redirect',
'ion-router',
'ion-route',
'ion-router-link',
'ion-router-outlet',
'ion-router',
'ion-row',
'ion-searchbar',
'ion-segment',
'ion-segment-button',
'ion-select',
'ion-segment-content',
'ion-segment-view',
'ion-segment',
'ion-select-modal',
'ion-select-option',
'ion-select-popover',
'ion-select',
'ion-skeleton-text',
'ion-spinner',
'ion-split-pane',
'ion-tab',
'ion-tab-bar',
'ion-tab-button',
'ion-tab',
'ion-tabs',
'ion-text',
'ion-textarea',
Expand Down Expand Up @@ -120,6 +125,10 @@ export const config: Config = {
type: 'dist',
esmLoaderPath: '../loader',
},
{
type: 'dist-custom-elements',
externalRuntime: false,
},
vueOutputTarget({
componentCorePackage: '@juntossomosmais/atomium',
proxiesFile: '../vue/src/components/index.ts',
Expand All @@ -128,15 +137,9 @@ export const config: Config = {
excludeComponents,
}),
reactOutputTarget({
componentCorePackage: '@juntossomosmais/atomium',
proxiesFile: '../react/src/components/index.ts',
includeDefineCustomElements: true,
includePolyfills: false,
stencilPackageName: '@juntossomosmais/atomium',
outDir: '../react/src/components',
excludeComponents,
}),
reactBooleanFixOutputTarget({
attachPropsFile:
'../../react/src/components/react-component-lib/utils/attachProps.ts',
}),
] as OutputTargetCustom[],
}
7 changes: 2 additions & 5 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,15 @@
"name": "@juntossomosmais/atomium-react",
"description": "React transpiled for Atomium",
"private": true,
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"main": "dist/index.js",
"types": "dist/types/index.d.ts",
"files": [
"dist/"
],
"scripts": {
"start": "tsc -p . --watch",
"build": "nx build @juntossomosmais/atomium && npm run compile && npm run copy",
"compile": "npm run build:cjs && npm run build:esm",
"build:cjs": "tsc --module commonjs --outDir ../core/react/dist/cjs --declarationDir ../core/react/dist/types",
"build:esm": "tsc --module es6 --outDir ../core/react/dist/esm --declarationDir ../core/react/dist/types",
"compile": "tsc --outDir ../core/react/dist --declarationDir ../core/react/dist/types",
"copy": "npx copyfiles --flat ./package.json ../core/react"
},
"nx": {
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './components'
export * from './components/components'
4 changes: 2 additions & 2 deletions packages/react/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"rootDir": "src",
"outDir": "dist",
"lib": ["dom", "es2015"],
"module": "CommonJS",
"moduleResolution": "node",
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"target": "es2015",
"skipLibCheck": true,
Expand Down
Loading