Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/SchwarzIT/onyx into feat/18…
Browse files Browse the repository at this point in the history
…51-data-grid-renderer
  • Loading branch information
JoCa96 committed Sep 26, 2024
2 parents 4623209 + 21e5f99 commit 27467cb
Show file tree
Hide file tree
Showing 90 changed files with 398 additions and 323 deletions.
1 change: 1 addition & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@
"real-mails-sneeze",
"real-pumas-matter",
"real-shirts-collect",
"red-tables-train",
"rich-books-move",
"rotten-apricots-battle",
"rotten-carpets-sing",
Expand Down
9 changes: 9 additions & 0 deletions .changeset/red-tables-train.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@sit-onyx/icons": minor
---

feat: update icons

#### New icons

- key-settings
8 changes: 8 additions & 0 deletions apps/demo-app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# demo-app

## 1.0.0-beta.46

### Patch Changes

- Updated dependencies [3e49c73]
- @sit-onyx/icons@1.0.0-beta.5
- sit-onyx@1.0.0-beta.46

## 1.0.0-beta.45

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion apps/demo-app/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "demo-app",
"private": true,
"version": "1.0.0-beta.45",
"version": "1.0.0-beta.46",
"type": "module",
"scripts": {
"dev": "turbo run vite --filter demo-app",
Expand Down
3 changes: 0 additions & 3 deletions apps/docs/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ const config: StorybookConfig = {
core: {
disableTelemetry: true,
},
docs: {
autodocs: true,
},
};

export default config;
Binary file modified apps/docs/playwright/snapshots/basics-colors-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/docs/playwright/snapshots/basics-colors-firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/docs/playwright/snapshots/basics-colors-webkit-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/docs/playwright/snapshots/basics-units-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/docs/playwright/snapshots/basics-units-firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/docs/playwright/snapshots/basics-units-webkit-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions apps/docs/src/.vitepress/components/ColorPalette.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import type { OnyxColor } from "sit-onyx";
import { capitalize, computed, ref } from "vue";
import ColorPaletteValue, { type ColorPaletteValueProps } from "./ColorPaletteValue.vue";
import DesignToken from "./DesignToken.vue";
import DesignTokenHeader from "./DesignTokenHeader.vue";
import DesignVariable from "./DesignVariable.vue";
import DesignVariableHeader from "./DesignVariableHeader.vue";
const AVAILABLE_TABS = ["Base", "Text & Icons"] as const;
type AvailableTab = (typeof AVAILABLE_TABS)[number];
Expand Down Expand Up @@ -92,7 +92,7 @@ const handleCopy = async (color: string) => {

<template>
<section class="palette">
<DesignTokenHeader
<DesignVariableHeader
v-model="currentTab"
:headline="capitalize(props.name)"
:tabs="AVAILABLE_TABS"
Expand All @@ -108,7 +108,7 @@ const handleCopy = async (color: string) => {
/>
</div>

<DesignToken
<DesignVariable
class="palette__copied"
v-if="copiedColor"
:name="copiedColor"
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/src/.vitepress/components/DensitySelection.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<script lang="ts" setup>
import { DENSITIES, type Density } from "~components/../composables/density";
import DesignTokenBadge from "./DesignTokenBadge.vue";
import DesignVariableBadge from "./DesignVariableBadge.vue";
const modelValue = defineModel<Density>({ default: "default" });
</script>

<template>
<div class="densities">
<DesignTokenBadge
<DesignVariableBadge
v-for="density in DENSITIES"
:key="density"
:text="density"
Expand Down
18 changes: 0 additions & 18 deletions apps/docs/src/.vitepress/components/DesignTokenHeader.stories.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
import type { Meta, StoryObj } from "@storybook/vue3";
import DesignToken from "./DesignToken.vue";
import DesignVariable from "./DesignVariable.vue";

const meta: Meta<typeof DesignToken> = {
title: "tokens/DesignToken",
component: DesignToken,
const meta: Meta<typeof DesignVariable> = {
title: "variables/DesignVariables",
component: DesignVariable,
};

export default meta;
type Story = StoryObj<typeof DesignToken>;
type Story = StoryObj<typeof DesignVariable>;

export const Default = {
args: {
name: "test-token",
name: "test-variable",
value: "42rem",
},
} satisfies Story;

export const Color = {
args: {
name: "test-token",
name: "test-variable",
value: "var(--onyx-color-base-primary-500)",
type: "color",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import OnyxIcon from "~components/OnyxIcon/OnyxIcon.vue";
const props = withDefaults(
defineProps<{
/** Token name. */
/** Variable name. */
name: string;
/** Value to display */
value?: string;
Expand All @@ -17,7 +17,7 @@ const props = withDefaults(
* @default "value"
*/
type?: "color" | "value";
/** If true, the user will be able to click the token to copy its value. */
/** If true, the user will be able to click the variable to copy its value. */
allowCopy?: boolean;
/** If true, a "copied" text will be displayed to indicate that the value has been copied. */
isCopied?: boolean;
Expand All @@ -34,32 +34,32 @@ const emit = defineEmits<{

<template>
<button
class="token"
:class="{ 'token--color': props.type === 'color', 'token--copyable': props.allowCopy }"
class="variable"
:class="{ 'variable--color': props.type === 'color', 'variable--copyable': props.allowCopy }"
:disabled="!props.allowCopy"
@click="emit('copy')"
@keyup.enter="emit('copy')"
>
<div class="token__name" :class="{ 'token__name--no-value': !props.value }">
<div class="variable__name" :class="{ 'variable__name--no-value': !props.value }">
<span>{{ props.name }}</span>
<span v-if="props.value && props.type === 'value'" class="token__value">
<span v-if="props.value && props.type === 'value'" class="variable__value">
{{ props.value }}
</span>
</div>

<span v-if="props.isCopied" class="token__copied">
<span v-if="props.isCopied" class="variable__copied">
<OnyxIcon :icon="checkIcon" />
copied
</span>

<OnyxIcon v-else class="token__copy" :icon="copyIcon" color="primary" />
<OnyxIcon v-else class="variable__copy" :icon="copyIcon" color="primary" />
</button>
</template>

<style lang="scss" scoped>
@use "@sit-onyx/vitepress-theme/mixins.scss";
.token {
.variable {
display: flex;
align-items: center;
gap: var(--onyx-spacing-md);
Expand Down Expand Up @@ -112,7 +112,7 @@ const emit = defineEmits<{
&:hover,
&:focus-within {
.token {
.variable {
&__name {
border: var(--onyx-1px-in-rem) solid var(--onyx-color-base-primary-300);
}
Expand All @@ -125,7 +125,7 @@ const emit = defineEmits<{
}
&--color {
.token {
.variable {
&__name {
&::after {
content: "";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import type { Meta, StoryObj } from "@storybook/vue3";
import DesignTokenCard from "./DesignTokenCard.vue";
import DesignVariableCard from "./DesignVariableCard.vue";

const meta: Meta<typeof DesignTokenCard> = {
title: "tokens/DesignTokenCard",
component: DesignTokenCard,
const meta: Meta<typeof DesignVariableCard> = {
title: "variables/DesignVariableCard",
component: DesignVariableCard,
};

export default meta;
type Story = StoryObj<typeof DesignTokenCard>;
type Story = StoryObj<typeof DesignVariableCard>;

export const Default = {
args: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<script lang="ts" setup>
import { computed, ref } from "vue";
import { getCssVariableValue } from "../utils-browser";
import DesignToken from "./DesignToken.vue";
import DesignVariable from "./DesignVariable.vue";
const props = defineProps<{
/** Token name. */
/** Variable name. */
name: string;
/** If true, both columns will take up 50% of the available width. */
wideName?: boolean;
/** Whether hide the token value. */
/** Whether hide the variable value. */
hideValue?: boolean;
}>();
Expand Down Expand Up @@ -36,7 +36,7 @@ const handleCopy = async () => {
inside the browser/client
-->
<ClientOnly>
<DesignToken
<DesignVariable
:name="props.name"
:value="value"
:is-copied="isCopied"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import type { Meta, StoryObj } from "@storybook/vue3";
import DesignVariableHeader from "./DesignVariableHeader.vue";

const meta: Meta<typeof DesignVariableHeader> = {
title: "variables/DesignVariableHeader",
component: DesignVariableHeader,
};

export default meta;
type Story = StoryObj<typeof DesignVariableHeader>;

export const Default = {
args: {
headline: "Headline",
tabs: ["Tab 1", "Tab 2", "Tab 3"],
modelValue: "Tab 1",
},
} satisfies Story;

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import type { Meta, StoryObj } from "@storybook/vue3";
import OnyxBorderRadiusVariables from "./OnyxBorderRadiusVariables.vue";

const meta: Meta<typeof OnyxBorderRadiusVariables> = {
title: "variables/OnyxBorderRadiusTokens",
component: OnyxBorderRadiusVariables,
};

export default meta;
type Story = StoryObj<typeof OnyxBorderRadiusVariables>;

export const Default = { args: {} } satisfies Story;
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts" setup>
import DesignTokenCard from "./DesignTokenCard.vue";
import DesignVariableCard from "./DesignVariableCard.vue";
const tokens = [
const variables = [
"onyx-radius-xs",
"onyx-radius-sm",
"onyx-radius-md",
Expand All @@ -12,27 +12,27 @@ const tokens = [
</script>

<template>
<DesignTokenCard
v-for="borderRadius in tokens"
<DesignVariableCard
v-for="borderRadius in variables"
:key="borderRadius"
:name="borderRadius"
class="token"
class="variable"
>
<figure
class="token__preview"
class="variable__preview"
:class="{
'token__preview--large': borderRadius.endsWith('-xl') || borderRadius.endsWith('-full'),
'variable__preview--large': borderRadius.endsWith('-xl') || borderRadius.endsWith('-full'),
}"
:style="{
borderTopRightRadius: `var(--${borderRadius})`,
borderBottomRightRadius: `var(--${borderRadius})`,
}"
></figure>
</DesignTokenCard>
</DesignVariableCard>
</template>

<style lang="scss" scoped>
.token {
.variable {
margin-bottom: var(--onyx-spacing-lg);
&__preview {
Expand All @@ -50,8 +50,8 @@ const tokens = [
}
}
// override token width so all border radius token names have the same width
:deep(.token__name) {
// override variable width so all border radius variable names have the same width
:deep(.variable__name) {
min-width: 16rem;
}
}
Expand Down
6 changes: 3 additions & 3 deletions apps/docs/src/.vitepress/components/OnyxColorPalettes.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<script lang="ts" setup>
import { useData } from "vitepress";
import ColorPalette from "./ColorPalette.vue";
import DesignTokenBadge from "./DesignTokenBadge.vue";
import DesignVariableBadge from "./DesignVariableBadge.vue";
const { isDark } = useData();
</script>

<template>
<div class="palettes">
<div class="themes">
<DesignTokenBadge text="Light mode" :active="!isDark" @click="isDark = false" />
<DesignTokenBadge text="Dark mode" :active="isDark" @click="isDark = true" />
<DesignVariableBadge text="Light mode" :active="!isDark" @click="isDark = false" />
<DesignVariableBadge text="Dark mode" :active="isDark" @click="isDark = true" />
</div>

<ColorPalette name="primary" />
Expand Down
Loading

0 comments on commit 27467cb

Please sign in to comment.