@xleddyl/443-components-vue 0.16.15 → 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 CHANGED
@@ -88,6 +88,7 @@ Playground paths in this file are relative to `playground/nuxt/app/pages/compone
88
88
  | Bulk actions bar for selected rows | `SelectionBar` |
89
89
  | Filter chips, active filters | `FilterPills` |
90
90
  | Tags, chips, removable labels | `Tag` |
91
+ | Color per group or category (tags, labels, series) | `color` on `Tag`, `Badge`, `FilterPill`, `Combobox` options, `BadgeCell` `colors`; `PALETTE_COLORS`, `paletteColor(key)` |
91
92
  | Reorder chips by drag and keyboard, drop items from another panel | `TagList` (`sortable`, `removable`, `accept` + `@item-drop`) |
92
93
  | Reorder any list by drag and keyboard | `useSortable` |
93
94
  | Status label, counter, dot | `Badge` |
@@ -157,28 +158,28 @@ Playground paths in this file are relative to `playground/nuxt/app/pages/compone
157
158
 
158
159
  All field components work inside `FormField` and take `invalid`, `disabled`, `readonly`, `required` and `size`. They use `v-model`.
159
160
 
160
- | Component | Purpose and when to use it | Main props, models, slots, events | Playground |
161
- | ------------------ | ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------- |
162
- | `Checkbox` | One boolean, or one value in an array model. Use `Switch` for an instant setting. | Model: boolean or array. Props: `label`, `description`, `value`, `indeterminate`. Slots: default, `description`. | `forms/checkbox.vue` |
163
- | `CheckboxGroup` | Several choices as checkboxes from `options`. | Model: `T[]`. Props: `options` (`label`, `value`, `description`, `disabled`, `icon`), `legend`, `orientation`, `columns`, `variant` (default, filled), `name`. | `forms/checkbox-group.vue` |
164
- | `Radio` | One radio option, used inside `RadioGroup`. | Props: `value`, `label`, `description`, `icon`. Slots: default, `description`. | `forms/radio-group.vue` |
165
- | `RadioGroup` | One choice from a short list. Use `Select` for long lists, `SegmentedControl` for a compact toggle. | Model: value or null. Props: `options`, `legend`, `orientation`, `variant` (default, card), `name`. | `forms/radio-group.vue` |
166
- | `SegmentedControl` | Compact toggle between 2 to 5 options (view mode, period). | Model: value (with `required` it is never null). Props: `options` (`label`, `value`, `icon`, `title`, `muted`), `iconOnly`, `block`, `label`. Slot: `option`. | `forms/segmented-control.vue` |
167
- | `Select` | Native styled select. Use `Combobox` when search or async options are needed. | Model: `T or null`. Props: `options` (items or groups with `label`, `value`, `disabled`), `placeholder`, `icon`. Option values can be string, number or boolean. | `forms/select.vue` |
168
- | `Combobox` | Searchable select. Local filter, async `search`, `multiple` with tags, `creatable`. | Models: `v-model`, `v-model:query`. Props: `options` (`label`, `value`, `description`, `icon`, `keywords`), `search(query, signal)`, `filter`, `multiple`, `hideTags`, `creatable`, `createTransform`, `createValidate` (a returned string is the inline error), `debounce`, `minQueryLength`, `maxSelected`, `clearable`, `loading`, `placeholder`, `emptyText`. Slots: `option`, `empty`. Events: `create`, `open`, `close`. | `forms/combobox.vue` |
169
- | `Switch` | On or off setting that applies at once. | Model: boolean. Props: `label`, `description`, `labelPosition`, `checkedIcon`, `uncheckedIcon`, `name`. Slots: default, `description`. | `forms/switch.vue` |
170
- | `NumberInput` | Locale aware number with stepper, min, max, step. | Model: number or null. Props: `min`, `max`, `step`, `largeStep`, `locale`, `formatOptions` (currency, percent), `stepper`, `wheel`, `align`, `icon`, `placeholder`. | `forms/number-input.vue` |
171
- | `PasswordInput` | Password with show or hide, optional generator, copy and strength meter. | Model: string. Props: `generate` (true or a function), `copy`, `strength`, `minLength`, `autocomplete`. Event: `generate`. | `forms/password-input.vue` |
172
- | `PinInput` | One time code or PIN in separate cells. | Model: string. Props: `length`, `mode` (numeric, alphanumeric, alphabetic), `mask`, `uppercase`, `separatorAfter`, `autocomplete`. Event: `complete(value)`. | `forms/pin-input.vue` |
173
- | `InputGroup` | Join an input with addons or buttons on its sides. | Props: `label`, `size`, `block`. Slot: default (inputs, `InputAddon`, `Button`). | `forms/input-group.vue` |
174
- | `InputAddon` | Static text or icon (currency, domain, unit) inside an `InputGroup`. | Props: `label`, `icon`, `size`. Slot: default. | `forms/input-group.vue` |
175
- | `DateInput` | Native date, datetime-local, month or week input. Use `DatePicker` for a calendar popover or ranges. | Model: ISO string or null. Props: `type`, `min`, `max`, `step`, `clearable`. | `forms/date-input.vue` |
176
- | `DatePicker` | Input with a calendar popover. Single date or `range`. | Model: ISO string, range object (`start`, `end`) or null. Props: `range`, `min`, `max`, `isDateDisabled`, `locale`, `weekStartsOn`, `format`, `closeOnSelect`, `clearable`. Slot: `footer`. | `forms/date-picker.vue` |
177
- | `Calendar` | Inline calendar. Use it for availability views, or as a building block. | Models: `v-model` (date or range), `v-model:month`. Props: `range`, `min`, `max`, `isDateDisabled`, `locale`, `weekStartsOn`, `dayText(iso)`. Slots: `day`, `footer`. Event: `select`. | `forms/calendar.vue` |
178
- | `TimeInput` | Time of day (HH:MM, optional seconds). | Model: string or null. Props: `min`, `max`, `step`, `seconds`, `clearable`. | `forms/time-input.vue` |
179
- | `ColorInput` | Color text field with picker and swatches. | Model: hex string or null. Props: `swatches` (strings or `{ value, label }`), `placeholder`, `invalidText`. | `forms/color-input.vue` |
180
- | `Slider` | Number in a range with drag handle. | Model: number. Props: `min`, `max`, `step`, `bubble` (true, always), `marks`, `format(value)`, `label`. Event: `change` (on release). | `forms/slider.vue` |
181
- | `FileInput` | Drop zone and file picker. Validates type, size and count. Supports folders and previews. | Model: `File`, `File[]` or null. Props: `accept`, `acceptMode`, `maxSize`, `maxFiles`, `multiple`, `directory`, `directoryAction`, `previews`, `list`, `loading`, `capture`, `title`, `dropText`, `hint`. Slots: `title`, `hint`, `actions`. Events: `add`, `remove`, `invalid`, `reject`. | `forms/file-input.vue` |
161
+ | Component | Purpose and when to use it | Main props, models, slots, events | Playground |
162
+ | ------------------ | ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------- |
163
+ | `Checkbox` | One boolean, or one value in an array model. Use `Switch` for an instant setting. | Model: boolean or array. Props: `label`, `description`, `value`, `indeterminate`. Slots: default, `description`. | `forms/checkbox.vue` |
164
+ | `CheckboxGroup` | Several choices as checkboxes from `options`. | Model: `T[]`. Props: `options` (`label`, `value`, `description`, `disabled`, `icon`), `legend`, `orientation`, `columns`, `variant` (default, filled), `name`. | `forms/checkbox-group.vue` |
165
+ | `Radio` | One radio option, used inside `RadioGroup`. | Props: `value`, `label`, `description`, `icon`. Slots: default, `description`. | `forms/radio-group.vue` |
166
+ | `RadioGroup` | One choice from a short list. Use `Select` for long lists, `SegmentedControl` for a compact toggle. | Model: value or null. Props: `options`, `legend`, `orientation`, `variant` (default, card), `name`. | `forms/radio-group.vue` |
167
+ | `SegmentedControl` | Compact toggle between 2 to 5 options (view mode, period). | Model: value (with `required` it is never null). Props: `options` (`label`, `value`, `icon`, `title`, `muted`), `iconOnly`, `block`, `label`. Slot: `option`. | `forms/segmented-control.vue` |
168
+ | `Select` | Native styled select. Use `Combobox` when search or async options are needed. | Model: `T or null`. Props: `options` (items or groups with `label`, `value`, `disabled`), `placeholder`, `icon`. Option values can be string, number or boolean. | `forms/select.vue` |
169
+ | `Combobox` | Searchable select. Local filter, async `search`, `multiple` with tags, `creatable`. | Models: `v-model`, `v-model:query`. Props: `options` (`label`, `value`, `description` (also the tooltip of a selected tag), `icon`, `color` (dot and tag color), `keywords`), `search(query, signal)`, `filter`, `multiple`, `hideTags`, `creatable`, `createTransform`, `createValidate` (a returned string is the inline error), `debounce`, `minQueryLength`, `maxSelected`, `clearable`, `loading`, `placeholder`, `emptyText`. Slots: `option`, `empty`, `header` (top of the panel, for example quick filter pills). Events: `create`, `open`, `close`. | `forms/combobox.vue` |
170
+ | `Switch` | On or off setting that applies at once. | Model: boolean. Props: `label`, `description`, `labelPosition`, `checkedIcon`, `uncheckedIcon`, `name`. Slots: default, `description`. | `forms/switch.vue` |
171
+ | `NumberInput` | Locale aware number with stepper, min, max, step. | Model: number or null. Props: `min`, `max`, `step`, `largeStep`, `locale`, `formatOptions` (currency, percent), `stepper`, `wheel`, `align`, `icon`, `placeholder`. | `forms/number-input.vue` |
172
+ | `PasswordInput` | Password with show or hide, optional generator, copy and strength meter. | Model: string. Props: `generate` (true or a function), `copy`, `strength`, `minLength`, `autocomplete`. Event: `generate`. | `forms/password-input.vue` |
173
+ | `PinInput` | One time code or PIN in separate cells. | Model: string. Props: `length`, `mode` (numeric, alphanumeric, alphabetic), `mask`, `uppercase`, `separatorAfter`, `autocomplete`. Event: `complete(value)`. | `forms/pin-input.vue` |
174
+ | `InputGroup` | Join an input with addons or buttons on its sides. | Props: `label`, `size`, `block`. Slot: default (inputs, `InputAddon`, `Button`). | `forms/input-group.vue` |
175
+ | `InputAddon` | Static text or icon (currency, domain, unit) inside an `InputGroup`. | Props: `label`, `icon`, `size`. Slot: default. | `forms/input-group.vue` |
176
+ | `DateInput` | Native date, datetime-local, month or week input. Use `DatePicker` for a calendar popover or ranges. | Model: ISO string or null. Props: `type`, `min`, `max`, `step`, `clearable`. | `forms/date-input.vue` |
177
+ | `DatePicker` | Input with a calendar popover. Single date or `range`. | Model: ISO string, range object (`start`, `end`) or null. Props: `range`, `min`, `max`, `isDateDisabled`, `locale`, `weekStartsOn`, `format`, `closeOnSelect`, `clearable`. Slot: `footer`. | `forms/date-picker.vue` |
178
+ | `Calendar` | Inline calendar. Use it for availability views, or as a building block. | Models: `v-model` (date or range), `v-model:month`. Props: `range`, `min`, `max`, `isDateDisabled`, `locale`, `weekStartsOn`, `dayText(iso)`. Slots: `day`, `footer`. Event: `select`. | `forms/calendar.vue` |
179
+ | `TimeInput` | Time of day (HH:MM, optional seconds). | Model: string or null. Props: `min`, `max`, `step`, `seconds`, `clearable`. | `forms/time-input.vue` |
180
+ | `ColorInput` | Color text field with picker and swatches. | Model: hex string or null. Props: `swatches` (strings or `{ value, label }`), `placeholder`, `invalidText`. | `forms/color-input.vue` |
181
+ | `Slider` | Number in a range with drag handle. | Model: number. Props: `min`, `max`, `step`, `bubble` (true, always), `marks`, `format(value)`, `label`. Event: `change` (on release). | `forms/slider.vue` |
182
+ | `FileInput` | Drop zone and file picker. Validates type, size and count. Supports folders and previews. | Model: `File`, `File[]` or null. Props: `accept`, `acceptMode`, `maxSize`, `maxFiles`, `multiple`, `directory`, `directoryAction`, `previews`, `list`, `loading`, `capture`, `title`, `dropText`, `hint`. Slots: `title`, `hint`, `actions`. Events: `add`, `remove`, `invalid`, `reject`. | `forms/file-input.vue` |
182
183
 
