diff --git a/packages/core/component-doc.json b/packages/core/component-doc.json index 776338a48f1..9ead03512d7 100644 --- a/packages/core/component-doc.json +++ b/packages/core/component-doc.json @@ -2,8 +2,8 @@ "timestamp": "", "compiler": { "name": "@stencil/core", - "version": "4.9.0", - "typescriptVersion": "5.2.2" + "version": "4.11.0", + "typescriptVersion": "5.3.3" }, "components": [ { @@ -11230,11 +11230,11 @@ "listeners": [] }, { - "dirPath": "src/components/my-component", - "filePath": "src/components/my-component/example-modal.tsx", + "dirPath": "src/components/playground", + "filePath": "src/components/playground/example-modal.tsx", "fileName": "example-modal.tsx", - "readmePath": "src/components/my-component/readme.md", - "usagesDir": "src/components/my-component/usage", + "readmePath": "src/components/playground/readme.md", + "usagesDir": "src/components/playground/usage", "tag": "ix-modal-example", "overview": "", "usage": {}, @@ -16758,29 +16758,6 @@ "passive": false } ] - }, - { - "dirPath": "src/components/my-component", - "filePath": "src/components/my-component/my-component.tsx", - "fileName": "my-component.tsx", - "readmePath": "src/components/my-component/readme.md", - "usagesDir": "src/components/my-component/usage", - "tag": "my-component", - "overview": "", - "usage": {}, - "docs": "", - "docsTags": [], - "encapsulation": "scoped", - "dependents": [], - "dependencies": [], - "dependencyGraph": {}, - "props": [], - "methods": [], - "events": [], - "styles": [], - "slots": [], - "parts": [], - "listeners": [] } ], "typeLibrary": { diff --git a/packages/core/package.json b/packages/core/package.json index d77e6ef3f03..a77c16edd8d 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -14,7 +14,7 @@ "module": "dist/index.js", "es2015": "dist/esm/index.mjs", "es2017": "dist/esm/index.mjs", - "types": "dist/types/index.d.ts", + "types": "dist/types/interfaces.d.ts", "collection": "dist/collection/collection-manifest.json", "collection:main": "dist/collection/index.js", "unpkg": "dist/siemens-ix/siemens-ix.esm.js", @@ -45,7 +45,7 @@ }, "dependencies": { "@floating-ui/dom": "^1.5.1", - "@stencil/core": "^4.9.0", + "@stencil/core": "^4.11.0", "@types/luxon": "^3.3.7", "animejs": "~3.2.1", "hyperlist": "^1.0.0", @@ -58,7 +58,7 @@ "@stencil-community/postcss": "^2.2.0", "@stencil/angular-output-target": "^0.8.3", "@stencil/react-output-target": "^0.5.3", - "@stencil/sass": "^3.0.7", + "@stencil/sass": "^3.0.8", "@stencil/vue-output-target": "^0.8.7", "@testing-library/dom": "^8.11.0", "@testing-library/jest-dom": "^5.16.5", diff --git a/packages/core/scripts/custom-elements/custom-elements.d.ts b/packages/core/scripts/custom-elements/custom-elements.d.ts index 435d9ac9d9b..00c31f0654c 100644 --- a/packages/core/scripts/custom-elements/custom-elements.d.ts +++ b/packages/core/scripts/custom-elements/custom-elements.d.ts @@ -6,5 +6,5 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -export * from '../dist/types/index'; +export * from '../dist/types/interfaces'; export * from './index'; diff --git a/packages/core/src/components.d.ts b/packages/core/src/components.d.ts index 1c9845a93f8..65b9c1a689f 100644 --- a/packages/core/src/components.d.ts +++ b/packages/core/src/components.d.ts @@ -1703,6 +1703,8 @@ export namespace Components { | 'success' | 'custom'; } + interface IxPlaygroundInternal { + } /** * @since 1.6.0 */ @@ -2332,8 +2334,6 @@ export namespace Components { */ "vertical": boolean; } - interface MyComponent { - } } export interface IxBlindCustomEvent extends CustomEvent { detail: T; @@ -3471,6 +3471,12 @@ declare global { prototype: HTMLIxPillElement; new (): HTMLIxPillElement; }; + interface HTMLIxPlaygroundInternalElement extends Components.IxPlaygroundInternal, HTMLStencilElement { + } + var HTMLIxPlaygroundInternalElement: { + prototype: HTMLIxPlaygroundInternalElement; + new (): HTMLIxPlaygroundInternalElement; + }; /** * @since 1.6.0 */ @@ -3821,12 +3827,6 @@ declare global { prototype: HTMLIxWorkflowStepsElement; new (): HTMLIxWorkflowStepsElement; }; - interface HTMLMyComponentElement extends Components.MyComponent, HTMLStencilElement { - } - var HTMLMyComponentElement: { - prototype: HTMLMyComponentElement; - new (): HTMLMyComponentElement; - }; interface HTMLElementTagNameMap { "ix-action-card": HTMLIxActionCardElement; "ix-application": HTMLIxApplicationElement; @@ -3903,6 +3903,7 @@ declare global { "ix-modal-loading": HTMLIxModalLoadingElement; "ix-pagination": HTMLIxPaginationElement; "ix-pill": HTMLIxPillElement; + "ix-playground-internal": HTMLIxPlaygroundInternalElement; "ix-push-card": HTMLIxPushCardElement; "ix-row": HTMLIxRowElement; "ix-select": HTMLIxSelectElement; @@ -3927,7 +3928,6 @@ declare global { "ix-validation-tooltip": HTMLIxValidationTooltipElement; "ix-workflow-step": HTMLIxWorkflowStepElement; "ix-workflow-steps": HTMLIxWorkflowStepsElement; - "my-component": HTMLMyComponentElement; } } declare namespace LocalJSX { @@ -5707,6 +5707,8 @@ declare namespace LocalJSX { | 'success' | 'custom'; } + interface IxPlaygroundInternal { + } /** * @since 1.6.0 */ @@ -6418,8 +6420,6 @@ declare namespace LocalJSX { */ "vertical"?: boolean; } - interface MyComponent { - } interface IntrinsicElements { "ix-action-card": IxActionCard; "ix-application": IxApplication; @@ -6496,6 +6496,7 @@ declare namespace LocalJSX { "ix-modal-loading": IxModalLoading; "ix-pagination": IxPagination; "ix-pill": IxPill; + "ix-playground-internal": IxPlaygroundInternal; "ix-push-card": IxPushCard; "ix-row": IxRow; "ix-select": IxSelect; @@ -6520,7 +6521,6 @@ declare namespace LocalJSX { "ix-validation-tooltip": IxValidationTooltip; "ix-workflow-step": IxWorkflowStep; "ix-workflow-steps": IxWorkflowSteps; - "my-component": MyComponent; } } export { LocalJSX as JSX }; @@ -6680,6 +6680,7 @@ declare module "@stencil/core" { */ "ix-pagination": LocalJSX.IxPagination & JSXBase.HTMLAttributes; "ix-pill": LocalJSX.IxPill & JSXBase.HTMLAttributes; + "ix-playground-internal": LocalJSX.IxPlaygroundInternal & JSXBase.HTMLAttributes; /** * @since 1.6.0 */ @@ -6725,7 +6726,6 @@ declare module "@stencil/core" { "ix-validation-tooltip": LocalJSX.IxValidationTooltip & JSXBase.HTMLAttributes; "ix-workflow-step": LocalJSX.IxWorkflowStep & JSXBase.HTMLAttributes; "ix-workflow-steps": LocalJSX.IxWorkflowSteps & JSXBase.HTMLAttributes; - "my-component": LocalJSX.MyComponent & JSXBase.HTMLAttributes; } } } diff --git a/packages/core/src/components/my-component/example-modal.tsx b/packages/core/src/components/playground/example-modal.tsx similarity index 100% rename from packages/core/src/components/my-component/example-modal.tsx rename to packages/core/src/components/playground/example-modal.tsx diff --git a/packages/core/src/components/my-component/my-component.scss b/packages/core/src/components/playground/playground.scss similarity index 100% rename from packages/core/src/components/my-component/my-component.scss rename to packages/core/src/components/playground/playground.scss diff --git a/packages/core/src/components/my-component/my-component.tsx b/packages/core/src/components/playground/playground.tsx similarity index 59% rename from packages/core/src/components/my-component/my-component.tsx rename to packages/core/src/components/playground/playground.tsx index 1c913f1220c..c6e234735ae 100644 --- a/packages/core/src/components/my-component/my-component.tsx +++ b/packages/core/src/components/playground/playground.tsx @@ -8,12 +8,15 @@ */ import { Component, h, Host } from '@stencil/core'; +/** @internal */ @Component({ - tag: 'my-component', - styleUrl: 'my-component.scss', - scoped: true, + tag: 'ix-playground-internal', + styleUrl: 'playground.scss', + shadow: true, + // Set scoped=true and shadow=false to test global styles like checkbox etc + // scoped: true, }) -export class MyComponent { +export class PlaygroundInternal { render() { return ; } diff --git a/packages/core/src/index.html b/packages/core/src/index.html index 2eaf589f3d2..e65806f53a9 100644 --- a/packages/core/src/index.html +++ b/packages/core/src/index.html @@ -30,6 +30,6 @@ - + diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 8f0ff8b43e3..3d190df4041 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -6,11 +6,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -import type { - Components as IxIconsComponents, - JSX as IxIconsJSX, -} from '@siemens/ix-icons'; -export * from './components'; + export * from './components/category-filter/filter-state'; export * from './components/category-filter/input-state'; export * from './components/category-filter/logical-filter-operator'; @@ -27,15 +23,3 @@ export { convertToRemString, } from './components/utils/rwd.util'; export * from './components/utils/theme-switcher'; - -declare module './components' { - export namespace Components { - export type IxIcon = IxIconsComponents.IxIcon; - } -} - -declare module './components' { - export namespace JSX { - export type IxIcon = IxIconsJSX.IxIcon; - } -} diff --git a/packages/core/src/interfaces.d.ts b/packages/core/src/interfaces.d.ts new file mode 100644 index 00000000000..7c29516c1bf --- /dev/null +++ b/packages/core/src/interfaces.d.ts @@ -0,0 +1,27 @@ +/* + * SPDX-FileCopyrightText: 2024 Siemens AG + * + * SPDX-License-Identifier: MIT + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +import type { + Components as IxIconsComponents, + JSX as IxIconsJSX, +} from '@siemens/ix-icons'; + +export * from './components'; +export * from './index'; + +declare module './components' { + export namespace Components { + export type IxIcon = IxIconsComponents.IxIcon; + } +} + +declare module './components' { + export namespace JSX { + export type IxIcon = IxIconsJSX.IxIcon; + } +} diff --git a/packages/core/stencil.config.ts b/packages/core/stencil.config.ts index cd6dfd82f70..812ef8c7889 100644 --- a/packages/core/stencil.config.ts +++ b/packages/core/stencil.config.ts @@ -75,13 +75,13 @@ export const config: Config = { includeImportCustomElements: true, includePolyfills: false, includeDefineCustomElements: false, - excludeComponents: ['my-component', 'ix-icon'], + excludeComponents: ['ix-playground-internal', 'ix-icon'], }), angularOutputTarget({ componentCorePackage: '@siemens/ix', directivesProxyFile: '../angular/src/components.ts', directivesArrayFile: '../angular/src/declare-components.ts', - excludeComponents: ['my-component', 'ix-tree', 'ix-icon'], + excludeComponents: ['ix-playground-internal', 'ix-tree', 'ix-icon'], valueAccessorConfigs: [ { elementSelectors: @@ -105,7 +105,12 @@ export const config: Config = { includeImportCustomElements: true, includePolyfills: false, includeDefineCustomElements: false, - excludeComponents: ['my-component', 'ix-tree', 'ix-tree-item', 'ix-icon'], + excludeComponents: [ + 'ix-playground-internal', + 'ix-tree', + 'ix-tree-item', + 'ix-icon', + ], }), { type: 'dist', diff --git a/yarn.lock b/yarn.lock index 129438c68d8..5156276a0cc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3598,10 +3598,10 @@ resolved "https://registry.npmjs.org/@stencil/core/-/core-3.2.1.tgz#50bd07f478e04a5527a35aee61deff772b056860" integrity sha512-Ybm4NteQBScLq3H0JML/uqo4nWjNpZw1HAAURtR5LlRm7ptzNKO5S8EnHp3m05/uyTzeh9yLpUFHY7bxGNdYLg== -"@stencil/core@^4.9.0": - version "4.9.0" - resolved "https://registry.npmjs.org/@stencil/core/-/core-4.9.0.tgz#f224813dde3a2b7f3cdccc5d39eaf777ad2d0ef2" - integrity sha512-aWSkhBmk3yPwRAkUwBbzRwmdhb8hKiQ/JMr9m5jthpBZLjtppYbzz6PN2MhSMDfRp6K93eQw5WogSEH4HHuB6w== +"@stencil/core@^4.11.0": + version "4.11.0" + resolved "https://registry.yarnpkg.com/@stencil/core/-/core-4.11.0.tgz#c9c1aed7ac7358d63ce5f6fdf5001a2d7f17259c" + integrity sha512-zsKhgIkTGo+s7IthitxR/MKiMS3Ck1yIypOdXr0aE6ofboKqe9NdffTcxZ0vel0wD2bZYOb6WfPMzuhRKk6+FA== "@stencil/postcss@^2.1.0": version "2.1.0" @@ -3616,10 +3616,10 @@ resolved "https://registry.npmjs.org/@stencil/react-output-target/-/react-output-target-0.5.3.tgz#2a7186b7ba6c8721f92f4200e414b70854030d79" integrity sha512-68jwRp35CjAcwhTJ9yFD/3n+jrHOqvEH2jreVuPVvZK+4tkhPlYlwz0d1E1RlF3jyifUSfdkWUGgXIEy8Fo3yw== -"@stencil/sass@^3.0.7": - version "3.0.7" - resolved "https://registry.npmjs.org/@stencil/sass/-/sass-3.0.7.tgz#7f8225cd0122b3c517c0f9007ed0cd98cf82ea3d" - integrity sha512-HcBjrh2CJ6aJnkOrBNSVyf1+x3FnUneYFk44rcx/jDK6Lx7R4w0dXMEsIR5MXqtROYWonZt7WtR8wsM1vcD+6w== +"@stencil/sass@^3.0.8": + version "3.0.8" + resolved "https://registry.yarnpkg.com/@stencil/sass/-/sass-3.0.8.tgz#5140382dd7cdf05cc01898f4cfae2ff066dd8afd" + integrity sha512-QJUG4Dr/b3wSizViwQXorrk1PJzxOsKkq5hSqtUHc3NNG3iomC4DQFYGeu15yNfoCDBtt4qkyHSCynsekQ8F6A== "@stencil/vue-output-target@^0.8.7": version "0.8.7"