Skip to content

Commit

Permalink
fix: put sl imports into preview
Browse files Browse the repository at this point in the history
- no overwrites if app uses sl-components too
  • Loading branch information
NilsJacobsen committed Mar 13, 2024
1 parent 4663262 commit c82dc23
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 19 deletions.
13 changes: 13 additions & 0 deletions inlang/source-code/settings-component/.storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
/** @type { import('@storybook/web-components').Preview } */

import { setBasePath } from "@shoelace-style/shoelace/dist/utilities/base-path.js"
setBasePath("./../../node_modules/@shoelace-style/shoelace/dist")

import "@shoelace-style/shoelace/dist/components/input/input.js"
import "@shoelace-style/shoelace/dist/components/button/button.js"
import "@shoelace-style/shoelace/dist/components/tag/tag.js"
import "@shoelace-style/shoelace/dist/components/icon/icon.js"
import "@shoelace-style/shoelace/dist/components/icon-button/icon-button.js"
import "@shoelace-style/shoelace/dist/components/select/select.js"
import "@shoelace-style/shoelace/dist/components/option/option.js"
import "@shoelace-style/shoelace/dist/components/checkbox/checkbox.js"

const preview = {
parameters: {
actions: { argTypesRegex: "^on[A-Z].*" },
Expand Down
2 changes: 1 addition & 1 deletion inlang/source-code/settings-component/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@inlang/settings-component",
"type": "module",
"version": "0.0.6",
"version": "0.0.7",
"publishConfig": {
"access": "public"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import { baseStyling } from "../styling/base.js"
import { ProjectSettings } from "@inlang/project-settings"
import { InlangModule } from "@inlang/module"
import { Task } from "@lit/task"
import { setBasePath } from "@shoelace-style/shoelace/dist/utilities/base-path.js"
setBasePath("./../../node_modules/@shoelace-style/shoelace/dist")

import "./input-fields/simple-input.js"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import { css, html, LitElement } from "lit"
import { customElement, property, state } from "lit/decorators.js"
import { baseStyling } from "../../../styling/base.js"
import "@shoelace-style/shoelace/dist/components/input/input.js"
import "@shoelace-style/shoelace/dist/components/tag/tag.js"
import "https://cdn.jsdelivr.net/npm/@shoelace-style/[email protected]/cdn/components/icon/icon.js"

@customElement("default-array-input")
export class DefaultArrayInput extends LitElement {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import { css, html, LitElement } from "lit"
import { customElement, property, state } from "lit/decorators.js"
import { baseStyling } from "../../../styling/base.js"
import "@shoelace-style/shoelace/dist/components/input/input.js"
import "@shoelace-style/shoelace/dist/components/tag/tag.js"
import "https://cdn.jsdelivr.net/npm/@shoelace-style/[email protected]/cdn/components/icon/icon.js"

@customElement("language-tags-input")
export class LanguageTagsInput extends LitElement {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import { css, html, LitElement } from "lit"
import { customElement, property } from "lit/decorators.js"
import { baseStyling } from "../../../styling/base.js"
import "@shoelace-style/shoelace/dist/components/input/input.js"
import "@shoelace-style/shoelace/dist/components/tag/tag.js"
import "https://cdn.jsdelivr.net/npm/@shoelace-style/[email protected]/cdn/components/icon/icon.js"

@customElement("reference-pattern-input")
export class ReferencePatternInput extends LitElement {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import { css, html, LitElement } from "lit"
import { customElement, property, state } from "lit/decorators.js"
import { baseStyling } from "../../../styling/base.js"
import "@shoelace-style/shoelace/dist/components/input/input.js"
import "@shoelace-style/shoelace/dist/components/icon-button/icon-button.js"
import "@shoelace-style/shoelace/dist/components/button/button.js"
import "https://cdn.jsdelivr.net/npm/@shoelace-style/[email protected]/cdn/components/icon/icon.js"
import { InlangModule } from "@inlang/module"

@customElement("default-object-input")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { css, html, LitElement } from "lit"
import { customElement, property, state } from "lit/decorators.js"
import { baseStyling } from "../../../styling/base.js"
import "@shoelace-style/shoelace/dist/components/input/input.js"
import "@shoelace-style/shoelace/dist/components/checkbox/checkbox.js"
import "./../object/object-input.js"

@customElement("path-pattern-input")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { html, LitElement } from "lit"
import { customElement, property } from "lit/decorators.js"
import "@shoelace-style/shoelace/dist/components/button/button.js"
import { baseStyling } from "../styling/base.js"

@customElement("ui-button")
Expand Down

0 comments on commit c82dc23

Please sign in to comment.