-
Notifications
You must be signed in to change notification settings - Fork 5
[NO-ISSUE] feat!: drop v3 tailwind build and PrimeVue SCSS layer #718
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
gab-az
wants to merge
9
commits into
dev
Choose a base branch
from
feat/theme-colors-foundations
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
684e5bc
[NO-ISSUE] docs(storybook): add Theme foundations page for semantic c…
isaquebock 6415358
[NO-ISSUE] feat!: drop v3 tailwind build and PrimeVue SCSS layer
isaquebock d83c56f
[NO-ISSUE] fix!: ship fonts and webkit source scan in theme v4 globals
isaquebock 1a30d59
fix: address review comments on PR #718
isaquebock 2b3d6fb
Merge branch 'dev' into feat/theme-colors-foundations
isaquebock 2a3b651
style: apply prettier formatting
isaquebock a1c8b43
Merge branch 'dev' into feat/theme-colors-foundations
isaquebock 37318bd
Merge branch 'dev' into feat/theme-colors-foundations
isaquebock 8ff0417
fix: escape backticks in ChangePlanDrawer snippet script template lit…
isaquebock File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
87 changes: 87 additions & 0 deletions
87
apps/storybook/src/foundations/components/SemanticSwatchGroup.vue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| <script setup> | ||
| import { ref } from 'vue' | ||
|
|
||
| defineProps({ | ||
| title: { type: String, required: true }, | ||
| description: { type: String, default: '' }, | ||
| /** Array of { name, description, kind, on }. */ | ||
| items: { type: Array, default: () => [] } | ||
| }) | ||
|
|
||
| const copiedKey = ref(null) | ||
| let copyTimeout = null | ||
|
|
||
| function copyToClipboard(value) { | ||
| if (!value) return | ||
| navigator.clipboard?.writeText(value).catch(() => {}) | ||
| copiedKey.value = value | ||
| if (copyTimeout) clearTimeout(copyTimeout) | ||
| copyTimeout = setTimeout(() => { | ||
| copiedKey.value = null | ||
| }, 1000) | ||
| } | ||
|
|
||
| // The live token is passed as a CSS custom property, then consumed by the | ||
| // token utilities below. Storybook's Tailwind runs with `important: true`, so | ||
| // the color has to be a utility (bg-/text-/border-[var(--…)]) — inline styles | ||
| // would lose to the !important utilities on the same element. | ||
| function swatchVars(item) { | ||
| return { | ||
| '--swatch-color': `var(${item.name})`, | ||
| '--swatch-on': item.on ?? 'var(--bg-surface)' | ||
| } | ||
| } | ||
|
|
||
| // Swatch renders the live token, so it follows the Storybook theme toggle. | ||
| function swatchKindClass(item) { | ||
| if (item.kind === 'text') { | ||
| return 'bg-[var(--swatch-on)] text-[var(--swatch-color)] border-2 border-solid border-[var(--border-muted)]' | ||
| } | ||
| if (item.kind === 'border') { | ||
| return 'bg-[var(--bg-canvas)] border-4 border-solid border-[var(--swatch-color)]' | ||
| } | ||
| return 'bg-[var(--swatch-color)] border-2 border-solid border-[var(--border-muted)]' | ||
| } | ||
| </script> | ||
|
|
||
| <template> | ||
| <section class="mb-[var(--spacing-xxl)]"> | ||
| <div class="mb-[var(--spacing-md)]"> | ||
| <h2 | ||
| class="m-0 mb-[var(--spacing-xs)] border-b border-solid border-[var(--border-default)] pb-[var(--spacing-xs)] text-overline-md! text-[var(--text-muted)]" | ||
| > | ||
| {{ title }} | ||
| </h2> | ||
| <p v-if="description" class="m-0 max-w-[var(--container-3xl)] text-body-sm text-[var(--text-muted)]"> | ||
| {{ description }} | ||
| </p> | ||
| </div> | ||
|
|
||
| <div class="overflow-hidden rounded-[var(--shape-card)] border border-solid border-[var(--border-default)] bg-[var(--bg-surface)]"> | ||
| <button | ||
| v-for="item in items" | ||
| :key="item.name" | ||
| type="button" | ||
| class="flex w-full items-center gap-[var(--spacing-md)] border-b border-solid border-[var(--border-muted)] px-[var(--spacing-md)] py-[var(--spacing-sm)] text-left last:border-b-0 hover:bg-[var(--bg-hover)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring-color)] focus-visible:ring-inset" | ||
| :title="copiedKey === item.name ? 'Copied!' : 'Copy CSS variable'" | ||
| @click="copyToClipboard(item.name)" | ||
| > | ||
| <span | ||
| :style="swatchVars(item)" | ||
| :class="[ | ||
| 'flex h-9 w-14 shrink-0 items-center justify-center rounded-[var(--shape-elements)] font-code text-body-xs', | ||
| swatchKindClass(item) | ||
| ]" | ||
| > | ||
| <span v-if="item.kind === 'text'">Aa</span> | ||
| </span> | ||
|
|
||
| <code class="w-[var(--container-3xs)] shrink-0 truncate font-code text-body-sm text-[var(--text-default)]"> | ||
| {{ copiedKey === item.name ? 'Copied!' : item.name }} | ||
| </code> | ||
|
|
||
| <span class="text-body-sm text-[var(--text-muted)]">{{ item.description }}</span> | ||
| </button> | ||
| </div> | ||
| </section> | ||
| </template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| /** | ||
| * Semantic theme color catalog — generated from the `@aziontech/theme` | ||
| * token resolvers (see ../utils/theme-tokens.js), so the page always reflects | ||
| * every color that ships in globals.css. | ||
| */ | ||
| export { themeColorGroups, buildThemeColorGroups } from '../utils/theme-tokens.js' |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.