183
184
  ## Overlays
184
185
 
@@ -207,11 +208,11 @@ Mount `OverlayHost` once for the imperative hooks (see [Composables](#composable
207
208
  | `Table` | Small to medium table with sort, selection, links and loading rows. For thousands of rows or editing use `DataGrid`. | Models: `v-model:sort` (`{ key, direction }`), `v-model:selected` (row keys). Props: `rows`, `columns` (`key`, `label`, `align`, `width`, `numeric`, `sortable`, `value`, `format`), `rowKey`, `selectable`, `rowTo`, `loading`, `emptyText`, `density`, `stickyHeader`, `maxHeight`, `bordered`, `caption`. Slots: `cell-<key>`, `header-<key>`, `empty`. Event: `rowClick`. | `data/table.vue` |
208
209
  | `Pagination` | Page buttons, page size select and summary. Client or server paging. | Models: `v-model:page`, `v-model:pageSize`. Props: `total`, `pageSizes` (numbers, `'all'` for every row), `allLabel`, `showEdges`, `showJump`, `compact`, `loading`, `showSummary`. Slot: `summary`. | `data/pagination.vue` |
209
210
  | `SelectionBar` | Shows the selected count and bulk actions for a list or table. | Props: `count`, `total`, `placement` (inline, sticky, floating), `onSelectAll`, `onClear`. Slots: `actions`, `count`. With `count` 0 it renders nothing visible. | `data/selection-bar.vue` |
210
- | `FilterPills` | Quick filters as pills: single, multiple, menu or panel pills, removable active filters. | Model: value, array (`multiple`) or null. Props: `options` (`value`, `label`, `valueLabel`, `count`, `icon`, `menu`, `panel`, `removable`), `multiple`, `required`, `clearable`, `size`. Slots: `pill`, `panel-<value>`. Events: `select`, `remove`. | `data/filter-pills.vue` |
211
+ | `FilterPills` | Quick filters as pills: single, multiple, menu or panel pills, removable active filters. | Model: value, array (`multiple`) or null. Props: `options` (`value`, `label`, `valueLabel`, `count`, `icon`, `color`, `menu`, `panel`, `removable`), `multiple`, `required`, `clearable`, `size`. Slots: `pill`, `panel-<value>`. Events: `select`, `remove`. | `data/filter-pills.vue` |
211
212
  | `FilterPill` | One pill button. Use it alone for a custom filter trigger. `FilterPills` uses it. | Props: `label`, `valueLabel`, `icon`, `count`, `active`, `pressed`, `caret`, `size`, `disabled`. Slot: default. | `data/filter-pills.vue` |
212
- | `Tag` | Chip or label, optionally removable. Use `Badge` for a status. | Props: `label`, `tone`, `size`, `icon`, `removable`, `removeLabel`, `removeTabindex`, `disabled`. Slot: default. Event: `remove`. | `data/tag.vue` |
213
+ | `Tag` | Chip or label, optionally removable. Use `Badge` for a status. | Props: `label`, `tone`, `color` (palette color), `size`, `icon`, `removable`, `removeLabel`, `removeTabindex`, `disabled`. Slot: default. Event: `remove`. | `data/tag.vue` |
213
214
  | `TagList` | A list of `Tag` chips, reorderable by drag, by keyboard (Alt with an arrow key) or move buttons, removable, and a drop target for items dragged from another panel (columns of an export). | Model: `v-model` (`TagListItem[]`: `value`, `label`, `tone`, `icon`, `removable`, `disabled`). Props: `label`, `sortable`, `removable`, `moveButtons`, `accept` (MIME types or a function), `dropEffect`, `tone`, `size`, `disabled`, `emptyText`, `removeLabel`. Slots: `item`, `empty`. Events: `remove`, `move`, `itemDrop` (`{ index, dataTransfer, event }`). | `data/tag-list.vue` |
214
- | `Badge` | Status label, counter or dot. Not interactive. | Props: `label` (string or number), `tone`, `variant` (soft, solid, outline), `size`, `dot`, `pulse`, `icon`. Slot: default. | `data/badge.vue` |
215
+ | `Badge` | Status label, counter or dot. Not interactive. | Props: `label` (string or number), `tone`, `color` (palette color), `variant` (soft, solid, outline), `size`, `dot`, `pulse`, `icon`. Slot: default. | `data/badge.vue` |
215
216
  | `Avatar` | User picture with initials fallback and status dot. | Props: `src`, `name`, `alt`, `size` (xs to xl), `shape` (circle, square), `status` (online, away, busy, offline), `decorative`. Slot: `fallback`. | `data/avatar.vue` |
216
217
  | `AvatarGroup` | Overlapping stack of avatars with "+N". | Props: `items` (`src`, `name`, `alt`), `max`, `size`, `shape`, `moreLabel`. | `data/avatar.vue` |
217
218
  | `Stat` | Key figure (KPI) with unit, delta, trend, hint and optional sparkline. Can be a link. | Props: `label`, `value`, `unit`, `delta`, `trend` (up, down, flat), `invert` (down is good), `hint`, `icon`, `loading`, `to`, `href`, `plain`. Slots: `label`, `value`, `icon`, `sparkline`, `footer`. | `data/stat.vue` |
@@ -292,7 +293,7 @@ Import from `@xleddyl/443-components-vue/grid`. It wraps AG Grid Community.
292
293
  | `DataGrid` | Big table: virtual scroll, column menu, search, CSV export, selection, server sort and paging, inline editing. For small tables use `Table`. | Models: `v-model:query`, `v-model:page`, `v-model:pageSize`, `v-model:sort` (`{ column, direction }`). Props: `rows`, `columns` (AG Grid `ColDef`), `rowIdKey` or `getRowId`, `storageKey` (columns and page size in the preferences store), `density`, `selectable`, `loading`, `height`, `fill`, `autoHeight`, `toolbar`, `searchable`, `columnMenu`, `exportable`, `serverSort`, `pagination`, `serverPagination`, `total`, `filterable`, `editable`, `spreadsheet`, `gridOptions`, `messages`, `filterCount`. Slots: `actions`, `actions-end` (after the column menu and export buttons), `filters` (`{ close, count }`, hosted in a modal opened by a funnel button next to the search). Events: `filtersReset`, `rowClick`, `selectionChange`, `sortChange`, `filterChange`, `cellsChange`, `cellsInvalid`, `dirtyChange`, `rangeChange`, `copy`. | `grid/data-grid.vue` |
293
294
  | `DataGrid` with `spreadsheet` | Excel-like editing: cell range selection, copy and paste (TSV), fill down and right, clear, undo and redo, dirty cell tracking. Set `rowIdKey` or `getRowId`. | Template ref methods (`GridSpreadsheetMethods`): `getRange`, `getSelectedCells`, `selectRange`, `selectAll`, `setRangeValue`, `copyRange`, `paste`, `fillDown`, `fillRight`, `clearCells`, `undo`, `redo`, `getDirtyCells`, `clearDirty`. The `actions` slot gets the same methods plus `range`, `selectedCellCount`, `dirtyCount`, `canUndo`, `canRedo`. Use `cellsChange` to save edits, `cellsInvalid` for rejected input. | `grid/spreadsheet.vue` |
294
295
  | `GridToolbar` | Toolbar of `DataGrid` (search, column menu, export). `DataGrid` already renders it. Use it alone only for a custom grid setup. | Props: `api`, `searchable`, `columnMenu`, `exportable`, `exportFileName`, `debounce`, `filterCount`. Model: `v-model` (query). Slots: default (actions), `filters`. Events: `resetColumns`, `filtersReset`. | - |
295
- | Cell renderers | Use as `cellRenderer` in a column definition, with `cellRendererParams`. | `BadgeCell` (`tones`, `labels`, `defaultTone`, `variant`; array values render one badge each, `max` adds a `+N` badge, `wrap`), `BooleanCell` (`trueLabel`, `falseLabel`), `DateCell` (`locale`, `options`, `relative`), `EmptyCell` (placeholder for empty values), `ImageCell` (`alt`, `rounded`, `fit`: `cover`, `contain` or `natural` (original aspect, height `size`), `size`), `LinkCell` (`href`, `label`, `target`), `ButtonCell` (`onClick`, `label`, `ariaLabel`, `emptyLabel`; an inline button that does not trigger the row click). | `grid/data-grid.vue` |
296
+ | Cell renderers | Use as `cellRenderer` in a column definition, with `cellRendererParams`. | `BadgeCell` (`tones`, `colors`, `labels`, `titles` (a record or a function of the value), `defaultTone`, `variant`; array values render one badge each, `max` adds a `+N` badge, `wrap`), `BooleanCell` (`trueLabel`, `falseLabel`), `DateCell` (`locale`, `options`, `relative`), `EmptyCell` (placeholder for empty values), `ImageCell` (`alt`, `rounded`, `fit`: `cover`, `contain` or `natural` (original aspect, height `size`), `size`), `LinkCell` (`href`, `label`, `target`), `ButtonCell` (`onClick`, `label`, `ariaLabel`, `emptyLabel`; an inline button that does not trigger the row click). | `grid/data-grid.vue` |
296
297
 
297
298
  Grid helpers: `registerGridModules`, `registerGridEditorModules`, `registerGridFilterModules`, `registerGridSpreadsheetModules` (register AG Grid modules by hand), `createGridTheme`, `parseTsv`, `formatTsv`.
298
299
 
@@ -316,6 +317,10 @@ Import from `@xleddyl/443-components-vue/chart`. It wraps Chart.js. Colors come
316
317
 
317
318
  Chart helpers: `useChartColors`, `readChartColors`, `withAlpha`, `registerChartModules`.
318
319
 
320
+ ## Palette
321
+
322
+ `PALETTE_COLORS` is a categorical palette of 12 colors (`--k-palette-<name>` tokens, light and dark). `paletteColor(key)` gives a stable color for a string, `paletteClass(color)` the class that sets `--k-palette` and `--k-palette-text` on your own elements.
323
+
319
324
  ## Composables
320
325
 
321
326
  All are exported from `@xleddyl/443-components-vue` and auto-imported in Nuxt.
@@ -11,4 +11,5 @@ export { default as Root } from './Root.vue';
11
11
  export { default as Spinner } from './Spinner.vue';
12
12
  export { default as Textarea } from './Textarea.vue';
13
13
  export { default as VisuallyHidden } from './VisuallyHidden.vue';
14
+ export { PALETTE_COLORS, paletteClass, paletteColor } from './palette';
14
15
  export type * from './types';
@@ -11,3 +11,4 @@ export { default as Root } from "./Root.vue";
11
11
  export { default as Spinner } from "./Spinner.vue";
12
12
  export { default as Textarea } from "./Textarea.vue";
13
13
  export { default as VisuallyHidden } from "./VisuallyHidden.vue";
14
+ export { PALETTE_COLORS, paletteClass, paletteColor } from "./palette.mjs";
@@ -0,0 +1,4 @@
1
+ import type { PaletteColor } from './types';
2
+ export declare const PALETTE_COLORS: readonly ["blue", "green", "amber", "violet", "pink", "teal", "orange", "cyan", "indigo", "lime", "red", "slate"];
3
+ export declare function paletteColor(key: string): PaletteColor;
4
+ export declare function paletteClass(color: PaletteColor | undefined): string | undefined;
@@ -0,0 +1,22 @@
1
+ export const PALETTE_COLORS = [
2
+ "blue",
3
+ "green",
4
+ "amber",
5
+ "violet",
6
+ "pink",
7
+ "teal",
8
+ "orange",
9
+ "cyan",
10
+ "indigo",
11
+ "lime",
12
+ "red",
13
+ "slate"
14
+ ];
15
+ export function paletteColor(key) {
16
+ let hash = 0;
17
+ for (const char of key) hash = hash * 31 + char.codePointAt(0) >>> 0;
18
+ return PALETTE_COLORS[hash % PALETTE_COLORS.length];
19
+ }
20
+ export function paletteClass(color) {
21
+ return color ? `k-palette-${color}` : void 0;
22
+ }
@@ -1,5 +1,6 @@
1
1
  export type ButtonSize = 'xs' | 'sm' | 'md' | 'lg';
2
2
  export type Tone = 'neutral' | 'accent' | 'info' | 'success' | 'warning' | 'danger';
3
+ export type PaletteColor = 'blue' | 'green' | 'amber' | 'violet' | 'pink' | 'teal' | 'orange' | 'cyan' | 'indigo' | 'lime' | 'red' | 'slate';
3
4
  export type ButtonVariant = 'solid' | 'soft' | 'subtle' | 'outline' | 'ghost' | 'link';
4
5
  export type FieldSize = 'sm' | 'md' | 'lg';
5
6
  export type LinkTarget = string | Record<string, unknown>;
@@ -1,7 +1,12 @@
1
1
  <template>
2
2
  <span
3
3
  class="k-badge"
4
- :class="[`k-badge-${tone}`, `k-badge-${variant}`, `k-badge-${size}`, { 'has-dot': dot }]"
4
+ :class="[
5
+ color ? ['k-badge-palette', paletteClass(color)] : `k-badge-${tone}`,
6
+ `k-badge-${variant}`,
7
+ `k-badge-${size}`,
8
+ { 'has-dot': dot }
9
+ ]"
5
10
  >
6
11
  <span v-if="dot" class="k-badge-dot" :class="{ 'is-pulse': pulse }" aria-hidden="true" />
7
12
  <Icon v-else-if="icon" :name="icon" />
@@ -11,9 +16,11 @@
11
16
 
12
17
  <script setup>
13
18
  import Icon from "../core/Icon.vue";
19
+ import { paletteClass } from "../core/palette";
14
20
  defineProps({
15
21
  label: { type: [String, Number], required: false },
16
22
  tone: { type: String, required: false, default: "neutral" },
23
+ color: { type: String, required: false },
17
24
  variant: { type: String, required: false, default: "soft" },
18
25
  size: { type: String, required: false, default: "md" },
19
26
  dot: { type: Boolean, required: false },
@@ -8,6 +8,7 @@ type __VLS_Slots = {} & {
8
8
  declare const __VLS_base: import("vue").DefineComponent<{
9
9
  label?: string | number;
10
10
  tone?: Tone;
11
+ color?: string | undefined;
11
12
  variant?: BadgeVariant;
12
13
  size?: BadgeSize;
13
14
  dot?: boolean;
@@ -45,7 +46,6 @@ declare const __VLS_base: import("vue").DefineComponent<{
45
46
  autocapitalize?: string | undefined | undefined;
46
47
  autocorrect?: string | undefined | undefined;
47
48
  autosave?: string | undefined | undefined;
48
- color?: string | undefined | undefined;
49
49
  itemprop?: string | undefined | undefined;
50
50
  itemscope?: (boolean | "true" | "false") | undefined;
51
51
  itemtype?: string | undefined | undefined;
@@ -208,6 +208,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
208
208
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
209
209
  label?: string | number;
210
210
  tone?: Tone;
211
+ color?: string | undefined;
211
212
  variant?: BadgeVariant;
212
213
  size?: BadgeSize;
213
214
  dot?: boolean;
@@ -245,7 +246,6 @@ declare const __VLS_base: import("vue").DefineComponent<{
245
246
  autocapitalize?: string | undefined | undefined;
246
247
  autocorrect?: string | undefined | undefined;
247
248
  autosave?: string | undefined | undefined;
248
- color?: string | undefined | undefined;
249
249
  itemprop?: string | undefined | undefined;
250
250
  itemscope?: (boolean | "true" | "false") | undefined;
251
251
  itemtype?: string | undefined | undefined;
@@ -10,6 +10,12 @@
10
10
  ><Icon name="check"
11
11
  /></span>
12
12
  <Icon v-if="icon" :name="icon" class="k-filter-pill-icon" />
13
+ <span
14
+ v-else-if="color"
15
+ class="k-filter-pill-dot"
16
+ :class="paletteClass(color)"
17
+ aria-hidden="true"
18
+ />
13
19
  <span class="k-filter-pill-label"
14
20
  ><slot>{{ label }}</slot></span
15
21
  >
@@ -21,10 +27,12 @@
21
27
 
22
28
  <script setup>
23
29
  import Icon from "../core/Icon.vue";
30
+ import { paletteClass } from "../core/palette";
24
31
  defineProps({
25
32
  label: { type: String, required: false },
26
33
  valueLabel: { type: String, required: false },
27
34
  icon: { type: null, required: false },
35
+ color: { type: String, required: false },
28
36
  count: { type: Number, required: false },
29
37
  active: { type: Boolean, required: false },
30
38
  pressed: { type: Boolean, required: false, default: void 0 },
@@ -7,6 +7,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
7
7
  label?: string;
8
8
  valueLabel?: string;
9
9
  icon?: IconName;
10
+ color?: string | undefined;
10
11
  count?: number;
11
12
  active?: boolean;
12
13
  pressed?: boolean;
@@ -57,7 +58,6 @@ declare const __VLS_base: import("vue").DefineComponent<{
57
58
  autocapitalize?: string | undefined | undefined;
58
59
  autocorrect?: string | undefined | undefined;
59
60
  autosave?: string | undefined | undefined;
60
- color?: string | undefined | undefined;
61
61
  itemprop?: string | undefined | undefined;
62
62
  itemscope?: (boolean | "true" | "false") | undefined;
63
63
  itemtype?: string | undefined | undefined;
@@ -221,6 +221,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
221
221
  label?: string;
222
222
  valueLabel?: string;
223
223
  icon?: IconName;
224
+ color?: string | undefined;
224
225
  count?: number;
225
226
  active?: boolean;
226
227
  pressed?: boolean;
@@ -271,7 +272,6 @@ declare const __VLS_base: import("vue").DefineComponent<{
271
272
  autocapitalize?: string | undefined | undefined;
272
273
  autocorrect?: string | undefined | undefined;
273
274
  autosave?: string | undefined | undefined;
274
- color?: string | undefined | undefined;
275
275
  itemprop?: string | undefined | undefined;
276
276
  itemscope?: (boolean | "true" | "false") | undefined;
277
277
  itemtype?: string | undefined | undefined;
@@ -141,6 +141,7 @@ function renderPill(value) {
141
141
  label: option.label,
142
142
  valueLabel: option.valueLabel,
143
143
  icon: option.icon,
144
+ color: option.color,
144
145
  count: option.count,
145
146
  size: props.size,
146
147
  disabled: Boolean(props.disabled || option.disabled)
@@ -3,7 +3,7 @@
3
3
  ref="root"
4
4
  class="k-tag"
5
5
  :class="[
6
- `k-tag-${tone}`,
6
+ color ? ['k-tag-palette', paletteClass(color)] : `k-tag-${tone}`,
7
7
  `k-tag-${size}`,
8
8
  { 'is-removable': removable, 'is-disabled': disabled }
9
9
  ]"
@@ -34,9 +34,11 @@ import { hasFocusWithin, neighborFocusTarget } from "../../internal/core/focus";
34
34
  import { useLocale } from "../../composables/useLocale";
35
35
  import { formatLocaleMessage } from "../../locale";
36
36
  import Icon from "../core/Icon.vue";
37
+ import { paletteClass } from "../core/palette";
37
38
  const props = defineProps({
38
39
  label: { type: String, required: false },
39
40
  tone: { type: String, required: false, default: "neutral" },
41
+ color: { type: String, required: false },
40
42
  size: { type: String, required: false, default: "md" },
41
43
  icon: { type: null, required: false },
42
44
  removable: { type: Boolean, required: false },
@@ -8,6 +8,7 @@ type __VLS_Slots = {} & {
8
8
  declare const __VLS_base: import("vue").DefineComponent<{
9
9
  label?: string;
10
10
  tone?: Tone;
11
+ color?: string | undefined;
11
12
  size?: BadgeSize;
12
13
  icon?: IconName;
13
14
  removable?: boolean;
@@ -122,7 +123,6 @@ declare const __VLS_base: import("vue").DefineComponent<{
122
123
  onTransitionrun?: ((payload: TransitionEvent) => void) | undefined;
123
124
  onTransitionstart?: ((payload: TransitionEvent) => void) | undefined;
124
125
  innerHTML?: string | undefined | undefined;
125
- color?: string | undefined | undefined;
126
126
  id?: string | undefined | undefined;
127
127
  lang?: string | undefined | undefined;
128
128
  tabindex?: (string | number) | undefined;
@@ -211,6 +211,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
211
211
  }, string, import("vue").PublicProps, Readonly<{
212
212
  label?: string;
213
213
  tone?: Tone;
214
+ color?: string | undefined;
214
215
  size?: BadgeSize;
215
216
  icon?: IconName;
216
217
  removable?: boolean;
@@ -325,7 +326,6 @@ declare const __VLS_base: import("vue").DefineComponent<{
325
326
  onTransitionrun?: ((payload: TransitionEvent) => void) | undefined;
326
327
  onTransitionstart?: ((payload: TransitionEvent) => void) | undefined;
327
328
  innerHTML?: string | undefined | undefined;
328
- color?: string | undefined | undefined;
329
329
  id?: string | undefined | undefined;
330
330
  lang?: string | undefined | undefined;
331
331
  tabindex?: (string | number) | undefined;
@@ -1,4 +1,4 @@
1
- import type { Tone } from '../core/types';
1
+ import type { PaletteColor, Tone } from '../core/types';
2
2
  import type { IconName } from '../../composables/useIcons';
3
3
  import type { MenuItems } from '../overlays/types';
4
4
  export type BadgeVariant = 'soft' | 'solid' | 'outline';
@@ -87,6 +87,7 @@ export interface FilterPillOption<T extends FilterPillValue = FilterPillValue> {
87
87
  valueLabel?: string;
88
88
  count?: number;
89
89
  icon?: string;
90
+ color?: PaletteColor;
90
91
  disabled?: boolean;
91
92
  menu?: MenuItems;
92
93
  menuLabel?: string;
@@ -29,7 +29,13 @@
29
29
  >
30
30
  <span v-if="icon" class="k-combobox-lead" aria-hidden="true"><Icon :name="icon" /></span>
31
31
  <template v-if="multiple && !hideTags">
32
- <span v-for="value in selectedValues" :key="keyOf(value)" class="k-combobox-tag">
32
+ <span
33
+ v-for="value in selectedValues"
34
+ :key="keyOf(value)"
35
+ class="k-combobox-tag"
36
+ :class="tagClass(value)"
37
+ :title="optionFor(value)?.description"
38
+ >
33
39
  <span class="k-combobox-tag-label">{{ labelFor(value) }}</span>
34
40
  <button
35
41
  v-if="interactive"
@@ -107,6 +113,9 @@
107
113
  :data-side="layer.side.value"
108
114
  @mousedown.prevent
109
115
  >
116
+ <div v-if="$slots.header" class="k-combobox-header">
117
+ <slot name="header" />
118
+ </div>
110
119
  <ul
111
120
  :id="listId"
112
121
  role="listbox"
@@ -136,6 +145,12 @@
136
145
  <Icon v-if="item.selected" name="check" />
137
146
  </span>
138
147
  <Icon v-if="item.kind === 'create'" name="plus" class="k-combobox-option-icon" />
148
+ <span
149
+ v-else-if="item.option.color && !item.option.icon"
150
+ class="k-combobox-option-dot"
151
+ :class="paletteClass(item.option.color)"
152
+ aria-hidden="true"
153
+ />
139
154
  <Icon
140
155
  v-else-if="item.option.icon"
141
156
  :name="item.option.icon"
@@ -210,6 +225,7 @@ import { normalizeSearch } from "../../internal/core/text";
210
225
  import { translateOr } from "../../locale";
211
226
  import { joinIds } from "../../internal/forms/control";
212
227
  import Icon from "../core/Icon.vue";
228
+ import { paletteClass } from "../core/palette";
213
229
  import FieldMessage from "../core/FieldMessage.vue";
214
230
  import Spinner from "../core/Spinner.vue";
215
231
  defineOptions({ inheritAttrs: false });
@@ -277,6 +293,11 @@ const activeIndex = ref(-1);
277
293
  const results = shallowRef([]);
278
294
  const searchedOnce = ref(false);
279
295
  const known = shallowReactive(/* @__PURE__ */ new Map());
296
+ watch(
297
+ () => props.options,
298
+ (options) => options.forEach(remember),
299
+ { immediate: true }
300
+ );
280
301
  const control = useFieldControl({
281
302
  invalid: () => props.invalid,
282
303
  disabled: () => props.disabled,
@@ -404,9 +425,16 @@ function optionId(index) {
404
425
  function remember(option) {
405
426
  known.set(keyOf(option.value), option);
406
427
  }
407
- function labelFor(value) {
428
+ function optionFor(value) {
408
429
  const key = keyOf(value);
409
- return known.get(key)?.label ?? props.options.find((option) => keyOf(option.value) === key)?.label ?? results.value.find((option) => keyOf(option.value) === key)?.label ?? key;
430
+ return props.options.find((option) => keyOf(option.value) === key) ?? results.value.find((option) => keyOf(option.value) === key) ?? known.get(key);
431
+ }
432
+ function labelFor(value) {
433
+ return optionFor(value)?.label ?? keyOf(value);
434
+ }
435
+ function tagClass(value) {
436
+ const color = optionFor(value)?.color;
437
+ return color ? ["is-colored", paletteClass(color)] : void 0;
410
438
  }
411
439
  function firstEnabled(from = 0, direction = 1) {
412
440
  return nextEnabledIndex(
@@ -55,6 +55,8 @@ declare const __VLS_export: <T extends string | number, M extends T | T[] | null
55
55
  }>) => void;
56
56
  attrs: any;
57
57
  slots: {
58
+ header?: (props: {}) => any;
59
+ } & {
58
60
  option?: (props: {
59
61
  option: ComboboxOption<T>;
60
62
  selected: boolean;
@@ -1,4 +1,5 @@
1
1
  import type { IconName } from '../../composables/useIcons';
2
+ import type { PaletteColor } from '../core/types';
2
3
  export type ChoiceValue = string | number | boolean | null;
3
4
  export type ChoiceOrientation = 'horizontal' | 'vertical';
4
5
  export interface ChoiceOption<T = ChoiceValue> {
@@ -28,6 +29,7 @@ export interface ComboboxOption<T = string | number> {
28
29
  description?: string;
29
30
  disabled?: boolean;
30
31
  icon?: IconName;
32
+ color?: PaletteColor;
31
33
  keywords?: string[];
32
34
  }
33
35
  export type ComboboxSearch<T = string | number> = (query: string, signal: AbortSignal) => Promise<ComboboxOption<T>[]> | ComboboxOption<T>[];
@@ -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
- v-else
19
- class="k-data-grid-badge"
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
- v-else
54
- class="k-data-grid-badge"
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?.[key] ?? key,
83
- tone: props.params.tones?.[key] ?? props.params.defaultTone ?? "neutral",
84
- badgeClass: typeof source === "function" ? source(raw, props.params.data) : source
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));
@@ -243,6 +243,10 @@
243
243
  --k-badge-tone: var(--k-info-text);
244
244
  }
245
245
 
246
+ .k-data-grid-badge-palette {
247
+ --k-badge-tone: var(--k-palette-text);
248
+ }
249
+
246
250
  .k-data-grid-image {
247
251
  display: inline-block;
248
252
  vertical-align: middle;
@@ -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
- labels?: Record<string, string>;
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;
@@ -59,6 +59,11 @@
59
59
  --k-badge-text: var(--k-info-text);
60
60
  }
61
61
 
62
+ .k-badge-palette {
63
+ --k-badge-tone: var(--k-palette);
64
+ --k-badge-text: var(--k-palette-text);
65
+ }
66
+
62
67
  .k-badge-accent {
63
68
  --k-badge-on-tone: var(--k-accent-contrast);
64
69
  }
@@ -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;
@@ -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);
@@ -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;
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xleddyl/443-components-vue",
3
- "version": "0.16.15",
3
+ "version": "0.16.16",
4
4
  "description": "Compact, scoped dashboard components for Vue and Nuxt",
5
5
  "license": "MIT",
6
6
  "author": "Edoardo Alberti (https://github.com/xleddyl)",