origam 2.25.0 → 2.26.1
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/CHANGELOG.md +30 -0
- package/dist/src/assets/css/main.css +1 -1
- package/dist/src/assets/css/tokens/dark.css +2 -4
- package/dist/src/assets/css/tokens/light.css +1 -2
- package/dist/src/assets/scss/tokens/_dark.scss +2 -4
- package/dist/src/assets/scss/tokens/_light.scss +1 -2
- package/dist/src/components/Card/OrigamCard.vue +80 -13
- package/dist/src/components/DataTable/OrigamDataTable.vue +26 -1
- package/dist/src/components/DataTable/OrigamDataTableRows.vue +58 -12
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanel.vue +4 -2
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanelContent.vue +12 -3
- package/dist/src/components/Skeleton/OrigamSkeleton.vue +2 -7
- package/dist/src/enums/DataTable/data-table.enum.cjs +8 -2
- package/dist/src/enums/DataTable/data-table.enum.d.ts +16 -0
- package/dist/src/enums/DataTable/data-table.enum.js +6 -0
- package/dist/src/interfaces/Skeleton/skeleton.interface.d.ts +13 -0
- package/dist/src/types/tokens.type.d.ts +1 -1
- package/dist/src/utils/Commons/color.util.cjs +2 -0
- package/dist/src/utils/Commons/color.util.d.ts +7 -0
- package/dist/src/utils/Commons/color.util.js +2 -0
- package/dist/src/utils/DataTable/skeleton-cell.util.cjs +13 -0
- package/dist/src/utils/DataTable/skeleton-cell.util.d.ts +12 -0
- package/dist/src/utils/DataTable/skeleton-cell.util.js +7 -0
- package/dist/src/utils/Skeleton/skeleton.util.cjs +30 -0
- package/dist/src/utils/Skeleton/skeleton.util.d.ts +33 -0
- package/dist/src/utils/Skeleton/skeleton.util.js +23 -0
- package/dist/src/utils/index.cjs +22 -0
- package/dist/src/utils/index.d.ts +2 -0
- package/dist/src/utils/index.js +2 -0
- package/package.json +1 -1
|
@@ -408,7 +408,9 @@ function tokenForegroundForIntent(intent) {
|
|
|
408
408
|
}
|
|
409
409
|
const _warnedColorKeys = /* @__PURE__ */new Set();
|
|
410
410
|
function warnLegacyColor(kind, value) {
|
|
411
|
+
if (!process.env?.DEV) return;
|
|
411
412
|
if (typeof console === "undefined") return;
|
|
413
|
+
if (/^\s*(?:var|color-mix)\(/i.test(value)) return;
|
|
412
414
|
const key = `${kind}::${value}`;
|
|
413
415
|
if (_warnedColorKeys.has(key)) return;
|
|
414
416
|
_warnedColorKeys.add(key);
|
|
@@ -470,6 +470,13 @@ export declare function tokenForegroundForIntent(intent: TIntent): string;
|
|
|
470
470
|
* Warn (once per prop / value) that the consumer passed a raw CSS color
|
|
471
471
|
* to a prop where the design system expects a `TIntent`. Raw color
|
|
472
472
|
* support is deprecated and will be removed in v3.0.0.
|
|
473
|
+
*
|
|
474
|
+
* @description
|
|
475
|
+
* Dev-only (`import.meta.env.DEV`, same gate as `warnUnsupportedProp`), so
|
|
476
|
+
* the message is tree-shaken from production bundles. `var(--x)` and
|
|
477
|
+
* `color-mix(...)` are NOT raw colors: they are the migration path the DS
|
|
478
|
+
* recommends (token reference / derived from tokens) and are rendered
|
|
479
|
+
* through the custom-value channel without any warning.
|
|
473
480
|
********************************************************/
|
|
474
481
|
export declare function warnLegacyColor(kind: 'color' | 'bgColor', value: string): void;
|
|
475
482
|
/*********************************************************
|
|
@@ -314,7 +314,9 @@ export function tokenForegroundForIntent(intent) {
|
|
|
314
314
|
}
|
|
315
315
|
const _warnedColorKeys = /* @__PURE__ */ new Set();
|
|
316
316
|
export function warnLegacyColor(kind, value) {
|
|
317
|
+
if (!import.meta.env?.DEV) return;
|
|
317
318
|
if (typeof console === "undefined") return;
|
|
319
|
+
if (/^\s*(?:var|color-mix)\(/i.test(value)) return;
|
|
318
320
|
const key = `${kind}::${value}`;
|
|
319
321
|
if (_warnedColorKeys.has(key)) return;
|
|
320
322
|
_warnedColorKeys.add(key);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getSkeletonCellShape = getSkeletonCellShape;
|
|
7
|
+
var _align = require("../../enums/Commons/align.enum.cjs");
|
|
8
|
+
var _dataTable = require("../../enums/DataTable/data-table.enum.cjs");
|
|
9
|
+
function getSkeletonCellShape(column) {
|
|
10
|
+
if (column.key === "data-table-select" || column.key === "data-table-expand") return _dataTable.DATATABLE_SKELETON_CELL.CONTROL;
|
|
11
|
+
if (column.align === _align.ALIGN.END) return _dataTable.DATATABLE_SKELETON_CELL.END;
|
|
12
|
+
return _dataTable.DATATABLE_SKELETON_CELL.TEXT;
|
|
13
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DATATABLE_SKELETON_CELL } from '../../enums/DataTable/data-table.enum';
|
|
2
|
+
import type { IInternalDataTableHeader } from '../../interfaces/DataTable/data-table-header.interface';
|
|
3
|
+
/*********************************************************
|
|
4
|
+
* getSkeletonCellShape
|
|
5
|
+
*
|
|
6
|
+
* @description
|
|
7
|
+
* Which silhouette a placeholder cell draws for `column`. The descriptor
|
|
8
|
+
* has no "type", so the shape is read from what it does carry: the
|
|
9
|
+
* reserved `data-table-select` / `data-table-expand` keys are controls,
|
|
10
|
+
* an `align: 'end'` column holds figures, anything else is text.
|
|
11
|
+
********************************************************/
|
|
12
|
+
export declare function getSkeletonCellShape(column: Pick<IInternalDataTableHeader, 'key' | 'align'>): DATATABLE_SKELETON_CELL;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ALIGN } from "../../enums/Commons/align.enum.js";
|
|
2
|
+
import { DATATABLE_SKELETON_CELL } from "../../enums/DataTable/data-table.enum.js";
|
|
3
|
+
export function getSkeletonCellShape(column) {
|
|
4
|
+
if (column.key === "data-table-select" || column.key === "data-table-expand") return DATATABLE_SKELETON_CELL.CONTROL;
|
|
5
|
+
if (column.align === ALIGN.END) return DATATABLE_SKELETON_CELL.END;
|
|
6
|
+
return DATATABLE_SKELETON_CELL.TEXT;
|
|
7
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getSkeletonHostClasses = getSkeletonHostClasses;
|
|
7
|
+
exports.splitSkeletonOverrides = splitSkeletonOverrides;
|
|
8
|
+
var _skeleton = require("../../enums/Skeleton/skeleton.enum.cjs");
|
|
9
|
+
function getSkeletonHostClasses(animation) {
|
|
10
|
+
return ["origam--skeleton", {
|
|
11
|
+
"origam--skeleton-wave": animation === _skeleton.SKELETON_ANIMATION.WAVE,
|
|
12
|
+
"origam--skeleton-none": animation === _skeleton.SKELETON_ANIMATION.NONE
|
|
13
|
+
}];
|
|
14
|
+
}
|
|
15
|
+
function splitSkeletonOverrides(overrides, loadingText) {
|
|
16
|
+
const o = overrides ?? {};
|
|
17
|
+
const group = {
|
|
18
|
+
animation: o.animation,
|
|
19
|
+
label: o.label ?? loadingText
|
|
20
|
+
};
|
|
21
|
+
const block = {
|
|
22
|
+
color: o.color,
|
|
23
|
+
bgColor: o.bgColor,
|
|
24
|
+
rounded: o.rounded
|
|
25
|
+
};
|
|
26
|
+
return {
|
|
27
|
+
group,
|
|
28
|
+
block
|
|
29
|
+
};
|
|
30
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { TSkeletonAnimation } from '../../types/Skeleton/skeleton.type';
|
|
2
|
+
import type { ISkeletonOverrides } from '../../interfaces/Skeleton/skeleton.interface';
|
|
3
|
+
/*********************************************************
|
|
4
|
+
* getSkeletonHostClasses
|
|
5
|
+
*
|
|
6
|
+
* @description
|
|
7
|
+
* The classes that turn ANY element into a placeholder (`.origam--skeleton`
|
|
8
|
+
* and its animation modifier, see `origam-utilities.css`). Shared by
|
|
9
|
+
* `<OrigamSkeleton>` and by the hosts that paint themselves without adding
|
|
10
|
+
* a node (the placeholder `<td>` of `<OrigamDataTableRows>`), so the
|
|
11
|
+
* mapping animation -> class exists once.
|
|
12
|
+
********************************************************/
|
|
13
|
+
export declare function getSkeletonHostClasses(animation: TSkeletonAnimation | undefined): Array<string | Record<string, boolean>>;
|
|
14
|
+
/*********************************************************
|
|
15
|
+
* splitSkeletonOverrides
|
|
16
|
+
*
|
|
17
|
+
* @description
|
|
18
|
+
* `loading="{ type: 'skeleton', ... }"` carries ONE bag of
|
|
19
|
+
* `Partial<ISkeletonProps>`. A container that composes several primitives
|
|
20
|
+
* inside an `<OrigamSkeletonGroup>` has two targets for it, and the
|
|
21
|
+
* boundary is the same everywhere:
|
|
22
|
+
*
|
|
23
|
+
* - the GROUP owns what is per zone: `animation` (one clock) and `label`
|
|
24
|
+
* (the one announcement). `loadingText` is the default label, an explicit
|
|
25
|
+
* `label` in the bag wins.
|
|
26
|
+
* - every PRIMITIVE owns what is per block: `color`, `bgColor`, `rounded`.
|
|
27
|
+
*
|
|
28
|
+
* @description
|
|
29
|
+
* `variant`, `loading`, the dimension props and `size` are deliberately
|
|
30
|
+
* dropped: they describe ONE block's silhouette, and applying one value to
|
|
31
|
+
* every primitive of a composed silhouette would flatten it.
|
|
32
|
+
********************************************************/
|
|
33
|
+
export declare function splitSkeletonOverrides(overrides: unknown, loadingText?: string): ISkeletonOverrides;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { SKELETON_ANIMATION } from "../../enums/Skeleton/skeleton.enum.js";
|
|
2
|
+
export function getSkeletonHostClasses(animation) {
|
|
3
|
+
return [
|
|
4
|
+
"origam--skeleton",
|
|
5
|
+
{
|
|
6
|
+
"origam--skeleton-wave": animation === SKELETON_ANIMATION.WAVE,
|
|
7
|
+
"origam--skeleton-none": animation === SKELETON_ANIMATION.NONE
|
|
8
|
+
}
|
|
9
|
+
];
|
|
10
|
+
}
|
|
11
|
+
export function splitSkeletonOverrides(overrides, loadingText) {
|
|
12
|
+
const o = overrides ?? {};
|
|
13
|
+
const group = {
|
|
14
|
+
animation: o.animation,
|
|
15
|
+
label: o.label ?? loadingText
|
|
16
|
+
};
|
|
17
|
+
const block = {
|
|
18
|
+
color: o.color,
|
|
19
|
+
bgColor: o.bgColor,
|
|
20
|
+
rounded: o.rounded
|
|
21
|
+
};
|
|
22
|
+
return { group, block };
|
|
23
|
+
}
|
package/dist/src/utils/index.cjs
CHANGED
|
@@ -25,6 +25,17 @@ Object.keys(_snackbarGroup).forEach(function (key) {
|
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
27
|
});
|
|
28
|
+
var _skeleton = require("./Skeleton/skeleton.util.cjs");
|
|
29
|
+
Object.keys(_skeleton).forEach(function (key) {
|
|
30
|
+
if (key === "default" || key === "__esModule") return;
|
|
31
|
+
if (key in exports && exports[key] === _skeleton[key]) return;
|
|
32
|
+
Object.defineProperty(exports, key, {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () {
|
|
35
|
+
return _skeleton[key];
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
});
|
|
28
39
|
var _a11y = require("./Commons/a11y.util.cjs");
|
|
29
40
|
Object.keys(_a11y).forEach(function (key) {
|
|
30
41
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -641,6 +652,17 @@ Object.keys(_slotName).forEach(function (key) {
|
|
|
641
652
|
}
|
|
642
653
|
});
|
|
643
654
|
});
|
|
655
|
+
var _skeletonCell = require("./DataTable/skeleton-cell.util.cjs");
|
|
656
|
+
Object.keys(_skeletonCell).forEach(function (key) {
|
|
657
|
+
if (key === "default" || key === "__esModule") return;
|
|
658
|
+
if (key in exports && exports[key] === _skeletonCell[key]) return;
|
|
659
|
+
Object.defineProperty(exports, key, {
|
|
660
|
+
enumerable: true,
|
|
661
|
+
get: function () {
|
|
662
|
+
return _skeletonCell[key];
|
|
663
|
+
}
|
|
664
|
+
});
|
|
665
|
+
});
|
|
644
666
|
var _fuzzyMatch = require("./CommandPalette/fuzzy-match.util.cjs");
|
|
645
667
|
Object.keys(_fuzzyMatch).forEach(function (key) {
|
|
646
668
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './Media/format-time.util';
|
|
2
2
|
export * from './Snackbar/snackbar-group.util';
|
|
3
|
+
export * from './Skeleton/skeleton.util';
|
|
3
4
|
export * from './Commons/a11y.util';
|
|
4
5
|
export * from './Commons/anchor.util';
|
|
5
6
|
export * from './Commons/border.util';
|
|
@@ -56,6 +57,7 @@ export * from './DataTable/items.util';
|
|
|
56
57
|
export * from './DataTable/sort.util';
|
|
57
58
|
export * from './DataTable/group.util';
|
|
58
59
|
export * from './DataTable/slot-name.util';
|
|
60
|
+
export * from './DataTable/skeleton-cell.util';
|
|
59
61
|
export * from './CommandPalette/fuzzy-match.util';
|
|
60
62
|
export * from './Code/parse-highlight-lines.util';
|
|
61
63
|
export * from './TextareaField/sanitize-html.util';
|
package/dist/src/utils/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from "./Media/format-time.util.js";
|
|
2
2
|
export * from "./Snackbar/snackbar-group.util.js";
|
|
3
|
+
export * from "./Skeleton/skeleton.util.js";
|
|
3
4
|
export * from "./Commons/a11y.util.js";
|
|
4
5
|
export * from "./Commons/anchor.util.js";
|
|
5
6
|
export * from "./Commons/border.util.js";
|
|
@@ -56,6 +57,7 @@ export * from "./DataTable/items.util.js";
|
|
|
56
57
|
export * from "./DataTable/sort.util.js";
|
|
57
58
|
export * from "./DataTable/group.util.js";
|
|
58
59
|
export * from "./DataTable/slot-name.util.js";
|
|
60
|
+
export * from "./DataTable/skeleton-cell.util.js";
|
|
59
61
|
export * from "./CommandPalette/fuzzy-match.util.js";
|
|
60
62
|
export * from "./Code/parse-highlight-lines.util.js";
|
|
61
63
|
export * from "./TextareaField/sanitize-html.util.js";
|