@breadstone/mosaik-elements-foundation 0.0.211 → 0.0.214
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/Controls/Components/Abstracts/CustomElement.js.map +1 -1
- package/Controls/Components/Overlays/Dialog/DialogService.d.ts +0 -22
- package/Controls/Components/Overlays/Dialog/DialogService.d.ts.map +1 -1
- package/Controls/Components/Overlays/Dialog/DialogService.js +2 -12
- package/Controls/Components/Overlays/Dialog/DialogService.js.map +1 -1
- package/Controls/Components/Overlays/Dialog/Themes/DialogElement.Cosmopolitan.d.ts.map +1 -1
- package/Controls/Components/Overlays/Dialog/Themes/DialogElement.Cosmopolitan.js +13 -0
- package/Controls/Components/Overlays/Dialog/Themes/DialogElement.Cosmopolitan.js.map +1 -1
- package/Controls/Components/Overlays/Dialog/Themes/DialogElement.Joy.d.ts.map +1 -1
- package/Controls/Components/Overlays/Dialog/Themes/DialogElement.Joy.js +13 -0
- package/Controls/Components/Overlays/Dialog/Themes/DialogElement.Joy.js.map +1 -1
- package/Controls/Components/Overlays/Dialog/Themes/DialogElement.Memphis.d.ts.map +1 -1
- package/Controls/Components/Overlays/Dialog/Themes/DialogElement.Memphis.js +13 -0
- package/Controls/Components/Overlays/Dialog/Themes/DialogElement.Memphis.js.map +1 -1
- package/Controls/Components/Overlays/Dialog/behaviors/DialogStackBehavior.d.ts +119 -0
- package/Controls/Components/Overlays/Dialog/behaviors/DialogStackBehavior.d.ts.map +1 -0
- package/Controls/Components/Overlays/Dialog/behaviors/DialogStackBehavior.js +246 -0
- package/Controls/Components/Overlays/Dialog/behaviors/DialogStackBehavior.js.map +1 -0
- package/Controls/Components/Overlays/Dialog/behaviors/IDialogStackBehaviorConfig.d.ts +64 -0
- package/Controls/Components/Overlays/Dialog/behaviors/IDialogStackBehaviorConfig.d.ts.map +1 -0
- package/Controls/Components/Overlays/Dialog/behaviors/IDialogStackBehaviorConfig.js +15 -0
- package/Controls/Components/Overlays/Dialog/behaviors/IDialogStackBehaviorConfig.js.map +1 -0
- package/Controls/Components/Overlays/Dialog/behaviors/withDialogStackBehavior.d.ts +11 -0
- package/Controls/Components/Overlays/Dialog/behaviors/withDialogStackBehavior.d.ts.map +1 -0
- package/Controls/Components/Overlays/Dialog/behaviors/withDialogStackBehavior.js +14 -0
- package/Controls/Components/Overlays/Dialog/behaviors/withDialogStackBehavior.js.map +1 -0
- package/Controls/Components/Overlays/Drawer/DrawerActionsElement.d.ts +44 -0
- package/Controls/Components/Overlays/Drawer/DrawerActionsElement.d.ts.map +1 -0
- package/Controls/Components/Overlays/Drawer/DrawerActionsElement.js +71 -0
- package/Controls/Components/Overlays/Drawer/DrawerActionsElement.js.map +1 -0
- package/Controls/Components/Overlays/Drawer/DrawerActionsElementTemplate.d.ts +9 -0
- package/Controls/Components/Overlays/Drawer/DrawerActionsElementTemplate.d.ts.map +1 -0
- package/Controls/Components/Overlays/Drawer/DrawerActionsElementTemplate.js +36 -0
- package/Controls/Components/Overlays/Drawer/DrawerActionsElementTemplate.js.map +1 -0
- package/Controls/Components/Overlays/Drawer/DrawerElement.d.ts +4 -2
- package/Controls/Components/Overlays/Drawer/DrawerElement.d.ts.map +1 -1
- package/Controls/Components/Overlays/Drawer/DrawerElement.js +4 -2
- package/Controls/Components/Overlays/Drawer/DrawerElement.js.map +1 -1
- package/Controls/Components/Overlays/Drawer/DrawerElementTemplate.d.ts.map +1 -1
- package/Controls/Components/Overlays/Drawer/DrawerElementTemplate.js +6 -1
- package/Controls/Components/Overlays/Drawer/DrawerElementTemplate.js.map +1 -1
- package/Controls/Components/Overlays/Drawer/DrawerService.d.ts +0 -17
- package/Controls/Components/Overlays/Drawer/DrawerService.d.ts.map +1 -1
- package/Controls/Components/Overlays/Drawer/DrawerService.js +4 -16
- package/Controls/Components/Overlays/Drawer/DrawerService.js.map +1 -1
- package/Controls/Components/Overlays/Drawer/IDrawerActionsElementProps.d.ts +9 -0
- package/Controls/Components/Overlays/Drawer/IDrawerActionsElementProps.d.ts.map +1 -0
- package/Controls/Components/Overlays/Drawer/IDrawerActionsElementProps.js +3 -0
- package/Controls/Components/Overlays/Drawer/IDrawerActionsElementProps.js.map +1 -0
- package/Controls/Components/Overlays/Drawer/Themes/DrawerActionsElement.Cosmopolitan.d.ts +6 -0
- package/Controls/Components/Overlays/Drawer/Themes/DrawerActionsElement.Cosmopolitan.d.ts.map +1 -0
- package/Controls/Components/Overlays/Drawer/Themes/DrawerActionsElement.Cosmopolitan.js +76 -0
- package/Controls/Components/Overlays/Drawer/Themes/DrawerActionsElement.Cosmopolitan.js.map +1 -0
- package/Controls/Components/Overlays/Drawer/Themes/DrawerActionsElement.Joy.d.ts +6 -0
- package/Controls/Components/Overlays/Drawer/Themes/DrawerActionsElement.Joy.d.ts.map +1 -0
- package/Controls/Components/Overlays/Drawer/Themes/DrawerActionsElement.Joy.js +76 -0
- package/Controls/Components/Overlays/Drawer/Themes/DrawerActionsElement.Joy.js.map +1 -0
- package/Controls/Components/Overlays/Drawer/Themes/DrawerActionsElement.Memphis.d.ts +6 -0
- package/Controls/Components/Overlays/Drawer/Themes/DrawerActionsElement.Memphis.d.ts.map +1 -0
- package/Controls/Components/Overlays/Drawer/Themes/DrawerActionsElement.Memphis.js +76 -0
- package/Controls/Components/Overlays/Drawer/Themes/DrawerActionsElement.Memphis.js.map +1 -0
- package/Controls/Components/Overlays/Drawer/Themes/DrawerElement.Cosmopolitan.d.ts.map +1 -1
- package/Controls/Components/Overlays/Drawer/Themes/DrawerElement.Cosmopolitan.js +48 -1
- package/Controls/Components/Overlays/Drawer/Themes/DrawerElement.Cosmopolitan.js.map +1 -1
- package/Controls/Components/Overlays/Drawer/Themes/DrawerElement.Joy.d.ts.map +1 -1
- package/Controls/Components/Overlays/Drawer/Themes/DrawerElement.Joy.js +48 -1
- package/Controls/Components/Overlays/Drawer/Themes/DrawerElement.Joy.js.map +1 -1
- package/Controls/Components/Overlays/Drawer/Themes/DrawerElement.Memphis.d.ts.map +1 -1
- package/Controls/Components/Overlays/Drawer/Themes/DrawerElement.Memphis.js +48 -1
- package/Controls/Components/Overlays/Drawer/Themes/DrawerElement.Memphis.js.map +1 -1
- package/Controls/Components/Overlays/Drawer/Themes/DrawerFooterElement.Cosmopolitan.d.ts.map +1 -1
- package/Controls/Components/Overlays/Drawer/Themes/DrawerFooterElement.Cosmopolitan.js +0 -6
- package/Controls/Components/Overlays/Drawer/Themes/DrawerFooterElement.Cosmopolitan.js.map +1 -1
- package/Controls/Components/Overlays/Drawer/Themes/DrawerFooterElement.Joy.d.ts.map +1 -1
- package/Controls/Components/Overlays/Drawer/Themes/DrawerFooterElement.Joy.js +0 -6
- package/Controls/Components/Overlays/Drawer/Themes/DrawerFooterElement.Joy.js.map +1 -1
- package/Controls/Components/Overlays/Drawer/Themes/DrawerFooterElement.Memphis.d.ts.map +1 -1
- package/Controls/Components/Overlays/Drawer/Themes/DrawerFooterElement.Memphis.js +0 -6
- package/Controls/Components/Overlays/Drawer/Themes/DrawerFooterElement.Memphis.js.map +1 -1
- package/Controls/Components/Overlays/Drawer/behaviors/DrawerStackBehavior.d.ts +136 -0
- package/Controls/Components/Overlays/Drawer/behaviors/DrawerStackBehavior.d.ts.map +1 -0
- package/Controls/Components/Overlays/Drawer/behaviors/DrawerStackBehavior.js +309 -0
- package/Controls/Components/Overlays/Drawer/behaviors/DrawerStackBehavior.js.map +1 -0
- package/Controls/Components/Overlays/Drawer/behaviors/IDrawerStackBehaviorConfig.d.ts +57 -0
- package/Controls/Components/Overlays/Drawer/behaviors/IDrawerStackBehaviorConfig.d.ts.map +1 -0
- package/Controls/Components/Overlays/Drawer/behaviors/IDrawerStackBehaviorConfig.js +14 -0
- package/Controls/Components/Overlays/Drawer/behaviors/IDrawerStackBehaviorConfig.js.map +1 -0
- package/Controls/Components/Overlays/Drawer/behaviors/withDrawerStackBehavior.d.ts +11 -0
- package/Controls/Components/Overlays/Drawer/behaviors/withDrawerStackBehavior.d.ts.map +1 -0
- package/Controls/Components/Overlays/Drawer/behaviors/withDrawerStackBehavior.js +14 -0
- package/Controls/Components/Overlays/Drawer/behaviors/withDrawerStackBehavior.js.map +1 -0
- package/Controls/Components/Overlays/MessageBox/MessageBoxService.d.ts +0 -1
- package/Controls/Components/Overlays/MessageBox/MessageBoxService.d.ts.map +1 -1
- package/Controls/Components/Overlays/MessageBox/MessageBoxService.js +0 -5
- package/Controls/Components/Overlays/MessageBox/MessageBoxService.js.map +1 -1
- package/Controls/Components/Overlays/Sheet/SheetService.d.ts +0 -1
- package/Controls/Components/Overlays/Sheet/SheetService.d.ts.map +1 -1
- package/Controls/Components/Overlays/Sheet/SheetService.js +0 -5
- package/Controls/Components/Overlays/Sheet/SheetService.js.map +1 -1
- package/Controls/Components/Overlays/Toast/ToastElement.d.ts.map +1 -1
- package/Controls/Components/Overlays/Toast/ToastElement.js +8 -3
- package/Controls/Components/Overlays/Toast/ToastElement.js.map +1 -1
- package/Controls/Components/Overlays/Toast/ToastElementTemplate.js +1 -1
- package/Controls/Components/Overlays/Toast/ToastElementTemplate.js.map +1 -1
- package/Controls/Components/Overlays/Toast/ToastService.d.ts +0 -1
- package/Controls/Components/Overlays/Toast/ToastService.d.ts.map +1 -1
- package/Controls/Components/Overlays/Toast/ToastService.js +0 -5
- package/Controls/Components/Overlays/Toast/ToastService.js.map +1 -1
- package/Controls/Components/Primitives/ResizeThumb/Events/ResizeThumbResizeEndEvent.d.ts +42 -0
- package/Controls/Components/Primitives/ResizeThumb/Events/ResizeThumbResizeEndEvent.d.ts.map +1 -0
- package/Controls/Components/Primitives/ResizeThumb/Events/ResizeThumbResizeEndEvent.js +3 -0
- package/Controls/Components/Primitives/ResizeThumb/Events/ResizeThumbResizeEndEvent.js.map +1 -0
- package/Controls/Components/Primitives/ResizeThumb/Events/ResizeThumbResizeStartEvent.d.ts +32 -0
- package/Controls/Components/Primitives/ResizeThumb/Events/ResizeThumbResizeStartEvent.d.ts.map +1 -0
- package/Controls/Components/Primitives/ResizeThumb/Events/ResizeThumbResizeStartEvent.js +3 -0
- package/Controls/Components/Primitives/ResizeThumb/Events/ResizeThumbResizeStartEvent.js.map +1 -0
- package/Controls/Components/Primitives/ResizeThumb/Events/ResizeThumbResizingEvent.d.ts +50 -0
- package/Controls/Components/Primitives/ResizeThumb/Events/ResizeThumbResizingEvent.d.ts.map +1 -0
- package/Controls/Components/Primitives/ResizeThumb/Events/ResizeThumbResizingEvent.js +3 -0
- package/Controls/Components/Primitives/ResizeThumb/Events/ResizeThumbResizingEvent.js.map +1 -0
- package/Controls/Components/Primitives/ResizeThumb/IResizeThumbElementProps.d.ts +40 -0
- package/Controls/Components/Primitives/ResizeThumb/IResizeThumbElementProps.d.ts.map +1 -0
- package/Controls/Components/Primitives/ResizeThumb/IResizeThumbElementProps.js +3 -0
- package/Controls/Components/Primitives/ResizeThumb/IResizeThumbElementProps.js.map +1 -0
- package/Controls/Components/Primitives/ResizeThumb/ResizeThumbElement.d.ts +251 -0
- package/Controls/Components/Primitives/ResizeThumb/ResizeThumbElement.d.ts.map +1 -0
- package/Controls/Components/Primitives/ResizeThumb/ResizeThumbElement.js +474 -0
- package/Controls/Components/Primitives/ResizeThumb/ResizeThumbElement.js.map +1 -0
- package/Controls/Components/Primitives/ResizeThumb/ResizeThumbElementTemplate.d.ts +9 -0
- package/Controls/Components/Primitives/ResizeThumb/ResizeThumbElementTemplate.d.ts.map +1 -0
- package/Controls/Components/Primitives/ResizeThumb/ResizeThumbElementTemplate.js +14 -0
- package/Controls/Components/Primitives/ResizeThumb/ResizeThumbElementTemplate.js.map +1 -0
- package/Controls/Components/Primitives/ResizeThumb/Themes/ResizeThumbElement.Cosmopolitan.d.ts +6 -0
- package/Controls/Components/Primitives/ResizeThumb/Themes/ResizeThumbElement.Cosmopolitan.d.ts.map +1 -0
- package/Controls/Components/Primitives/ResizeThumb/Themes/ResizeThumbElement.Cosmopolitan.js +104 -0
- package/Controls/Components/Primitives/ResizeThumb/Themes/ResizeThumbElement.Cosmopolitan.js.map +1 -0
- package/Controls/Components/Primitives/ResizeThumb/Themes/ResizeThumbElement.Joy.d.ts +6 -0
- package/Controls/Components/Primitives/ResizeThumb/Themes/ResizeThumbElement.Joy.d.ts.map +1 -0
- package/Controls/Components/Primitives/ResizeThumb/Themes/ResizeThumbElement.Joy.js +142 -0
- package/Controls/Components/Primitives/ResizeThumb/Themes/ResizeThumbElement.Joy.js.map +1 -0
- package/Controls/Components/Primitives/ResizeThumb/Themes/ResizeThumbElement.Memphis.d.ts +6 -0
- package/Controls/Components/Primitives/ResizeThumb/Themes/ResizeThumbElement.Memphis.d.ts.map +1 -0
- package/Controls/Components/Primitives/ResizeThumb/Themes/ResizeThumbElement.Memphis.js +104 -0
- package/Controls/Components/Primitives/ResizeThumb/Themes/ResizeThumbElement.Memphis.js.map +1 -0
- package/Controls/Components/Ranges/MeterBar/MeterBarElement.d.ts +4 -1
- package/Controls/Components/Ranges/MeterBar/MeterBarElement.d.ts.map +1 -1
- package/Controls/Components/Ranges/MeterBar/MeterBarElement.js +4 -1
- package/Controls/Components/Ranges/MeterBar/MeterBarElement.js.map +1 -1
- package/Controls/Components/Ranges/MeterBar/Themes/MeterBarElement.Cosmopolitan.js +2 -2
- package/Controls/Components/Ranges/MeterBar/Themes/MeterBarElement.Joy.js +2 -2
- package/Controls/Components/Ranges/MeterBar/Themes/MeterBarElement.Memphis.js +2 -2
- package/Controls/Components/Selectors/Abstracts/Selector/SelectorElement.d.ts.map +1 -1
- package/Controls/Controllers/ResizeThumbController.d.ts +349 -0
- package/Controls/Controllers/ResizeThumbController.d.ts.map +1 -0
- package/Controls/Controllers/ResizeThumbController.js +520 -0
- package/Controls/Controllers/ResizeThumbController.js.map +1 -0
- package/Controls/Types/ResizeDirection.d.ts +54 -0
- package/Controls/Types/ResizeDirection.d.ts.map +1 -0
- package/Controls/Types/ResizeDirection.js +60 -0
- package/Controls/Types/ResizeDirection.js.map +1 -0
- package/Dom/Interval.d.ts +16 -1
- package/Dom/Interval.d.ts.map +1 -1
- package/Dom/Interval.js +25 -2
- package/Dom/Interval.js.map +1 -1
- package/Index.d.ts +15 -6
- package/Index.d.ts.map +1 -1
- package/Index.js +10 -4
- package/Index.js.map +1 -1
- package/Routing/PathToRegexp.d.ts +1 -1
- package/custom-elements.json +2088 -1155
- package/package.json +3 -3
|
@@ -0,0 +1,474 @@
|
|
|
1
|
+
// #region Imports
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
import { on } from '@breadstone/mosaik-elements';
|
|
12
|
+
import { Attachable } from '../../../Behaviors/Attachable';
|
|
13
|
+
import { Disableable } from '../../../Behaviors/Disableable';
|
|
14
|
+
import { Themeable } from '../../../Behaviors/Themeable';
|
|
15
|
+
import { ResizeThumbController } from '../../../Controllers/ResizeThumbController';
|
|
16
|
+
import { Attribute } from '../../../Decorators/AttributeDecorator';
|
|
17
|
+
import { Component } from '../../../Decorators/ComponentDecorator';
|
|
18
|
+
import { Emit } from '../../../../Events/Decorators/EmitDecorator';
|
|
19
|
+
import { ALL_RESIZE_DIRECTIONS, ResizeDirection } from '../../../Types/ResizeDirection';
|
|
20
|
+
import { CustomElement } from '../../Abstracts/CustomElement';
|
|
21
|
+
import { resizeThumbElementTemplate } from './ResizeThumbElementTemplate';
|
|
22
|
+
import { resizeThumbElementCosmopolitanStyle } from './Themes/ResizeThumbElement.Cosmopolitan';
|
|
23
|
+
import { resizeThumbElementJoyStyle } from './Themes/ResizeThumbElement.Joy';
|
|
24
|
+
import { resizeThumbElementMemphisStyle } from './Themes/ResizeThumbElement.Memphis';
|
|
25
|
+
// #endregion
|
|
26
|
+
/**
|
|
27
|
+
* ResizeThumb - A primitive element that provides resize handle functionality.
|
|
28
|
+
*
|
|
29
|
+
* @description
|
|
30
|
+
* The ResizeThumb element is a low-level primitive that signals resizing capability
|
|
31
|
+
* in a specific direction. It handles user interactions (mouse/touch) and automatically
|
|
32
|
+
* resizes the attached control element.
|
|
33
|
+
*
|
|
34
|
+
* The element uses the Attachable behavior to connect to its target element, either
|
|
35
|
+
* through the `for` attribute referencing an element ID, or by automatically attaching
|
|
36
|
+
* to its parent element.
|
|
37
|
+
*
|
|
38
|
+
* Internally, this element uses a {@link ResizeThumbController} for all resize logic.
|
|
39
|
+
* For programmatic usage without a visual thumb, use the controller directly.
|
|
40
|
+
*
|
|
41
|
+
* This element has minimal visual appearance by design - parent components like Dialog,
|
|
42
|
+
* Sheet, or Panel are expected to style the thumb appropriately for their context.
|
|
43
|
+
*
|
|
44
|
+
* @name ResizeThumb
|
|
45
|
+
* @element mosaik-resize-thumb
|
|
46
|
+
* @category Primitive
|
|
47
|
+
*
|
|
48
|
+
* @slot - Default slot for custom thumb content.
|
|
49
|
+
*
|
|
50
|
+
* @csspart thumb - The main thumb element.
|
|
51
|
+
*
|
|
52
|
+
* @fires resizestart - Fired when a resize operation begins.
|
|
53
|
+
* @fires resizing - Fired continuously during a resize operation.
|
|
54
|
+
* @fires resizeend - Fired when a resize operation ends.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```html
|
|
58
|
+
* <!-- Inside a parent element (attaches to parent) -->
|
|
59
|
+
* <mosaik-dialog>
|
|
60
|
+
* <mosaik-resize-thumb direction="south-east"></mosaik-resize-thumb>
|
|
61
|
+
* </mosaik-dialog>
|
|
62
|
+
*
|
|
63
|
+
* <!-- Attached to specific element via for attribute -->
|
|
64
|
+
* <div id="resizable-box" style="width: 200px; height: 150px;">
|
|
65
|
+
* Content
|
|
66
|
+
* </div>
|
|
67
|
+
* <mosaik-resize-thumb for="resizable-box" direction="south-east"></mosaik-resize-thumb>
|
|
68
|
+
*
|
|
69
|
+
* <!-- With constraints -->
|
|
70
|
+
* <mosaik-resize-thumb
|
|
71
|
+
* direction="south-east"
|
|
72
|
+
* min-width="100"
|
|
73
|
+
* min-height="80"
|
|
74
|
+
* max-width="500"
|
|
75
|
+
* max-height="400">
|
|
76
|
+
* </mosaik-resize-thumb>
|
|
77
|
+
*
|
|
78
|
+
* <!-- Auto-apply disabled (manual handling via events) -->
|
|
79
|
+
* <mosaik-resize-thumb direction="east" auto-apply="false"></mosaik-resize-thumb>
|
|
80
|
+
* ```
|
|
81
|
+
*
|
|
82
|
+
* @see {@link ResizeThumbController} for programmatic usage without visual element.
|
|
83
|
+
*
|
|
84
|
+
* @public
|
|
85
|
+
*/
|
|
86
|
+
let ResizeThumbElement = class ResizeThumbElement extends Themeable(Disableable(Attachable(CustomElement))) {
|
|
87
|
+
// #region Fields
|
|
88
|
+
_resizeStart;
|
|
89
|
+
_resizing;
|
|
90
|
+
_resizeEnd;
|
|
91
|
+
_direction;
|
|
92
|
+
_allowedDirections;
|
|
93
|
+
_minWidth;
|
|
94
|
+
_minHeight;
|
|
95
|
+
_maxWidth;
|
|
96
|
+
_maxHeight;
|
|
97
|
+
_autoApply;
|
|
98
|
+
_controller;
|
|
99
|
+
_mouseDownSubscription;
|
|
100
|
+
_touchStartSubscription;
|
|
101
|
+
// #endregion
|
|
102
|
+
// #region Ctor
|
|
103
|
+
/**
|
|
104
|
+
* @public
|
|
105
|
+
*/
|
|
106
|
+
constructor() {
|
|
107
|
+
super();
|
|
108
|
+
this._direction = ResizeDirection.SouthEast;
|
|
109
|
+
this._allowedDirections = ALL_RESIZE_DIRECTIONS;
|
|
110
|
+
this._minWidth = 0;
|
|
111
|
+
this._minHeight = 0;
|
|
112
|
+
this._maxWidth = Number.MAX_SAFE_INTEGER;
|
|
113
|
+
this._maxHeight = Number.MAX_SAFE_INTEGER;
|
|
114
|
+
this._autoApply = true;
|
|
115
|
+
this._controller = null;
|
|
116
|
+
this._mouseDownSubscription = null;
|
|
117
|
+
this._touchStartSubscription = null;
|
|
118
|
+
}
|
|
119
|
+
// #endregion
|
|
120
|
+
// #region Properties
|
|
121
|
+
/**
|
|
122
|
+
* Returns the `{@link is}` property.
|
|
123
|
+
* The `{@link is}` property represents natural name of this element.
|
|
124
|
+
*
|
|
125
|
+
* @public
|
|
126
|
+
* @static
|
|
127
|
+
* @readonly
|
|
128
|
+
*/
|
|
129
|
+
static get is() {
|
|
130
|
+
return 'mosaik-resize-thumb';
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Gets or sets the resize `direction`.
|
|
134
|
+
*
|
|
135
|
+
* Determines which direction this resize thumb represents.
|
|
136
|
+
* The cursor style is automatically updated based on this direction.
|
|
137
|
+
*
|
|
138
|
+
* @attr
|
|
139
|
+
* @public
|
|
140
|
+
*/
|
|
141
|
+
get direction() {
|
|
142
|
+
return this._direction;
|
|
143
|
+
}
|
|
144
|
+
set direction(value) {
|
|
145
|
+
if (this._direction !== value) {
|
|
146
|
+
this._direction = value;
|
|
147
|
+
if (this._controller) {
|
|
148
|
+
this._controller.direction = value;
|
|
149
|
+
}
|
|
150
|
+
this.requestUpdate('direction');
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Gets or sets the `allowedDirections` array.
|
|
155
|
+
*
|
|
156
|
+
* When set, only the specified directions are permitted for resizing.
|
|
157
|
+
* If the current direction is not in the allowed list, resize operations
|
|
158
|
+
* will be blocked.
|
|
159
|
+
*
|
|
160
|
+
* @attr
|
|
161
|
+
* @public
|
|
162
|
+
*/
|
|
163
|
+
get allowedDirections() {
|
|
164
|
+
return this._allowedDirections;
|
|
165
|
+
}
|
|
166
|
+
set allowedDirections(value) {
|
|
167
|
+
if (this._allowedDirections !== value) {
|
|
168
|
+
this._allowedDirections = value;
|
|
169
|
+
this.requestUpdate('allowedDirections');
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Gets or sets the minimum width the control can be resized to.
|
|
174
|
+
*
|
|
175
|
+
* @attr min-width
|
|
176
|
+
* @public
|
|
177
|
+
*/
|
|
178
|
+
get minWidth() {
|
|
179
|
+
return this._minWidth;
|
|
180
|
+
}
|
|
181
|
+
set minWidth(value) {
|
|
182
|
+
if (this._minWidth !== value) {
|
|
183
|
+
this._minWidth = value;
|
|
184
|
+
if (this._controller) {
|
|
185
|
+
this._controller.minWidth = value;
|
|
186
|
+
}
|
|
187
|
+
this.requestUpdate('minWidth');
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Gets or sets the minimum height the control can be resized to.
|
|
192
|
+
*
|
|
193
|
+
* @attr min-height
|
|
194
|
+
* @public
|
|
195
|
+
*/
|
|
196
|
+
get minHeight() {
|
|
197
|
+
return this._minHeight;
|
|
198
|
+
}
|
|
199
|
+
set minHeight(value) {
|
|
200
|
+
if (this._minHeight !== value) {
|
|
201
|
+
this._minHeight = value;
|
|
202
|
+
if (this._controller) {
|
|
203
|
+
this._controller.minHeight = value;
|
|
204
|
+
}
|
|
205
|
+
this.requestUpdate('minHeight');
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Gets or sets the maximum width the control can be resized to.
|
|
210
|
+
*
|
|
211
|
+
* @attr max-width
|
|
212
|
+
* @public
|
|
213
|
+
*/
|
|
214
|
+
get maxWidth() {
|
|
215
|
+
return this._maxWidth;
|
|
216
|
+
}
|
|
217
|
+
set maxWidth(value) {
|
|
218
|
+
if (this._maxWidth !== value) {
|
|
219
|
+
this._maxWidth = value;
|
|
220
|
+
if (this._controller) {
|
|
221
|
+
this._controller.maxWidth = value;
|
|
222
|
+
}
|
|
223
|
+
this.requestUpdate('maxWidth');
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Gets or sets the maximum height the control can be resized to.
|
|
228
|
+
*
|
|
229
|
+
* @attr max-height
|
|
230
|
+
* @public
|
|
231
|
+
*/
|
|
232
|
+
get maxHeight() {
|
|
233
|
+
return this._maxHeight;
|
|
234
|
+
}
|
|
235
|
+
set maxHeight(value) {
|
|
236
|
+
if (this._maxHeight !== value) {
|
|
237
|
+
this._maxHeight = value;
|
|
238
|
+
if (this._controller) {
|
|
239
|
+
this._controller.maxHeight = value;
|
|
240
|
+
}
|
|
241
|
+
this.requestUpdate('maxHeight');
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Gets or sets whether resize changes are automatically applied to the control element.
|
|
246
|
+
* If false, only events are emitted and the control is responsible for applying changes.
|
|
247
|
+
* Defaults to true.
|
|
248
|
+
*
|
|
249
|
+
* @attr auto-apply
|
|
250
|
+
* @public
|
|
251
|
+
*/
|
|
252
|
+
get autoApply() {
|
|
253
|
+
return this._autoApply;
|
|
254
|
+
}
|
|
255
|
+
set autoApply(value) {
|
|
256
|
+
if (this._autoApply !== value) {
|
|
257
|
+
this._autoApply = value;
|
|
258
|
+
if (this._controller) {
|
|
259
|
+
this._controller.autoApply = value;
|
|
260
|
+
}
|
|
261
|
+
this.requestUpdate('autoApply');
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Gets whether a resize operation is currently in progress.
|
|
266
|
+
*
|
|
267
|
+
* @public
|
|
268
|
+
* @readonly
|
|
269
|
+
*/
|
|
270
|
+
get isResizing() {
|
|
271
|
+
return this._controller?.isResizing ?? false;
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Called when a resize operation starts.
|
|
275
|
+
* Provides reference to `{@link IResizeThumbResizeStartEventDetail}` as event detail.
|
|
276
|
+
*
|
|
277
|
+
* @public
|
|
278
|
+
* @readonly
|
|
279
|
+
* @eventProperty
|
|
280
|
+
*/
|
|
281
|
+
get resizeStart() {
|
|
282
|
+
return this._resizeStart;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Called during a resize operation.
|
|
286
|
+
* Provides reference to `{@link IResizeThumbResizingEventDetail}` as event detail.
|
|
287
|
+
*
|
|
288
|
+
* @public
|
|
289
|
+
* @readonly
|
|
290
|
+
* @eventProperty
|
|
291
|
+
*/
|
|
292
|
+
get resizing() {
|
|
293
|
+
return this._resizing;
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* Called when a resize operation ends.
|
|
297
|
+
* Provides reference to `{@link IResizeThumbResizeEndEventDetail}` as event detail.
|
|
298
|
+
*
|
|
299
|
+
* @public
|
|
300
|
+
* @readonly
|
|
301
|
+
* @eventProperty
|
|
302
|
+
*/
|
|
303
|
+
get resizeEnd() {
|
|
304
|
+
return this._resizeEnd;
|
|
305
|
+
}
|
|
306
|
+
// #endregion
|
|
307
|
+
// #region Methods
|
|
308
|
+
/**
|
|
309
|
+
* @public
|
|
310
|
+
* @override
|
|
311
|
+
*/
|
|
312
|
+
connectedCallback() {
|
|
313
|
+
super.connectedCallback();
|
|
314
|
+
this.initializeController();
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* @public
|
|
318
|
+
* @override
|
|
319
|
+
*/
|
|
320
|
+
disconnectedCallback() {
|
|
321
|
+
this._mouseDownSubscription?.dispose();
|
|
322
|
+
this._touchStartSubscription?.dispose();
|
|
323
|
+
this._controller?.dispose();
|
|
324
|
+
this._controller = null;
|
|
325
|
+
super.disconnectedCallback();
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
328
|
+
* @protected
|
|
329
|
+
* @override
|
|
330
|
+
*/
|
|
331
|
+
onApplyTemplate() {
|
|
332
|
+
const thumb = this.getTemplatePart('thumb');
|
|
333
|
+
this._mouseDownSubscription = on(thumb, 'mousedown', (e) => this.onPointerStart(e.clientX, e.clientY, e));
|
|
334
|
+
this._touchStartSubscription = on(thumb, 'touchstart', (e) => {
|
|
335
|
+
if (e.touches.length === 1) {
|
|
336
|
+
this.onPointerStart(e.touches[0].clientX, e.touches[0].clientY, e);
|
|
337
|
+
}
|
|
338
|
+
}, { passive: false });
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* Checks if the current direction is allowed.
|
|
342
|
+
*
|
|
343
|
+
* @protected
|
|
344
|
+
* @returns True if the direction is in the allowed list, false otherwise.
|
|
345
|
+
*/
|
|
346
|
+
isDirectionAllowed() {
|
|
347
|
+
return this._allowedDirections.includes(this._direction);
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* Handles the start of a pointer (mouse or touch) interaction.
|
|
351
|
+
*
|
|
352
|
+
* @protected
|
|
353
|
+
*/
|
|
354
|
+
onPointerStart(clientX, clientY, event) {
|
|
355
|
+
if (this.disabled || !this.isDirectionAllowed() || !this._controller) {
|
|
356
|
+
return;
|
|
357
|
+
}
|
|
358
|
+
event.preventDefault();
|
|
359
|
+
this._controller.startResize(clientX, clientY);
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* Initializes or re-initializes the controller with the current control element.
|
|
363
|
+
*
|
|
364
|
+
* @private
|
|
365
|
+
*/
|
|
366
|
+
initializeController() {
|
|
367
|
+
// Dispose existing controller
|
|
368
|
+
this._controller?.dispose();
|
|
369
|
+
this._controller = null;
|
|
370
|
+
// Wait for control to be available
|
|
371
|
+
if (!this.control) {
|
|
372
|
+
return;
|
|
373
|
+
}
|
|
374
|
+
// Create new controller
|
|
375
|
+
this._controller = new ResizeThumbController({
|
|
376
|
+
target: this.control,
|
|
377
|
+
direction: this._direction,
|
|
378
|
+
minWidth: this._minWidth,
|
|
379
|
+
minHeight: this._minHeight,
|
|
380
|
+
maxWidth: this._maxWidth,
|
|
381
|
+
maxHeight: this._maxHeight,
|
|
382
|
+
autoApply: this._autoApply,
|
|
383
|
+
onResizeStart: (event) => {
|
|
384
|
+
this._resizeStart.emit({
|
|
385
|
+
direction: event.direction,
|
|
386
|
+
startX: event.startX,
|
|
387
|
+
startY: event.startY
|
|
388
|
+
});
|
|
389
|
+
},
|
|
390
|
+
onResizing: (event) => {
|
|
391
|
+
this._resizing.emit({
|
|
392
|
+
direction: event.direction,
|
|
393
|
+
deltaX: event.deltaX,
|
|
394
|
+
deltaY: event.deltaY,
|
|
395
|
+
currentX: event.currentX,
|
|
396
|
+
currentY: event.currentY,
|
|
397
|
+
newWidth: event.newWidth,
|
|
398
|
+
newHeight: event.newHeight
|
|
399
|
+
});
|
|
400
|
+
},
|
|
401
|
+
onResizeEnd: (event) => {
|
|
402
|
+
this._resizeEnd.emit({
|
|
403
|
+
direction: event.direction,
|
|
404
|
+
totalDeltaX: event.totalDeltaX,
|
|
405
|
+
totalDeltaY: event.totalDeltaY,
|
|
406
|
+
finalWidth: event.finalWidth,
|
|
407
|
+
finalHeight: event.finalHeight
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
};
|
|
413
|
+
__decorate([
|
|
414
|
+
Emit({ eventName: 'resizestart' }),
|
|
415
|
+
__metadata("design:type", Object)
|
|
416
|
+
], ResizeThumbElement.prototype, "_resizeStart", void 0);
|
|
417
|
+
__decorate([
|
|
418
|
+
Emit({ eventName: 'resizing' }),
|
|
419
|
+
__metadata("design:type", Object)
|
|
420
|
+
], ResizeThumbElement.prototype, "_resizing", void 0);
|
|
421
|
+
__decorate([
|
|
422
|
+
Emit({ eventName: 'resizeend' }),
|
|
423
|
+
__metadata("design:type", Object)
|
|
424
|
+
], ResizeThumbElement.prototype, "_resizeEnd", void 0);
|
|
425
|
+
__decorate([
|
|
426
|
+
Attribute({ type: String }),
|
|
427
|
+
__metadata("design:type", String),
|
|
428
|
+
__metadata("design:paramtypes", [String])
|
|
429
|
+
], ResizeThumbElement.prototype, "direction", null);
|
|
430
|
+
__decorate([
|
|
431
|
+
Attribute({ type: Array }),
|
|
432
|
+
__metadata("design:type", Array),
|
|
433
|
+
__metadata("design:paramtypes", [Array])
|
|
434
|
+
], ResizeThumbElement.prototype, "allowedDirections", null);
|
|
435
|
+
__decorate([
|
|
436
|
+
Attribute({ type: Number }),
|
|
437
|
+
__metadata("design:type", Number),
|
|
438
|
+
__metadata("design:paramtypes", [Number])
|
|
439
|
+
], ResizeThumbElement.prototype, "minWidth", null);
|
|
440
|
+
__decorate([
|
|
441
|
+
Attribute({ type: Number }),
|
|
442
|
+
__metadata("design:type", Number),
|
|
443
|
+
__metadata("design:paramtypes", [Number])
|
|
444
|
+
], ResizeThumbElement.prototype, "minHeight", null);
|
|
445
|
+
__decorate([
|
|
446
|
+
Attribute({ type: Number }),
|
|
447
|
+
__metadata("design:type", Number),
|
|
448
|
+
__metadata("design:paramtypes", [Number])
|
|
449
|
+
], ResizeThumbElement.prototype, "maxWidth", null);
|
|
450
|
+
__decorate([
|
|
451
|
+
Attribute({ type: Number }),
|
|
452
|
+
__metadata("design:type", Number),
|
|
453
|
+
__metadata("design:paramtypes", [Number])
|
|
454
|
+
], ResizeThumbElement.prototype, "maxHeight", null);
|
|
455
|
+
__decorate([
|
|
456
|
+
Attribute({ type: Boolean }),
|
|
457
|
+
__metadata("design:type", Boolean),
|
|
458
|
+
__metadata("design:paramtypes", [Boolean])
|
|
459
|
+
], ResizeThumbElement.prototype, "autoApply", null);
|
|
460
|
+
ResizeThumbElement = __decorate([
|
|
461
|
+
Component({
|
|
462
|
+
selector: 'mosaik-resize-thumb',
|
|
463
|
+
template: resizeThumbElementTemplate,
|
|
464
|
+
themes: {
|
|
465
|
+
joy: resizeThumbElementJoyStyle,
|
|
466
|
+
memphis: resizeThumbElementMemphisStyle,
|
|
467
|
+
cosmopolitan: resizeThumbElementCosmopolitanStyle
|
|
468
|
+
},
|
|
469
|
+
imports: []
|
|
470
|
+
}),
|
|
471
|
+
__metadata("design:paramtypes", [])
|
|
472
|
+
], ResizeThumbElement);
|
|
473
|
+
export { ResizeThumbElement };
|
|
474
|
+
//# sourceMappingURL=ResizeThumbElement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResizeThumbElement.js","sourceRoot":"","sources":["../../../../../src/Controls/Components/Primitives/ResizeThumb/ResizeThumbElement.ts"],"names":[],"mappings":"AAAA,kBAAkB;;;;;;;;;;AAElB,OAAO,EAAE,EAAE,EAAuD,MAAM,6BAA6B,CAAC;AACtG,OAAO,EAAE,UAAU,EAAoB,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AACnF,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,6CAA6C,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACxF,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAK9D,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,mCAAmC,EAAE,MAAM,0CAA0C,CAAC;AAC/F,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AAErF,aAAa;AAEb;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AAWI,IAAM,kBAAkB,GAAxB,MAAM,kBACT,SAAQ,SAAS,CAAC,WAAW,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC;IAGzD,iBAAiB;IAGA,YAAY,CAAqD;IAEjE,SAAS,CAAkD;IAE3D,UAAU,CAAmD;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AG3B;AAmBD;IAAC,SAAS,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;;kDAG3B;AAmBD;IAAC,SAAS,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;;mDAG3B;AAqBD;IAAC,SAAS,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;;;mDAG5B;AA9MQ,kBAAkB;IAV9B,SAAS,CAAC;QACP,QAAQ,EAAE,qBAAqB;QAC/B,QAAQ,EAAE,0BAA0B;QACpC,MAAM,EAAE;YACJ,GAAG,EAAE,0BAA0B;YAC/B,OAAO,EAAE,8BAA8B;YACvC,YAAY,EAAE,mCAAmC;SACpD;QACD,OAAO,EAAE,EAAE;KACd,CAAC;;GACW,kBAAkB,CAiY9B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type TemplateResult } from '../../../../Dom/Html';
|
|
2
|
+
import type { ResizeThumbElement } from './ResizeThumbElement';
|
|
3
|
+
/**
|
|
4
|
+
* The template of the {@link ResizeThumbElement}.
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare function resizeThumbElementTemplate<T extends ResizeThumbElement>(e: T): TemplateResult;
|
|
9
|
+
//# sourceMappingURL=ResizeThumbElementTemplate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResizeThumbElementTemplate.d.ts","sourceRoot":"","sources":["../../../../../src/Controls/Components/Primitives/ResizeThumb/ResizeThumbElementTemplate.ts"],"names":[],"mappings":"AAEA,OAAO,EAAQ,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAI/D;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,CAAC,SAAS,kBAAkB,EAAE,CAAC,EAAE,CAAC,GAAG,cAAc,CAI7F"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// #region Imports
|
|
2
|
+
import { html } from '../../../../Dom/Html';
|
|
3
|
+
// #endregion
|
|
4
|
+
/**
|
|
5
|
+
* The template of the {@link ResizeThumbElement}.
|
|
6
|
+
*
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export function resizeThumbElementTemplate(e) {
|
|
10
|
+
return html `
|
|
11
|
+
<div part="thumb"></div>
|
|
12
|
+
`;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=ResizeThumbElementTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResizeThumbElementTemplate.js","sourceRoot":"","sources":["../../../../../src/Controls/Components/Primitives/ResizeThumb/ResizeThumbElementTemplate.ts"],"names":[],"mappings":"AAAA,kBAAkB;AAElB,OAAO,EAAE,IAAI,EAAuB,MAAM,sBAAsB,CAAC;AAGjE,aAAa;AAEb;;;;GAIG;AACH,MAAM,UAAU,0BAA0B,CAA+B,CAAI;IACzE,OAAO,IAAI,CAAA;;KAEV,CAAC;AACN,CAAC"}
|
package/Controls/Components/Primitives/ResizeThumb/Themes/ResizeThumbElement.Cosmopolitan.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResizeThumbElement.Cosmopolitan.d.ts","sourceRoot":"","sources":["../../../../../../src/Controls/Components/Primitives/ResizeThumb/Themes/ResizeThumbElement.Cosmopolitan.ts"],"names":[],"mappings":"AASA,OAAO,EAAO,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAI7D;;GAEG;AACH,wBAAgB,mCAAmC,IAAI,SAAS,CA0F/D"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
// ------------------------------------------------------------------------------
|
|
2
|
+
// <auto-generated>
|
|
3
|
+
// This code was generated by a tool.
|
|
4
|
+
// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
|
|
5
|
+
// </auto-generated>
|
|
6
|
+
// ------------------------------------------------------------------------------
|
|
7
|
+
// #region Imports
|
|
8
|
+
import { css } from '../../../../../Dom/Css';
|
|
9
|
+
// #endregion
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
export function resizeThumbElementCosmopolitanStyle() {
|
|
14
|
+
return css `
|
|
15
|
+
:host {
|
|
16
|
+
--resize-thumb-border-color: var(--cosmopolitan-scheme-highlight);
|
|
17
|
+
--resize-thumb-border-radius: var(--cosmopolitan-layout-radius);
|
|
18
|
+
--resize-thumb-border-style: dashed;
|
|
19
|
+
--resize-thumb-border-width: var(--cosmopolitan-layout-thickness);
|
|
20
|
+
--resize-thumb-font-family: unset;
|
|
21
|
+
--resize-thumb-font-letter-spacing: unset;
|
|
22
|
+
--resize-thumb-font-line-height: unset;
|
|
23
|
+
--resize-thumb-font-size: unset;
|
|
24
|
+
--resize-thumb-font-text-decoration: unset;
|
|
25
|
+
--resize-thumb-font-text-transform: unset;
|
|
26
|
+
--resize-thumb-font-weight: unset;
|
|
27
|
+
--resize-thumb-gap: unset;
|
|
28
|
+
--resize-thumb-padding-bottom: unset;
|
|
29
|
+
--resize-thumb-padding-left: unset;
|
|
30
|
+
--resize-thumb-padding-right: unset;
|
|
31
|
+
--resize-thumb-padding-top: unset;
|
|
32
|
+
--resize-thumb-thumb-background-color: var(--cosmopolitan-scheme-highlight);
|
|
33
|
+
--resize-thumb-thumb-border-radius: var(--cosmopolitan-layout-thickness);
|
|
34
|
+
--resize-thumb-transition-duration: unset;
|
|
35
|
+
--resize-thumb-transition-mode: unset;
|
|
36
|
+
--resize-thumb-transition-property: unset;
|
|
37
|
+
--resize-thumb-translate: unset;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@media screen and (prefers-reduced-motion: reduce) {
|
|
41
|
+
:host {
|
|
42
|
+
transition-duration: .01ms;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:host {
|
|
47
|
+
box-sizing: border-box;
|
|
48
|
+
display: block;
|
|
49
|
+
position: relative;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
:host *, :host :before, :host :after {
|
|
53
|
+
box-sizing: border-box;
|
|
54
|
+
background-repeat: no-repeat;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
:host :before, :host :after {
|
|
58
|
+
text-decoration: inherit;
|
|
59
|
+
vertical-align: inherit;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
:host([hidden]) {
|
|
63
|
+
display: none !important;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
:host {
|
|
67
|
+
box-sizing: border-box;
|
|
68
|
+
touch-action: none;
|
|
69
|
+
-webkit-user-select: none;
|
|
70
|
+
-moz-user-select: none;
|
|
71
|
+
user-select: none;
|
|
72
|
+
display: block;
|
|
73
|
+
position: absolute;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
:host [part="thumb"] {
|
|
77
|
+
width: 100%;
|
|
78
|
+
height: 100%;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
:host([direction="north"]), :host([direction="south"]) {
|
|
82
|
+
cursor: ns-resize;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
:host([direction="east"]), :host([direction="west"]) {
|
|
86
|
+
cursor: ew-resize;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
:host([direction="north-west"]), :host([direction="south-east"]) {
|
|
90
|
+
cursor: nwse-resize;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
:host([direction="north-east"]), :host([direction="south-west"]) {
|
|
94
|
+
cursor: nesw-resize;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
:host([disabled]) {
|
|
98
|
+
cursor: default;
|
|
99
|
+
pointer-events: none;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
`;
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=ResizeThumbElement.Cosmopolitan.js.map
|
package/Controls/Components/Primitives/ResizeThumb/Themes/ResizeThumbElement.Cosmopolitan.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResizeThumbElement.Cosmopolitan.js","sourceRoot":"","sources":["../../../../../../src/Controls/Components/Primitives/ResizeThumb/Themes/ResizeThumbElement.Cosmopolitan.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,mBAAmB;AACnB,yCAAyC;AACzC,qGAAqG;AACrG,oBAAoB;AACpB,iFAAiF;AAEjF,kBAAkB;AAElB,OAAO,EAAE,GAAG,EAAkB,MAAM,wBAAwB,CAAC;AAE7D,aAAa;AAEb;;GAEG;AACH,MAAM,UAAU,mCAAmC;IAC/C,OAAO,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAwFT,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResizeThumbElement.Joy.d.ts","sourceRoot":"","sources":["../../../../../../src/Controls/Components/Primitives/ResizeThumb/Themes/ResizeThumbElement.Joy.ts"],"names":[],"mappings":"AASA,OAAO,EAAO,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAI7D;;GAEG;AACH,wBAAgB,0BAA0B,IAAI,SAAS,CAgItD"}
|