origam 2.40.0 → 2.41.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 +33 -0
- package/dist/src/components/Breadcrumb/OrigamBreadcrumb.vue +2 -1
- package/dist/src/components/Chart/OrigamChartCartesian.vue +1 -2
- package/dist/src/components/Code/OrigamCode.vue +5 -16
- package/dist/src/components/DataTable/OrigamDataTable.vue +4 -5
- package/dist/src/components/Dialog/OrigamDialog.vue +3 -10
- package/dist/src/components/Drawer/OrigamDrawer.vue +4 -2
- package/dist/src/components/Grids/OrigamRow.vue +8 -11
- package/dist/src/components/Img/OrigamImg.vue +1 -0
- package/dist/src/components/Media/OrigamMediaController.vue +3 -2
- package/dist/src/components/Overlay/OrigamOverlay.vue +3 -4
- package/dist/src/components/Transition/OrigamTranslateScale.vue +4 -1
- package/dist/src/components/Window/OrigamWindow.vue +2 -3
- package/dist/src/composables/Commons/accessibleCommand.composable.cjs +2 -1
- package/dist/src/composables/Commons/accessibleCommand.composable.js +2 -1
- package/dist/src/composables/Commons/backButton.composable.cjs +14 -18
- package/dist/src/composables/Commons/backButton.composable.d.ts +4 -2
- package/dist/src/composables/Commons/backButton.composable.js +14 -18
- package/dist/src/composables/Commons/backgroundColor.composable.cjs +7 -3
- package/dist/src/composables/Commons/backgroundColor.composable.js +6 -3
- package/dist/src/composables/Commons/bothColor.composable.cjs +6 -2
- package/dist/src/composables/Commons/bothColor.composable.js +7 -4
- package/dist/src/composables/Commons/colorEffect.composable.cjs +2 -1
- package/dist/src/composables/Commons/colorEffect.composable.js +3 -1
- package/dist/src/composables/Commons/createLayout.composable.cjs +3 -2
- package/dist/src/composables/Commons/createLayout.composable.js +3 -2
- package/dist/src/composables/Commons/cssSupportClient.composable.d.ts +2 -1
- package/dist/src/composables/Commons/dragResizer.composable.cjs +7 -10
- package/dist/src/composables/Commons/dragResizer.composable.d.ts +2 -2
- package/dist/src/composables/Commons/dragResizer.composable.js +7 -10
- package/dist/src/composables/Commons/elevation.composable.cjs +2 -1
- package/dist/src/composables/Commons/elevation.composable.js +2 -1
- package/dist/src/composables/Commons/loader.composable.cjs +2 -2
- package/dist/src/composables/Commons/loader.composable.js +1 -1
- package/dist/src/composables/Commons/locationStrategies.composable.d.ts +1 -1
- package/dist/src/composables/Commons/passedProps.composable.cjs +1 -1
- package/dist/src/composables/Commons/passedProps.composable.js +1 -1
- package/dist/src/composables/Commons/status.composable.cjs +4 -4
- package/dist/src/composables/Commons/status.composable.js +1 -1
- package/dist/src/composables/Commons/textColor.composable.cjs +7 -3
- package/dist/src/composables/Commons/textColor.composable.js +6 -3
- package/dist/src/composables/Commons/touch.composable.cjs +17 -1
- package/dist/src/composables/Commons/touch.composable.js +17 -1
- package/dist/src/composables/DataTable/headers.composable.d.ts +12 -12
- package/dist/src/composables/Icon/icon.composable.cjs +0 -7
- package/dist/src/composables/Icon/icon.composable.d.ts +0 -17
- package/dist/src/composables/Icon/icon.composable.js +0 -4
- package/dist/src/composables/Icon/iconsFull.composable.cjs +14 -0
- package/dist/src/composables/Icon/iconsFull.composable.d.ts +16 -0
- package/dist/src/composables/Icon/iconsFull.composable.js +6 -0
- package/dist/src/composables/Parallax/parallax.composable.cjs +2 -10
- package/dist/src/composables/Parallax/parallax.composable.js +2 -10
- package/dist/src/composables/index.cjs +12 -0
- package/dist/src/composables/index.d.ts +1 -0
- package/dist/src/composables/index.js +1 -0
- package/dist/src/consts/Commons/anchor.const.cjs +6 -6
- package/dist/src/consts/Commons/anchor.const.js +1 -1
- package/dist/src/consts/Commons/border.const.cjs +18 -13
- package/dist/src/consts/Commons/border.const.d.ts +1 -1
- package/dist/src/consts/Commons/border.const.js +7 -2
- package/dist/src/consts/Commons/color.const.cjs +3 -3
- package/dist/src/consts/Commons/color.const.js +1 -1
- package/dist/src/consts/Commons/density.const.cjs +2 -2
- package/dist/src/consts/Commons/density.const.js +1 -1
- package/dist/src/consts/Commons/dimension.const.cjs +2 -2
- package/dist/src/consts/Commons/dimension.const.js +1 -1
- package/dist/src/consts/Commons/rounded.const.cjs +2 -2
- package/dist/src/consts/Commons/rounded.const.js +1 -1
- package/dist/src/consts/Commons/size.const.cjs +2 -2
- package/dist/src/consts/Commons/size.const.js +1 -1
- package/dist/src/consts/Commons/spacing.const.cjs +26 -25
- package/dist/src/consts/Commons/spacing.const.js +2 -1
- package/dist/src/consts/TextField/text-field.const.d.ts +1 -2
- package/dist/src/consts/TextField/text-field.const.js +1 -2
- package/dist/src/directives/Contrast/contrast.directive.cjs +1 -1
- package/dist/src/directives/Contrast/contrast.directive.js +1 -1
- package/dist/src/enums/BottomNav/bottom-nav.enum.cjs +4 -5
- package/dist/src/enums/BottomNav/bottom-nav.enum.js +4 -5
- package/dist/src/interfaces/Blockquote/blockquote.interface.d.ts +1 -1
- package/dist/src/interfaces/Chart/chart-map.interface.d.ts +5 -4
- package/dist/src/interfaces/Commons/activator.interface.d.ts +1 -1
- package/dist/src/interfaces/Parallax/parallax.interface.d.ts +3 -2
- package/dist/src/origam-core.cjs +1 -1
- package/dist/src/origam-core.js +1 -1
- package/dist/src/types/Grids/row.type.d.ts +2 -1
- package/dist/src/types/Parallax/parallax.type.d.ts +1 -2
- package/dist/src/types/TextField/text-field.type.d.ts +2 -1
- package/dist/src/utils/Commons/anchor.util.cjs +2 -2
- package/dist/src/utils/Commons/anchor.util.d.ts +1 -1
- package/dist/src/utils/Commons/anchor.util.js +1 -1
- package/dist/src/utils/Commons/animation.util.cjs +7 -4
- package/dist/src/utils/Commons/animation.util.js +4 -1
- package/dist/src/utils/Commons/commons.util.cjs +5 -5
- package/dist/src/utils/Commons/commons.util.js +1 -1
- package/dist/src/utils/Commons/location.util.cjs +5 -5
- package/dist/src/utils/Commons/location.util.js +1 -1
- package/dist/src/utils/Commons/nested.util.cjs +3 -1
- package/dist/src/utils/Commons/nested.util.js +4 -1
- package/dist/src/utils/Commons/spacing.util.cjs +1 -1
- package/dist/src/utils/Commons/spacing.util.js +1 -1
- package/dist/src/utils/Commons/token-name.util.cjs +9 -6
- package/dist/src/utils/Commons/token-name.util.js +9 -6
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.SRGB_REVERSE_TRANSFORM = exports.SRGB_REVERSE_MATRIX = exports.SRGB_FORWARD_TRANSFORM = exports.SRGB_FORWARD_MATRIX = exports.SCALE_W_O_B = exports.SCALE_B_O_W = exports.REV_TXT = exports.REV_BG = exports.RCO = exports.NORM_TXT = exports.NORM_BG = exports.MAIN_TRC = exports.LO_CON_THRESH = exports.LO_CON_OFFSET = exports.LO_CON_FACTOR = exports.LO_CLIP = exports.GCO = exports.CSS_NAMED_COLORS = exports.CSS_COLOR_REGEX = exports.COLOR_UTILITY_INTENTS = exports.COLOR_MAPPERS = exports.COLOR_INTENTS = exports.COLOR_HOVER_MIX_PCT = exports.COLOR_DELTA_Y_MIN = exports.COLOR_DELTA = exports.COLOR_ACTIVE_MIX_PCT = exports.CIELAB_REVERSE_TRANSFORM = exports.CIELAB_FORWARD_TRANSFORM = exports.BLK_THRS = exports.BLK_CLMP = exports.BCO = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _intent = require("../../enums/Commons/intent.enum.cjs");
|
|
8
8
|
var _color = require("../../utils/Commons/color.util.cjs");
|
|
9
9
|
const CSS_COLOR_REGEX = exports.CSS_COLOR_REGEX = /^(?<fn>(?:rgb|hsl)a?)\((?<values>.+)\)/;
|
|
10
10
|
const CSS_NAMED_COLORS = exports.CSS_NAMED_COLORS = /* @__PURE__ */new Set(["aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige", "bisque", "black", "blanchedalmond", "blue", "blueviolet", "brown", "burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflowerblue", "cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod", "darkgray", "darkgreen", "darkgrey", "darkkhaki", "darkmagenta", "darkolivegreen", "darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen", "darkslateblue", "darkslategray", "darkslategrey", "darkturquoise", "darkviolet", "deeppink", "deepskyblue", "dimgray", "dimgrey", "dodgerblue", "firebrick", "floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite", "gold", "goldenrod", "gray", "green", "greenyellow", "grey", "honeydew", "hotpink", "indianred", "indigo", "ivory", "khaki", "lavender", "lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral", "lightcyan", "lightgoldenrodyellow", "lightgray", "lightgreen", "lightgrey", "lightpink", "lightsalmon", "lightseagreen", "lightskyblue", "lightslategray", "lightslategrey", "lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta", "maroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple", "mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise", "mediumvioletred", "midnightblue", "mintcream", "mistyrose", "moccasin", "navajowhite", "navy", "oldlace", "olive", "olivedrab", "orange", "orangered", "orchid", "palegoldenrod", "palegreen", "paleturquoise", "palevioletred", "papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue", "purple", "rebeccapurple", "red", "rosybrown", "royalblue", "saddlebrown", "salmon", "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue", "slateblue", "slategray", "slategrey", "snow", "springgreen", "steelblue", "tan", "teal", "thistle", "tomato", "turquoise", "violet", "wheat", "white", "whitesmoke", "yellow", "yellowgreen",
|
|
@@ -60,8 +60,8 @@ exports.CIELAB_FORWARD_TRANSFORM = CIELAB_FORWARD_TRANSFORM;
|
|
|
60
60
|
const CIELAB_REVERSE_TRANSFORM = t => t > COLOR_DELTA ? t ** 3 : 3 * COLOR_DELTA ** 2 * (t - 4 / 29);
|
|
61
61
|
exports.CIELAB_REVERSE_TRANSFORM = CIELAB_REVERSE_TRANSFORM;
|
|
62
62
|
const MAIN_TRC = exports.MAIN_TRC = 2.4;
|
|
63
|
-
const COLOR_INTENTS = exports.COLOR_INTENTS = new Set(Object.values(
|
|
64
|
-
const COLOR_UTILITY_INTENTS = exports.COLOR_UTILITY_INTENTS = new Set(Object.values(
|
|
63
|
+
const COLOR_INTENTS = exports.COLOR_INTENTS = new Set(Object.values(_intent.INTENT));
|
|
64
|
+
const COLOR_UTILITY_INTENTS = exports.COLOR_UTILITY_INTENTS = new Set(Object.values(_intent.INTENT).filter(intent => intent !== _intent.INTENT.GHOST));
|
|
65
65
|
const COLOR_HOVER_MIX_PCT = exports.COLOR_HOVER_MIX_PCT = 20;
|
|
66
66
|
const COLOR_ACTIVE_MIX_PCT = exports.COLOR_ACTIVE_MIX_PCT = 30;
|
|
67
67
|
const RCO = exports.RCO = 0.2126729;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { INTENT } from "../../enums/
|
|
1
|
+
import { INTENT } from "../../enums/Commons/intent.enum.js";
|
|
2
2
|
import { HSLtoRGB, HSVtoRGB } from "../../utils/Commons/color.util.js";
|
|
3
3
|
export const CSS_COLOR_REGEX = /^(?<fn>(?:rgb|hsl)a?)\((?<values>.+)\)/;
|
|
4
4
|
export const CSS_NAMED_COLORS = /* @__PURE__ */ new Set([
|
|
@@ -4,5 +4,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.PREDEFINED_DENSITY = void 0;
|
|
7
|
-
var
|
|
8
|
-
const PREDEFINED_DENSITY = exports.PREDEFINED_DENSITY = [
|
|
7
|
+
var _density = require("../../enums/Commons/density.enum.cjs");
|
|
8
|
+
const PREDEFINED_DENSITY = exports.PREDEFINED_DENSITY = [_density.DENSITY.DEFAULT, _density.DENSITY.COMPACT, _density.DENSITY.COMFORTABLE];
|
|
@@ -4,5 +4,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.DIMENSIONS_ARRAY = void 0;
|
|
7
|
-
var
|
|
8
|
-
const DIMENSIONS_ARRAY = exports.DIMENSIONS_ARRAY = [
|
|
7
|
+
var _dimension = require("../../enums/Commons/dimension.enum.cjs");
|
|
8
|
+
const DIMENSIONS_ARRAY = exports.DIMENSIONS_ARRAY = [_dimension.DIMENSIONS.HEIGHT, _dimension.DIMENSIONS.MAX_HEIGHT, _dimension.DIMENSIONS.MAX_WIDTH, _dimension.DIMENSIONS.MIN_HEIGHT, _dimension.DIMENSIONS.MIN_WIDTH, _dimension.DIMENSIONS.WIDTH];
|
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.PREDIFINED_ROUNDED = exports.PREDEFINED_ROUNDED = exports.CUSTOM_BORDER_RADIUS_REGEX = exports.BORDER_RADIUS_REGEX = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _rounded = require("../../enums/Commons/rounded.enum.cjs");
|
|
8
8
|
const BORDER_RADIUS_REGEX = exports.BORDER_RADIUS_REGEX = /^(?<radius>(?: ?(?:0|(?:[0-9]+(?:\.[0-9]+)?)(?:px|pt|PC|in|cm|mm|em|rem|%|ex|ch|fr))){0,4})$/;
|
|
9
9
|
const CUSTOM_BORDER_RADIUS_REGEX = exports.CUSTOM_BORDER_RADIUS_REGEX = /^(?:var|calc|clamp|min|max|env)\(.*\)$|^-?(?:0|[0-9]*\.?[0-9]+)(?:px|pt|pc|in|cm|mm|q|em|rem|ex|ch|cap|ic|lh|rlh|vw|vh|vi|vb|vmin|vmax|%)$/i;
|
|
10
|
-
const PREDEFINED_ROUNDED = exports.PREDEFINED_ROUNDED = [
|
|
10
|
+
const PREDEFINED_ROUNDED = exports.PREDEFINED_ROUNDED = [_rounded.ROUNDED.X_SMALL, _rounded.ROUNDED.SMALL, _rounded.ROUNDED.DEFAULT, _rounded.ROUNDED.MEDIUM, _rounded.ROUNDED.LARGE, _rounded.ROUNDED.X_LARGE, _rounded.ROUNDED.SHAPED, _rounded.ROUNDED.SHAPED_INVERT];
|
|
11
11
|
const PREDIFINED_ROUNDED = exports.PREDIFINED_ROUNDED = PREDEFINED_ROUNDED;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ROUNDED } from "../../enums/
|
|
1
|
+
import { ROUNDED } from "../../enums/Commons/rounded.enum.js";
|
|
2
2
|
export const BORDER_RADIUS_REGEX = /^(?<radius>(?: ?(?:0|(?:[0-9]+(?:\.[0-9]+)?)(?:px|pt|PC|in|cm|mm|em|rem|%|ex|ch|fr))){0,4})$/;
|
|
3
3
|
export const CUSTOM_BORDER_RADIUS_REGEX = /^(?:var|calc|clamp|min|max|env)\(.*\)$|^-?(?:0|[0-9]*\.?[0-9]+)(?:px|pt|pc|in|cm|mm|q|em|rem|ex|ch|cap|ic|lh|rlh|vw|vh|vi|vb|vmin|vmax|%)$/i;
|
|
4
4
|
export const PREDEFINED_ROUNDED = [
|
|
@@ -4,5 +4,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.SIZES_ARRAY = void 0;
|
|
7
|
-
var
|
|
8
|
-
const SIZES_ARRAY = exports.SIZES_ARRAY = [
|
|
7
|
+
var _size = require("../../enums/Commons/size.enum.cjs");
|
|
8
|
+
const SIZES_ARRAY = exports.SIZES_ARRAY = [_size.SIZES.X_SMALL, _size.SIZES.SMALL, _size.SIZES.DEFAULT, _size.SIZES.LARGE, _size.SIZES.X_LARGE];
|
|
@@ -4,72 +4,73 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.UTILITY_RADIUS_FALLBACK = exports.SPACING_SCALE_STEPS = exports.ROUNDED_LOGICAL_CORNER_MAP = exports.ROUNDED_CORNER_MAP = exports.PADDING_POSITION_MAP = exports.PADDING_LOGICAL_SIDE_MAP = exports.PADDING_LOGICAL_AXIS_MAP = exports.NAMED_RADIUS_TOKEN = exports.MARGIN_POSITION_MAP = exports.MARGIN_LOGICAL_SIDE_MAP = exports.MARGIN_LOGICAL_AXIS_MAP = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _anchor = require("../../enums/Commons/anchor.enum.cjs");
|
|
8
|
+
var _border = require("../../enums/Commons/border.enum.cjs");
|
|
8
9
|
const SPACING_SCALE_STEPS = exports.SPACING_SCALE_STEPS = ["0", "1", "2", "3", "4", "5", "6", "8", "10", "12"];
|
|
9
10
|
const PADDING_POSITION_MAP = exports.PADDING_POSITION_MAP = [{
|
|
10
|
-
side:
|
|
11
|
+
side: _anchor.BLOCK.TOP,
|
|
11
12
|
prop: "paddingTop"
|
|
12
13
|
}, {
|
|
13
|
-
side:
|
|
14
|
+
side: _anchor.INLINE.RIGHT,
|
|
14
15
|
prop: "paddingRight"
|
|
15
16
|
}, {
|
|
16
|
-
side:
|
|
17
|
+
side: _anchor.BLOCK.BOTTOM,
|
|
17
18
|
prop: "paddingBottom"
|
|
18
19
|
}, {
|
|
19
|
-
side:
|
|
20
|
+
side: _anchor.INLINE.LEFT,
|
|
20
21
|
prop: "paddingLeft"
|
|
21
22
|
}];
|
|
22
23
|
const PADDING_LOGICAL_AXIS_MAP = exports.PADDING_LOGICAL_AXIS_MAP = [{
|
|
23
|
-
axis:
|
|
24
|
+
axis: _border.BORDER_LOGICAL_AXIS.BLOCK,
|
|
24
25
|
prop: "paddingBlock"
|
|
25
26
|
}, {
|
|
26
|
-
axis:
|
|
27
|
+
axis: _border.BORDER_LOGICAL_AXIS.INLINE,
|
|
27
28
|
prop: "paddingInline"
|
|
28
29
|
}];
|
|
29
30
|
const PADDING_LOGICAL_SIDE_MAP = exports.PADDING_LOGICAL_SIDE_MAP = [{
|
|
30
|
-
side: `${
|
|
31
|
+
side: `${_border.BORDER_LOGICAL_AXIS.BLOCK}-${_anchor.START_END.START}`,
|
|
31
32
|
prop: "paddingBlockStart"
|
|
32
33
|
}, {
|
|
33
|
-
side: `${
|
|
34
|
+
side: `${_border.BORDER_LOGICAL_AXIS.BLOCK}-${_anchor.START_END.END}`,
|
|
34
35
|
prop: "paddingBlockEnd"
|
|
35
36
|
}, {
|
|
36
|
-
side: `${
|
|
37
|
+
side: `${_border.BORDER_LOGICAL_AXIS.INLINE}-${_anchor.START_END.START}`,
|
|
37
38
|
prop: "paddingInlineStart"
|
|
38
39
|
}, {
|
|
39
|
-
side: `${
|
|
40
|
+
side: `${_border.BORDER_LOGICAL_AXIS.INLINE}-${_anchor.START_END.END}`,
|
|
40
41
|
prop: "paddingInlineEnd"
|
|
41
42
|
}];
|
|
42
43
|
const MARGIN_POSITION_MAP = exports.MARGIN_POSITION_MAP = [{
|
|
43
|
-
side:
|
|
44
|
+
side: _anchor.BLOCK.TOP,
|
|
44
45
|
prop: "marginTop"
|
|
45
46
|
}, {
|
|
46
|
-
side:
|
|
47
|
+
side: _anchor.INLINE.RIGHT,
|
|
47
48
|
prop: "marginRight"
|
|
48
49
|
}, {
|
|
49
|
-
side:
|
|
50
|
+
side: _anchor.BLOCK.BOTTOM,
|
|
50
51
|
prop: "marginBottom"
|
|
51
52
|
}, {
|
|
52
|
-
side:
|
|
53
|
+
side: _anchor.INLINE.LEFT,
|
|
53
54
|
prop: "marginLeft"
|
|
54
55
|
}];
|
|
55
56
|
const MARGIN_LOGICAL_AXIS_MAP = exports.MARGIN_LOGICAL_AXIS_MAP = [{
|
|
56
|
-
axis:
|
|
57
|
+
axis: _border.BORDER_LOGICAL_AXIS.BLOCK,
|
|
57
58
|
prop: "marginBlock"
|
|
58
59
|
}, {
|
|
59
|
-
axis:
|
|
60
|
+
axis: _border.BORDER_LOGICAL_AXIS.INLINE,
|
|
60
61
|
prop: "marginInline"
|
|
61
62
|
}];
|
|
62
63
|
const MARGIN_LOGICAL_SIDE_MAP = exports.MARGIN_LOGICAL_SIDE_MAP = [{
|
|
63
|
-
side: `${
|
|
64
|
+
side: `${_border.BORDER_LOGICAL_AXIS.BLOCK}-${_anchor.START_END.START}`,
|
|
64
65
|
prop: "marginBlockStart"
|
|
65
66
|
}, {
|
|
66
|
-
side: `${
|
|
67
|
+
side: `${_border.BORDER_LOGICAL_AXIS.BLOCK}-${_anchor.START_END.END}`,
|
|
67
68
|
prop: "marginBlockEnd"
|
|
68
69
|
}, {
|
|
69
|
-
side: `${
|
|
70
|
+
side: `${_border.BORDER_LOGICAL_AXIS.INLINE}-${_anchor.START_END.START}`,
|
|
70
71
|
prop: "marginInlineStart"
|
|
71
72
|
}, {
|
|
72
|
-
side: `${
|
|
73
|
+
side: `${_border.BORDER_LOGICAL_AXIS.INLINE}-${_anchor.START_END.END}`,
|
|
73
74
|
prop: "marginInlineEnd"
|
|
74
75
|
}];
|
|
75
76
|
const ROUNDED_CORNER_MAP = exports.ROUNDED_CORNER_MAP = [{
|
|
@@ -86,16 +87,16 @@ const ROUNDED_CORNER_MAP = exports.ROUNDED_CORNER_MAP = [{
|
|
|
86
87
|
prop: "roundedBottomRight"
|
|
87
88
|
}];
|
|
88
89
|
const ROUNDED_LOGICAL_CORNER_MAP = exports.ROUNDED_LOGICAL_CORNER_MAP = [{
|
|
89
|
-
corner: `${
|
|
90
|
+
corner: `${_anchor.START_END.START}-${_anchor.START_END.START}`,
|
|
90
91
|
prop: "roundedStartStart"
|
|
91
92
|
}, {
|
|
92
|
-
corner: `${
|
|
93
|
+
corner: `${_anchor.START_END.START}-${_anchor.START_END.END}`,
|
|
93
94
|
prop: "roundedStartEnd"
|
|
94
95
|
}, {
|
|
95
|
-
corner: `${
|
|
96
|
+
corner: `${_anchor.START_END.END}-${_anchor.START_END.START}`,
|
|
96
97
|
prop: "roundedEndStart"
|
|
97
98
|
}, {
|
|
98
|
-
corner: `${
|
|
99
|
+
corner: `${_anchor.START_END.END}-${_anchor.START_END.END}`,
|
|
99
100
|
prop: "roundedEndEnd"
|
|
100
101
|
}];
|
|
101
102
|
const NAMED_RADIUS_TOKEN = exports.NAMED_RADIUS_TOKEN = {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { BLOCK,
|
|
1
|
+
import { BLOCK, INLINE, START_END } from "../../enums/Commons/anchor.enum.js";
|
|
2
|
+
import { BORDER_LOGICAL_AXIS } from "../../enums/Commons/border.enum.js";
|
|
2
3
|
export const SPACING_SCALE_STEPS = [
|
|
3
4
|
"0",
|
|
4
5
|
"1",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { IMaskOptions } from '../../interfaces/Commons/mask.interface';
|
|
2
|
-
import type { TBuiltInPattern } from '../../types/TextField/text-field.type';
|
|
3
|
-
import type { TTextFieldType } from '../../types/TextField/text-field.type';
|
|
2
|
+
import type { TBuiltInPattern, TTextFieldType } from '../../types/TextField/text-field.type';
|
|
4
3
|
export declare const ACTIVE_TEXT_FIELD_TYPE: Partial<Array<TTextFieldType>>;
|
|
5
4
|
export declare const INPUT_TEXT_FIELD_TYPE: Partial<Array<TTextFieldType>>;
|
|
6
5
|
/**
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { BUILT_IN_PATTERN, PATTERN_VALIDATOR } from "../../enums/index.js";
|
|
2
|
-
import { TEXT_FIELD_TYPE } from "../../enums/index.js";
|
|
1
|
+
import { BUILT_IN_PATTERN, PATTERN_VALIDATOR, TEXT_FIELD_TYPE } from "../../enums/index.js";
|
|
3
2
|
export const ACTIVE_TEXT_FIELD_TYPE = [
|
|
4
3
|
TEXT_FIELD_TYPE.COLOR,
|
|
5
4
|
TEXT_FIELD_TYPE.FILE,
|
|
@@ -35,7 +35,7 @@ function srgbToRgb(color) {
|
|
|
35
35
|
return a < 1 ? `rgba(${r}, ${g}, ${b}, ${a})` : `rgb(${r}, ${g}, ${b})`;
|
|
36
36
|
}
|
|
37
37
|
function hexToRgb(hex) {
|
|
38
|
-
const m =
|
|
38
|
+
const m = /^#([0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.exec(hex);
|
|
39
39
|
if (!m) return null;
|
|
40
40
|
const h = m[1].length <= 4 ? [...m[1]].map(c => c + c).join("") : m[1];
|
|
41
41
|
const r = parseInt(h.slice(0, 2), 16);
|
|
@@ -23,7 +23,7 @@ function srgbToRgb(color) {
|
|
|
23
23
|
return a < 1 ? `rgba(${r}, ${g}, ${b}, ${a})` : `rgb(${r}, ${g}, ${b})`;
|
|
24
24
|
}
|
|
25
25
|
function hexToRgb(hex) {
|
|
26
|
-
const m =
|
|
26
|
+
const m = /^#([0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.exec(hex);
|
|
27
27
|
if (!m) return null;
|
|
28
28
|
const h = m[1].length <= 4 ? [...m[1]].map((c) => c + c).join("") : m[1];
|
|
29
29
|
const r = parseInt(h.slice(0, 2), 16);
|
|
@@ -4,10 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.BOTTOM_NAV_POSITION = void 0;
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
BOTTOM_NAV_POSITION2[
|
|
10
|
-
BOTTOM_NAV_POSITION2[
|
|
11
|
-
BOTTOM_NAV_POSITION2[BOTTOM_NAV_POSITION2["END"] = _align.ALIGN.END] = "END";
|
|
7
|
+
var BOTTOM_NAV_POSITION = exports.BOTTOM_NAV_POSITION = /* @__PURE__ */(BOTTOM_NAV_POSITION2 => {
|
|
8
|
+
BOTTOM_NAV_POSITION2["START"] = "start";
|
|
9
|
+
BOTTOM_NAV_POSITION2["CENTER"] = "center";
|
|
10
|
+
BOTTOM_NAV_POSITION2["END"] = "end";
|
|
12
11
|
return BOTTOM_NAV_POSITION2;
|
|
13
12
|
})(BOTTOM_NAV_POSITION || {});
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
BOTTOM_NAV_POSITION2[
|
|
4
|
-
BOTTOM_NAV_POSITION2[
|
|
5
|
-
BOTTOM_NAV_POSITION2[BOTTOM_NAV_POSITION2["END"] = ALIGN.END] = "END";
|
|
1
|
+
export var BOTTOM_NAV_POSITION = /* @__PURE__ */ ((BOTTOM_NAV_POSITION2) => {
|
|
2
|
+
BOTTOM_NAV_POSITION2["START"] = "start";
|
|
3
|
+
BOTTOM_NAV_POSITION2["CENTER"] = "center";
|
|
4
|
+
BOTTOM_NAV_POSITION2["END"] = "end";
|
|
6
5
|
return BOTTOM_NAV_POSITION2;
|
|
7
6
|
})(BOTTOM_NAV_POSITION || {});
|
|
@@ -27,7 +27,7 @@ import type { TBlockquoteAlign, TBlockquoteLang, TBlockquoteVariant } from '../.
|
|
|
27
27
|
* The two axes are meant to contrast: a dark body (`color`) reads against
|
|
28
28
|
* a coloured accent (`accentColor`).
|
|
29
29
|
*
|
|
30
|
-
*
|
|
30
|
+
* Deprecated prop `bgColor` — renamed to `accentColor` (see ROADMAP.md,
|
|
31
31
|
* "Renommer `bgColor` → `accentColor`"). `bgColor` keeps working as an
|
|
32
32
|
* alias (`accentColor ?? bgColor`, `accentColor` wins) and warns once via
|
|
33
33
|
* `warnDeprecatedProp`. Removal targeted for v3.0.0. Only Blockquote
|
|
@@ -3,6 +3,7 @@ import type { IChartPoint } from './chart-point.interface';
|
|
|
3
3
|
import type { IChartSeries } from './chart-series.interface';
|
|
4
4
|
import type { TChartMapMode } from '../../types/Chart/chart-map.type';
|
|
5
5
|
import type { TIntent } from '../../types/Commons/intent.type';
|
|
6
|
+
import type { TAnyString } from '../../types/Commons/commons.type';
|
|
6
7
|
/**
|
|
7
8
|
* A single choropleth data point keyed by ISO-3166-1 alpha-2 code.
|
|
8
9
|
*/
|
|
@@ -25,7 +26,7 @@ export interface IChartMapRouteDatum {
|
|
|
25
26
|
/** Optional flow weight — drives the stroke width via `Math.log(value + 1) * 1.5`. */
|
|
26
27
|
value?: number;
|
|
27
28
|
/** Overrides `lineColor` for this route specifically. */
|
|
28
|
-
color?: TIntent |
|
|
29
|
+
color?: TIntent | TAnyString;
|
|
29
30
|
}
|
|
30
31
|
/**
|
|
31
32
|
* Internal country descriptor produced by the map geometry engine.
|
|
@@ -103,20 +104,20 @@ export interface IChartMapProps extends IChartBaseProps {
|
|
|
103
104
|
* own background. Swapping the default would trade an adaptive
|
|
104
105
|
* behaviour for a fixed one, not just move a pixel.
|
|
105
106
|
*/
|
|
106
|
-
defaultCountryFill?: TIntent |
|
|
107
|
+
defaultCountryFill?: TIntent | TAnyString;
|
|
107
108
|
/**
|
|
108
109
|
* Stroke colour applied to all country path outlines.
|
|
109
110
|
* Supports intent names and raw CSS strings, resolved the same way as
|
|
110
111
|
* `lineColor` (#411 — was a hardcoded literal the theme could not reach).
|
|
111
112
|
* Default `'neutral'`.
|
|
112
113
|
*/
|
|
113
|
-
borderColor?: TIntent |
|
|
114
|
+
borderColor?: TIntent | TAnyString;
|
|
114
115
|
/**
|
|
115
116
|
* Default stroke colour for flight-route arcs.
|
|
116
117
|
* Overridden per route via `IChartMapRouteDatum.color`.
|
|
117
118
|
* Default `'primary'`.
|
|
118
119
|
*/
|
|
119
|
-
lineColor?: TIntent |
|
|
120
|
+
lineColor?: TIntent | TAnyString;
|
|
120
121
|
/**
|
|
121
122
|
* Radius in SVG pixels of the endpoint circles on each route.
|
|
122
123
|
* Default `4`.
|
|
@@ -2,7 +2,7 @@ import type { ComponentPublicInstance } from 'vue';
|
|
|
2
2
|
import type { IDelayProps } from './delay.interface';
|
|
3
3
|
import type { TAnyString } from '../../types/Commons/commons.type';
|
|
4
4
|
export interface IActivatorProps extends IDelayProps {
|
|
5
|
-
target?: 'parent' | 'cursor' | TAnyString | Element | ComponentPublicInstance | [x: number, y: number]
|
|
5
|
+
target?: 'parent' | 'cursor' | TAnyString | Element | ComponentPublicInstance | [x: number, y: number];
|
|
6
6
|
activator?: 'parent' | 'cursor' | TAnyString | Element | ComponentPublicInstance;
|
|
7
7
|
activatorProps?: any;
|
|
8
8
|
openOnClick?: boolean;
|
|
@@ -12,6 +12,7 @@ import type { IUseAudioProps } from '../Commons/audio.interface';
|
|
|
12
12
|
import type { TParallaxDirection, TParallaxEasing, TParallaxEvent } from '../../types/Parallax/parallax.type';
|
|
13
13
|
import type { TPoint } from '../../types/Commons/point.type';
|
|
14
14
|
import type { Ref } from 'vue';
|
|
15
|
+
import type { TAnyString } from '../../types/Commons/commons.type';
|
|
15
16
|
/*********************************************************
|
|
16
17
|
* IParallaxProps
|
|
17
18
|
*
|
|
@@ -119,7 +120,7 @@ export interface IParallaxProvide {
|
|
|
119
120
|
*/
|
|
120
121
|
export interface IParallaxLayerProvide {
|
|
121
122
|
direction: Ref<TParallaxDirection>;
|
|
122
|
-
easing: Ref<TParallaxEasing |
|
|
123
|
+
easing: Ref<TParallaxEasing | TAnyString>;
|
|
123
124
|
disabled: Ref<boolean>;
|
|
124
125
|
/**
|
|
125
126
|
* Live scroll progress, normalised to `[0, 1]`. `0` = host just entered
|
|
@@ -167,7 +168,7 @@ export interface IParallaxLayerProvide {
|
|
|
167
168
|
export interface IUseParallaxRuntimeOptions {
|
|
168
169
|
target: Ref<HTMLElement | undefined>;
|
|
169
170
|
direction: Ref<TParallaxDirection>;
|
|
170
|
-
easing: Ref<TParallaxEasing |
|
|
171
|
+
easing: Ref<TParallaxEasing | TAnyString>;
|
|
171
172
|
threshold: Ref<number>;
|
|
172
173
|
disabled: Ref<boolean>;
|
|
173
174
|
/**
|
package/dist/src/origam-core.cjs
CHANGED
|
@@ -56,7 +56,7 @@ function createOrigamCore(origam = {}) {
|
|
|
56
56
|
const allThemes = [...suppliedThemes];
|
|
57
57
|
const installedThemes = (0, _utils.installedThemesFromList)(allThemes);
|
|
58
58
|
const defaultsRef = (0, _composables.createDefaults)({});
|
|
59
|
-
defaultsRef.value = activeDefaultsFor(allThemes, allThemes[0]?.name ?? ""
|
|
59
|
+
defaultsRef.value = activeDefaultsFor(allThemes, allThemes[0]?.name ?? "");
|
|
60
60
|
const themedKeysUnion = (0, _composables.themedPropKeysUnion)(allThemes.map(theme => theme.components).filter(components2 => !!components2));
|
|
61
61
|
const variantPresets = (0, _composables.resolveVariantPresetRegistry)(_consts.VARIANT_PRESETS, allThemes.map(theme => theme.variants).filter(variants => !!variants));
|
|
62
62
|
const scope = (0, _vue.effectScope)();
|
package/dist/src/origam-core.js
CHANGED
|
@@ -67,7 +67,7 @@ export function createOrigamCore(origam = {}) {
|
|
|
67
67
|
const allThemes = [...suppliedThemes];
|
|
68
68
|
const installedThemes = installedThemesFromList(allThemes);
|
|
69
69
|
const defaultsRef = createDefaults({});
|
|
70
|
-
defaultsRef.value = activeDefaultsFor(allThemes, allThemes[0]?.name ?? ""
|
|
70
|
+
defaultsRef.value = activeDefaultsFor(allThemes, allThemes[0]?.name ?? "");
|
|
71
71
|
const themedKeysUnion = themedPropKeysUnion(
|
|
72
72
|
allThemes.map((theme) => theme.components).filter((components2) => !!components2)
|
|
73
73
|
);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import OrigamRow from '../../components/Grids/OrigamRow.vue';
|
|
2
|
+
import type { TAnyString } from '../Commons/commons.type';
|
|
2
3
|
import { FLEX_DIRECTION, ROW_GUTTER } from '../../enums/Grids/row.enum';
|
|
3
4
|
export type TFlexDirection = `${FLEX_DIRECTION}`;
|
|
4
5
|
/*********************************************************
|
|
@@ -18,5 +19,5 @@ export type TRowGutterRung = `${ROW_GUTTER}`;
|
|
|
18
19
|
* libre par une declaration en ligne — meme partage que `color` /
|
|
19
20
|
* `rounded` ailleurs dans le DS.
|
|
20
21
|
********************************************************/
|
|
21
|
-
export type TRowGutter = TRowGutterRung |
|
|
22
|
+
export type TRowGutter = TRowGutterRung | TAnyString | number;
|
|
22
23
|
export type TOrigamRow = InstanceType<typeof OrigamRow>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { PARALLAX_DIRECTION, PARALLAX_EASING } from '../../enums/Parallax/parallax.enum';
|
|
1
|
+
import { PARALLAX_DIRECTION, PARALLAX_EASING, PARALLAX_EVENT } from '../../enums/Parallax/parallax.enum';
|
|
2
2
|
import OrigamParallax from '../../components/Parallax/OrigamParallax.vue';
|
|
3
|
-
import { PARALLAX_EVENT } from '../../enums/Parallax/parallax.enum';
|
|
4
3
|
export type TParallaxDirection = `${PARALLAX_DIRECTION}`;
|
|
5
4
|
export type TParallaxEasing = `${PARALLAX_EASING}`;
|
|
6
5
|
export type TParallaxEvent = `${PARALLAX_EVENT}`;
|
|
@@ -2,6 +2,7 @@ import type { BUILT_IN_PATTERN, PATTERN_VALIDATOR } from '../../enums/TextField/
|
|
|
2
2
|
import type { IMaskOptions } from '../../interfaces/Commons/mask.interface';
|
|
3
3
|
import OrigamTextField from '../../components/TextField/OrigamTextField.vue';
|
|
4
4
|
import { MASK_TOKEN_KIND, TEXT_FIELD_TYPE } from '../../enums/TextField/text-field.enum';
|
|
5
|
+
import type { TAnyString } from '../Commons/commons.type';
|
|
5
6
|
export type TTextFieldType = `${TEXT_FIELD_TYPE}`;
|
|
6
7
|
export type TOrigamTextField = InstanceType<typeof OrigamTextField>;
|
|
7
8
|
/**
|
|
@@ -16,7 +17,7 @@ export type TBuiltInPattern = typeof BUILT_IN_PATTERN[keyof typeof BUILT_IN_PATT
|
|
|
16
17
|
* pattern string (with `#`, `A`, `*`, literals), or a full
|
|
17
18
|
* options object.
|
|
18
19
|
*/
|
|
19
|
-
export type TMask = TBuiltInPattern |
|
|
20
|
+
export type TMask = TBuiltInPattern | TAnyString | IMaskOptions | null;
|
|
20
21
|
/**
|
|
21
22
|
* Token kinds recognised by the in-house token-walker.
|
|
22
23
|
*
|
|
@@ -9,7 +9,7 @@ exports.flipSide = flipSide;
|
|
|
9
9
|
exports.getAxis = getAxis;
|
|
10
10
|
exports.parseAnchor = parseAnchor;
|
|
11
11
|
var _anchor = require("../../consts/Commons/anchor.const.cjs");
|
|
12
|
-
var
|
|
12
|
+
var _drag = require("../../enums/Commons/drag.enum.cjs");
|
|
13
13
|
function parseAnchor(anchor) {
|
|
14
14
|
const [side, initialAlign] = anchor.split(" ");
|
|
15
15
|
const align = !initialAlign ? _anchor.BLOCK_ARRAY.includes(side) ? "left" : _anchor.INLINE_ARRAY.includes(side) ? "top" : "center" : initialAlign;
|
|
@@ -49,5 +49,5 @@ function flipCorner(anchor) {
|
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
51
|
function getAxis(anchor) {
|
|
52
|
-
return _anchor.BLOCK_ARRAY.includes(anchor.side) ?
|
|
52
|
+
return _anchor.BLOCK_ARRAY.includes(anchor.side) ? _drag.AXIS.Y : _drag.AXIS.X;
|
|
53
53
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BLOCK_ARRAY, INLINE_ARRAY } from "../../consts/Commons/anchor.const.js";
|
|
2
|
-
import { AXIS } from "../../enums/
|
|
2
|
+
import { AXIS } from "../../enums/Commons/drag.enum.js";
|
|
3
3
|
export function parseAnchor(anchor) {
|
|
4
4
|
const [side, initialAlign] = anchor.split(" ");
|
|
5
5
|
const align = !initialAlign ? BLOCK_ARRAY.includes(side) ? "left" : INLINE_ARRAY.includes(side) ? "top" : "center" : initialAlign;
|
|
@@ -54,10 +54,13 @@ function animate(el, keyframes, options) {
|
|
|
54
54
|
if (typeof el.animate === "undefined") return {
|
|
55
55
|
finished: Promise.resolve()
|
|
56
56
|
};
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
let resolvedOptions = options;
|
|
58
|
+
if (prefersReducedMotion()) {
|
|
59
|
+
resolvedOptions = options == null || typeof options === "number" ? _commons.REDUCED_MOTION_ANIMATION_DURATION : {
|
|
60
|
+
...options,
|
|
61
|
+
duration: _commons.REDUCED_MOTION_ANIMATION_DURATION
|
|
62
|
+
};
|
|
63
|
+
}
|
|
61
64
|
let animation;
|
|
62
65
|
try {
|
|
63
66
|
animation = el.animate(keyframes, resolvedOptions);
|
|
@@ -39,7 +39,10 @@ export function nullifyTransforms(el) {
|
|
|
39
39
|
}
|
|
40
40
|
export function animate(el, keyframes, options) {
|
|
41
41
|
if (typeof el.animate === "undefined") return { finished: Promise.resolve() };
|
|
42
|
-
|
|
42
|
+
let resolvedOptions = options;
|
|
43
|
+
if (prefersReducedMotion()) {
|
|
44
|
+
resolvedOptions = options == null || typeof options === "number" ? REDUCED_MOTION_ANIMATION_DURATION : { ...options, duration: REDUCED_MOTION_ANIMATION_DURATION };
|
|
45
|
+
}
|
|
43
46
|
let animation;
|
|
44
47
|
try {
|
|
45
48
|
animation = el.animate(keyframes, resolvedOptions);
|
|
@@ -54,7 +54,7 @@ exports.tryOnScopeDispose = tryOnScopeDispose;
|
|
|
54
54
|
exports.wrapInArray = wrapInArray;
|
|
55
55
|
var _vue = require("vue");
|
|
56
56
|
var _commons = require("../../consts/Commons/commons.const.cjs");
|
|
57
|
-
var
|
|
57
|
+
var _commons2 = require("../../enums/Commons/commons.enum.cjs");
|
|
58
58
|
var _getCurrentInstance = require("./getCurrentInstance.util.cjs");
|
|
59
59
|
function convertToUnit(str, unit = "px") {
|
|
60
60
|
if (str == null || str === "") {
|
|
@@ -261,15 +261,15 @@ function focusChild(el, location) {
|
|
|
261
261
|
if (el === document.activeElement || !el.contains(document.activeElement)) {
|
|
262
262
|
focusable[0]?.focus();
|
|
263
263
|
}
|
|
264
|
-
} else if (location ===
|
|
264
|
+
} else if (location === _commons2.FOCUS_LOCATION.FIRST) {
|
|
265
265
|
focusable[0]?.focus();
|
|
266
|
-
} else if (location ===
|
|
266
|
+
} else if (location === _commons2.FOCUS_LOCATION.LAST) {
|
|
267
267
|
focusable.at(-1)?.focus();
|
|
268
268
|
} else if (typeof location === "number") {
|
|
269
269
|
focusable[location]?.focus();
|
|
270
270
|
} else {
|
|
271
271
|
const _el = getNextElement(focusable, location);
|
|
272
|
-
if (_el) _el.focus();else focusChild(el, location ===
|
|
272
|
+
if (_el) _el.focus();else focusChild(el, location === _commons2.FOCUS_LOCATION.NEXT ? _commons2.FOCUS_LOCATION.FIRST : _commons2.FOCUS_LOCATION.LAST);
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
275
|
function focusableChildren(el, filterByTabIndex = true) {
|
|
@@ -279,7 +279,7 @@ function focusableChildren(el, filterByTabIndex = true) {
|
|
|
279
279
|
function getNextElement(elements, location, condition) {
|
|
280
280
|
let _el;
|
|
281
281
|
let idx = elements.indexOf(document.activeElement);
|
|
282
|
-
const inc = location ===
|
|
282
|
+
const inc = location === _commons2.FOCUS_LOCATION.NEXT ? 1 : -1;
|
|
283
283
|
do {
|
|
284
284
|
idx += inc;
|
|
285
285
|
_el = elements[idx];
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
watchEffect
|
|
14
14
|
} from "vue";
|
|
15
15
|
import { IN_BROWSER, ON_REGEX } from "../../consts/Commons/commons.const.js";
|
|
16
|
-
import { FOCUS_LOCATION } from "../../enums/
|
|
16
|
+
import { FOCUS_LOCATION } from "../../enums/Commons/commons.enum.js";
|
|
17
17
|
import { getLifeCycleTarget } from "./getCurrentInstance.util.js";
|
|
18
18
|
export function convertToUnit(str, unit = "px") {
|
|
19
19
|
if (str == null || str === "") {
|
|
@@ -10,7 +10,7 @@ exports.pixelCeil = pixelCeil;
|
|
|
10
10
|
exports.pixelRound = pixelRound;
|
|
11
11
|
exports.staticLocationStrategy = staticLocationStrategy;
|
|
12
12
|
var _vue = require("vue");
|
|
13
|
-
var
|
|
13
|
+
var _drag = require("../../enums/Commons/drag.enum.cjs");
|
|
14
14
|
var _box = require("../../classes/Commons/box.class.cjs");
|
|
15
15
|
var _anchor = require("./anchor.util.cjs");
|
|
16
16
|
var _animation = require("./animation.util.cjs");
|
|
@@ -210,8 +210,8 @@ function connectedLocationStrategy(data, props, contentStyles) {
|
|
|
210
210
|
const hasOverflowX = overflows.x.before || overflows.x.after;
|
|
211
211
|
const hasOverflowY = overflows.y.before || overflows.y.after;
|
|
212
212
|
let reset = false;
|
|
213
|
-
[
|
|
214
|
-
if (key ===
|
|
213
|
+
[_drag.AXIS.X, _drag.AXIS.Y].forEach(key => {
|
|
214
|
+
if (key === _drag.AXIS.X && hasOverflowX && !flipped.x || key === _drag.AXIS.Y && hasOverflowY && !flipped.y) {
|
|
215
215
|
const newPlacement = {
|
|
216
216
|
anchor: {
|
|
217
217
|
...placement.anchor
|
|
@@ -220,7 +220,7 @@ function connectedLocationStrategy(data, props, contentStyles) {
|
|
|
220
220
|
...placement.origin
|
|
221
221
|
}
|
|
222
222
|
};
|
|
223
|
-
const flip = key ===
|
|
223
|
+
const flip = key === _drag.AXIS.X ? axis2 === _drag.AXIS.Y ? _anchor.flipAlign : _anchor.flipSide : axis2 === _drag.AXIS.Y ? _anchor.flipSide : _anchor.flipAlign;
|
|
224
224
|
newPlacement.anchor = flip(newPlacement.anchor);
|
|
225
225
|
newPlacement.origin = flip(newPlacement.origin);
|
|
226
226
|
const {
|
|
@@ -268,7 +268,7 @@ function connectedLocationStrategy(data, props, contentStyles) {
|
|
|
268
268
|
top: (0, _commons.convertToUnit)(pixelRound(y)),
|
|
269
269
|
left: (0, _commons.convertToUnit)(pixelRound(x)),
|
|
270
270
|
right: void 0,
|
|
271
|
-
minWidth: (0, _commons.convertToUnit)(axis ===
|
|
271
|
+
minWidth: (0, _commons.convertToUnit)(axis === _drag.AXIS.Y ? Math.min(minWidth.value, targetBox.width) : minWidth.value),
|
|
272
272
|
maxWidth: (0, _commons.convertToUnit)(pixelCeil((0, _commons.clamp)(available.x, minWidth.value === Infinity ? 0 : minWidth.value, maxWidth.value))),
|
|
273
273
|
maxHeight: (0, _commons.convertToUnit)(pixelCeil((0, _commons.clamp)(available.y, minHeight.value === Infinity ? 0 : minHeight.value, maxHeight.value)))
|
|
274
274
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed, nextTick, onScopeDispose, watch } from "vue";
|
|
2
|
-
import { AXIS } from "../../enums/
|
|
2
|
+
import { AXIS } from "../../enums/Commons/drag.enum.js";
|
|
3
3
|
import { Box } from "../../classes/Commons/box.class.js";
|
|
4
4
|
import { flipAlign, flipCorner, flipSide, getAxis, parseAnchor } from "./anchor.util.js";
|
|
5
5
|
import { nullifyTransforms } from "./animation.util.js";
|