origam 2.43.0 → 2.44.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.
Files changed (76) hide show
  1. package/CHANGELOG.md +116 -0
  2. package/dist/src/assets/css/main.css +1 -1
  3. package/dist/src/assets/css/tokens/dark-pinned.css +5 -1
  4. package/dist/src/assets/css/tokens/dark-system.css +5 -1
  5. package/dist/src/assets/css/tokens/dark.css +10 -2
  6. package/dist/src/assets/css/tokens/light.css +5 -1
  7. package/dist/src/assets/locales/en.json +3 -0
  8. package/dist/src/assets/locales/fr.json +3 -0
  9. package/dist/src/assets/scss/tokens/_dark.scss +10 -2
  10. package/dist/src/assets/scss/tokens/_light.scss +5 -1
  11. package/dist/src/components/Audio/OrigamAudio.vue +1 -1
  12. package/dist/src/components/Btn/OrigamBtn.vue +31 -10
  13. package/dist/src/components/Chart/OrigamChartRadar.vue +1 -1
  14. package/dist/src/components/ColorPickerField/OrigamColorPickerField.vue +3 -5
  15. package/dist/src/components/ConfirmWrapper/OrigamConfirmWrapper.vue +0 -1
  16. package/dist/src/components/DataTable/OrigamDataTableFooter.vue +3 -1
  17. package/dist/src/components/DataTable/OrigamDataTableHeaderCell.vue +20 -2
  18. package/dist/src/components/DatePicker/OrigamDatePickerControls.vue +1 -1
  19. package/dist/src/components/DatePickerField/OrigamDatePickerField.vue +3 -5
  20. package/dist/src/components/Drawer/OrigamDrawer.vue +65 -3
  21. package/dist/src/components/ExpansionPanel/OrigamExpansionPanel.vue +6 -4
  22. package/dist/src/components/ExpansionPanel/OrigamExpansionPanelContent.vue +1 -1
  23. package/dist/src/components/ExpansionPanel/OrigamExpansionPanelHeader.vue +1 -1
  24. package/dist/src/components/Field/OrigamField.vue +17 -7
  25. package/dist/src/components/FileField/OrigamFileField.vue +3 -3
  26. package/dist/src/components/Form/OrigamForm.vue +0 -1
  27. package/dist/src/components/Input/OrigamInput.vue +0 -1
  28. package/dist/src/components/List/OrigamListChildren.vue +1 -1
  29. package/dist/src/components/Messages/OrigamMessages.vue +1 -1
  30. package/dist/src/components/NumberField/OrigamNumberField.vue +13 -5
  31. package/dist/src/components/OtpInputField/OrigamOtpInputField.vue +8 -5
  32. package/dist/src/components/PasswordField/OrigamPasswordField.vue +3 -3
  33. package/dist/src/components/Select/OrigamSelect.vue +22 -5
  34. package/dist/src/components/Stepper/OrigamStepper.vue +22 -1
  35. package/dist/src/components/Stepper/OrigamStepperItem.vue +46 -21
  36. package/dist/src/components/TextField/OrigamTextField.vue +3 -3
  37. package/dist/src/components/TextareaField/OrigamTextareaField.vue +3 -3
  38. package/dist/src/components/Toolbar/OrigamToolbar.vue +1 -1
  39. package/dist/src/components/Video/OrigamVideo.vue +1 -1
  40. package/dist/src/composables/Commons/adjacentInner.composable.cjs +17 -3
  41. package/dist/src/composables/Commons/adjacentInner.composable.d.ts +5 -3
  42. package/dist/src/composables/Commons/adjacentInner.composable.js +18 -4
  43. package/dist/src/composables/Commons/link.composable.cjs +6 -5
  44. package/dist/src/composables/Commons/link.composable.js +6 -5
  45. package/dist/src/composables/Commons/popup-dialog-aria.composable.cjs +26 -0
  46. package/dist/src/composables/Commons/popup-dialog-aria.composable.d.ts +23 -0
  47. package/dist/src/composables/Commons/popup-dialog-aria.composable.js +17 -0
  48. package/dist/src/composables/Commons/stack.composable.cjs +2 -19
  49. package/dist/src/composables/Commons/stack.composable.d.ts +1 -1
  50. package/dist/src/composables/Commons/stack.composable.js +3 -20
  51. package/dist/src/composables/Commons/style.composable.cjs +3 -2
  52. package/dist/src/composables/Commons/style.composable.js +3 -2
  53. package/dist/src/composables/index.cjs +12 -0
  54. package/dist/src/composables/index.d.ts +1 -0
  55. package/dist/src/composables/index.js +1 -0
  56. package/dist/src/consts/Commons/style.const.cjs +9 -0
  57. package/dist/src/consts/Commons/style.const.d.ts +26 -0
  58. package/dist/src/consts/Commons/style.const.js +3 -0
  59. package/dist/src/consts/index.cjs +11 -0
  60. package/dist/src/consts/index.d.ts +1 -0
  61. package/dist/src/consts/index.js +1 -0
  62. package/dist/src/directives/Contrast/contrast.directive.cjs +5 -1
  63. package/dist/src/directives/Contrast/contrast.directive.js +5 -1
  64. package/dist/src/interfaces/ExpansionPanel/expansion-panel.interface.d.ts +1 -0
  65. package/dist/src/interfaces/Stepper/stepper-item.interface.d.ts +11 -2
  66. package/dist/src/interfaces/Stepper/stepper.interface.d.ts +7 -0
  67. package/dist/src/themes/origam.theme.cjs +0 -2
  68. package/dist/src/themes/origam.theme.js +2 -2
  69. package/dist/src/types/tokens.type.d.ts +1 -1
  70. package/dist/src/utils/Commons/style.util.cjs +30 -0
  71. package/dist/src/utils/Commons/style.util.d.ts +18 -0
  72. package/dist/src/utils/Commons/style.util.js +23 -0
  73. package/dist/src/utils/index.cjs +11 -0
  74. package/dist/src/utils/index.d.ts +1 -0
  75. package/dist/src/utils/index.js +1 -0
  76. package/package.json +1 -1
@@ -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
+ }
@@ -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';
@@ -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";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "origam",
3
- "version": "2.43.0",
3
+ "version": "2.44.1",
4
4
  "type": "module",
5
5
  "description": "origam — a Vue 3 design system with multi-theme design tokens, CSS-first components and TypeScript types.",
6
6
  "keywords": [