@ews-admin/global-design-system 1.19.0 → 1.21.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/dist/components/PaymentDueBanner/PaymentDueBanner.d.ts +24 -0
- package/dist/components/PaymentDueBanner/PaymentDueBanner.d.ts.map +1 -0
- package/dist/components/PaymentDueBanner/index.d.ts +3 -0
- package/dist/components/PaymentDueBanner/index.d.ts.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +24 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.css +1 -1
- package/dist/index.esm.js +21 -12
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +21 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/PaymentDueBanner/PaymentDueBanner.tsx +77 -0
- package/src/components/PaymentDueBanner/index.ts +2 -0
- package/src/index.ts +3 -0
package/dist/index.js
CHANGED
|
@@ -34209,6 +34209,7 @@ var Cropper$1 = class Cropper extends React__namespace.Component {
|
|
|
34209
34209
|
this.resizeObserver = null;
|
|
34210
34210
|
this.previousCropSize = null;
|
|
34211
34211
|
this.isInitialized = false;
|
|
34212
|
+
this.dragInteractionSource = null;
|
|
34212
34213
|
this.state = {
|
|
34213
34214
|
cropSize: null,
|
|
34214
34215
|
hasWheelJustStarted: false,
|
|
@@ -34332,7 +34333,7 @@ var Cropper$1 = class Cropper extends React__namespace.Component {
|
|
|
34332
34333
|
this.currentDoc.addEventListener("mousemove", this.onMouseMove);
|
|
34333
34334
|
this.currentDoc.addEventListener("mouseup", this.onDragStopped);
|
|
34334
34335
|
this.saveContainerPosition();
|
|
34335
|
-
this.onDragStart(Cropper.getMousePoint(e));
|
|
34336
|
+
this.onDragStart(Cropper.getMousePoint(e), "mouse");
|
|
34336
34337
|
};
|
|
34337
34338
|
this.onMouseMove = (e) => this.onDrag(Cropper.getMousePoint(e));
|
|
34338
34339
|
this.onScroll = (e) => {
|
|
@@ -34348,7 +34349,7 @@ var Cropper$1 = class Cropper extends React__namespace.Component {
|
|
|
34348
34349
|
this.currentDoc.addEventListener("touchend", this.onDragStopped);
|
|
34349
34350
|
this.saveContainerPosition();
|
|
34350
34351
|
if (e.touches.length === 2) this.onPinchStart(e);
|
|
34351
|
-
else if (e.touches.length === 1) this.onDragStart(Cropper.getTouchPoint(e.touches[0]));
|
|
34352
|
+
else if (e.touches.length === 1) this.onDragStart(Cropper.getTouchPoint(e.touches[0]), "touch");
|
|
34352
34353
|
};
|
|
34353
34354
|
this.onTouchMove = (e) => {
|
|
34354
34355
|
e.preventDefault();
|
|
@@ -34377,14 +34378,15 @@ var Cropper$1 = class Cropper extends React__namespace.Component {
|
|
|
34377
34378
|
this.onGestureEnd = (e) => {
|
|
34378
34379
|
this.cleanEvents();
|
|
34379
34380
|
};
|
|
34380
|
-
this.onDragStart = ({ x, y }) => {
|
|
34381
|
+
this.onDragStart = ({ x, y }, source) => {
|
|
34381
34382
|
var _this$props$onInterac, _this$props;
|
|
34382
34383
|
this.dragStartPosition = {
|
|
34383
34384
|
x,
|
|
34384
34385
|
y
|
|
34385
34386
|
};
|
|
34386
34387
|
this.dragStartCrop = _objectSpread2({}, this.props.crop);
|
|
34387
|
-
|
|
34388
|
+
this.dragInteractionSource = source;
|
|
34389
|
+
(_this$props$onInterac = (_this$props = this.props).onInteractionStart) === null || _this$props$onInterac === void 0 || _this$props$onInterac.call(_this$props, { source });
|
|
34388
34390
|
};
|
|
34389
34391
|
this.onDrag = ({ x, y }) => {
|
|
34390
34392
|
if (!this.currentWindow) return;
|
|
@@ -34403,11 +34405,12 @@ var Cropper$1 = class Cropper extends React__namespace.Component {
|
|
|
34403
34405
|
});
|
|
34404
34406
|
};
|
|
34405
34407
|
this.onDragStopped = () => {
|
|
34406
|
-
var _this$props$onInterac2, _this$props2;
|
|
34408
|
+
var _this$props$onInterac2, _this$props2, _this$dragInteraction;
|
|
34407
34409
|
this.isTouching = false;
|
|
34408
34410
|
this.cleanEvents();
|
|
34409
34411
|
this.emitCropData();
|
|
34410
|
-
(_this$props$onInterac2 = (_this$props2 = this.props).onInteractionEnd) === null || _this$props$onInterac2 === void 0 || _this$props$onInterac2.call(_this$props2);
|
|
34412
|
+
(_this$props$onInterac2 = (_this$props2 = this.props).onInteractionEnd) === null || _this$props$onInterac2 === void 0 || _this$props$onInterac2.call(_this$props2, { source: (_this$dragInteraction = this.dragInteractionSource) !== null && _this$dragInteraction !== void 0 ? _this$dragInteraction : "mouse" });
|
|
34413
|
+
this.dragInteractionSource = null;
|
|
34411
34414
|
};
|
|
34412
34415
|
this.onWheel = (e) => {
|
|
34413
34416
|
if (!this.currentWindow) return;
|
|
@@ -34419,12 +34422,12 @@ var Cropper$1 = class Cropper extends React__namespace.Component {
|
|
|
34419
34422
|
this.setNewZoom(newZoom, point, { shouldUpdatePosition: true });
|
|
34420
34423
|
if (!this.state.hasWheelJustStarted) this.setState({ hasWheelJustStarted: true }, () => {
|
|
34421
34424
|
var _this$props$onInterac3, _this$props3;
|
|
34422
|
-
return (_this$props$onInterac3 = (_this$props3 = this.props).onInteractionStart) === null || _this$props$onInterac3 === void 0 ? void 0 : _this$props$onInterac3.call(_this$props3);
|
|
34425
|
+
return (_this$props$onInterac3 = (_this$props3 = this.props).onInteractionStart) === null || _this$props$onInterac3 === void 0 ? void 0 : _this$props$onInterac3.call(_this$props3, { source: "wheel" });
|
|
34423
34426
|
});
|
|
34424
34427
|
if (this.wheelTimer) clearTimeout(this.wheelTimer);
|
|
34425
34428
|
this.wheelTimer = this.currentWindow.setTimeout(() => this.setState({ hasWheelJustStarted: false }, () => {
|
|
34426
34429
|
var _this$props$onInterac4, _this$props4;
|
|
34427
|
-
return (_this$props$onInterac4 = (_this$props4 = this.props).onInteractionEnd) === null || _this$props$onInterac4 === void 0 ? void 0 : _this$props$onInterac4.call(_this$props4);
|
|
34430
|
+
return (_this$props$onInterac4 = (_this$props4 = this.props).onInteractionEnd) === null || _this$props$onInterac4 === void 0 ? void 0 : _this$props$onInterac4.call(_this$props4, { source: "wheel" });
|
|
34428
34431
|
}), 250);
|
|
34429
34432
|
};
|
|
34430
34433
|
this.getPointOnContainer = ({ x, y }, containerTopLeft) => {
|
|
@@ -34532,7 +34535,7 @@ var Cropper$1 = class Cropper extends React__namespace.Component {
|
|
|
34532
34535
|
if (this.props.restrictPosition) newCrop = restrictPosition(newCrop, this.mediaSize, this.state.cropSize, zoom, rotation);
|
|
34533
34536
|
if (!event.repeat) {
|
|
34534
34537
|
var _this$props$onInterac5, _this$props5;
|
|
34535
|
-
(_this$props$onInterac5 = (_this$props5 = this.props).onInteractionStart) === null || _this$props$onInterac5 === void 0 || _this$props$onInterac5.call(_this$props5);
|
|
34538
|
+
(_this$props$onInterac5 = (_this$props5 = this.props).onInteractionStart) === null || _this$props$onInterac5 === void 0 || _this$props$onInterac5.call(_this$props5, { source: "keyboard" });
|
|
34536
34539
|
}
|
|
34537
34540
|
onCropChange(newCrop);
|
|
34538
34541
|
};
|
|
@@ -34548,7 +34551,7 @@ var Cropper$1 = class Cropper extends React__namespace.Component {
|
|
|
34548
34551
|
default: return;
|
|
34549
34552
|
}
|
|
34550
34553
|
this.emitCropData();
|
|
34551
|
-
(_this$props$onInterac6 = (_this$props6 = this.props).onInteractionEnd) === null || _this$props$onInterac6 === void 0 || _this$props$onInterac6.call(_this$props6);
|
|
34554
|
+
(_this$props$onInterac6 = (_this$props6 = this.props).onInteractionEnd) === null || _this$props$onInterac6 === void 0 || _this$props$onInterac6.call(_this$props6, { source: "keyboard" });
|
|
34552
34555
|
};
|
|
34553
34556
|
}
|
|
34554
34557
|
componentDidMount() {
|
|
@@ -34628,7 +34631,7 @@ var Cropper$1 = class Cropper extends React__namespace.Component {
|
|
|
34628
34631
|
const pointB = Cropper.getTouchPoint(e.touches[1]);
|
|
34629
34632
|
this.lastPinchDistance = getDistanceBetweenPoints(pointA, pointB);
|
|
34630
34633
|
this.lastPinchRotation = getRotationBetweenPoints(pointA, pointB);
|
|
34631
|
-
this.onDragStart(getCenter(pointA, pointB));
|
|
34634
|
+
this.onDragStart(getCenter(pointA, pointB), "touch");
|
|
34632
34635
|
}
|
|
34633
34636
|
onPinchMove(e) {
|
|
34634
34637
|
if (!this.currentDoc || !this.currentWindow) return;
|
|
@@ -35147,6 +35150,12 @@ const TagList = ({ items, maxVisible = DEFAULT_MAX, showMoreLabel, showLessLabel
|
|
|
35147
35150
|
return (jsxRuntime.jsxs("div", { className: cn("flex flex-wrap items-center gap-2", className), children: [visible.map((label, i) => renderTag ? (renderTag(label, i)) : (jsxRuntime.jsx(Tag, { label: label, variant: variant }, i))), hasMore && !expanded && (jsxRuntime.jsx("span", { className: "text-sm text-gray-400", children: "..." })), hasMore && (jsxRuntime.jsx("button", { onClick: handleToggle, className: "text-xs text-ews-primary hover:underline", children: expanded ? showLessLabel : showMoreLabel }))] }));
|
|
35148
35151
|
};
|
|
35149
35152
|
|
|
35153
|
+
/**
|
|
35154
|
+
* Full-width payment reminder banner (red gradient) used above the app
|
|
35155
|
+
* content when a licence payment is due soon or overdue.
|
|
35156
|
+
*/
|
|
35157
|
+
const PaymentDueBanner = ({ title, subtitle, warning, ctaLabel, onCtaClick, onDismiss, dismissLabel = "Close", }) => (jsxRuntime.jsx("div", { "data-testid": "payment-banner", className: "overflow-hidden bg-gradient-to-r from-red-600 to-red-700 shadow-lg", children: jsxRuntime.jsx("div", { className: "px-6 py-8 sm:px-8", children: jsxRuntime.jsxs("div", { className: "flex flex-col space-y-6 sm:flex-row sm:items-center sm:justify-between sm:space-y-0", children: [jsxRuntime.jsxs("div", { className: "flex items-center space-x-4", children: [jsxRuntime.jsx(TriangleAlert, { className: "w-8 h-8 text-white shrink-0" }), jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [jsxRuntime.jsx("h3", { className: "text-2xl font-bold text-white", children: title }), subtitle && (jsxRuntime.jsx("p", { className: "mt-2 text-base text-red-100", children: subtitle })), warning && (jsxRuntime.jsx("p", { className: "mt-1 text-sm font-medium text-red-200", children: warning }))] })] }), jsxRuntime.jsxs("div", { className: "flex flex-col flex-shrink-0 gap-3 sm:flex-row sm:gap-4 sm:items-center", children: [jsxRuntime.jsx("button", { onClick: onCtaClick, className: "w-full px-8 py-3 text-base font-semibold text-red-600 bg-white rounded-lg shadow-sm transition-all duration-200 sm:w-auto hover:bg-red-50 hover:shadow-md", children: ctaLabel }), onDismiss && (jsxRuntime.jsx("button", { onClick: onDismiss, className: "self-start p-2 rounded-full transition-colors bg-white/10 hover:bg-white/20 sm:self-auto", "aria-label": dismissLabel, children: jsxRuntime.jsx(X, { className: "w-5 h-5 text-white" }) }))] })] }) }) }));
|
|
35158
|
+
|
|
35150
35159
|
const SpecialtySearchAutocomplete = ({ selectedSpecialties = [], onSpecialtiesChange, specialties: availableSpecialties, placeholder = "Search and select medical specialties...", className = "", disabled = false, maxSelections, showSelectedCount = true, title = "Medical Specialties", label = "Select Specialties", getSelectedCountText, }) => {
|
|
35151
35160
|
const [filteredSpecialties, setFilteredSpecialties] = React.useState([]);
|
|
35152
35161
|
const [isLoading, setIsLoading] = React.useState(false);
|
|
@@ -39557,6 +39566,7 @@ exports.PauseOctagon = OctagonPause;
|
|
|
39557
39566
|
exports.PauseOctagonIcon = OctagonPause;
|
|
39558
39567
|
exports.PawPrint = PawPrint;
|
|
39559
39568
|
exports.PawPrintIcon = PawPrint;
|
|
39569
|
+
exports.PaymentDueBanner = PaymentDueBanner;
|
|
39560
39570
|
exports.PcCase = PcCase;
|
|
39561
39571
|
exports.PcCaseIcon = PcCase;
|
|
39562
39572
|
exports.Pen = Pen;
|