diff --git a/.changeset/angry-zebras-remember.md b/.changeset/angry-zebras-remember.md new file mode 100644 index 000000000..958213932 --- /dev/null +++ b/.changeset/angry-zebras-remember.md @@ -0,0 +1,5 @@ +--- +'svelte-ux': patch +--- + +Add styles (with daisy) as top-level export diff --git a/.changeset/pre.json b/.changeset/pre.json new file mode 100644 index 000000000..db8e7b817 --- /dev/null +++ b/.changeset/pre.json @@ -0,0 +1,14 @@ +{ + "mode": "pre", + "tag": "next", + "initialVersions": { + "create-svelte-ux": "0.2.1", + "svelte-ux": "0.57.1" + }, + "changesets": [ + "angry-zebras-remember", + "quick-avocados-hope", + "strong-flies-provide", + "yellow-oranges-fly" + ] +} diff --git a/.changeset/strong-flies-provide.md b/.changeset/strong-flies-provide.md new file mode 100644 index 000000000..92c7c9f5e --- /dev/null +++ b/.changeset/strong-flies-provide.md @@ -0,0 +1,5 @@ +--- +'svelte-ux': minor +--- + +Support `ux.themes` tailwind config, including Daisy UI diff --git a/.changeset/yellow-oranges-fly.md b/.changeset/yellow-oranges-fly.md new file mode 100644 index 000000000..e1e3126c2 --- /dev/null +++ b/.changeset/yellow-oranges-fly.md @@ -0,0 +1,6 @@ +--- +'create-svelte-ux': minor +'svelte-ux': minor +--- + +Theme support diff --git a/packages/create-svelte-ux/CHANGELOG.md b/packages/create-svelte-ux/CHANGELOG.md index 1fac8d9b7..9405fda5f 100644 --- a/packages/create-svelte-ux/CHANGELOG.md +++ b/packages/create-svelte-ux/CHANGELOG.md @@ -1,5 +1,11 @@ # create-svelte-ux +## 0.3.0-next.0 + +### Minor Changes + +- Theme support ([#146](https://github.com/techniq/svelte-ux/pull/146)) + ## 0.2.1 ### Patch Changes diff --git a/packages/create-svelte-ux/package.json b/packages/create-svelte-ux/package.json index 03a0e2f54..8bcc0c693 100644 --- a/packages/create-svelte-ux/package.json +++ b/packages/create-svelte-ux/package.json @@ -1,6 +1,6 @@ { "name": "create-svelte-ux", - "version": "0.2.1", + "version": "0.3.0-next.0", "description": "A CLI for creating new Svelte UX projects", "repository": { "type": "git", @@ -18,12 +18,12 @@ }, "dependencies": { "@clack/prompts": "^0.7.0", - "@kitql/helpers": "^0.8.3", + "@kitql/helpers": "^0.8.8", "commander": "^11.1.0" }, "devDependencies": { - "@types/node": "^20.9.2", - "prettier": "^3.1.0" + "@types/node": "^20.10.6", + "prettier": "^3.1.1" }, "files": [ "fragments", diff --git a/packages/create-svelte-ux/templates/layerchart/src/routes/+layout.svelte b/packages/create-svelte-ux/templates/layerchart/src/routes/+layout.svelte index 53c3f6f7e..f822e60c4 100644 --- a/packages/create-svelte-ux/templates/layerchart/src/routes/+layout.svelte +++ b/packages/create-svelte-ux/templates/layerchart/src/routes/+layout.svelte @@ -5,8 +5,8 @@ import '../app.postcss'; settings({ - theme:{ - AppBar: 'bg-accent-500 text-white shadow-md', + theme: { + AppBar: 'bg-primary text-white shadow-md', AppLayout: { nav: 'bg-neutral-800' }, diff --git a/packages/create-svelte-ux/templates/layerchart/src/routes/+page.svelte b/packages/create-svelte-ux/templates/layerchart/src/routes/+page.svelte index 0d2ccdd74..ca3f9c2b2 100644 --- a/packages/create-svelte-ux/templates/layerchart/src/routes/+page.svelte +++ b/packages/create-svelte-ux/templates/layerchart/src/routes/+page.svelte @@ -9,7 +9,7 @@ href="https://svelte-ux.techniq.dev" target="_blank" variant="fill-light" - color="accent" + color="primary" > Documentation @@ -17,7 +17,7 @@ href="https://svelte-ux.techniq.dev/customization" target="_blank" variant="fill-light" - color="accent" + color="primary" > Customization diff --git a/packages/create-svelte-ux/templates/layerchart/src/routes/chart/+page.svelte b/packages/create-svelte-ux/templates/layerchart/src/routes/chart/+page.svelte index 277eabe17..85d199a07 100644 --- a/packages/create-svelte-ux/templates/layerchart/src/routes/chart/+page.svelte +++ b/packages/create-svelte-ux/templates/layerchart/src/routes/chart/+page.svelte @@ -22,7 +22,7 @@ format(d, PeriodType.Day, 'short')} rule /> - + diff --git a/packages/create-svelte-ux/templates/layerchart/tailwind.config.cjs b/packages/create-svelte-ux/templates/layerchart/tailwind.config.cjs index 9ddbe378d..962e73513 100644 --- a/packages/create-svelte-ux/templates/layerchart/tailwind.config.cjs +++ b/packages/create-svelte-ux/templates/layerchart/tailwind.config.cjs @@ -9,11 +9,7 @@ const config = { './node_modules/layerchart/**/*.{svelte,js}' ], theme: { - extend: { - colors: { - accent: colors.blue - } - } + extend: {} }, variants: { extend: {} diff --git a/packages/create-svelte-ux/templates/minimal/tailwind.config.cjs b/packages/create-svelte-ux/templates/minimal/tailwind.config.cjs index 200063ec9..9702b2b4f 100644 --- a/packages/create-svelte-ux/templates/minimal/tailwind.config.cjs +++ b/packages/create-svelte-ux/templates/minimal/tailwind.config.cjs @@ -5,11 +5,7 @@ const svelte_ux = require('svelte-ux/plugins/tailwind.cjs'); const config = { content: ['./src/**/*.{html,svelte}', './node_modules/svelte-ux/**/*.{svelte,js}'], theme: { - extend: { - colors: { - accent: colors.blue - } - } + extend: {} }, variants: { extend: {} diff --git a/packages/create-svelte-ux/templates/starter/src/routes/+layout.svelte b/packages/create-svelte-ux/templates/starter/src/routes/+layout.svelte index d68d9c3d0..8bc3c7a48 100644 --- a/packages/create-svelte-ux/templates/starter/src/routes/+layout.svelte +++ b/packages/create-svelte-ux/templates/starter/src/routes/+layout.svelte @@ -5,8 +5,8 @@ import '../app.postcss'; settings({ - theme:{ - AppBar: 'bg-accent-500 text-white shadow-md', + theme: { + AppBar: 'bg-primary text-white shadow-md', AppLayout: { nav: 'bg-neutral-800' }, diff --git a/packages/create-svelte-ux/templates/starter/src/routes/+page.svelte b/packages/create-svelte-ux/templates/starter/src/routes/+page.svelte index 0d2ccdd74..ca3f9c2b2 100644 --- a/packages/create-svelte-ux/templates/starter/src/routes/+page.svelte +++ b/packages/create-svelte-ux/templates/starter/src/routes/+page.svelte @@ -9,7 +9,7 @@ href="https://svelte-ux.techniq.dev" target="_blank" variant="fill-light" - color="accent" + color="primary" > Documentation @@ -17,7 +17,7 @@ href="https://svelte-ux.techniq.dev/customization" target="_blank" variant="fill-light" - color="accent" + color="primary" > Customization diff --git a/packages/create-svelte-ux/templates/starter/tailwind.config.cjs b/packages/create-svelte-ux/templates/starter/tailwind.config.cjs index 200063ec9..9702b2b4f 100644 --- a/packages/create-svelte-ux/templates/starter/tailwind.config.cjs +++ b/packages/create-svelte-ux/templates/starter/tailwind.config.cjs @@ -5,11 +5,7 @@ const svelte_ux = require('svelte-ux/plugins/tailwind.cjs'); const config = { content: ['./src/**/*.{html,svelte}', './node_modules/svelte-ux/**/*.{svelte,js}'], theme: { - extend: { - colors: { - accent: colors.blue - } - } + extend: {} }, variants: { extend: {} diff --git a/packages/svelte-ux/CHANGELOG.md b/packages/svelte-ux/CHANGELOG.md index b773152fc..de08c28af 100644 --- a/packages/svelte-ux/CHANGELOG.md +++ b/packages/svelte-ux/CHANGELOG.md @@ -1,5 +1,25 @@ # svelte-ux +## 0.58.0-next.2 + +### Patch Changes + +- Add styles (with daisy) as top-level export ([#146](https://github.com/techniq/svelte-ux/pull/146)) + +## 0.58.0-next.1 + +### Minor Changes + +- Support `ux.themes` tailwind config, including Daisy UI ([#146](https://github.com/techniq/svelte-ux/pull/146)) + +## 0.58.0-next.0 + +### Minor Changes + +- Removes SelectList. Updates SelectField features to support SelectList's use case via property/attribute overrides. Updates QuickSearch to use SelectField. Defines MenuOption type & updates MenuField & SelectField to use it; this results in renaming of SelectField options' `name` field to become `label`, standardizing the API across the two. Also adds `activeOptionIcon` to SelectField so users can opt-in to dynamically updating the field icon based on the selected option. Also fixed a bug with the `scrollIntoView` action related to its `onlyIfNeeded` flag. ([#127](https://github.com/techniq/svelte-ux/pull/127)) + +- Theme support ([#146](https://github.com/techniq/svelte-ux/pull/146)) + ## 0.57.1 ### Patch Changes diff --git a/packages/svelte-ux/package.json b/packages/svelte-ux/package.json index 263d63f45..e403cc452 100644 --- a/packages/svelte-ux/package.json +++ b/packages/svelte-ux/package.json @@ -4,7 +4,7 @@ "author": "Sean Lynch ", "license": "MIT", "repository": "techniq/svelte-ux", - "version": "0.57.2", + "version": "0.58.0-next.7", "scripts": { "dev": "vite dev", "build": "vite build", @@ -21,48 +21,50 @@ }, "devDependencies": { "@sveltejs/adapter-auto": "^2.1.1", - "@sveltejs/kit": "^1.27.6", - "@sveltejs/package": "^2.2.2", + "@sveltejs/kit": "^1.30.3", + "@sveltejs/package": "^2.2.5", "@tailwindcss/typography": "^0.5.10", "@types/d3-array": "^3.2.1", "@types/d3-scale": "^4.0.8", - "@types/lodash-es": "^4.17.11", + "@types/lodash-es": "^4.17.12", "@types/marked": "^6.0.0", "@types/prismjs": "^1.26.3", "@vitest/coverage-v8": "^0.34.6", "autoprefixer": "^10.4.16", + "culori": "^3.3.0", + "daisyui": "^4.5.0", "execa": "^8.0.1", "marked": "^10.0.0", "mdsvex": "^0.11.0", - "prettier": "^3.1.0", - "prettier-plugin-svelte": "^3.1.0", + "prettier": "^3.1.1", + "prettier-plugin-svelte": "^3.1.2", "sveld": "^0.19.1", - "svelte": "^4.2.7", - "svelte-check": "^3.6.0", - "svelte-preprocess": "^5.1.0", - "svelte2tsx": "^0.6.25", - "tailwindcss": "^3.3.5", + "svelte": "^4.2.8", + "svelte-check": "^3.6.2", + "svelte-preprocess": "^5.1.3", + "svelte2tsx": "^0.6.27", + "tailwindcss": "^3.4.0", "tslib": "^2.6.2", "typedoc-json-parser": "^9.0.1", - "typescript": "^5.2.2", + "typescript": "^5.3.3", "unist-util-visit": "^5.0.0", - "vite": "^4.5.0", + "vite": "^4.5.1", "vitest": "^0.33.0" }, "type": "module", "dependencies": { - "@changesets/cli": "^2.26.2", + "@changesets/cli": "^2.27.1", "@floating-ui/dom": "^1.5.3", - "@fortawesome/fontawesome-common-types": "^6.4.2", - "clsx": "^2.0.0", + "@fortawesome/fontawesome-common-types": "^6.5.1", + "clsx": "^2.1.0", "d3-array": "^3.2.4", "d3-scale": "^4.0.2", - "date-fns": "^3.0.5", + "date-fns": "^3.0.6", "immer": "^10.0.3", "lodash-es": "^4.17.21", - "posthog-js": "^1.95.1", + "posthog-js": "^1.96.1", "rehype-slug": "^6.0.0", - "tailwind-merge": "^2.0.0", + "tailwind-merge": "^2.2.0", "zod": "^3.22.4" }, "peerDependencies": { @@ -85,7 +87,8 @@ "types": "./dist/utils/*.d.ts", "svelte": "./dist/utils/*.js" }, - "./plugins/*": "./dist/plugins/*" + "./plugins/*": "./dist/plugins/*", + "./styles/*": "./dist/styles/*" }, "files": [ "dist" diff --git a/packages/svelte-ux/src/docs/Blockquote.svelte b/packages/svelte-ux/src/docs/Blockquote.svelte index 5caf8d41f..1131a3bcb 100644 --- a/packages/svelte-ux/src/docs/Blockquote.svelte +++ b/packages/svelte-ux/src/docs/Blockquote.svelte @@ -1,11 +1,15 @@
a]:font-medium [&>a]:underline [&>a]:decoration-dashed [&>a]:decoration-primary/50 [&>a]:underline-offset-2' + )} > - +
diff --git a/packages/svelte-ux/src/docs/Link.svelte b/packages/svelte-ux/src/docs/Link.svelte index 276343a05..eec570e72 100644 --- a/packages/svelte-ux/src/docs/Link.svelte +++ b/packages/svelte-ux/src/docs/Link.svelte @@ -1,3 +1,3 @@ - + diff --git a/packages/svelte-ux/src/docs/ViewSourceButton.svelte b/packages/svelte-ux/src/docs/ViewSourceButton.svelte index 28b6b47bd..7a2f2948d 100644 --- a/packages/svelte-ux/src/docs/ViewSourceButton.svelte +++ b/packages/svelte-ux/src/docs/ViewSourceButton.svelte @@ -14,7 +14,7 @@ {#if source} - +
{label}
-
{href}
+
{href}
{#if href} - {/if} @@ -38,13 +38,13 @@
- +
{:else if href} - diff --git a/packages/svelte-ux/src/lib/actions/dataBackground.ts b/packages/svelte-ux/src/lib/actions/dataBackground.ts index fad06ca3a..23b5e8012 100644 --- a/packages/svelte-ux/src/lib/actions/dataBackground.ts +++ b/packages/svelte-ux/src/lib/actions/dataBackground.ts @@ -95,8 +95,8 @@ export const dataBackground: Action = (node, linear-gradient( to right, transparent var(--baseline), - #999 var(--baseline), - #999 calc(var(--baseline) + 1px), + currentColor var(--baseline), + currentColor calc(var(--baseline) + 1px), transparent 0%, transparent 100% ), diff --git a/packages/svelte-ux/src/lib/components/ApiDocs.svelte b/packages/svelte-ux/src/lib/components/ApiDocs.svelte index 938f55f9c..ab69bcfe6 100644 --- a/packages/svelte-ux/src/lib/components/ApiDocs.svelte +++ b/packages/svelte-ux/src/lib/components/ApiDocs.svelte @@ -25,17 +25,19 @@
-

Props

-
+

+ Props +

+
{#each api.props as prop}
{prop.name}
-
+
{#if prop.description} {prop.description} @@ -46,7 +48,7 @@
{#if prop.isRequired}
Required
@@ -54,7 +56,7 @@
{prop.value}
@@ -62,7 +64,7 @@
{prop.type ?? 'unknown'}
@@ -75,7 +77,7 @@
{#if api.rest_props} -
+
Remaining props are passed to underlying @@ -84,7 +86,7 @@ href="/docs/components/{api.rest_props.name}#props" target="_blank" variant="none" - class="text-xs font-semibold bg-white border border-black/30 px-2 rounded-full" + class="text-xs font-semibold bg-surface-100 border px-2 rounded-full" > <{api.rest_props.name}> @@ -95,7 +97,7 @@ .name}#attributes" target="_blank" variant="none" - class="text-xs font-semibold bg-white border border-black/30 px-2 rounded-full" + class="text-xs font-semibold bg-surface-100 border px-2 rounded-full" > <{api.rest_props.name}> @@ -107,8 +109,10 @@
-

Slots

-
+

+ Slots +

+
{#each api.slots as slot} -
+
{slot.description ?? ''}
@@ -132,7 +136,7 @@ {#each parseSlotProps(slot.slot_props) as { key, value }}
{key}: {value}
@@ -148,8 +152,10 @@
-

Events

-
+

+ Events +

+
{#each api.events as event} {#if event.element != null}
{event.element}
{/if}
{event.type}
@@ -180,19 +186,22 @@
-

+

Module Exports

-
+
{#each api.moduleExports as prop}
{prop.name}
-
+
{#if prop.description} {prop.description} @@ -203,7 +212,7 @@
{#if prop.isRequired}
Required
@@ -211,7 +220,7 @@
{prop.value}
@@ -219,7 +228,7 @@
{prop.type ?? 'unknown'}
diff --git a/packages/svelte-ux/src/lib/components/AppBar.svelte b/packages/svelte-ux/src/lib/components/AppBar.svelte index 9995b9afc..bb5471921 100644 --- a/packages/svelte-ux/src/lib/components/AppBar.svelte +++ b/packages/svelte-ux/src/lib/components/AppBar.svelte @@ -32,7 +32,7 @@ {#if $$slots.title} {:else} -
+
{#if typeof title === 'string' || typeof title === 'number'} {title} {:else} diff --git a/packages/svelte-ux/src/lib/components/Backdrop.svelte b/packages/svelte-ux/src/lib/components/Backdrop.svelte index ff13bd0da..0c87f02fb 100644 --- a/packages/svelte-ux/src/lib/components/Backdrop.svelte +++ b/packages/svelte-ux/src/lib/components/Backdrop.svelte @@ -16,7 +16,7 @@
- import type { ComponentProps } from 'svelte'; import { slide } from 'svelte/transition'; import Icon from './Icon.svelte'; @@ -7,7 +6,7 @@ import { cls } from '../utils/styles'; import { multi } from '../actions/multi'; import type { Actions } from '../actions/multi'; - import type { TailwindColors } from '$lib/types'; + import type { ThemeColors } from '$lib/types'; import { getComponentTheme } from './theme'; import { getButtonGroup } from './ButtonGroup.svelte'; import { asIconData, type IconInput } from '$lib/utils/icons'; @@ -33,7 +32,7 @@ | 'none' | undefined = undefined; // default in reactive groupContext below export let size: 'sm' | 'md' | 'lg' | undefined = undefined; // default in reactive groupContext below - export let color: TailwindColors | 'default' | undefined = undefined; // default in reactive groupContext below + export let color: ThemeColors | 'default' | undefined = undefined; // default in reactive groupContext below /** @type {{root?: string, icon?: string, loading?: string}} */ export let classes: { @@ -52,7 +51,7 @@ $: _class = cls( 'Button', - 'transition duration-200 ring-black/20', + 'transition duration-200 ring-surface-content/60', 'focus:outline-none focus-visible:ring-1', fullWidth ? 'flex w-full' : 'inline-flex', loading ? 'gap-2' : 'gap-1', @@ -84,153 +83,366 @@ text: 'p-0', none: '', }[variant ?? 'none'], + // Variant specific colors { default: { - default: 'hover:bg-black/5 ring-black/10', - accent: 'text-accent-500 hover:bg-accent-500/10 ring-accent-500/60', - red: 'text-red-500 hover:bg-red-500/10 ring-red-500/60', - orange: 'text-orange-500 hover:bg-orange-500/10 ring-orange-500/60', - amber: 'text-amber-500 hover:bg-amber-500/10 ring-amber-500/60', - yellow: 'text-yellow-500 hover:bg-yellow-500/10 ring-yellow-500/60', - lime: 'text-lime-500 hover:bg-lime-500/10 ring-lime-500/60', - green: 'text-green-500 hover:bg-green-500/10 ring-green-500/60', - emerald: 'text-emerald-500 hover:bg-emerald-500/10 ring-emerald-500/60', - teal: 'text-teal-500 hover:bg-teal-500/10 ring-teal-500/60', - cyan: 'text-cyan-500 hover:bg-cyan-500/10 ring-cyan-500/60', - sky: 'text-sky-500 hover:bg-sky-500/10 ring-sky-500/60', - blue: 'text-blue-500 hover:bg-blue-500/10 ring-blue-500/60', - indigo: 'text-indigo-500 hover:bg-indigo-500/10 ring-indigo-500/60', - violet: 'text-violet-500 hover:bg-violet-500/10 ring-violet-500/60', - purple: 'text-purple-500 hover:bg-purple-500/10 ring-purple-500/60', - fuchsia: 'text-fuchsia-500 hover:bg-fuchsia-500/10 ring-fuchsia-500/60', - pink: 'text-pink-500 hover:bg-pink-500/10 ring-pink-500/60', - rose: 'text-rose-500 hover:bg-rose-500/10 ring-rose-500/60', - gray: 'text-gray-500 hover:bg-gray-500/10 ring-gray-500/60', + default: [ + 'hover:[--bg-color:theme(colors.surface-content/10%)]', + // '[--text-color:theme(colors.surface-content)]', // inherit + '[--ring-color:theme(colors.surface-content/60%)]', + ], + primary: [ + 'hover:[--bg-color:theme(colors.primary/10%)]', + '[--text-color:theme(colors.primary)]', + '[--ring-color:theme(colors.primary/60%)]', + ], + secondary: [ + 'hover:[--bg-color:theme(colors.secondary/10%)]', + '[--text-color:theme(colors.secondary)]', + '[--ring-color:theme(colors.secondary/60%)]', + ], + accent: [ + 'hover:[--bg-color:theme(colors.accent/10%)]', + '[--text-color:theme(colors.accent)]', + '[--ring-color:theme(colors.accent/60%)]', + ], + neutral: [ + 'hover:[--bg-color:theme(colors.neutral/10%)]', + '[--text-color:theme(colors.neutral)]', + '[--ring-color:theme(colors.neutral/60%)]', + ], + info: [ + 'hover:[--bg-color:theme(colors.info/10%)]', + '[--text-color:theme(colors.info)]', + '[--ring-color:theme(colors.info/60%)]', + ], + success: [ + 'hover:[--bg-color:theme(colors.success/10%)]', + '[--text-color:theme(colors.success)]', + '[--ring-color:theme(colors.success/60%)]', + ], + warning: [ + 'hover:[--bg-color:theme(colors.warning/10%)]', + '[--text-color:theme(colors.warning)]', + '[--ring-color:theme(colors.warning/60%)]', + ], + danger: [ + 'hover:[--bg-color:theme(colors.danger/10%)]', + '[--text-color:theme(colors.danger)]', + '[--ring-color:theme(colors.danger/60%)]', + ], }, outline: { - default: 'bg-white hover:bg-black/5 ring-black/10', - accent: 'text-accent-500 border-accent-500 hover:bg-accent-500/10 ring-accent-500/60', - red: 'text-red-500 border-red-500 hover:bg-red-500/10 ring-red-500/60', - orange: 'text-orange-500 border-orange-500 hover:bg-orange-500/10 ring-orange-500/60', - amber: 'text-amber-500 border-amber-500 hover:bg-amber-500/10 ring-amber-500/60', - yellow: 'text-yellow-500 border-yellow-500 hover:bg-yellow-500/10 ring-yellow-500/60', - lime: 'text-lime-500 border-lime-500 hover:bg-lime-500/10 ring-lime-500/60', - green: 'text-green-500 border-green-500 hover:bg-green-500/10 ring-green-500/60', - emerald: 'text-emerald-500 border-emerald-500 hover:bg-emerald-500/10 ring-emerald-500/60', - teal: 'text-teal-500 border-teal-500 hover:bg-teal-500/10 ring-teal-500/60', - cyan: 'text-cyan-500 border-cyan-500 hover:bg-cyan-500/10 ring-cyan-500/60', - sky: 'text-sky-500 border-sky-500 hover:bg-sky-500/10 ring-sky-500/60', - blue: 'text-blue-500 border-blue-500 hover:bg-blue-500/10 ring-blue-500/60', - indigo: 'text-indigo-500 border-indigo-500 hover:bg-indigo-500/10 ring-indigo-500/60', - violet: 'text-violet-500 border-violet-500 hover:bg-violet-500/10 ring-violet-500/60', - purple: 'text-purple-500 border-purple-500 hover:bg-purple-500/10 ring-purple-500/60', - fuchsia: 'text-fuchsia-500 border-fuchsia-500 hover:bg-fuchsia-500/10 ring-fuchsia-500/60', - pink: 'text-pink-500 border-pink-500 hover:bg-pink-500/10 ring-pink-500/60', - rose: 'text-rose-500 border-rose-500 hover:bg-rose-500/10 ring-rose-500/60', - gray: 'text-gray-500 border-gray-500 hover:bg-gray-500/10 ring-gray-500/60', + default: [ + 'hover:[--bg-color:theme(colors.surface-content/10%)]', + '[--border-color:theme(colors.surface-content)]', + '[--text-color:theme(colors.surface-content)]', + '[--ring-color:theme(colors.surface-content/60%)]', + ], + primary: [ + 'hover:[--bg-color:theme(colors.primary/10%)]', + '[--border-color:theme(colors.primary)]', + '[--text-color:theme(colors.primary)]', + '[--ring-color:theme(colors.primary/60%)]', + ], + secondary: [ + 'hover:[--bg-color:theme(colors.secondary/10%)]', + '[--border-color:theme(colors.secondary)]', + '[--text-color:theme(colors.secondary)]', + '[--ring-color:theme(colors.secondary/60%)]', + ], + accent: [ + 'hover:[--bg-color:theme(colors.accent/10%)]', + '[--border-color:theme(colors.accent)]', + '[--text-color:theme(colors.accent)]', + '[--ring-color:theme(colors.accent/60%)]', + ], + neutral: [ + 'hover:[--bg-color:theme(colors.neutral/10%)]', + '[--border-color:theme(colors.neutral)]', + '[--text-color:theme(colors.neutral)]', + '[--ring-color:theme(colors.neutral/60%)]', + ], + info: [ + 'hover:[--bg-color:theme(colors.info/10%)]', + '[--border-color:theme(colors.info)]', + '[--text-color:theme(colors.info)]', + '[--ring-color:theme(colors.info/60%)]', + ], + success: [ + 'hover:[--bg-color:theme(colors.success/10%)]', + '[--border-color:theme(colors.success)]', + '[--text-color:theme(colors.success)]', + '[--ring-color:theme(colors.success/60%)]', + ], + warning: [ + 'hover:[--bg-color:theme(colors.warning/10%)]', + '[--border-color:theme(colors.warning)]', + '[--text-color:theme(colors.warning)]', + '[--ring-color:theme(colors.warning/60%)]', + ], + danger: [ + 'hover:[--bg-color:theme(colors.danger/10%)]', + '[--border-color:theme(colors.danger)]', + '[--text-color:theme(colors.danger)]', + '[--ring-color:theme(colors.danger/60%)]', + ], }, fill: { - default: 'text-black bg-black/5 hover:bg-black/10 ring-black/10', - accent: 'text-white bg-accent-500 hover:bg-accent-600 ring-accent-500/60', - red: 'text-white bg-red-500 hover:bg-red-600 ring-red-500/60', - orange: 'text-white bg-orange-500 hover:bg-orange-600 ring-orange-500/60', - amber: 'text-white bg-amber-500 hover:bg-amber-600 ring-amber-500/60', - yellow: 'text-white bg-yellow-500 hover:bg-yellow-600 ring-yellow-500/60', - lime: 'text-white bg-lime-500 hover:bg-lime-600 ring-lime-500/60', - green: 'text-white bg-green-500 hover:bg-green-600 ring-green-500/60', - emerald: 'text-white bg-emerald-500 hover:bg-emerald-600 ring-emerald-500/60', - teal: 'text-white bg-teal-500 hover:bg-teal-600 ring-teal-500/60', - cyan: 'text-white bg-cyan-500 hover:bg-cyan-600 ring-cyan-500/60', - sky: 'text-white bg-sky-500 hover:bg-sky-600 ring-sky-500/60', - blue: 'text-white bg-blue-500 hover:bg-blue-600 ring-blue-500/60', - indigo: 'text-white bg-indigo-500 hover:bg-indigo-600 ring-indigo-500/60', - violet: 'text-white bg-violet-500 hover:bg-violet-600 ring-violet-500/60', - purple: 'text-white bg-purple-500 hover:bg-purple-600 ring-purple-500/60', - fuchsia: 'text-white bg-fuchsia-500 hover:bg-fuchsia-600 ring-fuchsia-500/60', - pink: 'text-white bg-pink-500 hover:bg-pink-600 ring-pink-500/60', - rose: 'text-white bg-rose-500 hover:bg-rose-600 ring-rose-500/60', - gray: 'text-white bg-gray-500 hover:bg-gray-600 ring-gray-500/60', + default: [ + `[--bg-color:theme(colors.surface-content)]`, + 'hover:[--bg-color:theme(colors.surface-content/80%)]', + '[--text-color:theme(colors.surface-200)]', + '[--ring-color:theme(colors.surface-content/60%)]', + ], + primary: [ + `[--bg-color:theme(colors.primary)]`, + 'hover:[--bg-color:theme(colors.primary-600)]', + '[--text-color:theme(colors.primary-content)]', + '[--ring-color:theme(colors.primary/60%)]', + ], + secondary: [ + '[--bg-color:theme(colors.secondary)]', + 'hover:[--bg-color:theme(colors.secondary-600)]', + '[--text-color:theme(colors.secondary-content)]', + '[--ring-color:theme(colors.secondary/60%)]', + ], + accent: [ + '[--bg-color:theme(colors.accent)]', + 'hover:[--bg-color:theme(colors.accent-600)]', + '[--text-color:theme(colors.accent-content)]', + '[--ring-color:theme(colors.accent/60%)]', + ], + neutral: [ + '[--bg-color:theme(colors.neutral)]', + 'hover:[--bg-color:theme(colors.neutral-600)]', + '[--text-color:theme(colors.neutral-content)]', + '[--ring-color:theme(colors.neutral/60%)]', + ], + info: [ + `[--bg-color:theme(colors.info)]`, + 'hover:[--bg-color:theme(colors.info-600)]', + '[--text-color:theme(colors.info-content)]', + '[--ring-color:theme(colors.info/60%)]', + ], + success: [ + `[--bg-color:theme(colors.success)]`, + 'hover:[--bg-color:theme(colors.success-600)]', + '[--text-color:theme(colors.success-content)]', + '[--ring-color:theme(colors.success/60%)]', + ], + warning: [ + `[--bg-color:theme(colors.warning)]`, + 'hover:[--bg-color:theme(colors.warning-600)]', + '[--text-color:theme(colors.warning-content)]', + '[--ring-color:theme(colors.warning/60%)]', + ], + danger: [ + `[--bg-color:theme(colors.danger)]`, + 'hover:[--bg-color:theme(colors.danger-600)]', + '[--text-color:theme(colors.danger-content)]', + '[--ring-color:theme(colors.danger/60%)]', + ], }, 'fill-light': { - default: 'text-black bg-black/5 hover:bg-black/10 ring-black/20', - accent: - 'text-accent-500 bg-accent-500/10 hover:bg-accent-500/20 ring-accent-400 ring-accent-500/60', - red: 'text-red-500 bg-red-500/10 hover:bg-red-500/20 ring-red-500/60', - orange: 'text-orange-500 bg-orange-500/10 hover:bg-orange-500/20 ring-orange-500/60', - amber: 'text-amber-500 bg-amber-500/10 hover:bg-amber-500/20 ring-amber-500/60', - yellow: 'text-yellow-500 bg-yellow-500/10 hover:bg-yellow-500/20 ring-yellow-500/60', - lime: 'text-lime-500 bg-lime-500/10 hover:bg-lime-500/20 ring-lime-500/60', - green: 'text-green-500 bg-green-500/10 hover:bg-green-500/20 ring-green-500/60', - emerald: 'text-emerald-500 bg-emerald-500/10 hover:bg-emerald-500/20 ring-emerald-500/60', - teal: 'text-teal-500 bg-teal-500/10 hover:bg-teal-500/20 ring-teal-500/60', - cyan: 'text-cyan-500 bg-cyan-500/10 hover:bg-cyan-500/20 ring-cyan-500/60', - sky: 'text-sky-500 bg-sky-500/10 hover:bg-sky-500/20 ring-sky-500/60', - blue: 'text-blue-500 bg-blue-500/10 hover:bg-blue-500/20 ring-blue-500/60', - indigo: 'text-indigo-500 bg-indigo-500/10 hover:bg-indigo-500/20 ring-indigo-500/60', - violet: 'text-violet-500 bg-violet-500/10 hover:bg-violet-500/20 ring-violet-500/60', - purple: 'text-purple-500 bg-purple-500/10 hover:bg-purple-500/20 ring-purple-500/60', - fuchsia: 'text-fuchsia-500 bg-fuchsia-500/10 hover:bg-fuchsia-500/20 ring-fuchsia-500/60', - pink: 'text-pink-500 bg-pink-500/10 hover:bg-pink-500/20 ring-pink-500/60', - rose: 'text-rose-500 bg-rose-500/10 hover:bg-rose-500/20 ring-rose-500/60', - gray: 'text-gray-500 bg-gray-500/10 hover:bg-gray-500/20 ring-gray-500/60', + default: [ + '[--bg-color:theme(colors.surface-content/10%)]', + 'hover:[--bg-color:theme(colors.surface-content/20%)]', + '[--text-color:theme(colors.surface-content)]', + '[--ring-color:theme(colors.surface-content/60%)]', + ], + primary: [ + '[--bg-color:theme(colors.primary/10%)]', + 'hover:[--bg-color:theme(colors.primary/20%)]', + '[--text-color:theme(colors.primary)]', + '[--ring-color:theme(colors.primary/60%)]', + ], + secondary: [ + '[--bg-color:theme(colors.secondary/10%)]', + 'hover:[--bg-color:theme(colors.secondary/20%)]', + '[--text-color:theme(colors.secondary)]', + '[--ring-color:theme(colors.secondary/60%)]', + ], + accent: [ + '[--bg-color:theme(colors.accent/10%)]', + 'hover:[--bg-color:theme(colors.accent/20%)]', + '[--text-color:theme(colors.accent)]', + '[--ring-color:theme(colors.secondary/60%)]', + ], + neutral: [ + '[--bg-color:theme(colors.neutral/10%)]', + 'hover:[--bg-color:theme(colors.neutral/20%)]', + '[--text-color:theme(colors.neutral)]', + '[--ring-color:theme(colors.neutral/60%)]', + ], + info: [ + '[--bg-color:theme(colors.info/10%)]', + 'hover:[--bg-color:theme(colors.info/20%)]', + '[--text-color:theme(colors.info)]', + '[--ring-color:theme(colors.info/60%)]', + ], + success: [ + '[--bg-color:theme(colors.success/10%)]', + 'hover:[--bg-color:theme(colors.success/20%)]', + '[--text-color:theme(colors.success)]', + '[--ring-color:theme(colors.success/60%)]', + ], + warning: [ + '[--bg-color:theme(colors.warning/10%)]', + 'hover:[--bg-color:theme(colors.warning/20%)]', + '[--text-color:theme(colors.warning)]', + '[--ring-color:theme(colors.warning/60%)]', + ], + danger: [ + '[--bg-color:theme(colors.danger/10%)]', + 'hover:[--bg-color:theme(colors.danger/20%)]', + '[--text-color:theme(colors.danger)]', + '[--ring-color:theme(colors.danger/60%)]', + ], }, 'fill-outline': { - default: 'text-black bg-black/5 hover:bg-black/10 border-black/20 ring-black/10', - accent: - 'text-accent-500 border-accent-500 bg-accent-500/10 hover:bg-accent-500/20 ring-accent-500/60', - red: 'text-red-500 border-red-500 bg-red-500/10 hover:bg-red-500/20 ring-red-500/60', - orange: - 'text-orange-500 border-orange-500 bg-orange-500/10 hover:bg-orange-500/20 ring-orange-500/60', - amber: - 'text-amber-500 border-amber-500 bg-amber-500/10 hover:bg-amber-500/20 ring-amber-500/60', - yellow: - 'text-yellow-500 border-yellow-500 bg-yellow-500/10 hover:bg-yellow-500/20 ring-yellow-500/60', - lime: 'text-lime-500 border-lime-500 bg-lime-500/10 hover:bg-lime-500/20 ring-lime-500/60', - green: - 'text-green-500 border-green-500 bg-green-500/10 hover:bg-green-500/20 ring-green-500/60', - emerald: - 'text-emerald-500 border-emerald-500 bg-emerald-500/10 hover:bg-emerald-500/20 ring-emerald-500/60', - teal: 'text-teal-500 border-teal-500 bg-teal-500/10 hover:bg-teal-500/20 ring-teal-500/60', - cyan: 'text-cyan-500 border-cyan-500 bg-cyan-500/10 hover:bg-cyan-500/20 ring-cyan-500/60', - sky: 'text-sky-500 border-sky-500 bg-sky-500/10 hover:bg-sky-500/20 ring-sky-500/60', - blue: 'text-blue-500 border-blue-500 bg-blue-500/10 hover:bg-blue-500/20 ring-blue-500/60', - indigo: - 'text-indigo-500 border-indigo-500 bg-indigo-500/10 hover:bg-indigo-500/20 ring-indigo-500/60', - violet: - 'text-violet-500 border-violet-500 bg-violet-500/10 hover:bg-violet-500/20 ring-violet-500/60', - purple: - 'text-purple-500 border-purple-500 bg-purple-500/10 hover:bg-purple-500/20 ring-purple-500/60', - fuchsia: - 'text-fuchsia-500 border-fuchsia-500 bg-fuchsia-500/10 hover:bg-fuchsia-500/20 ring-fuchsia-500/60', - pink: 'text-pink-500 border-pink-500 bg-pink-500/10 hover:bg-pink-500/20 ring-pink-500/60', - rose: 'text-rose-500 border-rose-500 bg-rose-500/10 hover:bg-rose-500/20 ring-rose-500/60', - gray: 'text-gray-500 border-gray-500 bg-gray-500/10 hover:bg-gray-500/20 ring-gray-500/60', + default: [ + '[--bg-color:theme(colors.surface-content/10%)]', + 'hover:[--bg-color:theme(colors.surface-content/20%)]', + '[--border-color:theme(colors.surface-content)]', + '[--text-color:theme(colors.surface-content)]', + '[--ring-color:theme(colors.surface-content/60%)]', + ], + primary: [ + '[--bg-color:theme(colors.primary/10%)]', + 'hover:[--bg-color:theme(colors.primary/20%)]', + '[--border-color:theme(colors.primary)]', + '[--text-color:theme(colors.primary)]', + '[--ring-color:theme(colors.primary/60%)]', + ], + secondary: [ + '[--bg-color:theme(colors.secondary/10%)]', + 'hover:[--bg-color:theme(colors.secondary/20%)]', + '[--border-color:theme(colors.secondary)]', + '[--text-color:theme(colors.secondary)]', + '[--ring-color:theme(colors.secondary/60%)]', + ], + accent: [ + '[--bg-color:theme(colors.accent/10%)]', + 'hover:[--bg-color:theme(colors.accent/20%)]', + '[--border-color:theme(colors.accent)]', + '[--text-color:theme(colors.accent)]', + '[--ring-color:theme(colors.accent/60%)]', + ], + neutral: [ + '[--bg-color:theme(colors.neutral/10%)]', + 'hover:[--bg-color:theme(colors.neutral/20%)]', + '[--border-color:theme(colors.neutral)]', + '[--text-color:theme(colors.neutral)]', + '[--ring-color:theme(colors.neutral/60%)]', + ], + info: [ + '[--bg-color:theme(colors.info/10%)]', + 'hover:[--bg-color:theme(colors.info/20%)]', + '[--border-color:theme(colors.info)]', + '[--text-color:theme(colors.info)]', + '[--ring-color:theme(colors.info/60%)]', + ], + success: [ + '[--bg-color:theme(colors.success/10%)]', + 'hover:[--bg-color:theme(colors.success/20%)]', + '[--border-color:theme(colors.success)]', + '[--text-color:theme(colors.success)]', + '[--ring-color:theme(colors.success/60%)]', + ], + warning: [ + '[--bg-color:theme(colors.warning/10%)]', + 'hover:[--bg-color:theme(colors.warning/20%)]', + '[--border-color:theme(colors.warning)]', + '[--text-color:theme(colors.warning)]', + '[--ring-color:theme(colors.warning/60%)]', + ], + danger: [ + '[--bg-color:theme(colors.danger/10%)]', + 'hover:[--bg-color:theme(colors.danger/20%)]', + '[--border-color:theme(colors.danger)]', + '[--text-color:theme(colors.danger)]', + '[--ring-color:theme(colors.danger/60%)]', + ], }, text: { - default: 'hover:text-black/70 ring-black/10', - accent: 'text-accent-500 hover:text-accent-700 ring-accent-500/60', - red: 'text-red-500 hover:text-red-700 ring-red-500/60', - orange: 'text-orange-500 hover:text-orange-700 ring-orange-500/60', - amber: 'text-amber-500 hover:text-amber-700 ring-amber-500/60', - yellow: 'text-yellow-500 hover:text-yellow-700 ring-yellow-500/60', - lime: 'text-lime-500 hover:text-lime-700 ring-lime-500/60', - green: 'text-green-500 hover:text-green-700 ring-green-500/60', - emerald: 'text-emerald-500 hover:text-emerald-700 ring-emerald-500/60', - teal: 'text-teal-500 hover:text-teal-700 ring-teal-500/60', - cyan: 'text-cyan-500 hover:text-cyan-700 ring-cyan-500/60', - sky: 'text-sky-500 hover:text-sky-700 ring-sky-500/60', - blue: 'text-blue-500 hover:text-blue-700 ring-blue-500/60', - indigo: 'text-indigo-500 hover:text-indigo-700 ring-indigo-500/60', - violet: 'text-violet-500 hover:text-violet-700 ring-violet-500/60', - purple: 'text-purple-500 hover:text-purple-700 ring-purple-500/60', - fuchsia: 'text-fuchsia-500 hover:text-fuchsia-700 ring-fuchsia-500/60', - pink: 'text-pink-500 hover:text-pink-700 ring-pink-500/60', - rose: 'text-rose-500 hover:text-rose-700 ring-rose-500/60', - gray: 'text-gray-500 hover:text-gray-700 ring-gray-500/60', + default: [ + '[--text-color:theme(colors.surface-content)]', + 'hover:[--text-color:theme(colors.surface-content/80%)]', + '[--ring-color:theme(colors.surface-content/60%)]', + ], + primary: [ + '[--text-color:theme(colors.primary)]', + 'hover:[--text-color:theme(colors.primary-700)]', + '[--ring-color:theme(colors.primary/60%)]', + ], + secondary: [ + '[--text-color:theme(colors.secondary)]', + 'hover:[--text-color:theme(colors.secondary-700)]', + '[--ring-color:theme(colors.secondary/60%)]', + ], + accent: [ + '[--text-color:theme(colors.accent)]', + 'hover:[--text-color:theme(colors.accent-700)]', + '[--ring-color:theme(colors.accent/60%)]', + ], + neutral: [ + '[--text-color:theme(colors.neutral)]', + 'hover:[--text-color:theme(colors.neutral-700)]', + '[--ring-color:theme(colors.neutral/60%)]', + ], + info: [ + '[--text-color:theme(colors.info)]', + 'hover:[--text-color:theme(colors.info-700)]', + '[--ring-color:theme(colors.info/60%)]', + ], + success: [ + '[--text-color:theme(colors.success)]', + 'hover:[--text-color:theme(colors.success-700)]', + '[--ring-color:theme(colors.success/60%)]', + ], + warning: [ + '[--text-color:theme(colors.warning)]', + 'hover:[--text-color:theme(colors.warning-700)]', + '[--ring-color:theme(colors.warning/60%)]', + ], + danger: [ + '[--text-color:theme(colors.danger)]', + 'hover:[--text-color:theme(colors.danger-700)]', + '[--ring-color:theme(colors.danger/60%)]', + ], + }, + none: { + default: '', + primary: '', + secondary: '', + accent: '', + neutral: '', + info: '', + success: '', + warning: '', + danger: '', }, - none: {}, }[variant ?? 'none']?.[color ?? 'default'], + + // text color + ['default', 'outline', 'fill', 'fill-outline', 'fill-light', 'text'].includes( + variant ?? 'none' + ) && 'text-[--text-color]', + + // background color + ['default', 'outline', 'fill', 'fill-outline', 'fill-light'].includes(variant ?? 'none') && + 'bg-[--bg-color] ', + + // border color + ['outline', 'fill-outline'].includes(variant ?? 'none') && 'border-[--border-color]', + + // ring color + ['default', 'outline', 'fill', 'fill-outline', 'fill-light', 'text'].includes( + variant ?? 'none' + ) && 'ring-[--ring-color]', + theme.root, classes?.root, $$props.class @@ -262,7 +474,10 @@ {#if typeof icon === 'string' || 'icon' in icon} - + {:else} {/if} diff --git a/packages/svelte-ux/src/lib/components/ButtonGroup.svelte b/packages/svelte-ux/src/lib/components/ButtonGroup.svelte index 8fafc4195..0978a64d8 100644 --- a/packages/svelte-ux/src/lib/components/ButtonGroup.svelte +++ b/packages/svelte-ux/src/lib/components/ButtonGroup.svelte @@ -1,7 +1,7 @@ -
+
{#if source}
-
-          {@html highlightedSource}
+      
+          {@html highlightedSource}
       
diff --git a/packages/svelte-ux/src/lib/components/DateButton.svelte b/packages/svelte-ux/src/lib/components/DateButton.svelte index 2ec7be7cc..f360d830c 100644 --- a/packages/svelte-ux/src/lib/components/DateButton.svelte +++ b/packages/svelte-ux/src/lib/components/DateButton.svelte @@ -78,10 +78,8 @@ 'inline-flex items-center justify-center', isSelectedStart ? '[--tw-gradient-from:transparent]' - : '[--tw-gradient-from:theme(colors.accent.500)]', - isSelectedEnd - ? '[--tw-gradient-to:transparent]' - : '[--tw-gradient-to:theme(colors.accent.500)]', + : '[--tw-gradient-from:theme(colors.primary)]', + isSelectedEnd ? '[--tw-gradient-to:transparent]' : '[--tw-gradient-to:theme(colors.primary)]', isSelected && (isVerticalSelection ? 'bg-gradient-to-b' : 'bg-gradient-to-r'), hidden && 'opacity-0 pointer-events-none', theme.root, @@ -96,7 +94,7 @@ isCurrent ? 'font-bold' : 'font-normal' )} variant={isSelected ? 'fill' : 'default'} - color={isSelected || isCurrent ? 'accent' : 'default'} + color={isSelected || isCurrent ? 'primary' : 'default'} {disabled} on:click={() => { // Do not set selected date as this is causing issues with controlled selected (ex. date ranges, arrays, etc) / changing from date to { from: ..., to: ... } diff --git a/packages/svelte-ux/src/lib/components/DateField.svelte b/packages/svelte-ux/src/lib/components/DateField.svelte index 803df34d8..338e690fb 100644 --- a/packages/svelte-ux/src/lib/components/DateField.svelte +++ b/packages/svelte-ux/src/lib/components/DateField.svelte @@ -78,7 +78,7 @@ value = e.detail; dispatch('change', { value }); }} - class="p-1 text-black/50" + class="p-1 text-surface-content/50" /> {/if} diff --git a/packages/svelte-ux/src/lib/components/DatePickerField.svelte b/packages/svelte-ux/src/lib/components/DatePickerField.svelte index 256835178..85364769c 100644 --- a/packages/svelte-ux/src/lib/components/DatePickerField.svelte +++ b/packages/svelte-ux/src/lib/components/DatePickerField.svelte @@ -105,7 +105,7 @@ {#if clearable && value} {getDictionary().Ok} {/if} - +
@@ -61,7 +61,7 @@
{#if stackTrace}
-
Stacktrace:
+
Stacktrace:
             {stackTrace ?? ''}
           
@@ -70,7 +70,7 @@
- +
diff --git a/packages/svelte-ux/src/lib/components/ExpansionPanel.svelte b/packages/svelte-ux/src/lib/components/ExpansionPanel.svelte index e58b769b0..960208987 100644 --- a/packages/svelte-ux/src/lib/components/ExpansionPanel.svelte +++ b/packages/svelte-ux/src/lib/components/ExpansionPanel.svelte @@ -29,7 +29,7 @@ classes={{ root: cls( 'ExpansionPanel', - 'bg-white elevation-1 border-t', + 'bg-surface-100 elevation-1 border-t', 'relative', // Match ListItem (used for loading) so Stacking Context is consistent (else causes a solid line between ExpansionPanel and ListItem) list === 'type' && 'first-of-type:border-t-0 first-of-type:rounded-t last-of-type:rounded-b', list === 'parent' && 'first:border-t-0 first:rounded-t last:rounded-b', @@ -38,7 +38,7 @@ classes.root, $$props.class ), - icon: cls('text-gray-500 px-2', !enabled && 'hidden'), + icon: cls('text-surface-content/30 px-2', !enabled && 'hidden'), }} popout {list} diff --git a/packages/svelte-ux/src/lib/components/Field.svelte b/packages/svelte-ux/src/lib/components/Field.svelte index 4ccc88161..4b4d29316 100644 --- a/packages/svelte-ux/src/lib/components/Field.svelte +++ b/packages/svelte-ux/src/lib/components/Field.svelte @@ -61,7 +61,7 @@ 'Field', 'group flex gap-1', labelPlacement !== 'left' ? 'flex-col' : 'items-center', - error ? '[--color:theme(colors.red.500)]' : '[--color:theme(colors.accent.500)]', + error ? '[--color:theme(colors.danger)]' : '[--color:theme(colors.primary)]', disabled && 'opacity-50 pointer-events-none', !base && (rounded ? 'rounded-full' : 'rounded'), theme.root, @@ -73,8 +73,8 @@
@@ -127,9 +127,9 @@ {#if label && ['inset', 'float'].includes(labelPlacement)}
{/if} @@ -190,7 +190,7 @@ class={cls( error ? 'error' : 'hint', 'text-xs ml-2 transition-transform ease-out overflow-hidden origin-top transform group-focus-within:scale-y-100', - error ? 'text-red-500' : 'text-black/50 scale-y-0', + error ? 'text-danger' : 'text-surface-content/50 scale-y-0', theme.error, classes.error )} diff --git a/packages/svelte-ux/src/lib/components/Header.svelte b/packages/svelte-ux/src/lib/components/Header.svelte index d1396280e..f2449d6e1 100644 --- a/packages/svelte-ux/src/lib/components/Header.svelte +++ b/packages/svelte-ux/src/lib/components/Header.svelte @@ -26,9 +26,9 @@ {#if subheading} {#if Array.isArray(subheading)} - + {:else} -
{subheading}
+
{subheading}
{/if} {/if}
diff --git a/packages/svelte-ux/src/lib/components/Input.svelte b/packages/svelte-ux/src/lib/components/Input.svelte index 866a6968d..36611beee 100644 --- a/packages/svelte-ux/src/lib/components/Input.svelte +++ b/packages/svelte-ux/src/lib/components/Input.svelte @@ -124,7 +124,7 @@ {...$$restProps} class={cls( 'Input', - 'text-sm w-full outline-none bg-transparent selection:bg-gray-500/30', + 'text-sm w-full outline-none bg-transparent placeholder-surface/50 selection:bg-surface-content/10', mask && (mask == placeholder || isFocused || value) && 'font-mono', theme.root, $$props.class diff --git a/packages/svelte-ux/src/lib/components/Kbd.svelte b/packages/svelte-ux/src/lib/components/Kbd.svelte new file mode 100644 index 000000000..f1aa66f0e --- /dev/null +++ b/packages/svelte-ux/src/lib/components/Kbd.svelte @@ -0,0 +1,37 @@ + + + + {#if control} + ⌃ + {/if} + + {#if option} + ⌥ + {/if} + + {#if shift} + ⇧ + {/if} + + {#if command} + ⌘ + {/if} + + + diff --git a/packages/svelte-ux/src/lib/components/ListItem.svelte b/packages/svelte-ux/src/lib/components/ListItem.svelte index ce230a55c..fae01ba79 100644 --- a/packages/svelte-ux/src/lib/components/ListItem.svelte +++ b/packages/svelte-ux/src/lib/components/ListItem.svelte @@ -53,13 +53,13 @@
  • {#if subheading != null} -
    +
    {subheading}
    {/if} diff --git a/packages/svelte-ux/src/lib/components/Menu.svelte b/packages/svelte-ux/src/lib/components/Menu.svelte index ddb9cd017..86c939f2a 100644 --- a/packages/svelte-ux/src/lib/components/Menu.svelte +++ b/packages/svelte-ux/src/lib/components/Menu.svelte @@ -22,7 +22,7 @@ export let resize = false; export let disableTransition = false; export let transition = disableTransition - ? (node: HTMLElement, params: TransitionParams) => ({} as TransitionConfig) + ? (node: HTMLElement, params: TransitionParams) => ({}) as TransitionConfig : slide; export let transitionParams: TransitionParams = {}; export let explicitClose = false; @@ -62,7 +62,7 @@ {open} class={cls( 'Menu', - 'bg-white rounded shadow border overflow-auto', + 'bg-surface-100 rounded shadow border overflow-auto', theme.root, classes.root, $$props.class diff --git a/packages/svelte-ux/src/lib/components/MenuField.svelte b/packages/svelte-ux/src/lib/components/MenuField.svelte index e028a8e66..307c84a74 100644 --- a/packages/svelte-ux/src/lib/components/MenuField.svelte +++ b/packages/svelte-ux/src/lib/components/MenuField.svelte @@ -89,7 +89,7 @@ &]:bg-black/5', + icon: 'text-surface-content/50', + selected: 'font-semibold [:not(.group:hover)>&]:bg-surface-content/5', }; const theme = getComponentTheme('MenuItem'); @@ -41,7 +41,7 @@ {...$$restProps} class={cls( 'MenuItem', - 'text-left items-center p-2 hover:bg-black/5 rounded duration-75', + 'text-left items-center p-2 hover:bg-surface-content/5 rounded duration-75', selected && classes?.selected, theme.root, classes?.root, diff --git a/packages/svelte-ux/src/lib/components/Month.svelte b/packages/svelte-ux/src/lib/components/Month.svelte index 3175243ae..2551741d6 100644 --- a/packages/svelte-ux/src/lib/components/Month.svelte +++ b/packages/svelte-ux/src/lib/components/Month.svelte @@ -106,7 +106,9 @@
    {#each monthDaysByWeek[0] ?? [] as day (day.getDate())}
    - {format(day, PeriodType.Day, { custom: 'eee' })} + + {format(day, PeriodType.Day, { custom: 'eee' })} +
    {/each}
    diff --git a/packages/svelte-ux/src/lib/components/MultiSelect.svelte b/packages/svelte-ux/src/lib/components/MultiSelect.svelte index c550bc92e..08a1dd4d6 100644 --- a/packages/svelte-ux/src/lib/components/MultiSelect.svelte +++ b/packages/svelte-ux/src/lib/components/MultiSelect.svelte @@ -105,7 +105,7 @@ {#if inlineSearch} -
    +
    -
    +
    {/if} @@ -180,13 +180,13 @@
    {:else} {#if !filteredSelectedOptions.length} -
    There are no matching items.
    +
    There are no matching items.
    {/if} {/each}
    -
    +
    @@ -208,7 +208,7 @@
    diff --git a/packages/svelte-ux/src/lib/components/Overlay.svelte b/packages/svelte-ux/src/lib/components/Overlay.svelte index fb3becc83..92f685f93 100644 --- a/packages/svelte-ux/src/lib/components/Overlay.svelte +++ b/packages/svelte-ux/src/lib/components/Overlay.svelte @@ -8,7 +8,7 @@ export let center = false; export let transition = [fade, { duration: 100 }] as [ (node: Element, options: any) => TransitionConfig, - object + object, ]; const theme = getComponentTheme('Overlay'); @@ -19,7 +19,7 @@
    -
    +
    {#if code && showCode} -
    -
    -          {@html highlightedCode}
    -      
    - -
    - -
    +
    +
    {/if}
    {#if code} - {/if} diff --git a/packages/svelte-ux/src/lib/components/Progress.svelte b/packages/svelte-ux/src/lib/components/Progress.svelte index 471a24200..adaa69666 100644 --- a/packages/svelte-ux/src/lib/components/Progress.svelte +++ b/packages/svelte-ux/src/lib/components/Progress.svelte @@ -17,12 +17,12 @@ 'h-2 w-full', // bar color - '[--color:theme(colors.accent.500)]', + '[--color:theme(colors.primary)]', '[&::-webkit-progress-value]:bg-[--color]', '[&::-moz-progress-bar]:bg-[--color]', // track color - '[--track-color:theme(colors.gray.100)]', + '[--track-color:theme(colors.surface-200)]', '[&::-webkit-progress-bar]:bg-[--track-color]', 'bg-[--track-color]', diff --git a/packages/svelte-ux/src/lib/components/QuickSearch.svelte b/packages/svelte-ux/src/lib/components/QuickSearch.svelte index 4e1ce196a..8e55049d3 100644 --- a/packages/svelte-ux/src/lib/components/QuickSearch.svelte +++ b/packages/svelte-ux/src/lib/components/QuickSearch.svelte @@ -3,6 +3,7 @@ import Button from '$lib/components/Button.svelte'; import Dialog from '$lib/components/Dialog.svelte'; + import Kbd from './Kbd.svelte'; import SelectField from '$lib/components/SelectField.svelte'; import { getComponentTheme } from './theme'; import { cls } from '$lib/utils/styles'; @@ -52,17 +53,14 @@ )} > Search - - ⌘ - K - + K
    diff --git a/packages/svelte-ux/src/lib/components/Radio.svelte b/packages/svelte-ux/src/lib/components/Radio.svelte index 6457e3ae3..bbfe64c09 100644 --- a/packages/svelte-ux/src/lib/components/Radio.svelte +++ b/packages/svelte-ux/src/lib/components/Radio.svelte @@ -39,12 +39,16 @@
    @@ -34,7 +34,7 @@
    Are you sure you want to do that?
    - +
    @@ -58,7 +58,7 @@ }, 1000); }} variant="fill" - color="accent" + color="primary" > Save @@ -86,7 +86,7 @@ }, 1000); }} variant="fill" - color="accent" + color="primary" > Save @@ -100,7 +100,7 @@ - +
    Are you sure?
    This will permanently delete the item and can not be undone.
    @@ -110,7 +110,7 @@ console.log('Deleting item...'); }} variant="fill" - color="red" + color="danger" > Yes, delete item @@ -124,7 +124,7 @@ - +
    Delete this item ?
    This will permanently delete the item
    @@ -136,7 +136,7 @@ e.stopPropagation(); toggleConfirm(); }} - color="red" + color="danger" variant="fill" > Yes @@ -154,7 +154,7 @@ toggleDelete(); }} variant="fill" - color="red" + color="danger" > Yes, delete item @@ -177,7 +177,7 @@
    Are you sure you want to do that?
    - +
    @@ -191,7 +191,7 @@
    Are you sure you want to do that?
    - +
    @@ -209,7 +209,7 @@
    - +
    @@ -224,7 +224,7 @@
    Are you sure you want to do that?
    - +
    diff --git a/packages/svelte-ux/src/routes/docs/components/Drawer/+page.svelte b/packages/svelte-ux/src/routes/docs/components/Drawer/+page.svelte index 752320dc9..80af768fa 100644 --- a/packages/svelte-ux/src/routes/docs/components/Drawer/+page.svelte +++ b/packages/svelte-ux/src/routes/docs/components/Drawer/+page.svelte @@ -23,10 +23,7 @@

    Contents

    -
    +
    @@ -34,10 +31,7 @@

    Contents

    -
    +
    @@ -45,10 +39,7 @@

    Contents

    -
    +
    @@ -56,10 +47,7 @@

    Contents

    -
    +
    @@ -72,10 +60,7 @@

    Contents

    -
    +
    @@ -89,10 +74,7 @@

    Contents

    -
    +
    @@ -108,10 +90,7 @@
    -
    +
    @@ -130,15 +109,12 @@
    Are you sure you want to do that?
    - +
    -
    +
    @@ -160,10 +136,7 @@ ]} />
    -
    +
    @@ -192,10 +165,7 @@
    -
    +
    @@ -212,7 +182,7 @@ isChanged = false; }} variant="fill" - color="red" + color="danger" > Yes, lose changes @@ -237,10 +207,7 @@ portal={{ target: '#portal' }} >

    Contents

    -
    +
    diff --git a/packages/svelte-ux/src/routes/docs/components/ExpansionPanel/+page.svelte b/packages/svelte-ux/src/routes/docs/components/ExpansionPanel/+page.svelte index 2b9e063ee..477e3630e 100644 --- a/packages/svelte-ux/src/routes/docs/components/ExpansionPanel/+page.svelte +++ b/packages/svelte-ux/src/routes/docs/components/ExpansionPanel/+page.svelte @@ -28,7 +28,7 @@ {#each Array(5) as _, i} - +
    Item {i + 1}
    @@ -68,7 +68,7 @@ title="Item {i + 1}" subheading="List Item" icon={mdiAccount} - avatar={{ class: 'bg-gray-400 text-white/90' }} + avatar={{ class: 'bg-surface-content/50 text-surface-100/90' }} class="flex-1" noShadow /> @@ -92,7 +92,7 @@ title="Item 1" subheading="Expansion Panel" icon={mdiAccount} - avatar={{ class: 'bg-gray-400 text-white/90' }} + avatar={{ class: 'bg-surface-content/50 text-surface-100/90' }} class="flex-1" noShadow /> @@ -106,7 +106,7 @@ title="Item 2" subheading="List Item" icon={mdiAccount} - avatar={{ class: 'bg-gray-400 text-white/90' }} + avatar={{ class: 'bg-surface-content/50 text-surface-100/90' }} /> @@ -135,7 +135,7 @@ title="Item 1" subheading="List Item" icon={mdiAccount} - avatar={{ class: 'bg-gray-400 text-white/90' }} + avatar={{ class: 'bg-surface-content/50 text-surface-100/90' }} /> @@ -157,6 +157,6 @@ title="Item 3" subheading="List Item" icon={mdiAccount} - avatar={{ class: 'bg-gray-400 text-white/90' }} + avatar={{ class: 'bg-surface-content/50 text-surface-100/90' }} /> diff --git a/packages/svelte-ux/src/routes/docs/components/Field/+page.svelte b/packages/svelte-ux/src/routes/docs/components/Field/+page.svelte index edf463135..0be42d3da 100644 --- a/packages/svelte-ux/src/routes/docs/components/Field/+page.svelte +++ b/packages/svelte-ux/src/routes/docs/components/Field/+page.svelte @@ -67,7 +67,7 @@
    ToggleGroup
    -
    default width
    +
    default width
    @@ -81,7 +81,7 @@
    ToggleGroup
    -
    full width
    +
    full width
    @@ -95,7 +95,9 @@
    ToggleGroup
    -
    full rounded and small
    +
    + full rounded and small +
    @@ -109,7 +111,7 @@
    ToggleGroup
    -
    with icons
    +
    with icons
    @@ -140,7 +142,7 @@ - + @@ -148,7 +150,14 @@ - + @@ -164,7 +173,7 @@ - diff --git a/packages/svelte-ux/src/routes/docs/components/Gooey/+page.svelte b/packages/svelte-ux/src/routes/docs/components/Gooey/+page.svelte index fe23bd367..6709d5da0 100644 --- a/packages/svelte-ux/src/routes/docs/components/Gooey/+page.svelte +++ b/packages/svelte-ux/src/routes/docs/components/Gooey/+page.svelte @@ -43,15 +43,9 @@
    - Inspiration: - Text Morph - + Inspiration: Text Morph by - Valgo + Valgo

    Morphing emoji

    @@ -79,11 +73,11 @@
    - +
    This is an example of a simple headline
    or text with rounded corners
    using a gooey SVG filter.
    You can edit me! @@ -92,11 +86,11 @@
    - Inspiration: + Inspiration: Gooey text background with SVG filters by - Ines Montani + Ines Montani
    @@ -126,15 +120,11 @@
    - Inspiration: + Inspiration: Spinner with Glowing, Gooey Effect by - Lou + Lou
    @@ -165,15 +155,11 @@
    - Inspiration: + Inspiration: Loader/Scanner with Gooey Effect by - Lou + Lou
    diff --git a/packages/svelte-ux/src/routes/docs/components/Icon/+page.svelte b/packages/svelte-ux/src/routes/docs/components/Icon/+page.svelte index 120059917..521de9f95 100644 --- a/packages/svelte-ux/src/routes/docs/components/Icon/+page.svelte +++ b/packages/svelte-ux/src/routes/docs/components/Icon/+page.svelte @@ -61,7 +61,7 @@ - + '} diff --git a/packages/svelte-ux/src/routes/docs/components/ListItem/+page.svelte b/packages/svelte-ux/src/routes/docs/components/ListItem/+page.svelte index fa57dbfa7..56c9c4951 100644 --- a/packages/svelte-ux/src/routes/docs/components/ListItem/+page.svelte +++ b/packages/svelte-ux/src/routes/docs/components/ListItem/+page.svelte @@ -67,7 +67,7 @@ title="Title" subheading="Subheading" icon={mdiAccount} - avatar={{ class: 'bg-gray-400 text-white/90' }} + avatar={{ class: 'bg-surface-content/50 text-surface-100/90' }} /> @@ -76,7 +76,7 @@
    -
    @@ -112,8 +112,8 @@ on:click={() => (selectedId = choice.id)} class={cls( 'cursor-pointer', - 'hover:bg-accent-50', - selectedId == choice.id ? 'bg-accent-50' : '' + 'hover:bg-primary/5', + selectedId == choice.id ? 'bg-primary/5' : '' )} >
    @@ -138,9 +138,9 @@ on:click={() => (selectedId = choice.id)} class={cls( 'px-8 py-4', - 'cursor-pointer ring ring-inset ring-accent-500 transition-shadow duration-100', - 'hover:bg-accent-50', - selectedId == choice.id ? 'ring-1 bg-accent-50' : 'ring-0' + 'cursor-pointer ring ring-inset ring-primary transition-shadow duration-100', + 'hover:bg-primary/5', + selectedId == choice.id ? 'ring-1 bg-primary/5' : 'ring-0' )} noShadow /> @@ -152,7 +152,7 @@

    example 3

    -
    +
    {#each choices as choice}
    (selectedId = choice.id)} class={cls( 'px-8 py-4', - 'cursor-pointer transition-shadow duration-100 border', - 'hover:bg-white', - selectedId == choice.id ? 'bg-white shadow-md' : '' + 'cursor-pointer transition-shadow duration-100', + 'hover:bg-surface-100 hover:outline', + selectedId == choice.id ? 'bg-surface-100 shadow-md' : '' )} noBackground noShadow diff --git a/packages/svelte-ux/src/routes/docs/components/Menu/+page.svelte b/packages/svelte-ux/src/routes/docs/components/Menu/+page.svelte index 8ab50a839..fd734220c 100644 --- a/packages/svelte-ux/src/routes/docs/components/Menu/+page.svelte +++ b/packages/svelte-ux/src/routes/docs/components/Menu/+page.svelte @@ -67,7 +67,7 @@
    Are you sure you want to do that?
    - +
    @@ -77,7 +77,7 @@
    Are you sure you want to do that?
    - +
    @@ -85,9 +85,7 @@ Open Drawer... -
    +
    @@ -96,9 +94,7 @@ Open Persistent Drawer... -
    +
    @@ -118,9 +114,7 @@ -
    +
    diff --git a/packages/svelte-ux/src/routes/docs/components/MenuButton/+page.svelte b/packages/svelte-ux/src/routes/docs/components/MenuButton/+page.svelte index 92bc9f9f0..9a0f736c0 100644 --- a/packages/svelte-ux/src/routes/docs/components/MenuButton/+page.svelte +++ b/packages/svelte-ux/src/routes/docs/components/MenuButton/+page.svelte @@ -48,7 +48,7 @@

    Variant

    - +

    Size

    diff --git a/packages/svelte-ux/src/routes/docs/components/MenuField/+page.svelte b/packages/svelte-ux/src/routes/docs/components/MenuField/+page.svelte index 711b47cc0..3ace992b0 100644 --- a/packages/svelte-ux/src/routes/docs/components/MenuField/+page.svelte +++ b/packages/svelte-ux/src/routes/docs/components/MenuField/+page.svelte @@ -121,7 +121,7 @@
    -
    @@ -137,6 +137,6 @@ diff --git a/packages/svelte-ux/src/routes/docs/components/MultiSelect/+page.svelte b/packages/svelte-ux/src/routes/docs/components/MultiSelect/+page.svelte index 78864a399..09d648125 100644 --- a/packages/svelte-ux/src/routes/docs/components/MultiSelect/+page.svelte +++ b/packages/svelte-ux/src/routes/docs/components/MultiSelect/+page.svelte @@ -83,7 +83,7 @@
    (value = e.detail.value)} inlineSearch>
    - +
    diff --git a/packages/svelte-ux/src/routes/docs/components/MultiSelectField/+page.svelte b/packages/svelte-ux/src/routes/docs/components/MultiSelectField/+page.svelte index 706806385..e3e4d5c12 100644 --- a/packages/svelte-ux/src/routes/docs/components/MultiSelectField/+page.svelte +++ b/packages/svelte-ux/src/routes/docs/components/MultiSelectField/+page.svelte @@ -71,7 +71,7 @@ (value = e.detail.value)}>
    - +
    @@ -79,16 +79,13 @@

    within Drawer

    - + Open Drawer - +
    (value = e.detail.value)} />
    -
    +
    diff --git a/packages/svelte-ux/src/routes/docs/components/MultiSelectMenu/+page.svelte b/packages/svelte-ux/src/routes/docs/components/MultiSelectMenu/+page.svelte index 7fb41c36e..e1d664cf4 100644 --- a/packages/svelte-ux/src/routes/docs/components/MultiSelectMenu/+page.svelte +++ b/packages/svelte-ux/src/routes/docs/components/MultiSelectMenu/+page.svelte @@ -133,7 +133,7 @@ inlineSearch >
    - +
    diff --git a/packages/svelte-ux/src/routes/docs/components/NavItem/+page.svelte b/packages/svelte-ux/src/routes/docs/components/NavItem/+page.svelte index bd26d0857..f898bfcc8 100644 --- a/packages/svelte-ux/src/routes/docs/components/NavItem/+page.svelte +++ b/packages/svelte-ux/src/routes/docs/components/NavItem/+page.svelte @@ -20,6 +20,6 @@ text="NavItem" currentUrl={$page.url} path="/docs/components/NavItem" - classes={{ root: 'pl-3', active: 'bg-accent-50 text-accent-500' }} + classes={{ root: 'pl-3', active: 'bg-primary/10 text-primary' }} /> diff --git a/packages/svelte-ux/src/routes/docs/components/Notification/+page.svelte b/packages/svelte-ux/src/routes/docs/components/Notification/+page.svelte index f55e727c8..04cc2aa54 100644 --- a/packages/svelte-ux/src/routes/docs/components/Notification/+page.svelte +++ b/packages/svelte-ux/src/routes/docs/components/Notification/+page.svelte @@ -30,7 +30,7 @@
    Discussion archived
    - +
    @@ -49,7 +49,7 @@ Lorem ipsum dolor sit amet consectetur adipisicing elit oluptatum tenetur.
    - +
    @@ -65,7 +65,7 @@
    Notifications may include alerts, sounds, and badges
    - +
    diff --git a/packages/svelte-ux/src/routes/docs/components/Overflow/+page.svelte b/packages/svelte-ux/src/routes/docs/components/Overflow/+page.svelte index c102abc87..f6188b03e 100644 --- a/packages/svelte-ux/src/routes/docs/components/Overflow/+page.svelte +++ b/packages/svelte-ux/src/routes/docs/components/Overflow/+page.svelte @@ -20,7 +20,7 @@
    overflowX: {overflowX}
    overflowY: {overflowY}
    -
    +
    {#each { length: overflowItems } as _}
    Resize the window to see text truncate and watch values
    {/each} @@ -44,7 +44,7 @@ +
    diff --git a/packages/svelte-ux/src/routes/docs/components/Popover/+page.svelte b/packages/svelte-ux/src/routes/docs/components/Popover/+page.svelte index 43fd7c363..6e78179c0 100644 --- a/packages/svelte-ux/src/routes/docs/components/Popover/+page.svelte +++ b/packages/svelte-ux/src/routes/docs/components/Popover/+page.svelte @@ -16,7 +16,7 @@
    -
    Example contents
    +
    Example contents
    @@ -31,7 +31,7 @@
    -
    Contents
    +
    Contents
    @@ -41,7 +41,7 @@
    -
    Contents
    +
    Contents
    @@ -51,7 +51,7 @@
    -
    Contents
    +
    Contents
    @@ -61,7 +61,7 @@
    -
    Contents
    +
    Contents
    @@ -71,7 +71,7 @@
    -
    Contents
    +
    Contents
    @@ -81,7 +81,7 @@
    -
    Contents
    +
    Contents
    @@ -91,7 +91,7 @@
    -
    Contents
    +
    Contents
    @@ -101,7 +101,7 @@
    -
    Contents
    +
    Contents
    @@ -111,7 +111,7 @@
    -
    Contents
    +
    Contents
    @@ -121,7 +121,7 @@
    -
    Contents
    +
    Contents
    @@ -131,7 +131,7 @@
    -
    Contents
    +
    Contents
    @@ -141,7 +141,7 @@
    -
    Contents
    +
    Contents
    diff --git a/packages/svelte-ux/src/routes/docs/components/Progress/+page.svelte b/packages/svelte-ux/src/routes/docs/components/Progress/+page.svelte index d494e32b2..093c4c115 100644 --- a/packages/svelte-ux/src/routes/docs/components/Progress/+page.svelte +++ b/packages/svelte-ux/src/routes/docs/components/Progress/+page.svelte @@ -29,26 +29,26 @@

    Color

    - - - + + +

    Track color

    - + @@ -59,10 +59,10 @@ bind:value class={cls( value > 90 - ? '[--color:theme(colors.red.500)]' - : value > 70 - ? '[--color:theme(colors.yellow.500)]' - : '[--color:theme(colors.green.500)]' + ? '[--color:theme(colors.danger)]' + : value > 50 + ? '[--color:theme(colors.warning)]' + : '[--color:theme(colors.success)]' )} max={100} /> diff --git a/packages/svelte-ux/src/routes/docs/components/ProgressCircle/+page.svelte b/packages/svelte-ux/src/routes/docs/components/ProgressCircle/+page.svelte index b0c4c77e8..a8b3d679e 100644 --- a/packages/svelte-ux/src/routes/docs/components/ProgressCircle/+page.svelte +++ b/packages/svelte-ux/src/routes/docs/components/ProgressCircle/+page.svelte @@ -15,16 +15,16 @@

    Demo

    -
    +
    {#if label} - + {#if indeterminate}Loading...{:else}{value}%{/if} {/if} -
    +