Skip to content

Commit

Permalink
fix(core, docs): fix build, upgrade playground to V3
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasBerliner committed Sep 2, 2024
1 parent b9b6464 commit 5fbc459
Show file tree
Hide file tree
Showing 7 changed files with 698 additions and 1,016 deletions.
12 changes: 5 additions & 7 deletions packages/documentation/docs/controls/checkbox.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Playground from '@site/src/components/PlaygroundV2';
import Playground from '@site/src/components/PlaygroundV3';
import Props from '@site/docs/auto-generated/ix-checkbox/props.md';
import Events from '@site/docs/auto-generated/ix-checkbox/events.md';
import Tags from '@site/docs/auto-generated/ix-checkbox/tags.md';
Expand All @@ -11,22 +11,21 @@ import Tags from '@site/docs/auto-generated/ix-checkbox/tags.md';

### Basic

<Playground name="form-checkbox" examplesByName></Playground>
<Playground name="form-checkbox"></Playground>

### Disabled

<Playground name="form-checkbox-disabled" examplesByName></Playground>
<Playground name="form-checkbox-disabled"></Playground>

### Group

<Playground name="form-checkbox-group" examplesByName></Playground>
<Playground name="form-checkbox-group"></Playground>

### Validation

<Playground
name="form-checkbox-validation"
height="32rem"
examplesByName
></Playground>

## API
Expand All @@ -41,13 +40,12 @@ import Tags from '@site/docs/auto-generated/ix-checkbox/tags.md';

## Legacy checkbox

<Playground name="checkbox" height="8rem" examplesByName></Playground>
<Playground name="checkbox" height="8rem"></Playground>

### Indeterminate

<Playground
name="checkbox-indeterminate"
height="8rem"
hideInitalCodePreview
examplesByName
></Playground>
12 changes: 6 additions & 6 deletions packages/documentation/docs/controls/radio.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Playground from '@site/src/components/PlaygroundV2';
import Playground from '@site/src/components/PlaygroundV3';
import Props from '@site/docs/auto-generated/ix-radio/props.md';
import Events from '@site/docs/auto-generated/ix-radio/events.md';
import Tags from '@site/docs/auto-generated/ix-radio/tags.md';
Expand All @@ -11,19 +11,19 @@ import Tags from '@site/docs/auto-generated/ix-radio/tags.md';

### Basic

<Playground name="radio" examplesByName></Playground>
<Playground name="radio"></Playground>

### Disabled

<Playground name="radio-disabled" examplesByName></Playground>
<Playground name="radio-disabled"></Playground>

### Group

<Playground name="radio-group" height="12rem" examplesByName></Playground>
<Playground name="radio-group" height="12rem"></Playground>

### Validation

<Playground name="radio-validation" height="12rem" examplesByName></Playground>
<Playground name="radio-validation" height="12rem"></Playground>

## API

Expand All @@ -39,4 +39,4 @@ import Tags from '@site/docs/auto-generated/ix-radio/tags.md';

### Usage

<Playground name="radio-button" examplesByName></Playground>
<Playground name="radio-button"></Playground>
14 changes: 5 additions & 9 deletions packages/documentation/docs/controls/textarea-field.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Playground from '@site/src/components/PlaygroundV2';
import Playground from '@site/src/components/PlaygroundV3';
import Props from '@site/docs/auto-generated/ix-textarea-field/props.md';
import Events from '@site/docs/auto-generated/ix-textarea-field/events.md';
import Tags from '@site/docs/auto-generated/ix-textarea-field/tags.md';
Expand All @@ -11,29 +11,27 @@ import Tags from '@site/docs/auto-generated/ix-textarea-field/tags.md';

### Basic

<Playground name="textarea-field" examplesByName></Playground>
<Playground name="textarea-field"></Playground>

### Disabled

<Playground name="textarea-field-disabled" examplesByName></Playground>
<Playground name="textarea-field-disabled"></Playground>

### Readonly

<Playground name="textarea-field-readonly" examplesByName></Playground>
<Playground name="textarea-field-readonly"></Playground>

### RowsCols

<Playground
name="textarea-field-rows-cols"
examplesByName
height="10rem"
></Playground>

### Validation

<Playground
name="textarea-field-validation"
examplesByName
height="30rem"
></Playground>

Expand All @@ -53,15 +51,14 @@ import Tags from '@site/docs/auto-generated/ix-textarea-field/tags.md';

### Usage

<Playground name="textarea" height="7rem" examplesByName></Playground>
<Playground name="textarea" height="7rem"></Playground>

#### Disabled

<Playground
name="textarea-disabled"
height="7rem"
hideInitalCodePreview
examplesByName
></Playground>

#### Readonly
Expand All @@ -70,5 +67,4 @@ import Tags from '@site/docs/auto-generated/ix-textarea-field/tags.md';
name="textarea-readonly"
height="7rem"
hideInitalCodePreview
examplesByName
></Playground>
27 changes: 0 additions & 27 deletions packages/documentation/src/components/PlaygroundV2/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,33 +46,6 @@ export type SourceFile = {
raw: string;
};

export function getBranchPath(framework: TargetFramework) {
let path = 'html';

const branch = 'main';

if (framework === TargetFramework.ANGULAR) {
path = 'angular';
}

if (framework === TargetFramework.REACT) {
path = 'react';
}

if (framework === TargetFramework.VUE) {
path = 'vue';
}

return `siemens/ix/tree/${branch}/packages/${path}-test-app`;
}

function stripComments(code: string) {
return code
.replace(/\/\*[^]*?\*\//gs, '')
.replace(/<!--[^]*?-->/gs, '')
.trim();
}

function extractCodePart(code: string, limiter: RegExp) {
const limiterMatches = code.match(limiter);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ export default function EchartsLineSimple() {
value: [150, 230, 224, 218, 135, 147, 260],
};

const value = 60;

const options: EChartsOption = {
xAxis: {
type: 'category',
Expand Down
2 changes: 0 additions & 2 deletions packages/vue-test-app/src/Root.vue
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ import KeyValueWithLabelLeft from './preview-examples/key-value-with-label-left.
import KeyValue from './preview-examples/key-value.vue';
import MapNavigationOverlay from './preview-examples/map-navigation-overlay.vue';
import MapNavigation from './preview-examples/map-navigation.vue';
import MenuCategory from './preview-examples/menu-category.vue';
import ModalExample from './preview-examples/modal.vue';
import NumberField from './preview-examples/number-field.vue';
import NumberFieldLabel from './preview-examples/number-field-label.vue';
Expand Down Expand Up @@ -168,7 +167,6 @@ import TreeCustom from './preview-examples/tree-custom.vue';
import Tree from './preview-examples/tree.vue';
import WorkflowVertical from './preview-examples/workflow-vertical.vue';
import Workflow from './preview-examples/workflow.vue';
import Echarts from './preview-examples/echarts.vue';
import ValidationSelect from './preview-examples/validation-select.vue';
import FormValidation from './preview-examples/form-validation.vue';
import LayoutAuto from './preview-examples/layout-auto.vue';
Expand Down
Loading

0 comments on commit 5fbc459

Please sign in to comment.