mn-angular-lib 1.0.17 → 1.0.19
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.
|
@@ -220,7 +220,7 @@ const mnAlertVariants = tv({
|
|
|
220
220
|
});
|
|
221
221
|
|
|
222
222
|
const mnButtonVariants = tv({
|
|
223
|
-
base: 'hover:cursor-pointer transition-all duration-300 ease-in-out
|
|
223
|
+
base: 'hover:cursor-pointer transition-all duration-300 ease-in-out',
|
|
224
224
|
variants: {
|
|
225
225
|
size: {
|
|
226
226
|
sm: 'px-2 py-1 text-sm',
|
|
@@ -255,6 +255,9 @@ const mnButtonVariants = tv({
|
|
|
255
255
|
},
|
|
256
256
|
disabled: {
|
|
257
257
|
true: 'opacity-50 pointer-events-none',
|
|
258
|
+
},
|
|
259
|
+
noWrap: {
|
|
260
|
+
true: 'whitespace-nowrap',
|
|
258
261
|
}
|
|
259
262
|
},
|
|
260
263
|
compoundVariants: [
|
|
@@ -293,6 +296,7 @@ const mnButtonVariants = tv({
|
|
|
293
296
|
color: 'primary',
|
|
294
297
|
borderRadius: 'lg',
|
|
295
298
|
disabled: false,
|
|
299
|
+
noWrap: true,
|
|
296
300
|
},
|
|
297
301
|
});
|
|
298
302
|
|
|
@@ -306,6 +310,7 @@ class MnButton {
|
|
|
306
310
|
color: this.data.color,
|
|
307
311
|
borderRadius: this.data.borderRadius,
|
|
308
312
|
disabled: this.data.disabled,
|
|
313
|
+
noWrap: this.data.noWrap,
|
|
309
314
|
});
|
|
310
315
|
}
|
|
311
316
|
// For accessibility (works for both <button> and <a>)
|
|
@@ -371,6 +376,51 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
|
|
|
371
376
|
type: Input
|
|
372
377
|
}] } });
|
|
373
378
|
|
|
379
|
+
const mnBadgeVariants = tv({
|
|
380
|
+
base: 'inline-flex items-center rounded-md border font-semibold',
|
|
381
|
+
variants: {
|
|
382
|
+
size: {
|
|
383
|
+
sm: 'px-1.5 py-0.5 text-xs',
|
|
384
|
+
md: 'px-2 py-0.5 text-sm',
|
|
385
|
+
lg: 'px-2.5 py-1 text-base',
|
|
386
|
+
xl: 'px-3 py-1.5 text-lg',
|
|
387
|
+
},
|
|
388
|
+
color: {
|
|
389
|
+
primary: 'bg-primary/20 border-primary text-primary',
|
|
390
|
+
secondary: 'bg-neutral/20 border-neutral text-neutral',
|
|
391
|
+
danger: 'bg-error/20 border-error text-error',
|
|
392
|
+
warning: 'bg-warning/20 border-warning text-warning',
|
|
393
|
+
success: 'bg-success/20 border-success text-success',
|
|
394
|
+
accent: 'bg-accent/20 border-accent text-accent',
|
|
395
|
+
},
|
|
396
|
+
},
|
|
397
|
+
defaultVariants: {
|
|
398
|
+
size: 'md',
|
|
399
|
+
color: 'primary',
|
|
400
|
+
},
|
|
401
|
+
});
|
|
402
|
+
|
|
403
|
+
class MnBadge {
|
|
404
|
+
data = {};
|
|
405
|
+
get hostClasses() {
|
|
406
|
+
return mnBadgeVariants({
|
|
407
|
+
size: this.data.size,
|
|
408
|
+
color: this.data.color,
|
|
409
|
+
});
|
|
410
|
+
}
|
|
411
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MnBadge, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
412
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.3", type: MnBadge, isStandalone: true, selector: "span[mnBadge]", inputs: { data: "data" }, host: { properties: { "class": "this.hostClasses" } }, ngImport: i0, template: "<ng-content></ng-content>\n" });
|
|
413
|
+
}
|
|
414
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MnBadge, decorators: [{
|
|
415
|
+
type: Component,
|
|
416
|
+
args: [{ selector: 'span[mnBadge]', standalone: true, template: "<ng-content></ng-content>\n" }]
|
|
417
|
+
}], propDecorators: { data: [{
|
|
418
|
+
type: Input
|
|
419
|
+
}], hostClasses: [{
|
|
420
|
+
type: HostBinding,
|
|
421
|
+
args: ['class']
|
|
422
|
+
}] } });
|
|
423
|
+
|
|
374
424
|
/**
|
|
375
425
|
* MnInputField Adapters
|
|
376
426
|
*
|
|
@@ -7865,5 +7915,5 @@ function enableMnPreviewMode(configService, langService, allowedOrigins) {
|
|
|
7865
7915
|
* Generated bundle index. Do not edit.
|
|
7866
7916
|
*/
|
|
7867
7917
|
|
|
7868
|
-
export { API_BASE_URL, ActionStyle, BackdropMode, BaseModalBuilder, CALENDAR_CONFIG, CALENDAR_DATE_FORMATTER, CalendarDayComponent, CalendarEventComponent, CalendarEventDefaultComponent, CalendarEventLayoutService, CalendarMonthComponent, CalendarUtility, CalendarView, CalendarViewComponent, CalendarWeekComponent, CloseMode, ColumnSortType, ConfirmationModalBuilder, ConfirmationTone, CrudService, CustomModalBuilder, DEFAULT_CALENDAR_CONFIG, DEFAULT_MN_ALERT_CONFIG, DefaultCalendarDateFormatter, FieldAppearance, FieldKind, FormLayoutMode, FormModalBuilder, KeyboardMode, MN_ALERT_CONFIG, MN_CALENDAR_COMPONENT_NAME, MN_CALENDAR_CONFIG, MN_CHECKBOX_CONFIG, MN_DATETIME_CONFIG, MN_INPUT_FIELD_CONFIG, MN_INSTANCE_ID, MN_LIB_DUAL_HORIZONTAL_IMAGE, MN_MULTI_SELECT_CONFIG, MN_SECTION_PATH, MN_SELECT_CONFIG, MN_TEXTAREA_CONFIG, MnAlertOutletComponent, MnAlertService, MnAlertStore, MnButton, MnCheckbox, MnConfigService, MnConfirmationBodyComponent, MnCustomBodyHostComponent, MnDatetime, MnDualHorizontalImage, MnFormBodyComponent, MnHiddenBelowDirective, MnInformationCard, MnInputField, MnInstanceDirective, MnLanguageService, MnList, MnModalRef, MnModalService, MnModalShellComponent, MnMultiSelect, MnSectionDirective, MnSelect, MnTabComponent, MnTable, MnTextarea, MnTranslatePipe, MnWizardBodyComponent, ModalBuilder, ModalCloseReason, ModalIntent, ModalKind, ModalSize, NavigationDirection, OptionState, SelectionMode, StepBuilder, StepState, SubmitMode, UpcomingEventRowComponent, UpcomingEventsComponent, ValidationCode, ValidationStatus, WizardFlowMode, WizardModalBuilder, dateTimeAdapter, defaultTextAdapter, enableMnPreviewMode, isTranslatable, mnAlertVariants, mnButtonVariants, mnCheckboxVariants, mnCheckboxWrapperVariants, mnDatetimeVariants, mnInformationCardVariants, mnInputFieldVariants, mnMultiSelectVariants, mnSelectVariants, mnTextareaVariants, numberAdapter, pickAdapter, provideMnAlerts, provideMnCalendarConfig, provideMnComponentConfig, provideMnConfig, provideMnLanguage, resolveCalendarConfig };
|
|
7918
|
+
export { API_BASE_URL, ActionStyle, BackdropMode, BaseModalBuilder, CALENDAR_CONFIG, CALENDAR_DATE_FORMATTER, CalendarDayComponent, CalendarEventComponent, CalendarEventDefaultComponent, CalendarEventLayoutService, CalendarMonthComponent, CalendarUtility, CalendarView, CalendarViewComponent, CalendarWeekComponent, CloseMode, ColumnSortType, ConfirmationModalBuilder, ConfirmationTone, CrudService, CustomModalBuilder, DEFAULT_CALENDAR_CONFIG, DEFAULT_MN_ALERT_CONFIG, DefaultCalendarDateFormatter, FieldAppearance, FieldKind, FormLayoutMode, FormModalBuilder, KeyboardMode, MN_ALERT_CONFIG, MN_CALENDAR_COMPONENT_NAME, MN_CALENDAR_CONFIG, MN_CHECKBOX_CONFIG, MN_DATETIME_CONFIG, MN_INPUT_FIELD_CONFIG, MN_INSTANCE_ID, MN_LIB_DUAL_HORIZONTAL_IMAGE, MN_MULTI_SELECT_CONFIG, MN_SECTION_PATH, MN_SELECT_CONFIG, MN_TEXTAREA_CONFIG, MnAlertOutletComponent, MnAlertService, MnAlertStore, MnBadge, MnButton, MnCheckbox, MnConfigService, MnConfirmationBodyComponent, MnCustomBodyHostComponent, MnDatetime, MnDualHorizontalImage, MnFormBodyComponent, MnHiddenBelowDirective, MnInformationCard, MnInputField, MnInstanceDirective, MnLanguageService, MnList, MnModalRef, MnModalService, MnModalShellComponent, MnMultiSelect, MnSectionDirective, MnSelect, MnTabComponent, MnTable, MnTextarea, MnTranslatePipe, MnWizardBodyComponent, ModalBuilder, ModalCloseReason, ModalIntent, ModalKind, ModalSize, NavigationDirection, OptionState, SelectionMode, StepBuilder, StepState, SubmitMode, UpcomingEventRowComponent, UpcomingEventsComponent, ValidationCode, ValidationStatus, WizardFlowMode, WizardModalBuilder, dateTimeAdapter, defaultTextAdapter, enableMnPreviewMode, isTranslatable, mnAlertVariants, mnBadgeVariants, mnButtonVariants, mnCheckboxVariants, mnCheckboxWrapperVariants, mnDatetimeVariants, mnInformationCardVariants, mnInputFieldVariants, mnMultiSelectVariants, mnSelectVariants, mnTextareaVariants, numberAdapter, pickAdapter, provideMnAlerts, provideMnCalendarConfig, provideMnComponentConfig, provideMnConfig, provideMnLanguage, resolveCalendarConfig };
|
|
7869
7919
|
//# sourceMappingURL=mn-angular-lib.mjs.map
|