@xleddyl/443-components-vue 0.16.14 → 0.16.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CATALOG.md +155 -144
- package/README.md +4 -0
- package/dist/components/core/index.d.ts +1 -0
- package/dist/components/core/index.mjs +1 -0
- package/dist/components/core/palette.d.ts +4 -0
- package/dist/components/core/palette.mjs +22 -0
- package/dist/components/core/types.d.ts +1 -0
- package/dist/components/data/Badge.vue +8 -1
- package/dist/components/data/Badge.vue.d.ts +2 -2
- package/dist/components/data/FilterPill.vue +8 -0
- package/dist/components/data/FilterPill.vue.d.ts +2 -2
- package/dist/components/data/FilterPills.vue +1 -0
- package/dist/components/data/RecordList.vue +55 -0
- package/dist/components/data/RecordList.vue.d.ts +237 -0
- package/dist/components/data/Tag.vue +3 -1
- package/dist/components/data/Tag.vue.d.ts +2 -2
- package/dist/components/data/index.d.ts +1 -0
- package/dist/components/data/index.mjs +1 -0
- package/dist/components/data/types.d.ts +11 -1
- package/dist/components/forms/Combobox.vue +31 -3
- package/dist/components/forms/Combobox.vue.d.ts +2 -0
- package/dist/components/forms/types.d.ts +2 -0
- package/dist/components/overlays/CommandButton.vue +21 -0
- package/dist/components/overlays/CommandButton.vue.d.ts +249 -0
- package/dist/components/overlays/CommandPalette.vue +13 -2
- package/dist/components/overlays/index.d.ts +2 -0
- package/dist/components/overlays/index.mjs +2 -0
- package/dist/components/overlays/types.d.ts +4 -0
- package/dist/components/templates/DashboardLayout.vue +22 -6
- package/dist/components/templates/DashboardLayout.vue.d.ts +1 -0
- package/dist/components/templates/FormDrawer.vue +59 -9
- package/dist/components/templates/FormDrawer.vue.d.ts +3 -1
- package/dist/components/templates/types.d.ts +4 -0
- package/dist/composables/layout.d.ts +1 -0
- package/dist/composables/layout.mjs +1 -0
- package/dist/composables/templates.d.ts +1 -0
- package/dist/composables/templates.mjs +1 -0
- package/dist/composables/useConfirm.d.ts +4 -1
- package/dist/composables/useConfirm.mjs +16 -2
- package/dist/composables/usePageCommands.d.ts +6 -0
- package/dist/composables/usePageCommands.mjs +9 -0
- package/dist/composables/useRouteRecord.d.ts +24 -0
- package/dist/composables/useRouteRecord.mjs +55 -0
- package/dist/grid/cells/BadgeCell.vue +27 -15
- package/dist/grid/data-grid.css +4 -0
- package/dist/grid/types.d.ts +5 -2
- package/dist/locale/de.mjs +1 -0
- package/dist/locale/en.mjs +1 -0
- package/dist/locale/it.mjs +1 -0
- package/dist/locale/types.d.ts +1 -0
- package/dist/styles/data/badge.css +5 -0
- package/dist/styles/data/filter-pills.css +8 -0
- package/dist/styles/data/record-list.css +57 -0
- package/dist/styles/data/tag.css +5 -0
- package/dist/styles/data.css +1 -0
- package/dist/styles/forms/combobox.css +27 -0
- package/dist/styles/tokens.css +12 -0
- package/dist/styles/utilities.css +55 -0
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { TabItem } from '../layout/types';
|
|
1
2
|
import type { Component } from 'vue';
|
|
2
3
|
import type { LinkTarget, Tone } from '../core/types';
|
|
3
4
|
import type { DescriptionItem, StatTrend } from '../data/types';
|
|
@@ -156,3 +157,6 @@ export interface DashboardRuntimeState {
|
|
|
156
157
|
breadcrumbs?: BreadcrumbItem[];
|
|
157
158
|
badges?: Record<string, string | number>;
|
|
158
159
|
}
|
|
160
|
+
export interface FormDrawerTab extends TabItem {
|
|
161
|
+
fields?: string[];
|
|
162
|
+
}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import type { ConfirmOptions } from '../internal/overlays/confirm';
|
|
2
2
|
export type { ConfirmOptions } from '../internal/overlays/confirm';
|
|
3
|
-
export declare function useConfirm(): (input?: string | ConfirmOptions) => Promise<boolean
|
|
3
|
+
export declare function useConfirm(): ((input?: string | ConfirmOptions) => Promise<boolean>) & {
|
|
4
|
+
delete: (title: string, options?: Omit<ConfirmOptions, "title">) => Promise<boolean>;
|
|
5
|
+
discard: (options?: ConfirmOptions) => Promise<boolean>;
|
|
6
|
+
};
|
|
@@ -12,12 +12,26 @@ async function nativeConfirm(options, fallback) {
|
|
|
12
12
|
}
|
|
13
13
|
export function useConfirm() {
|
|
14
14
|
const { t } = useLocale();
|
|
15
|
-
|
|
15
|
+
function confirm(input = {}) {
|
|
16
16
|
const options = typeof input === "string" ? { description: input } : input;
|
|
17
17
|
if (!isClient()) return Promise.resolve(false);
|
|
18
18
|
if (!hasConfirmHost()) return nativeConfirm(options, t("common.areYouSure"));
|
|
19
19
|
return new Promise((resolve) => {
|
|
20
20
|
enqueueDialog({ ...options, kind: "confirm", resolve });
|
|
21
21
|
});
|
|
22
|
-
}
|
|
22
|
+
}
|
|
23
|
+
function confirmDelete(title, options = {}) {
|
|
24
|
+
return confirm({ tone: "danger", confirmLabel: t("common.delete"), ...options, title });
|
|
25
|
+
}
|
|
26
|
+
function confirmDiscard(options = {}) {
|
|
27
|
+
return confirm({
|
|
28
|
+
tone: "danger",
|
|
29
|
+
title: t("dirtyGuard.title"),
|
|
30
|
+
description: t("formDrawer.discardDescription"),
|
|
31
|
+
confirmLabel: t("dirtyGuard.confirm"),
|
|
32
|
+
cancelLabel: t("dirtyGuard.cancel"),
|
|
33
|
+
...options
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
return Object.assign(confirm, { delete: confirmDelete, discard: confirmDiscard });
|
|
23
37
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { MaybeRefOrGetter } from 'vue';
|
|
2
|
+
import type { CommandItem } from '../components/overlays/types';
|
|
3
|
+
type CommandSource = MaybeRefOrGetter<CommandItem[]>;
|
|
4
|
+
export declare function usePageCommands(commands: CommandSource): void;
|
|
5
|
+
export declare function usePageCommandItems(): import("vue").ComputedRef<CommandItem<unknown>[]>;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { computed, onBeforeUnmount, onMounted, shallowReactive, toValue } from "vue";
|
|
2
|
+
const sources = shallowReactive(/* @__PURE__ */ new Set());
|
|
3
|
+
export function usePageCommands(commands) {
|
|
4
|
+
onMounted(() => sources.add(commands));
|
|
5
|
+
onBeforeUnmount(() => sources.delete(commands));
|
|
6
|
+
}
|
|
7
|
+
export function usePageCommandItems() {
|
|
8
|
+
return computed(() => [...sources].flatMap((source) => toValue(source)));
|
|
9
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { MaybeRefOrGetter } from 'vue';
|
|
2
|
+
import type { RouteLocation } from '../internal/layout/query';
|
|
3
|
+
export declare const NEW_ROUTE_RECORD = "new";
|
|
4
|
+
export interface RouteRecordOptions<T> {
|
|
5
|
+
find?: (id: string) => T | undefined;
|
|
6
|
+
loaded?: MaybeRefOrGetter<boolean>;
|
|
7
|
+
canCreate?: MaybeRefOrGetter<boolean>;
|
|
8
|
+
linkedKeys?: string[];
|
|
9
|
+
newId?: string;
|
|
10
|
+
location?: RouteLocation;
|
|
11
|
+
}
|
|
12
|
+
type RouteChanges = Record<string, string | undefined>;
|
|
13
|
+
export declare function useRouteRecord<T = never>(key: string, options?: RouteRecordOptions<T>): {
|
|
14
|
+
param: import("vue").Ref<string | undefined, string | undefined>;
|
|
15
|
+
id: import("vue").ComputedRef<string | null>;
|
|
16
|
+
isNew: import("vue").ComputedRef<boolean>;
|
|
17
|
+
current: import("vue").ComputedRef<T | undefined>;
|
|
18
|
+
loading: import("vue").ComputedRef<boolean>;
|
|
19
|
+
open: import("vue").WritableComputedRef<boolean, boolean>;
|
|
20
|
+
openRecord: (recordId: string | null, linked?: RouteChanges) => Promise<boolean>;
|
|
21
|
+
close: () => Promise<boolean>;
|
|
22
|
+
replaceId: (recordId: string, linked?: RouteChanges) => Promise<boolean>;
|
|
23
|
+
};
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { computed, toValue, watch } from "vue";
|
|
2
|
+
import { useDefaultRouteLocation, writeRouteValue } from "../internal/layout/query.mjs";
|
|
3
|
+
import { useRouterLike } from "../internal/layout/route.mjs";
|
|
4
|
+
import { useRouteState } from "./useRouteState.mjs";
|
|
5
|
+
export const NEW_ROUTE_RECORD = "new";
|
|
6
|
+
export function useRouteRecord(key, options = {}) {
|
|
7
|
+
const router = useRouterLike();
|
|
8
|
+
const location = options.location ?? useDefaultRouteLocation();
|
|
9
|
+
const newId = options.newId ?? NEW_ROUTE_RECORD;
|
|
10
|
+
const param = useRouteState(key, { location });
|
|
11
|
+
const id = computed(() => param.value && param.value !== newId ? param.value : null);
|
|
12
|
+
const isNew = computed(() => param.value === newId);
|
|
13
|
+
const loaded = computed(() => toValue(options.loaded) ?? true);
|
|
14
|
+
const current = computed(() => id.value ? options.find?.(id.value) : void 0);
|
|
15
|
+
const loading = computed(() => !!id.value && !loaded.value);
|
|
16
|
+
function cleared() {
|
|
17
|
+
return Object.fromEntries((options.linkedKeys ?? []).map((name) => [name, void 0]));
|
|
18
|
+
}
|
|
19
|
+
function write(changes, history) {
|
|
20
|
+
if (!router) {
|
|
21
|
+
param.value = changes[key];
|
|
22
|
+
return Promise.resolve(true);
|
|
23
|
+
}
|
|
24
|
+
const writes = Object.entries(changes).map(
|
|
25
|
+
([name, value]) => writeRouteValue(router, name, value, history, location)
|
|
26
|
+
);
|
|
27
|
+
return Promise.all(writes).then((results) => results.every(Boolean));
|
|
28
|
+
}
|
|
29
|
+
function openRecord(recordId, linked = {}) {
|
|
30
|
+
return write({ ...cleared(), ...linked, [key]: recordId ?? newId }, "push");
|
|
31
|
+
}
|
|
32
|
+
function close() {
|
|
33
|
+
return write({ ...cleared(), [key]: void 0 }, "push");
|
|
34
|
+
}
|
|
35
|
+
function replaceId(recordId, linked = {}) {
|
|
36
|
+
return write({ ...linked, [key]: recordId }, "replace");
|
|
37
|
+
}
|
|
38
|
+
const open = computed({
|
|
39
|
+
get: () => isNew.value ? toValue(options.canCreate) ?? true : !!id.value,
|
|
40
|
+
set: (value) => {
|
|
41
|
+
if (!value) close();
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
if (options.find) {
|
|
45
|
+
watch(
|
|
46
|
+
[loaded, id, current],
|
|
47
|
+
() => {
|
|
48
|
+
if (loaded.value && id.value && !current.value)
|
|
49
|
+
write({ ...cleared(), [key]: void 0 }, "replace");
|
|
50
|
+
},
|
|
51
|
+
{ immediate: true }
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
return { param, id, isNew, current, loading, open, openRecord, close, replaceId };
|
|
55
|
+
}
|
|
@@ -10,16 +10,15 @@
|
|
|
10
10
|
v-if="params.variant"
|
|
11
11
|
:class="entry.badgeClass"
|
|
12
12
|
:tone="entry.tone"
|
|
13
|
+
:color="entry.color"
|
|
13
14
|
:variant="params.variant"
|
|
14
15
|
:size
|
|
16
|
+
:title="entry.title"
|
|
15
17
|
>{{ entry.text }}</Badge
|
|
16
18
|
>
|
|
17
|
-
<span
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
:class="[`k-data-grid-badge-${entry.tone}`, entry.badgeClass]"
|
|
21
|
-
>{{ entry.text }}</span
|
|
22
|
-
>
|
|
19
|
+
<span v-else class="k-data-grid-badge" :class="entry.classes" :title="entry.title">{{
|
|
20
|
+
entry.text
|
|
21
|
+
}}</span>
|
|
23
22
|
</template>
|
|
24
23
|
<template v-if="hiddenCount > 0">
|
|
25
24
|
<Badge
|
|
@@ -45,16 +44,15 @@
|
|
|
45
44
|
v-if="params.variant"
|
|
46
45
|
:class="single.badgeClass"
|
|
47
46
|
:tone="single.tone"
|
|
47
|
+
:color="single.color"
|
|
48
48
|
:variant="params.variant"
|
|
49
49
|
:size
|
|
50
|
+
:title="single.title"
|
|
50
51
|
>{{ single.text }}</Badge
|
|
51
52
|
>
|
|
52
|
-
<span
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
:class="[`k-data-grid-badge-${single.tone}`, single.badgeClass]"
|
|
56
|
-
>{{ single.text }}</span
|
|
57
|
-
>
|
|
53
|
+
<span v-else class="k-data-grid-badge" :class="single.classes" :title="single.title">{{
|
|
54
|
+
single.text
|
|
55
|
+
}}</span>
|
|
58
56
|
</template>
|
|
59
57
|
<EmptyCell v-else :context="cellContext" />
|
|
60
58
|
</template>
|
|
@@ -62,6 +60,7 @@
|
|
|
62
60
|
<script setup>
|
|
63
61
|
import { computed } from "vue";
|
|
64
62
|
import Badge from "../../components/data/Badge.vue";
|
|
63
|
+
import { paletteClass } from "../../components/core/palette";
|
|
65
64
|
import { formatLocaleMessage } from "../../locale";
|
|
66
65
|
import EmptyCell from "./EmptyCell.vue";
|
|
67
66
|
const props = defineProps({
|
|
@@ -73,15 +72,28 @@ const isList = computed(() => Array.isArray(props.params.value));
|
|
|
73
72
|
function keyOf(raw) {
|
|
74
73
|
return raw === null || raw === void 0 ? "" : String(raw);
|
|
75
74
|
}
|
|
75
|
+
function lookup(map, raw, key) {
|
|
76
|
+
if (!map) return void 0;
|
|
77
|
+
return typeof map === "function" ? map(raw, props.params.data) : map[key];
|
|
78
|
+
}
|
|
76
79
|
function entryFor(raw, index) {
|
|
77
80
|
const key = keyOf(raw);
|
|
78
81
|
if (!key) return null;
|
|
79
82
|
const source = props.params.badgeClass;
|
|
83
|
+
const tone = props.params.tones?.[key] ?? props.params.defaultTone ?? "neutral";
|
|
84
|
+
const color = lookup(props.params.colors, raw, key);
|
|
85
|
+
const badgeClass = typeof source === "function" ? source(raw, props.params.data) : source;
|
|
80
86
|
return {
|
|
81
87
|
key: `${index}-${key}`,
|
|
82
|
-
text: props.params.labels
|
|
83
|
-
|
|
84
|
-
|
|
88
|
+
text: lookup(props.params.labels, raw, key) ?? key,
|
|
89
|
+
title: lookup(props.params.titles, raw, key),
|
|
90
|
+
tone,
|
|
91
|
+
color,
|
|
92
|
+
badgeClass,
|
|
93
|
+
classes: [
|
|
94
|
+
color ? ["k-data-grid-badge-palette", paletteClass(color)] : `k-data-grid-badge-${tone}`,
|
|
95
|
+
badgeClass
|
|
96
|
+
]
|
|
85
97
|
};
|
|
86
98
|
}
|
|
87
99
|
const single = computed(() => isList.value ? null : entryFor(props.params.value, 0));
|
package/dist/grid/data-grid.css
CHANGED
package/dist/grid/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ColDef, GridApi, ICellRendererParams } from 'ag-grid-community';
|
|
2
|
-
import type { Tone } from '../components/core/types';
|
|
2
|
+
import type { PaletteColor, Tone } from '../components/core/types';
|
|
3
3
|
import type { BadgeSize, BadgeVariant, PageSize } from '../components/data/types';
|
|
4
4
|
import type { KMessages } from '../locale/types';
|
|
5
5
|
export type GridDensity = 'compact' | 'normal' | 'comfortable';
|
|
@@ -47,9 +47,12 @@ export interface DateCellParams {
|
|
|
47
47
|
relative?: boolean | Intl.RelativeTimeFormatOptions;
|
|
48
48
|
relativeWithin?: number;
|
|
49
49
|
}
|
|
50
|
+
export type BadgeCellMap<V, T> = Record<string, V> | ((value: unknown, data: T | undefined) => V | undefined);
|
|
50
51
|
export interface BadgeCellParams<T = unknown> {
|
|
51
52
|
tones?: Record<string, Tone>;
|
|
52
|
-
|
|
53
|
+
colors?: BadgeCellMap<PaletteColor, T>;
|
|
54
|
+
labels?: BadgeCellMap<string, T>;
|
|
55
|
+
titles?: BadgeCellMap<string, T>;
|
|
53
56
|
defaultTone?: Tone;
|
|
54
57
|
variant?: BadgeVariant;
|
|
55
58
|
size?: BadgeSize;
|
package/dist/locale/de.mjs
CHANGED
package/dist/locale/en.mjs
CHANGED
package/dist/locale/it.mjs
CHANGED
package/dist/locale/types.d.ts
CHANGED
|
@@ -88,6 +88,14 @@
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
.k-filter-pill-sm,
|
|
91
|
+
.k-filter-pill-dot {
|
|
92
|
+
width: 0.5rem;
|
|
93
|
+
height: 0.5rem;
|
|
94
|
+
flex: none;
|
|
95
|
+
border-radius: var(--k-radius-full);
|
|
96
|
+
background: var(--k-palette);
|
|
97
|
+
}
|
|
98
|
+
|
|
91
99
|
.k-filter-pills-sm .k-filter-pill {
|
|
92
100
|
height: var(--k-size-sm);
|
|
93
101
|
padding: 0 0.625rem;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
.k-record-list {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
margin: 0;
|
|
5
|
+
padding: 0;
|
|
6
|
+
list-style: none;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.k-record-list-item {
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
gap: 0.75rem;
|
|
13
|
+
padding-block: 0.75rem;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.k-record-list-item + .k-record-list-item {
|
|
17
|
+
border-top: 1px solid var(--k-line);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.k-record-list-item:first-child {
|
|
21
|
+
padding-top: 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.k-record-list-item:last-child {
|
|
25
|
+
padding-bottom: 0;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.k-record-list-text {
|
|
29
|
+
display: flex;
|
|
30
|
+
flex: 1;
|
|
31
|
+
flex-direction: column;
|
|
32
|
+
gap: 0.125rem;
|
|
33
|
+
min-width: 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.k-record-list-title-row {
|
|
37
|
+
display: flex;
|
|
38
|
+
align-items: center;
|
|
39
|
+
gap: 0.5rem;
|
|
40
|
+
min-width: 0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.k-record-list-title {
|
|
44
|
+
overflow: hidden;
|
|
45
|
+
font-weight: var(--k-font-weight-medium, 500);
|
|
46
|
+
color: var(--k-text);
|
|
47
|
+
text-overflow: ellipsis;
|
|
48
|
+
white-space: nowrap;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.k-record-list-description {
|
|
52
|
+
overflow: hidden;
|
|
53
|
+
font-size: 0.8125rem;
|
|
54
|
+
color: var(--k-text-muted);
|
|
55
|
+
text-overflow: ellipsis;
|
|
56
|
+
white-space: nowrap;
|
|
57
|
+
}
|
package/dist/styles/data/tag.css
CHANGED
|
@@ -66,6 +66,11 @@
|
|
|
66
66
|
--k-tag-tone: var(--k-info);
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
+
.k-tag-palette {
|
|
70
|
+
--k-tag-tone: var(--k-palette);
|
|
71
|
+
color: var(--k-palette-text);
|
|
72
|
+
}
|
|
73
|
+
|
|
69
74
|
.k-tag:not(.k-tag-neutral) {
|
|
70
75
|
background: color-mix(in oklab, var(--k-tag-tone) 8%, var(--k-surface));
|
|
71
76
|
border-color: color-mix(in oklab, var(--k-tag-tone) 26%, transparent);
|
package/dist/styles/data.css
CHANGED
|
@@ -138,6 +138,12 @@
|
|
|
138
138
|
animation: k-pop var(--k-duration-lg) var(--k-ease-out);
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
+
.k-combobox-tag.is-colored {
|
|
142
|
+
border-color: color-mix(in oklab, var(--k-palette) 26%, transparent);
|
|
143
|
+
background: color-mix(in oklab, var(--k-palette) 8%, var(--k-surface));
|
|
144
|
+
color: var(--k-palette-text);
|
|
145
|
+
}
|
|
146
|
+
|
|
141
147
|
.k-combobox-tag-remove {
|
|
142
148
|
--k-icon-size: 0.75rem;
|
|
143
149
|
display: grid;
|
|
@@ -161,6 +167,27 @@
|
|
|
161
167
|
outline-offset: 0;
|
|
162
168
|
}
|
|
163
169
|
|
|
170
|
+
.k-combobox-header {
|
|
171
|
+
display: flex;
|
|
172
|
+
flex-wrap: wrap;
|
|
173
|
+
gap: 0.25rem;
|
|
174
|
+
margin: -0.25rem -0.25rem 0.25rem;
|
|
175
|
+
position: sticky;
|
|
176
|
+
top: 0;
|
|
177
|
+
z-index: 1;
|
|
178
|
+
padding: 0.375rem;
|
|
179
|
+
border-bottom: 1px solid var(--k-line);
|
|
180
|
+
background: inherit;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.k-combobox-option-dot {
|
|
184
|
+
width: 0.5rem;
|
|
185
|
+
height: 0.5rem;
|
|
186
|
+
flex: none;
|
|
187
|
+
border-radius: var(--k-radius-full);
|
|
188
|
+
background: var(--k-palette);
|
|
189
|
+
}
|
|
190
|
+
|
|
164
191
|
.k-combobox-list {
|
|
165
192
|
margin: 0;
|
|
166
193
|
padding: 0;
|
package/dist/styles/tokens.css
CHANGED
|
@@ -57,6 +57,18 @@
|
|
|
57
57
|
color-mix(in oklab, var(--k-info) 86%, black),
|
|
58
58
|
color-mix(in oklab, var(--k-info) 94%, white)
|
|
59
59
|
);
|
|
60
|
+
--k-palette-blue: light-dark(#2563eb, #60a5fa);
|
|
61
|
+
--k-palette-green: light-dark(#16a34a, #4ade80);
|
|
62
|
+
--k-palette-amber: light-dark(#d97706, #fbbf24);
|
|
63
|
+
--k-palette-violet: light-dark(#7c3aed, #a78bfa);
|
|
64
|
+
--k-palette-pink: light-dark(#db2777, #f472b6);
|
|
65
|
+
--k-palette-teal: light-dark(#0d9488, #2dd4bf);
|
|
66
|
+
--k-palette-orange: light-dark(#ea580c, #fb923c);
|
|
67
|
+
--k-palette-cyan: light-dark(#0891b2, #22d3ee);
|
|
68
|
+
--k-palette-indigo: light-dark(#4f46e5, #818cf8);
|
|
69
|
+
--k-palette-lime: light-dark(#65a30d, #a3e635);
|
|
70
|
+
--k-palette-red: light-dark(#dc2626, #f87171);
|
|
71
|
+
--k-palette-slate: light-dark(#64748b, #94a3b8);
|
|
60
72
|
--k-focus-ring-danger: 0 0 0 3px color-mix(in oklab, var(--k-danger) 18%, transparent);
|
|
61
73
|
|
|
62
74
|
--k-hover: color-mix(in oklab, var(--k-text) 5%, transparent);
|
|
@@ -55,3 +55,58 @@
|
|
|
55
55
|
.k-rise {
|
|
56
56
|
animation: k-rise var(--k-duration-xl) var(--k-ease-out) both;
|
|
57
57
|
}
|
|
58
|
+
|
|
59
|
+
.k-palette-blue {
|
|
60
|
+
--k-palette: var(--k-palette-blue);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.k-palette-green {
|
|
64
|
+
--k-palette: var(--k-palette-green);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.k-palette-amber {
|
|
68
|
+
--k-palette: var(--k-palette-amber);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.k-palette-violet {
|
|
72
|
+
--k-palette: var(--k-palette-violet);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.k-palette-pink {
|
|
76
|
+
--k-palette: var(--k-palette-pink);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.k-palette-teal {
|
|
80
|
+
--k-palette: var(--k-palette-teal);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.k-palette-orange {
|
|
84
|
+
--k-palette: var(--k-palette-orange);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.k-palette-cyan {
|
|
88
|
+
--k-palette: var(--k-palette-cyan);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.k-palette-indigo {
|
|
92
|
+
--k-palette: var(--k-palette-indigo);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.k-palette-lime {
|
|
96
|
+
--k-palette: var(--k-palette-lime);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.k-palette-red {
|
|
100
|
+
--k-palette: var(--k-palette-red);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.k-palette-slate {
|
|
104
|
+
--k-palette: var(--k-palette-slate);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
[class*='k-palette-'] {
|
|
108
|
+
--k-palette-text: light-dark(
|
|
109
|
+
color-mix(in oklab, var(--k-palette) 78%, black),
|
|
110
|
+
color-mix(in oklab, var(--k-palette) 88%, white)
|
|
111
|
+
);
|
|
112
|
+
}
|
package/package.json
CHANGED