origam 2.44.0 → 2.45.0
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 +52 -0
- package/dist/src/assets/css/main.css +1 -1
- package/dist/src/assets/css/tokens/dark-pinned.css +3 -3
- package/dist/src/assets/css/tokens/dark-system.css +3 -3
- package/dist/src/assets/css/tokens/dark.css +6 -6
- package/dist/src/assets/css/tokens/light.css +3 -3
- package/dist/src/assets/scss/_ripple.scss +47 -0
- package/dist/src/assets/scss/main.scss +3 -0
- package/dist/src/assets/scss/tokens/_dark.scss +6 -6
- package/dist/src/assets/scss/tokens/_light.scss +3 -3
- package/dist/src/components/Audio/OrigamAudio.vue +1 -1
- package/dist/src/components/Chart/OrigamChartRadar.vue +1 -1
- package/dist/src/components/DataList/OrigamDataText.vue +1 -1
- package/dist/src/components/DataList/OrigamDataTitle.vue +1 -1
- package/dist/src/components/DatePicker/OrigamDatePickerControls.vue +1 -1
- package/dist/src/components/Drawer/OrigamDrawer.vue +65 -3
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanel.vue +6 -4
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanelContent.vue +1 -1
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanelHeader.vue +1 -1
- package/dist/src/components/List/OrigamListChildren.vue +1 -1
- package/dist/src/components/List/OrigamListItem.vue +5 -5
- package/dist/src/components/Video/OrigamVideo.vue +1 -1
- package/dist/src/composables/Commons/style.composable.cjs +3 -2
- package/dist/src/composables/Commons/style.composable.js +3 -2
- package/dist/src/consts/Commons/style.const.cjs +9 -0
- package/dist/src/consts/Commons/style.const.d.ts +26 -0
- package/dist/src/consts/Commons/style.const.js +3 -0
- package/dist/src/consts/index.cjs +11 -0
- package/dist/src/consts/index.d.ts +1 -0
- package/dist/src/consts/index.js +1 -0
- package/dist/src/interfaces/DataList/data-text.interface.d.ts +1 -1
- package/dist/src/interfaces/DataList/data-title.interface.d.ts +2 -2
- package/dist/src/interfaces/ExpansionPanel/expansion-panel.interface.d.ts +1 -0
- package/dist/src/themes/origam.theme.cjs +0 -2
- package/dist/src/themes/origam.theme.js +2 -2
- package/dist/src/utils/Commons/style.util.cjs +30 -0
- package/dist/src/utils/Commons/style.util.d.ts +18 -0
- package/dist/src/utils/Commons/style.util.js +23 -0
- package/dist/src/utils/index.cjs +11 -0
- package/dist/src/utils/index.d.ts +1 -0
- package/dist/src/utils/index.js +1 -0
- package/package.json +1 -1
|
@@ -268,7 +268,6 @@ const origamLightTheme = exports.origamLightTheme = {
|
|
|
268
268
|
},
|
|
269
269
|
"origam-chip": {
|
|
270
270
|
size: "small",
|
|
271
|
-
variant: "outlined",
|
|
272
271
|
color: "primary",
|
|
273
272
|
pill: true,
|
|
274
273
|
border: true,
|
|
@@ -682,7 +681,6 @@ const origamDarkTheme = exports.origamDarkTheme = {
|
|
|
682
681
|
},
|
|
683
682
|
"origam-chip": {
|
|
684
683
|
size: "small",
|
|
685
|
-
variant: "outlined",
|
|
686
684
|
color: "primary",
|
|
687
685
|
pill: true,
|
|
688
686
|
border: true,
|
|
@@ -172,7 +172,7 @@ export const origamLightTheme = {
|
|
|
172
172
|
"origam-btn-toggle": { variant: "text", size: "small" },
|
|
173
173
|
"origam-card": { tag: "div", density: "default", rounded: "lg", border: true },
|
|
174
174
|
"origam-checkbox": { density: "default" },
|
|
175
|
-
"origam-chip": { size: "small",
|
|
175
|
+
"origam-chip": { size: "small", color: "primary", pill: true, border: true, borderColor: "var(--origam-color__action--primary---bg)" },
|
|
176
176
|
"origam-clipboard": { tag: "span" },
|
|
177
177
|
"origam-code": { tag: "figure", rounded: "lg" },
|
|
178
178
|
"origam-color-picker-field": { density: "default", border: true, rounded: true },
|
|
@@ -342,7 +342,7 @@ export const origamDarkTheme = {
|
|
|
342
342
|
"origam-btn-toggle": { variant: "text", size: "small" },
|
|
343
343
|
"origam-card": { tag: "div", density: "default", rounded: "lg", border: true },
|
|
344
344
|
"origam-checkbox": { density: "default" },
|
|
345
|
-
"origam-chip": { size: "small",
|
|
345
|
+
"origam-chip": { size: "small", color: "primary", pill: true, border: true, borderColor: "var(--origam-color__action--primary---bg)" },
|
|
346
346
|
"origam-clipboard": { tag: "span" },
|
|
347
347
|
"origam-code": { tag: "figure", rounded: "lg" },
|
|
348
348
|
"origam-color-picker-field": { density: "default", border: true, rounded: true },
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.toSafeCssDeclaration = toSafeCssDeclaration;
|
|
7
|
+
exports.toSafeCssDeclarations = toSafeCssDeclarations;
|
|
8
|
+
var _style = require("../../consts/Commons/style.const.cjs");
|
|
9
|
+
function maskCssLiterals(value) {
|
|
10
|
+
return value.replace(_style.CSS_LITERAL_REGEX, literal => "_".repeat(literal.length));
|
|
11
|
+
}
|
|
12
|
+
function toSafeCssDeclaration(name, value) {
|
|
13
|
+
const safe = _style.CSS_PROPERTY_NAME_REGEX.test(name) && !_style.CSS_UNSAFE_VALUE_REGEX.test(maskCssLiterals(value));
|
|
14
|
+
return safe ? `${name}: ${value}` : null;
|
|
15
|
+
}
|
|
16
|
+
function toSafeCssDeclarations(style) {
|
|
17
|
+
const masked = maskCssLiterals(style);
|
|
18
|
+
const declarations = [];
|
|
19
|
+
let start = 0;
|
|
20
|
+
for (let end = 0; end <= masked.length; end++) {
|
|
21
|
+
if (end < masked.length && masked[end] !== ";") continue;
|
|
22
|
+
const colon = masked.indexOf(":", start);
|
|
23
|
+
if (colon !== -1 && colon < end) {
|
|
24
|
+
const declaration = toSafeCssDeclaration(style.slice(start, colon).trim(), style.slice(colon + 1, end).trim());
|
|
25
|
+
if (declaration) declarations.push(declaration);
|
|
26
|
+
}
|
|
27
|
+
start = end + 1;
|
|
28
|
+
}
|
|
29
|
+
return declarations;
|
|
30
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*********************************************************
|
|
2
|
+
* toSafeCssDeclaration (#1113)
|
|
3
|
+
*
|
|
4
|
+
* @description
|
|
5
|
+
* Returns `name: value` when both parts stay inside one declaration, `null`
|
|
6
|
+
* otherwise. The value is checked on its masked form, so `;` `{` `}` inside a
|
|
7
|
+
* quoted string or a `url(…)` body remain allowed.
|
|
8
|
+
********************************************************/
|
|
9
|
+
export declare function toSafeCssDeclaration(name: string, value: string): string | null;
|
|
10
|
+
/*********************************************************
|
|
11
|
+
* toSafeCssDeclarations (#1113)
|
|
12
|
+
*
|
|
13
|
+
* @description
|
|
14
|
+
* Splits an inline style STRING (`color: red; padding: 4px`) on the `;` that
|
|
15
|
+
* end a declaration — never on one inside a string or a `url(…)` body — and
|
|
16
|
+
* keeps only the declarations `toSafeCssDeclaration` accepts.
|
|
17
|
+
********************************************************/
|
|
18
|
+
export declare function toSafeCssDeclarations(style: string): string[];
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { CSS_LITERAL_REGEX, CSS_PROPERTY_NAME_REGEX, CSS_UNSAFE_VALUE_REGEX } from "../../consts/Commons/style.const.js";
|
|
2
|
+
function maskCssLiterals(value) {
|
|
3
|
+
return value.replace(CSS_LITERAL_REGEX, (literal) => "_".repeat(literal.length));
|
|
4
|
+
}
|
|
5
|
+
export function toSafeCssDeclaration(name, value) {
|
|
6
|
+
const safe = CSS_PROPERTY_NAME_REGEX.test(name) && !CSS_UNSAFE_VALUE_REGEX.test(maskCssLiterals(value));
|
|
7
|
+
return safe ? `${name}: ${value}` : null;
|
|
8
|
+
}
|
|
9
|
+
export function toSafeCssDeclarations(style) {
|
|
10
|
+
const masked = maskCssLiterals(style);
|
|
11
|
+
const declarations = [];
|
|
12
|
+
let start = 0;
|
|
13
|
+
for (let end = 0; end <= masked.length; end++) {
|
|
14
|
+
if (end < masked.length && masked[end] !== ";") continue;
|
|
15
|
+
const colon = masked.indexOf(":", start);
|
|
16
|
+
if (colon !== -1 && colon < end) {
|
|
17
|
+
const declaration = toSafeCssDeclaration(style.slice(start, colon).trim(), style.slice(colon + 1, end).trim());
|
|
18
|
+
if (declaration) declarations.push(declaration);
|
|
19
|
+
}
|
|
20
|
+
start = end + 1;
|
|
21
|
+
}
|
|
22
|
+
return declarations;
|
|
23
|
+
}
|
package/dist/src/utils/index.cjs
CHANGED
|
@@ -168,6 +168,17 @@ Object.keys(_ssrStyles).forEach(function (key) {
|
|
|
168
168
|
}
|
|
169
169
|
});
|
|
170
170
|
});
|
|
171
|
+
var _style = require("./Commons/style.util.cjs");
|
|
172
|
+
Object.keys(_style).forEach(function (key) {
|
|
173
|
+
if (key === "default" || key === "__esModule") return;
|
|
174
|
+
if (key in exports && exports[key] === _style[key]) return;
|
|
175
|
+
Object.defineProperty(exports, key, {
|
|
176
|
+
enumerable: true,
|
|
177
|
+
get: function () {
|
|
178
|
+
return _style[key];
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
});
|
|
171
182
|
var _layout = require("./Commons/layout.util.cjs");
|
|
172
183
|
Object.keys(_layout).forEach(function (key) {
|
|
173
184
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -13,6 +13,7 @@ export * from './Commons/date.util';
|
|
|
13
13
|
export * from './Commons/elevation.util';
|
|
14
14
|
export * from './Commons/getCurrentInstance.util';
|
|
15
15
|
export * from './Commons/ssr-styles.util';
|
|
16
|
+
export * from './Commons/style.util';
|
|
16
17
|
export * from './Commons/layout.util';
|
|
17
18
|
export * from './Commons/locale.util';
|
|
18
19
|
export * from './Commons/nuxt-icons.util';
|
package/dist/src/utils/index.js
CHANGED
|
@@ -13,6 +13,7 @@ export * from "./Commons/date.util.js";
|
|
|
13
13
|
export * from "./Commons/elevation.util.js";
|
|
14
14
|
export * from "./Commons/getCurrentInstance.util.js";
|
|
15
15
|
export * from "./Commons/ssr-styles.util.js";
|
|
16
|
+
export * from "./Commons/style.util.js";
|
|
16
17
|
export * from "./Commons/layout.util.js";
|
|
17
18
|
export * from "./Commons/locale.util.js";
|
|
18
19
|
export * from "./Commons/nuxt-icons.util.js";
|