@warp-ds/elements 2.2.0-next.1 → 2.2.0-next.3
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/index.js +3441 -453
- package/dist/index.js.map +4 -4
- package/dist/packages/affix/index.d.ts +1 -1
- package/dist/packages/affix/index.js +6 -6
- package/dist/packages/affix/index.js.map +2 -2
- package/dist/packages/alert/index.d.ts +3 -4
- package/dist/packages/alert/index.js +8 -8
- package/dist/packages/alert/index.js.map +1 -1
- package/dist/packages/attention/index.d.ts +1 -1
- package/dist/packages/attention/index.js +4 -4
- package/dist/packages/attention/index.js.map +2 -2
- package/dist/packages/badge/index.d.ts +3 -2
- package/dist/packages/badge/index.js +1 -1
- package/dist/packages/badge/index.js.map +1 -1
- package/dist/packages/box/index.d.ts +5 -3
- package/dist/packages/box/index.js +1 -1
- package/dist/packages/box/index.js.map +1 -1
- package/dist/packages/breadcrumbs/index.d.ts +1 -1
- package/dist/packages/breadcrumbs/index.js +3 -3
- package/dist/packages/breadcrumbs/index.js.map +2 -2
- package/dist/packages/button/button.test.d.ts +1 -0
- package/dist/packages/button/index.d.ts +28 -52
- package/dist/packages/button/index.js +302 -6
- package/dist/packages/button/index.js.map +4 -4
- package/dist/packages/card/index.d.ts +3 -2
- package/dist/packages/card/index.js +3 -3
- package/dist/packages/card/index.js.map +1 -1
- package/dist/packages/expandable/index.d.ts +1 -1
- package/dist/packages/expandable/index.js +6 -6
- package/dist/packages/expandable/index.js.map +2 -2
- package/dist/packages/modal/index.d.ts +3 -3
- package/dist/packages/modal/index.js +314 -357
- package/dist/packages/modal/index.js.map +4 -4
- package/dist/packages/modal/modal-footer.d.ts +2 -2
- package/dist/packages/modal/modal-header.d.ts +12 -20
- package/dist/packages/modal/modal-main.d.ts +14 -24
- package/dist/packages/pill/index.d.ts +1 -1
- package/dist/packages/pill/index.js +5 -5
- package/dist/packages/pill/index.js.map +2 -2
- package/dist/packages/select/index.d.ts +12 -2
- package/dist/packages/select/index.js +304 -7
- package/dist/packages/select/index.js.map +4 -4
- package/dist/packages/styles.d.ts +2 -0
- package/dist/packages/textfield/index.d.ts +5 -5
- package/dist/packages/textfield/index.js +289 -3
- package/dist/packages/textfield/index.js.map +4 -4
- package/dist/packages/toast/index.d.ts +3 -0
- package/dist/packages/toast/index.js +7 -7
- package/dist/packages/toast/index.js.map +1 -1
- package/dist/packages/toast/toast-container.d.ts +3 -4
- package/dist/packages/toast/toast.d.ts +4 -6
- package/dist/packages/utils/expand-transition.d.ts +3 -2
- package/dist/packages/utils/index.d.ts +1 -1
- package/dist/packages/utils/unstyled-heading.d.ts +4 -3
- package/package.json +10 -7
|
@@ -52,6 +52,14 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
52
52
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
53
53
|
mod
|
|
54
54
|
));
|
|
55
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
56
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
57
|
+
for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
|
|
58
|
+
if (decorator = decorators[i2])
|
|
59
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
60
|
+
if (kind && result) __defProp(target, key, result);
|
|
61
|
+
return result;
|
|
62
|
+
};
|
|
55
63
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
56
64
|
|
|
57
65
|
// node_modules/.pnpm/unraw@3.0.0/node_modules/unraw/dist/errors.js
|
|
@@ -428,9 +436,9 @@ var require_moo = __commonJS({
|
|
|
428
436
|
}
|
|
429
437
|
var fallbackRule = errorRule && errorRule.fallback;
|
|
430
438
|
var flags = hasSticky && !fallbackRule ? "ym" : "gm";
|
|
431
|
-
var
|
|
439
|
+
var suffix = hasSticky || fallbackRule ? "" : "|";
|
|
432
440
|
if (unicodeFlag === true) flags += "u";
|
|
433
|
-
var combined = new RegExp(reUnion(parts) +
|
|
441
|
+
var combined = new RegExp(reUnion(parts) + suffix, flags);
|
|
434
442
|
return { regexp: combined, groups, fast, error: errorRule || defaultErrorRule };
|
|
435
443
|
}
|
|
436
444
|
function compile(rules) {
|
|
@@ -438,9 +446,9 @@ var require_moo = __commonJS({
|
|
|
438
446
|
return new Lexer({ start: result }, "start");
|
|
439
447
|
}
|
|
440
448
|
function checkStateGroup(g2, name, map) {
|
|
441
|
-
var
|
|
442
|
-
if (
|
|
443
|
-
throw new Error("Missing state '" +
|
|
449
|
+
var state2 = g2 && (g2.push || g2.next);
|
|
450
|
+
if (state2 && !map[state2]) {
|
|
451
|
+
throw new Error("Missing state '" + state2 + "' (in token '" + g2.defaultType + "' of state '" + name + "')");
|
|
444
452
|
}
|
|
445
453
|
if (g2 && g2.pop && +g2.pop !== 1) {
|
|
446
454
|
throw new Error("pop must be 1 (in token '" + g2.defaultType + "' of state '" + name + "')");
|
|
@@ -487,14 +495,14 @@ var require_moo = __commonJS({
|
|
|
487
495
|
}
|
|
488
496
|
for (var i2 = 0; i2 < keys.length; i2++) {
|
|
489
497
|
var name = keys[i2];
|
|
490
|
-
var
|
|
491
|
-
var groups =
|
|
498
|
+
var state2 = map[name];
|
|
499
|
+
var groups = state2.groups;
|
|
492
500
|
for (var j = 0; j < groups.length; j++) {
|
|
493
501
|
checkStateGroup(groups[j], name, map);
|
|
494
502
|
}
|
|
495
|
-
var fastKeys = Object.getOwnPropertyNames(
|
|
503
|
+
var fastKeys = Object.getOwnPropertyNames(state2.fast);
|
|
496
504
|
for (var j = 0; j < fastKeys.length; j++) {
|
|
497
|
-
checkStateGroup(
|
|
505
|
+
checkStateGroup(state2.fast[fastKeys[j]], name, map);
|
|
498
506
|
}
|
|
499
507
|
}
|
|
500
508
|
return new Lexer(map, start);
|
|
@@ -522,8 +530,8 @@ var require_moo = __commonJS({
|
|
|
522
530
|
return isMap ? reverseMap.get(k) : reverseMap[k];
|
|
523
531
|
};
|
|
524
532
|
}
|
|
525
|
-
var Lexer = function(states,
|
|
526
|
-
this.startState =
|
|
533
|
+
var Lexer = function(states, state2) {
|
|
534
|
+
this.startState = state2;
|
|
527
535
|
this.states = states;
|
|
528
536
|
this.buffer = "";
|
|
529
537
|
this.stack = [];
|
|
@@ -552,10 +560,10 @@ var require_moo = __commonJS({
|
|
|
552
560
|
queuedThrow: this.queuedThrow
|
|
553
561
|
};
|
|
554
562
|
};
|
|
555
|
-
Lexer.prototype.setState = function(
|
|
556
|
-
if (!
|
|
557
|
-
this.state =
|
|
558
|
-
var info = this.states[
|
|
563
|
+
Lexer.prototype.setState = function(state2) {
|
|
564
|
+
if (!state2 || this.state === state2) return;
|
|
565
|
+
this.state = state2;
|
|
566
|
+
var info = this.states[state2];
|
|
559
567
|
this.groups = info.groups;
|
|
560
568
|
this.error = info.error;
|
|
561
569
|
this.re = info.regexp;
|
|
@@ -564,9 +572,9 @@ var require_moo = __commonJS({
|
|
|
564
572
|
Lexer.prototype.popState = function() {
|
|
565
573
|
this.setState(this.stack.pop());
|
|
566
574
|
};
|
|
567
|
-
Lexer.prototype.pushState = function(
|
|
575
|
+
Lexer.prototype.pushState = function(state2) {
|
|
568
576
|
this.stack.push(this.state);
|
|
569
|
-
this.setState(
|
|
577
|
+
this.setState(state2);
|
|
570
578
|
};
|
|
571
579
|
var eat = hasSticky ? function(re, buffer) {
|
|
572
580
|
return re.exec(buffer);
|
|
@@ -1016,257 +1024,8 @@ var require_parser = __commonJS({
|
|
|
1016
1024
|
}
|
|
1017
1025
|
});
|
|
1018
1026
|
|
|
1019
|
-
// packages/modal/modal-footer.
|
|
1020
|
-
import { html } from "lit";
|
|
1021
|
-
|
|
1022
|
-
// node_modules/.pnpm/@warp-ds+css@2.1.1_@warp-ds+uno@2.1.0_unocss@0.62.0_postcss@8.5.1_rollup@4.32.1_vite@5.3.3_@t_sgrraibu65gdmqpe655kfrpl6a/node_modules/@warp-ds/css/component-classes/index.js
|
|
1023
|
-
var buttonDefaultStyling = "font-bold focusable justify-center transition-colors ease-in-out";
|
|
1024
|
-
var buttonColors = {
|
|
1025
|
-
primary: "s-text-inverted bg-[--w-color-button-primary-background] hover:bg-[--w-color-button-primary-background-hover] active:bg-[--w-color-button-primary-background-active]",
|
|
1026
|
-
secondary: "s-text-link s-border s-bg hover:s-bg-hover hover:s-border-hover active:s-bg-active",
|
|
1027
|
-
utility: "s-text s-bg hover:s-bg-hover active:s-bg-active s-border hover:s-border-hover active:s-border-active",
|
|
1028
|
-
destructive: "s-bg-negative s-text-inverted hover:s-bg-negative-hover active:s-bg-negative-active",
|
|
1029
|
-
pill: "s-icon hover:s-icon-hover active:s-icon-active bg-transparent hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]",
|
|
1030
|
-
disabled: "s-text-inverted s-bg-disabled",
|
|
1031
|
-
quiet: "bg-transparent s-text-link hover:s-bg-hover active:s-bg-active",
|
|
1032
|
-
utilityQuiet: "s-text bg-transparent hover:s-bg-hover active:s-bg-active",
|
|
1033
|
-
negativeQuiet: "bg-transparent s-text-negative hover:s-bg-negative-subtle-hover active:s-bg-negative-subtle-active",
|
|
1034
|
-
loading: "s-text s-bg-subtle",
|
|
1035
|
-
link: "s-text-link"
|
|
1036
|
-
};
|
|
1037
|
-
var buttonTypes = {
|
|
1038
|
-
primary: `border-0 rounded-8 ${buttonDefaultStyling}`,
|
|
1039
|
-
secondary: `border-2 rounded-8 ${buttonDefaultStyling}`,
|
|
1040
|
-
utility: `border rounded-4 ${buttonDefaultStyling}`,
|
|
1041
|
-
negative: `border-0 rounded-8 ${buttonDefaultStyling}`,
|
|
1042
|
-
pill: `p-4 rounded-full border-0 inline-flex items-center justify-center hover:bg-clip-padding ${buttonDefaultStyling}`,
|
|
1043
|
-
link: `bg-transparent focusable ease-in-out inline active:underline hover:underline focus:underline ${buttonColors.link}`
|
|
1044
|
-
};
|
|
1045
|
-
var buttonSizes = {
|
|
1046
|
-
xsmall: "py-6 px-16",
|
|
1047
|
-
small: "py-8 px-16",
|
|
1048
|
-
medium: "py-10 px-14",
|
|
1049
|
-
large: "py-12 px-16",
|
|
1050
|
-
utility: "py-[11px] px-[15px]",
|
|
1051
|
-
smallUtility: "py-[7px] px-[15px]",
|
|
1052
|
-
pill: "min-h-[44px] min-w-[44px]",
|
|
1053
|
-
pillSmall: "min-h-32 min-w-32",
|
|
1054
|
-
link: "p-0"
|
|
1055
|
-
};
|
|
1056
|
-
var buttonTextSizes = {
|
|
1057
|
-
medium: "text-m leading-[24]",
|
|
1058
|
-
xsmall: "text-xs"
|
|
1059
|
-
};
|
|
1060
|
-
var buttonVariants = {
|
|
1061
|
-
inProgress: `border-transparent animate-inprogress pointer-events-none ${buttonColors.loading}`,
|
|
1062
|
-
// .button--in-progress, a.button--in-progress:visited
|
|
1063
|
-
quiet: `border-0 rounded-8 ${buttonDefaultStyling}`,
|
|
1064
|
-
utilityQuiet: `border-0 rounded-4 ${buttonDefaultStyling}`,
|
|
1065
|
-
negativeQuiet: `border-0 rounded-8 ${buttonDefaultStyling}`,
|
|
1066
|
-
isDisabled: `font-bold justify-center transition-colors ease-in-out cursor-default pointer-events-none ${buttonColors.disabled}`
|
|
1067
|
-
// .button:disabled, .button--is-disabled
|
|
1068
|
-
};
|
|
1069
|
-
var button = {
|
|
1070
|
-
// Buttontypes
|
|
1071
|
-
secondary: `${buttonSizes.medium} ${buttonTextSizes.medium} ${buttonTypes.secondary} ${buttonColors.secondary}`,
|
|
1072
|
-
// .button--secondary, .button--default, .button
|
|
1073
|
-
secondaryHref: `${buttonSizes.medium} ${buttonTextSizes.medium} ${buttonTypes.secondary} ${buttonColors.secondary}`,
|
|
1074
|
-
secondaryDisabled: `${buttonSizes.medium} ${buttonTextSizes.medium} ${buttonTypes.secondary} ${buttonVariants.isDisabled}`,
|
|
1075
|
-
secondarySmall: `${buttonTextSizes.xsmall} ${buttonSizes.xsmall} ${buttonTypes.secondary} ${buttonColors.secondary}`,
|
|
1076
|
-
secondarySmallDisabled: `${buttonTextSizes.xsmall} ${buttonSizes.xsmall} ${buttonTypes.secondary} ${buttonVariants.isDisabled}`,
|
|
1077
|
-
secondaryQuiet: `${buttonSizes.medium} ${buttonTextSizes.medium} ${buttonVariants.quiet} ${buttonColors.quiet}`,
|
|
1078
|
-
secondaryQuietDisabled: `${buttonSizes.medium} ${buttonTextSizes.medium} ${buttonVariants.quiet} ${buttonVariants.isDisabled}`,
|
|
1079
|
-
secondarySmallQuiet: `${buttonTextSizes.xsmall} ${buttonSizes.xsmall} ${buttonVariants.quiet} ${buttonColors.quiet}`,
|
|
1080
|
-
secondarySmallQuietDisabled: `${buttonTextSizes.xsmall} ${buttonSizes.xsmall} ${buttonVariants.quiet} ${buttonVariants.isDisabled}`,
|
|
1081
|
-
secondaryLoading: `${buttonSizes.medium} ${buttonTextSizes.medium} ${buttonTypes.secondary} ${buttonVariants.inProgress}`,
|
|
1082
|
-
secondarySmallLoading: `${buttonTextSizes.xsmall} ${buttonSizes.xsmall} ${buttonTypes.secondary} ${buttonVariants.inProgress}`,
|
|
1083
|
-
secondarySmallQuietLoading: `${buttonTextSizes.xsmall} ${buttonSizes.xsmall} ${buttonVariants.quiet} ${buttonVariants.inProgress}`,
|
|
1084
|
-
secondaryQuietLoading: `${buttonSizes.medium} ${buttonTextSizes.medium} ${buttonVariants.quiet} ${buttonVariants.inProgress}`,
|
|
1085
|
-
primary: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonTypes.primary} ${buttonColors.primary}`,
|
|
1086
|
-
// .button--primary, .button--cta
|
|
1087
|
-
primaryDisabled: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonVariants.isDisabled} ${buttonTypes.primary}`,
|
|
1088
|
-
primarySmall: `${buttonSizes.small} ${buttonTextSizes.xsmall} ${buttonTypes.primary} ${buttonColors.primary}`,
|
|
1089
|
-
primarySmallDisabled: `${buttonSizes.small} ${buttonTextSizes.xsmall} ${buttonVariants.isDisabled} ${buttonTypes.primary} `,
|
|
1090
|
-
primaryQuiet: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonVariants.quiet} ${buttonColors.quiet}`,
|
|
1091
|
-
primaryQuietDisabled: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonVariants.quiet} ${buttonVariants.isDisabled}`,
|
|
1092
|
-
primarySmallQuiet: `${buttonSizes.small} ${buttonTextSizes.xsmall} ${buttonVariants.quiet} ${buttonColors.quiet}`,
|
|
1093
|
-
primarySmallQuietDisabled: `${buttonSizes.small} ${buttonTextSizes.xsmall} ${buttonVariants.quiet} ${buttonVariants.isDisabled}`,
|
|
1094
|
-
primaryLoading: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonVariants.inProgress} ${buttonTypes.primary}`,
|
|
1095
|
-
primarySmallLoading: `${buttonSizes.small} ${buttonTextSizes.xsmall} ${buttonVariants.inProgress} ${buttonTypes.primary}`,
|
|
1096
|
-
primarySmallQuietLoading: `${buttonSizes.small} ${buttonTextSizes.xsmall} ${buttonVariants.quiet} ${buttonVariants.inProgress} ${buttonTypes.primary}`,
|
|
1097
|
-
primaryQuietLoading: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonVariants.quiet} ${buttonVariants.inProgress}`,
|
|
1098
|
-
utility: `${buttonSizes.utility} ${buttonTextSizes.medium} ${buttonTypes.utility} ${buttonColors.utility}`,
|
|
1099
|
-
// .button--utility
|
|
1100
|
-
utilityDisabled: `${buttonSizes.utility} ${buttonTextSizes.medium} ${buttonTypes.utility} ${buttonVariants.isDisabled}`,
|
|
1101
|
-
utilityQuiet: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonVariants.utilityQuiet} ${buttonColors.utilityQuiet}`,
|
|
1102
|
-
// .button--utility-flat
|
|
1103
|
-
utilityQuietDisabled: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonVariants.utilityQuiet} ${buttonVariants.isDisabled}`,
|
|
1104
|
-
utilitySmall: `${buttonSizes.smallUtility} ${buttonTextSizes.xsmall} ${buttonTypes.utility} ${buttonColors.utility}`,
|
|
1105
|
-
utilitySmallDisabled: `${buttonSizes.smallUtility} ${buttonTextSizes.xsmall} ${buttonTypes.utility} ${buttonVariants.isDisabled}`,
|
|
1106
|
-
utilitySmallQuiet: `${buttonSizes.smallUtility} ${buttonTextSizes.xsmall} ${buttonVariants.utilityQuiet} ${buttonColors.utilityQuiet}`,
|
|
1107
|
-
utilitySmallQuietDisabled: `${buttonSizes.smallUtility} ${buttonTextSizes.xsmall} ${buttonVariants.utilityQuiet} ${buttonVariants.isDisabled}`,
|
|
1108
|
-
utilityLoading: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonTypes.utility} ${buttonVariants.inProgress}`,
|
|
1109
|
-
utilitySmallLoading: `${buttonSizes.smallUtility} ${buttonTextSizes.xsmall} ${buttonTypes.utility} ${buttonVariants.inProgress}`,
|
|
1110
|
-
utilityQuietLoading: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonVariants.inProgress} ${buttonVariants.utilityQuiet}`,
|
|
1111
|
-
utilitySmallQuietLoading: `${buttonSizes.smallUtility} ${buttonTextSizes.xsmall} ${buttonVariants.inProgress} ${buttonVariants.utilityQuiet}`,
|
|
1112
|
-
negative: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonTypes.negative} ${buttonColors.destructive}`,
|
|
1113
|
-
// .button--destructive
|
|
1114
|
-
negativeDisabled: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonTypes.negative} ${buttonVariants.isDisabled}`,
|
|
1115
|
-
negativeQuiet: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonVariants.negativeQuiet} ${buttonColors.negativeQuiet}`,
|
|
1116
|
-
// .button--destructive-flat
|
|
1117
|
-
negativeQuietDisabled: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonVariants.negativeQuiet}${buttonVariants.isDisabled}`,
|
|
1118
|
-
negativeSmall: `${buttonSizes.small} ${buttonTextSizes.xsmall} ${buttonTypes.negative} ${buttonColors.destructive}`,
|
|
1119
|
-
negativeSmallDisabled: `${buttonSizes.small} ${buttonTextSizes.xsmall} ${buttonTypes.negative} ${buttonVariants.isDisabled}`,
|
|
1120
|
-
negativeSmallQuiet: `${buttonSizes.small} ${buttonTextSizes.xsmall} ${buttonVariants.negativeQuiet} ${buttonColors.negativeQuiet}`,
|
|
1121
|
-
negativeSmallQuietDisabled: `${buttonSizes.small} ${buttonTextSizes.xsmall} ${buttonVariants.negativeQuiet} ${buttonVariants.isDisabled}`,
|
|
1122
|
-
negativeLoading: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonTypes.negative} ${buttonVariants.inProgress}`,
|
|
1123
|
-
negativeSmallLoading: `${buttonSizes.small} ${buttonTextSizes.xsmall} ${buttonVariants.inProgress} ${buttonTypes.negative}`,
|
|
1124
|
-
negativeQuietLoading: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonVariants.negativeQuiet} ${buttonTypes.negative} ${buttonVariants.inProgress}`,
|
|
1125
|
-
negativeSmallQuietLoading: `${buttonSizes.small} ${buttonTextSizes.xsmall} ${buttonVariants.negativeQuiet} ${buttonVariants.inProgress}`,
|
|
1126
|
-
pill: `${buttonSizes.pill} ${buttonTextSizes.medium} ${buttonTypes.pill} ${buttonColors.pill}`,
|
|
1127
|
-
// .button--pill
|
|
1128
|
-
pillSmall: `${buttonSizes.pillSmall} ${buttonTextSizes.xsmall} ${buttonTypes.pill} ${buttonColors.pill}`,
|
|
1129
|
-
pillLoading: `${buttonSizes.pill} ${buttonTextSizes.medium} ${buttonTypes.pill} ${buttonVariants.inProgress}`,
|
|
1130
|
-
pillSmallLoading: `${buttonSizes.pillSmall} ${buttonTextSizes.xsmall} ${buttonTypes.pill} ${buttonVariants.inProgress}`,
|
|
1131
|
-
link: `${buttonSizes.link} ${buttonTextSizes.medium} ${buttonTypes.link}`,
|
|
1132
|
-
linkSmall: `${buttonSizes.link} ${buttonTextSizes.xsmall} ${buttonTypes.link}`,
|
|
1133
|
-
linkAsButton: "inline-block active:no-underline hover:no-underline focus:no-underline text-center",
|
|
1134
|
-
a11y: "sr-only",
|
|
1135
|
-
fullWidth: "w-full max-w-full",
|
|
1136
|
-
contentWidth: "max-w-max"
|
|
1137
|
-
};
|
|
1138
|
-
var modal = {
|
|
1139
|
-
backdrop: "fixed inset-0 flex sm:place-content-center sm:place-items-center items-end z-30 [--w-modal-max-height:80%] [--w-modal-width:640px] bg-[--w-black/25]",
|
|
1140
|
-
base: "pb-safe-[32] shadow-m max-h-[--w-modal-max-height] min-h-[--w-modal-min-height] w-[--w-modal-width] h-[--w-modal-height] relative transition-300 ease-in-out backface-hidden will-change-height rounded-8 mx-0 sm:mx-16 bg-[--w-s-color-surface-elevated-100] flex flex-col overflow-hidden outline-none space-y-16 pt-8 sm:pt-32 sm:pb-32 rounded-b-0 sm:rounded-b-8",
|
|
1141
|
-
content: "block overflow-y-auto overflow-x-hidden last-child:mb-0 grow shrink px-16 sm:px-32 relative",
|
|
1142
|
-
footer: "flex justify-end shrink-0 px-16 sm:px-32",
|
|
1143
|
-
transitionTitle: "transition-all duration-300",
|
|
1144
|
-
transitionTitleCenter: "justify-self-center self-center",
|
|
1145
|
-
transitionTitleColSpan: "col-span-2",
|
|
1146
|
-
title: "py-8 sm:py-0 -mt-4 sm:-mt-8 min-h-40 sm:min-h-48 grid gap-8 sm:gap-16 grid-cols-[auto_1fr_auto] items-start px-16 sm:px-32 border-b sm:border-b-0 shrink-0",
|
|
1147
|
-
titleText: "mb-0 h4 sm:h3",
|
|
1148
|
-
titleButton: `${buttonTextSizes.medium} ${buttonTypes.pill} ${buttonColors.pill} sm:min-h-[44px] sm:min-w-[44px] min-h-[32px] min-w-[32px]`,
|
|
1149
|
-
titleButtonLeft: "-ml-8 sm:-ml-12 justify-self-start",
|
|
1150
|
-
titleButtonRight: "-mr-8 sm:-mr-12 justify-self-end",
|
|
1151
|
-
titleButtonIcon: "h-16 w-16 sm:h-24 sm:w-24",
|
|
1152
|
-
titleButtonIconRotated: "transform rotate-90"
|
|
1153
|
-
};
|
|
1154
|
-
var modalElement = {
|
|
1155
|
-
// several items in here are 'resets' for the <dialog> element
|
|
1156
|
-
dialogEl: "bg-transparent backface-hidden w-unset h-unset max-w-unset max-h-unset p-0 m-auto border-0 inset-0 open:flex open:fixed sm:place-content-center sm:place-items-center items-end [--w-modal-max-height:80%] [--w-modal-width:640px]",
|
|
1157
|
-
dialogInner: "transition-all relative pb-safe-[32] sm:pb-32 shadow-m max-h-[--w-modal-max-height] min-h-[--w-modal-min-height] w-[--w-modal-width] h-[--w-modal-height] ease-in-out backface-hidden will-change-height rounded-8 sm:mx-16 s-bg flex flex-col overflow-hidden lt-sm:rounded-b-0",
|
|
1158
|
-
contentSlot: "block overflow-y-auto overflow-x-hidden last-child:mb-0 grow shrink px-16 sm:px-32 relative",
|
|
1159
|
-
header: "relative pb-8",
|
|
1160
|
-
headerTitleBar: "pt-16 sm:pt-24 px-16 sm:px-32 grid gap-12 grid-cols-[auto_1fr_auto] items-start shrink-0!",
|
|
1161
|
-
headerButton: "sm:min-h-[32px] sm:min-w-[32px] min-h-[40px] min-w-[40px] text-m leading-[24] p-4 rounded-full border-0 inline-flex items-center justify-center hover:bg-clip-padding font-bold focusable transition-colors ease-in-out",
|
|
1162
|
-
headerButtonLeft: "-ml-8 s-icon bg-transparent hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]",
|
|
1163
|
-
headerCloseButton: "-mr-8 s-icon bg-transparent hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]",
|
|
1164
|
-
headerCloseButtonOnImage: `absolute right-8 top-8 z-10 s-color-inverted bg-[var(--w-black)/70] hover:bg-[var(--w-black)/85] active:bg-[var(--w-black)] s-text-inverted`,
|
|
1165
|
-
headerTitle: "mb-0 t3 self-center",
|
|
1166
|
-
headerTitleWithBackButton: "justify-self-center",
|
|
1167
|
-
headerTitleWithoutBackButton: "col-span-2",
|
|
1168
|
-
headerTitleWithTopArea: "pt-16 px-16 sm:px-32",
|
|
1169
|
-
footer: "flex justify-end shrink-0 px-16 sm:px-32 pt-24"
|
|
1170
|
-
};
|
|
1171
|
-
var prefixSuffixWrapper = "absolute top-0 bottom-0 flex justify-center items-center focusable rounded-4 focus:[--w-outline-offset:-2px] bg-transparent ";
|
|
1172
|
-
var suffix = {
|
|
1173
|
-
wrapper: prefixSuffixWrapper + "right-0",
|
|
1174
|
-
wrapperWithLabel: "w-max pr-12",
|
|
1175
|
-
wrapperWithIcon: "w-40",
|
|
1176
|
-
label: "antialiased block relative cursor-default pb-0 font-bold text-xs s-text"
|
|
1177
|
-
};
|
|
1178
|
-
var prefix = {
|
|
1179
|
-
wrapper: prefixSuffixWrapper + "left-0",
|
|
1180
|
-
wrapperWithLabel: "w-max pl-12",
|
|
1181
|
-
wrapperWithIcon: "w-40",
|
|
1182
|
-
label: "antialiased block relative cursor-default pb-0 font-bold text-xs s-text"
|
|
1183
|
-
};
|
|
1184
|
-
var toggle = {
|
|
1185
|
-
// wrapper classes
|
|
1186
|
-
field: "relative text-m",
|
|
1187
|
-
// true
|
|
1188
|
-
wrapper: "relative py-1",
|
|
1189
|
-
// true
|
|
1190
|
-
wrapperRadioButtons: "inline-flex font-bold rounded-8 focus-within:focusable",
|
|
1191
|
-
// isRadioButton && !isEqualWidth
|
|
1192
|
-
wrapperRadioButtonsJustified: "flex font-bold rounded-8 focus-within:focusable",
|
|
1193
|
-
// isRadioButton && isEqualWidth,
|
|
1194
|
-
// group classes
|
|
1195
|
-
radioButtonsGroup: "group",
|
|
1196
|
-
// isRadioButton
|
|
1197
|
-
radioButtonsGroupJustified: "grow-1 shrink-0 basis-auto",
|
|
1198
|
-
// isRadioButton && isEqualWidth
|
|
1199
|
-
// input classes
|
|
1200
|
-
input: "peer",
|
|
1201
|
-
a11y: "sr-only",
|
|
1202
|
-
// label classes
|
|
1203
|
-
label: "peer-focus:focusable cursor-pointer text-m s-text s-border py-2 pl-28 select-none relative block before:border before:absolute before:transition-all before:left-0 before:w-20 before:h-20 before:top-2",
|
|
1204
|
-
// !isRadioButton
|
|
1205
|
-
labelBefore: 'before:content-[""] before:block',
|
|
1206
|
-
// !isRadioButton && !isIndeterminate
|
|
1207
|
-
checkbox: "before:s-bg before:rounded-2 hover:before:s-border-primary hover:before:s-bg-hover peer-checked:before:bg-center peer-checked:before:bg-[url(var(--w-icon-toggle-checked))] peer-checked:before:s-border-primary peer-checked:before:s-bg-primary peer-checked:peer-hover:before:s-border-primary-hover peer-checked:peer-hover:before:s-bg-primary-hover",
|
|
1208
|
-
// isCheckbox && !isIndeterminate && !isInvalid && !isDisabled
|
|
1209
|
-
checkboxInvalid: "before:s-bg before:s-border-negative before:rounded-2 hover:before:s-bg-negative-subtle-hover hover:before:s-border-negative-hover peer-checked:before:bg-center peer-checked:before:bg-[url(var(--w-icon-toggle-checked))] peer-checked:before:s-bg-negative peer-checked:before:s-border-negative peer-checked:peer-hover:before:s-bg-negative-hover peer-checked:peer-hover:before:s-border-negative-hover",
|
|
1210
|
-
// isCheckbox && !isIndeterminate && isInvalid && !isDisabled
|
|
1211
|
-
checkboxDisabled: "before:s-bg-disabled-subtle before:s-border-disabled pointer-events-none before:rounded-2 peer-checked:before:bg-center peer-checked:before:bg-[url(var(--w-icon-toggle-checked))] peer-checked:before:s-border-disabled peer-checked:before:s-bg-disabled",
|
|
1212
|
-
// isCheckbox && !isIndeterminate && !isInvalid && isDisabled
|
|
1213
|
-
indeterminate: 'before:content-["\u2013"] before:rounded-2 before:leading-xs before:text-center before:font-bold before:s-icon-inverted peer-indeterminate:before:s-border-primary peer-indeterminate:before:s-bg-primary peer-indeterminate:hover:before:s-border-primary-hover peer-indeterminate:hover:before:s-bg-primary-hover',
|
|
1214
|
-
// isCheckbox && isIndeterminate && !isInvalid && !isDisabled
|
|
1215
|
-
indeterminateInvalid: 'before:content-["\u2013"] before:rounded-2 before:leading-xs before:text-center before:font-bold before:s-icon-inverted peer-indeterminate:before:s-border-negative peer-indeterminate:before:s-bg-negative peer-indeterminate:hover:before:s-border-negative-hover peer-indeterminate:hover:before:s-bg-negative-hover',
|
|
1216
|
-
// isCheckbox && isIndeterminate && isInvalid && !isDisabled
|
|
1217
|
-
indeterminateDisabled: 'before:content-["\u2013"] before:rounded-2 before:leading-xs before:text-center before:font-bold pointer-events-none before:s-icon-inverted peer-indeterminate:before:s-border-disabled peer-indeterminate:before:s-bg-disabled',
|
|
1218
|
-
// isCheckbox && isIndeterminate && !isInvalid && isDisabled
|
|
1219
|
-
radio: "before:s-bg before:rounded-full peer-checked:before:border-[6] peer-checked:before:s-border-selected peer-checked:peer-hover:before:s-border-selected-hover peer-hover:before:s-border-primary peer-hover:before:s-bg-hover",
|
|
1220
|
-
// isRadio && !isDisabled && !isInvalid
|
|
1221
|
-
radioInvalid: "before:s-bg before:s-border-negative before:rounded-full peer-checked:before:border-[6] peer-hover:before:s-bg-negative-subtle peer-hover:before:s-border-negative-hover peer-checked:before:s-border-negative peer-checked:peer-hover:before:s-border-negative-hover",
|
|
1222
|
-
// isRadio && isInvalid && !isDisabled
|
|
1223
|
-
radioDisabled: "before:s-bg-disabled-subtle before:s-border-disabled pointer-events-none before:rounded-full peer-checked:before:border-[6]",
|
|
1224
|
-
// isRadio && !isInvalid && isDisabled
|
|
1225
|
-
radioButtonsLabel: "peer-hover:peer-not-checked:s-bg-hover peer-checked:s-text-inverted peer-checked:s-bg-primary peer-checked:s-border-primary block relative font-bold cursor-pointer s-text-link text-center s-bg border-2 s-border group-first-of-type:rounded-tl-8 group-first-of-type:rounded-bl-8 group-last-of-type:rounded-tr-8 group-last-of-type:rounded-br-8 group-not-last-of-type:border-r-0 peer-checked:z-10 group-not-first:-ml-2",
|
|
1226
|
-
// isRadioButtons
|
|
1227
|
-
radioButtonsRegular: "text-s py-8 pl-12 pr-14",
|
|
1228
|
-
// isRadioButtons && !isSmall
|
|
1229
|
-
radioButtonsSmall: "text-xs py-[5px] px-[8px]"
|
|
1230
|
-
// isRadioButtons && isSmall
|
|
1231
|
-
};
|
|
1232
|
-
var deadToggle = {
|
|
1233
|
-
wrapper: `${toggle.wrapper} h-20 w-20 pointer-events-none`,
|
|
1234
|
-
input: `${toggle.input} hidden`,
|
|
1235
|
-
inputVue: "hidden",
|
|
1236
|
-
labelVue: "-mt-2",
|
|
1237
|
-
labelRadio: `${toggle.label} ${toggle.labelBefore} ${toggle.radio}`,
|
|
1238
|
-
labelCheckbox: `${toggle.label} ${toggle.labelBefore} ${toggle.checkbox}`
|
|
1239
|
-
};
|
|
1240
|
-
var attention = {
|
|
1241
|
-
base: "border-2 relative flex items-start",
|
|
1242
|
-
tooltip: "s-bg-inverted border-[--w-s-color-background-inverted] shadow-m s-text-inverted-static rounded-4 py-6 px-8",
|
|
1243
|
-
callout: "bg-[--w-color-callout-background] border-[--w-color-callout-border] s-text py-8 px-16 rounded-8",
|
|
1244
|
-
highlight: "bg-[--w-color-callout-background] border-[--w-color-callout-border] s-text py-8 px-16 rounded-8 drop-shadow-m translate-z-0",
|
|
1245
|
-
popover: "bg-[--w-s-color-surface-elevated-300] border-[--w-s-color-surface-elevated-300] s-text rounded-8 p-16 drop-shadow-m translate-z-0",
|
|
1246
|
-
arrowBase: "absolute h-[14px] w-[14px] border-2 border-b-0 border-r-0 rounded-tl-4 transform",
|
|
1247
|
-
arrowDirectionLeftStart: "-left-[8px]",
|
|
1248
|
-
arrowDirectionLeft: "-left-[8px]",
|
|
1249
|
-
arrowDirectionLeftEnd: "-left-[8px]",
|
|
1250
|
-
arrowDirectionRightStart: "-right-[8px]",
|
|
1251
|
-
arrowDirectionRight: "-right-[8px]",
|
|
1252
|
-
arrowDirectionRightEnd: "-right-[8px]",
|
|
1253
|
-
arrowDirectionBottomStart: "-bottom-[8px]",
|
|
1254
|
-
arrowDirectionBottom: "-bottom-[8px]",
|
|
1255
|
-
arrowDirectionBottomEnd: "-bottom-[8px]",
|
|
1256
|
-
arrowDirectionTopStart: "-top-[8px]",
|
|
1257
|
-
arrowDirectionTop: "-top-[8px]",
|
|
1258
|
-
arrowDirectionTopEnd: "-top-[8px]",
|
|
1259
|
-
arrowTooltip: "s-bg-inverted border-[--w-s-color-background-inverted]",
|
|
1260
|
-
arrowCallout: "bg-[--w-color-callout-background] border-[--w-color-callout-border]",
|
|
1261
|
-
arrowPopover: "bg-[--w-s-color-surface-elevated-300] border-[--w-s-color-surface-elevated-300]",
|
|
1262
|
-
arrowHighlight: "bg-[--w-color-callout-background] border-[--w-color-callout-border]",
|
|
1263
|
-
content: "last-child:mb-0",
|
|
1264
|
-
notCallout: "absolute z-50",
|
|
1265
|
-
closeBtn: `${buttonTextSizes.medium} ${buttonTypes.pill} ${buttonColors.pill} justify-self-end -mr-8 ml-8`
|
|
1266
|
-
};
|
|
1267
|
-
|
|
1268
|
-
// packages/modal/modal-footer.js
|
|
1269
|
-
import WarpElement from "@warp-ds/elements-core";
|
|
1027
|
+
// packages/modal/modal-footer.ts
|
|
1028
|
+
import { html, css, LitElement } from "lit";
|
|
1270
1029
|
|
|
1271
1030
|
// packages/modal/util.js
|
|
1272
1031
|
var CanCloseMixin = (superClass) => class extends superClass {
|
|
@@ -1290,20 +1049,35 @@ var ProvidesCanCloseToSlotsMixin = (superClass) => class extends superClass {
|
|
|
1290
1049
|
}
|
|
1291
1050
|
};
|
|
1292
1051
|
|
|
1293
|
-
// packages/modal/modal-footer.
|
|
1294
|
-
var ModalFooter = class extends CanCloseMixin(ProvidesCanCloseToSlotsMixin(
|
|
1052
|
+
// packages/modal/modal-footer.ts
|
|
1053
|
+
var ModalFooter = class extends CanCloseMixin(ProvidesCanCloseToSlotsMixin(LitElement)) {
|
|
1295
1054
|
render() {
|
|
1296
1055
|
return html`
|
|
1297
|
-
<div class="
|
|
1056
|
+
<div class="footer">
|
|
1298
1057
|
<slot @slotchange="${this.handleSlotChange}"></slot>
|
|
1299
1058
|
</div>
|
|
1300
1059
|
`;
|
|
1301
1060
|
}
|
|
1302
1061
|
};
|
|
1303
|
-
|
|
1062
|
+
ModalFooter.styles = css`
|
|
1063
|
+
.footer {
|
|
1064
|
+
display:flex;
|
|
1065
|
+
flex-shrink:0;
|
|
1066
|
+
justify-content:flex-end;
|
|
1067
|
+
padding-left:1.6rem;
|
|
1068
|
+
padding-right:1.6rem;
|
|
1069
|
+
padding-top:2.4rem;
|
|
1070
|
+
}
|
|
1071
|
+
@media (min-width: 480px){
|
|
1072
|
+
.footer {
|
|
1073
|
+
padding-left:3.2rem;
|
|
1074
|
+
padding-right:3.2rem;
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1077
|
+
`;
|
|
1304
1078
|
|
|
1305
|
-
// packages/modal/modal-header.
|
|
1306
|
-
import { html as html4, nothing } from "lit";
|
|
1079
|
+
// packages/modal/modal-header.ts
|
|
1080
|
+
import { css as css2, html as html4, LitElement as LitElement4, nothing } from "lit";
|
|
1307
1081
|
|
|
1308
1082
|
// node_modules/.pnpm/@itsy+animate@0.0.9/node_modules/@itsy/animate/src/utility.js
|
|
1309
1083
|
var computeDeltas = (first, last) => ({
|
|
@@ -1324,10 +1098,10 @@ var animationDefaults = { easing: "ease", duration: 300 };
|
|
|
1324
1098
|
var reduceMotion = false;
|
|
1325
1099
|
var windowExists = typeof window !== "undefined";
|
|
1326
1100
|
if (windowExists) {
|
|
1327
|
-
const
|
|
1101
|
+
const query3 = window.matchMedia("(prefers-reduced-motion: reduce)");
|
|
1328
1102
|
const callback = ({ matches }) => reduceMotion = matches;
|
|
1329
|
-
if (
|
|
1330
|
-
callback(
|
|
1103
|
+
if (query3.addEventListener) query3.addEventListener("change", callback);
|
|
1104
|
+
callback(query3);
|
|
1331
1105
|
}
|
|
1332
1106
|
|
|
1333
1107
|
// node_modules/.pnpm/@itsy+animate@0.0.9/node_modules/@itsy/animate/src/move.js
|
|
@@ -1377,7 +1151,7 @@ var Move = class {
|
|
|
1377
1151
|
}
|
|
1378
1152
|
};
|
|
1379
1153
|
|
|
1380
|
-
// node_modules/.pnpm/@lingui+core@5.2.0_@lingui+babel-plugin-lingui-macro@5.2.0_babel-plugin-macros@3.1.
|
|
1154
|
+
// node_modules/.pnpm/@lingui+core@5.2.0_@lingui+babel-plugin-lingui-macro@5.2.0_babel-plugin-macros@3.1.0_ty_33a2537ce57a59324989ce8020998d0e/node_modules/@lingui/core/dist/index.mjs
|
|
1381
1155
|
var import_unraw = __toESM(require_dist(), 1);
|
|
1382
1156
|
|
|
1383
1157
|
// node_modules/.pnpm/@lingui+message-utils@5.2.0/node_modules/@lingui/message-utils/dist/compileMessage.mjs
|
|
@@ -1699,7 +1473,7 @@ Message: ${message}`);
|
|
|
1699
1473
|
}
|
|
1700
1474
|
}
|
|
1701
1475
|
|
|
1702
|
-
// node_modules/.pnpm/@lingui+core@5.2.0_@lingui+babel-plugin-lingui-macro@5.2.0_babel-plugin-macros@3.1.
|
|
1476
|
+
// node_modules/.pnpm/@lingui+core@5.2.0_@lingui+babel-plugin-lingui-macro@5.2.0_babel-plugin-macros@3.1.0_ty_33a2537ce57a59324989ce8020998d0e/node_modules/@lingui/core/dist/index.mjs
|
|
1703
1477
|
var isString = (s) => typeof s === "string";
|
|
1704
1478
|
var isFunction = (f2) => typeof f2 === "function";
|
|
1705
1479
|
var cache = /* @__PURE__ */ new Map();
|
|
@@ -2107,8 +1881,11 @@ function setupI18n(params = {}) {
|
|
|
2107
1881
|
}
|
|
2108
1882
|
var i18n = setupI18n();
|
|
2109
1883
|
|
|
2110
|
-
//
|
|
2111
|
-
import {
|
|
1884
|
+
// packages/modal/modal-header.ts
|
|
1885
|
+
import { property, query, state } from "lit/decorators.js";
|
|
1886
|
+
|
|
1887
|
+
// node_modules/.pnpm/@warp-ds+icons@2.5.0_@lingui+core@5.2.0_@lingui+babel-plugin-lingui-macro@5.2.0_babel-p_f73b1d3c5bd9121d6f30248535f1f172/node_modules/@warp-ds/icons/dist/elements/arrow-left-16.js
|
|
1888
|
+
import { LitElement as LitElement2 } from "lit";
|
|
2112
1889
|
import { unsafeStatic, html as html2 } from "lit/static-html.js";
|
|
2113
1890
|
var messages = JSON.parse('{"icon.title.arrow-left":["Pil som peker mot venstre"]}');
|
|
2114
1891
|
var messages2 = JSON.parse('{"icon.title.arrow-left":["Leftward-pointing arrow"]}');
|
|
@@ -2191,7 +1968,7 @@ var activateI18n = (enMessages, nbMessages, fiMessages, daMessages, svMessages)
|
|
|
2191
1968
|
i18n.activate(locale);
|
|
2192
1969
|
};
|
|
2193
1970
|
activateI18n(messages2, messages, messages3, messages4, messages5);
|
|
2194
|
-
var IconArrowLeft16 = class extends
|
|
1971
|
+
var IconArrowLeft16 = class extends LitElement2 {
|
|
2195
1972
|
render() {
|
|
2196
1973
|
const title = i18n.t({ message: `Leftward-pointing arrow`, id: "icon.title.arrow-left", comment: "Title for table arrow left icon" });
|
|
2197
1974
|
return html2`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-arrow-left-16-part">${unsafeStatic(`<title>${title}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-width="1.5" d="M5.222 8h6.667"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M7.444 11.75 4.111 8l3.333-3.75"></path></svg>`;
|
|
@@ -2201,8 +1978,8 @@ if (!customElements.get("w-icon-arrow-left-16")) {
|
|
|
2201
1978
|
customElements.define("w-icon-arrow-left-16", IconArrowLeft16);
|
|
2202
1979
|
}
|
|
2203
1980
|
|
|
2204
|
-
// node_modules/.pnpm/@warp-ds+icons@2.5.0_@lingui+core@5.2.0_@lingui+babel-plugin-lingui-macro@5.2.0_babel-
|
|
2205
|
-
import { LitElement as
|
|
1981
|
+
// node_modules/.pnpm/@warp-ds+icons@2.5.0_@lingui+core@5.2.0_@lingui+babel-plugin-lingui-macro@5.2.0_babel-p_f73b1d3c5bd9121d6f30248535f1f172/node_modules/@warp-ds/icons/dist/elements/close-16.js
|
|
1982
|
+
import { LitElement as LitElement3 } from "lit";
|
|
2206
1983
|
import { unsafeStatic as unsafeStatic2, html as html3 } from "lit/static-html.js";
|
|
2207
1984
|
var messages6 = JSON.parse('{"icon.title.close":["Kryss"]}');
|
|
2208
1985
|
var messages22 = JSON.parse('{"icon.title.close":["Cross"]}');
|
|
@@ -2285,7 +2062,7 @@ var activateI18n2 = (enMessages, nbMessages, fiMessages, daMessages, svMessages)
|
|
|
2285
2062
|
i18n.activate(locale);
|
|
2286
2063
|
};
|
|
2287
2064
|
activateI18n2(messages22, messages6, messages32, messages42, messages52);
|
|
2288
|
-
var IconClose16 = class extends
|
|
2065
|
+
var IconClose16 = class extends LitElement3 {
|
|
2289
2066
|
render() {
|
|
2290
2067
|
const title = i18n.t({ message: `Cross`, id: "icon.title.close", comment: "Title for close icon" });
|
|
2291
2068
|
return html3`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-close-16-part">${unsafeStatic2(`<title>${title}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m12.5 3.5-9 9m0-9 9 9"></path></svg>`;
|
|
@@ -2295,10 +2072,6 @@ if (!customElements.get("w-icon-close-16")) {
|
|
|
2295
2072
|
customElements.define("w-icon-close-16", IconClose16);
|
|
2296
2073
|
}
|
|
2297
2074
|
|
|
2298
|
-
// packages/modal/modal-header.js
|
|
2299
|
-
import WarpElement2 from "@warp-ds/elements-core";
|
|
2300
|
-
import { createRef, ref } from "lit/directives/ref.js";
|
|
2301
|
-
|
|
2302
2075
|
// packages/i18n.ts
|
|
2303
2076
|
var supportedLocales3 = ["en", "nb", "fi", "da", "sv"];
|
|
2304
2077
|
var defaultLocale4 = "en";
|
|
@@ -2349,22 +2122,20 @@ var messages10 = JSON.parse('{"modal.aria.back":["Tilbake"],"modal.aria.close":[
|
|
|
2349
2122
|
// packages/modal/locales/sv/messages.mjs
|
|
2350
2123
|
var messages11 = JSON.parse('{"modal.aria.back":["Tillbaka"],"modal.aria.close":["St\xE4ng"]}');
|
|
2351
2124
|
|
|
2352
|
-
// packages/modal/modal-header.
|
|
2353
|
-
var
|
|
2354
|
-
var ModalHeader = class extends CanCloseMixin(WarpElement2) {
|
|
2125
|
+
// packages/modal/modal-header.ts
|
|
2126
|
+
var ModalHeader = class extends CanCloseMixin(LitElement4) {
|
|
2355
2127
|
constructor() {
|
|
2356
2128
|
super();
|
|
2357
|
-
__publicField(this, "titleEl", createRef());
|
|
2358
|
-
activateI18n3(messages8, messages10, messages9, messages7, messages11);
|
|
2359
2129
|
this._hasTopContent = false;
|
|
2130
|
+
activateI18n3(messages8, messages10, messages9, messages7, messages11);
|
|
2360
2131
|
}
|
|
2361
2132
|
render() {
|
|
2362
2133
|
return html4`
|
|
2363
|
-
<div class="
|
|
2134
|
+
<div class="header">
|
|
2364
2135
|
<slot name="top" @slotchange=${this.handleTopSlotChange}></slot>
|
|
2365
|
-
<div class="${this._hasTopContent ? "" :
|
|
2136
|
+
<div class="${this._hasTopContent ? "" : "header-title-bar"}">
|
|
2366
2137
|
${this.backButton}
|
|
2367
|
-
<h1
|
|
2138
|
+
<h1 class="title-el ${this.titleClasses}">${this.title}</h1>
|
|
2368
2139
|
${this.closeButton}
|
|
2369
2140
|
</div>
|
|
2370
2141
|
</div>
|
|
@@ -2372,7 +2143,7 @@ var ModalHeader = class extends CanCloseMixin(WarpElement2) {
|
|
|
2372
2143
|
}
|
|
2373
2144
|
async willUpdate(changedProperties) {
|
|
2374
2145
|
if (changedProperties.has("back")) {
|
|
2375
|
-
const move = new Move(this.titleEl
|
|
2146
|
+
const move = new Move(this.titleEl);
|
|
2376
2147
|
move.when(async () => {
|
|
2377
2148
|
await this.updateComplete;
|
|
2378
2149
|
});
|
|
@@ -2380,9 +2151,9 @@ var ModalHeader = class extends CanCloseMixin(WarpElement2) {
|
|
|
2380
2151
|
}
|
|
2381
2152
|
get titleClasses() {
|
|
2382
2153
|
return [
|
|
2383
|
-
|
|
2384
|
-
this.back ?
|
|
2385
|
-
this._hasTopContent ?
|
|
2154
|
+
"header-title",
|
|
2155
|
+
this.back ? "header-title-with-back-button" : "header-title-without-back-button",
|
|
2156
|
+
this._hasTopContent ? "header-title-with-top-area" : ""
|
|
2386
2157
|
].join(" ");
|
|
2387
2158
|
}
|
|
2388
2159
|
get backButton() {
|
|
@@ -2393,13 +2164,13 @@ var ModalHeader = class extends CanCloseMixin(WarpElement2) {
|
|
|
2393
2164
|
message: "Back",
|
|
2394
2165
|
comment: "Aria label for the back button in modal"
|
|
2395
2166
|
})}"
|
|
2396
|
-
class="
|
|
2167
|
+
class="header-button header-button-left"
|
|
2397
2168
|
@click="${this.emitBack}">
|
|
2398
2169
|
<w-icon-arrow-left-16></w-icon-arrow-left-16>
|
|
2399
2170
|
</button>` : nothing;
|
|
2400
2171
|
}
|
|
2401
2172
|
get closeButton() {
|
|
2402
|
-
if (this
|
|
2173
|
+
if (this.noClose) return nothing;
|
|
2403
2174
|
return html4`<button
|
|
2404
2175
|
type="button"
|
|
2405
2176
|
aria-label="${i18n._({
|
|
@@ -2407,7 +2178,7 @@ var ModalHeader = class extends CanCloseMixin(WarpElement2) {
|
|
|
2407
2178
|
message: "Close",
|
|
2408
2179
|
comment: "Aria label for the close button in modal"
|
|
2409
2180
|
})}"
|
|
2410
|
-
class="
|
|
2181
|
+
class="header-button ${this._hasTopContent ? "header-close-button-on-image" : "header-close-button"}"
|
|
2411
2182
|
@click="${this.close}">
|
|
2412
2183
|
<w-icon-close-16></w-icon-close-16>
|
|
2413
2184
|
</button>`;
|
|
@@ -2420,18 +2191,136 @@ var ModalHeader = class extends CanCloseMixin(WarpElement2) {
|
|
|
2420
2191
|
this._hasTopContent = !!topContent.length;
|
|
2421
2192
|
}
|
|
2422
2193
|
};
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2194
|
+
ModalHeader.styles = css2`
|
|
2195
|
+
.header {
|
|
2196
|
+
position: relative;
|
|
2197
|
+
padding-bottom: 0.8rem;
|
|
2198
|
+
}
|
|
2199
|
+
.header-title-bar {
|
|
2200
|
+
display:grid;
|
|
2201
|
+
flex-shrink:0 !important;
|
|
2202
|
+
gap:1.2rem;
|
|
2203
|
+
grid-template-columns:auto 1fr auto;
|
|
2204
|
+
align-items:flex-start;
|
|
2205
|
+
padding-left:1.6rem;
|
|
2206
|
+
padding-right:1.6rem;
|
|
2207
|
+
padding-top:1.6rem;
|
|
2208
|
+
}
|
|
2209
|
+
.header-title {
|
|
2210
|
+
font-weight:700;
|
|
2211
|
+
font-size:var(--w-font-size-l);
|
|
2212
|
+
line-height:var(--w-line-height-l);
|
|
2213
|
+
align-self:center;
|
|
2214
|
+
margin: 0;
|
|
2215
|
+
}
|
|
2216
|
+
.header-title-with-back-button {
|
|
2217
|
+
justify-self:center;
|
|
2218
|
+
}
|
|
2219
|
+
.header-title-without-back-button {
|
|
2220
|
+
grid-column:span 2/span 2;
|
|
2221
|
+
}
|
|
2222
|
+
.header-title-with-top-area {
|
|
2223
|
+
padding-left:1.6rem;
|
|
2224
|
+
padding-right:1.6rem;
|
|
2225
|
+
padding-top:1.6rem;
|
|
2226
|
+
}
|
|
2227
|
+
.header-button:hover {
|
|
2228
|
+
-webkit-background-clip:padding-box;
|
|
2229
|
+
background-clip:padding-box;
|
|
2230
|
+
}
|
|
2231
|
+
.header-button:focus, .header-button:focus-visible {
|
|
2232
|
+
outline:2px solid var(--w-s-color-border-focus);
|
|
2233
|
+
outline-offset:var(--w-outline-offset, 1px);
|
|
2234
|
+
}
|
|
2235
|
+
.header-button:not(:focus-visible){
|
|
2236
|
+
outline:none;
|
|
2237
|
+
}
|
|
2238
|
+
.header-button {
|
|
2239
|
+
border-width:0;
|
|
2240
|
+
border-radius:9999px;
|
|
2241
|
+
display:inline-flex;
|
|
2242
|
+
align-items:center;
|
|
2243
|
+
justify-content:center;
|
|
2244
|
+
min-height:40px;
|
|
2245
|
+
min-width:40px;
|
|
2246
|
+
padding:0.4rem;
|
|
2247
|
+
font-weight:700;
|
|
2248
|
+
transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;
|
|
2249
|
+
transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);
|
|
2250
|
+
transition-duration:150ms;
|
|
2251
|
+
font-size:var(--w-font-size-m);line-height:var(--w-line-height-m);
|
|
2252
|
+
line-height:2.4rem;
|
|
2253
|
+
}
|
|
2254
|
+
.header-button-left {
|
|
2255
|
+
background-color:transparent;
|
|
2256
|
+
color:var(--w-s-color-icon);
|
|
2257
|
+
margin-left:-0.8rem;
|
|
2258
|
+
}
|
|
2259
|
+
.header-button-left:hover {
|
|
2260
|
+
background-color:var(--w-color-button-pill-background-hover);
|
|
2261
|
+
}
|
|
2262
|
+
.header-button-left:active {
|
|
2263
|
+
background-color:var(--w-color-button-pill-background-active);
|
|
2264
|
+
}
|
|
2265
|
+
.header-close-button {
|
|
2266
|
+
background-color:transparent;
|
|
2267
|
+
color:var(--w-s-color-icon);
|
|
2268
|
+
margin-right:-0.8rem;
|
|
2269
|
+
}
|
|
2270
|
+
.header-close-button:hover {
|
|
2271
|
+
background-color:var(--w-color-button-pill-background-hover);
|
|
2272
|
+
}
|
|
2273
|
+
.header-close-button:active {
|
|
2274
|
+
background-color:var(--w-color-button-pill-background-active);
|
|
2275
|
+
}
|
|
2276
|
+
.header-close-button-on-image {
|
|
2277
|
+
background-color:rgba(var(--w-rgb-black),0.7);
|
|
2278
|
+
right:0.8rem;
|
|
2279
|
+
top:0.8rem;
|
|
2280
|
+
position:absolute;
|
|
2281
|
+
z-index:10;
|
|
2282
|
+
color:var(--w-s-color-text-inverted);
|
|
2283
|
+
}
|
|
2284
|
+
.header-close-button-on-image:hover {
|
|
2285
|
+
background-color:rgba(var(--w-rgb-black),0.85);
|
|
2286
|
+
}
|
|
2287
|
+
.header-close-button-on-image:active {
|
|
2288
|
+
background-color:var(--w-black);
|
|
2289
|
+
}
|
|
2290
|
+
@media (min-width: 480px){
|
|
2291
|
+
.header-title-bar {
|
|
2292
|
+
padding-left:3.2rem;
|
|
2293
|
+
padding-right:3.2rem;
|
|
2294
|
+
padding-top:2.4rem;
|
|
2295
|
+
}
|
|
2296
|
+
.header-title-with-top-area {
|
|
2297
|
+
padding-left:3.2rem;
|
|
2298
|
+
padding-right:3.2rem;
|
|
2299
|
+
}
|
|
2300
|
+
.header-button {
|
|
2301
|
+
min-height:32px;
|
|
2302
|
+
min-width:32px;
|
|
2303
|
+
}
|
|
2304
|
+
}
|
|
2305
|
+
`;
|
|
2306
|
+
__decorateClass([
|
|
2307
|
+
property({ type: String })
|
|
2308
|
+
], ModalHeader.prototype, "title", 2);
|
|
2309
|
+
__decorateClass([
|
|
2310
|
+
property({ type: Boolean })
|
|
2311
|
+
], ModalHeader.prototype, "back", 2);
|
|
2312
|
+
__decorateClass([
|
|
2313
|
+
property({ type: Boolean, attribute: "no-close" })
|
|
2314
|
+
], ModalHeader.prototype, "noClose", 2);
|
|
2315
|
+
__decorateClass([
|
|
2316
|
+
state()
|
|
2317
|
+
], ModalHeader.prototype, "_hasTopContent", 2);
|
|
2318
|
+
__decorateClass([
|
|
2319
|
+
query(".title-el")
|
|
2320
|
+
], ModalHeader.prototype, "titleEl", 2);
|
|
2430
2321
|
|
|
2431
|
-
// packages/modal/modal-main.
|
|
2432
|
-
import { css, html as html5 } from "lit";
|
|
2433
|
-
import WarpElement3 from "@warp-ds/elements-core";
|
|
2434
|
-
import { createRef as createRef2, ref as ref2 } from "lit/directives/ref.js";
|
|
2322
|
+
// packages/modal/modal-main.ts
|
|
2323
|
+
import { css as css3, html as html5, LitElement as LitElement5 } from "lit";
|
|
2435
2324
|
|
|
2436
2325
|
// node_modules/.pnpm/scroll-doctor@2.0.2/node_modules/scroll-doctor/dist/scroll-doctor.js
|
|
2437
2326
|
var n = [];
|
|
@@ -2491,35 +2380,31 @@ function T() {
|
|
|
2491
2380
|
n.forEach(p), g(), f(), n = [];
|
|
2492
2381
|
}
|
|
2493
2382
|
|
|
2494
|
-
// packages/modal/modal-main.
|
|
2495
|
-
|
|
2496
|
-
var
|
|
2497
|
-
var ModalMain = class extends ProvidesCanCloseToSlotsMixin(WarpElement3) {
|
|
2383
|
+
// packages/modal/modal-main.ts
|
|
2384
|
+
import { property as property2, query as query2 } from "lit/decorators.js";
|
|
2385
|
+
var ModalMain = class extends ProvidesCanCloseToSlotsMixin(LitElement5) {
|
|
2498
2386
|
constructor() {
|
|
2499
2387
|
super();
|
|
2500
|
-
__publicField(this, "dialogEl", createRef2());
|
|
2501
|
-
__publicField(this, "dialogInnerEl", createRef2());
|
|
2502
|
-
__publicField(this, "contentEl", createRef2());
|
|
2503
2388
|
this.interceptEscape = this.interceptEscape.bind(this);
|
|
2504
2389
|
this.closeOnBackdropClick = this.closeOnBackdropClick.bind(this);
|
|
2505
2390
|
this.eventPreventer = this.eventPreventer.bind(this);
|
|
2506
2391
|
this.modifyBorderRadius = this.modifyBorderRadius.bind(this);
|
|
2507
2392
|
}
|
|
2508
2393
|
async open() {
|
|
2509
|
-
this.dialogEl.
|
|
2394
|
+
this.dialogEl.showModal();
|
|
2510
2395
|
this.handleListeners();
|
|
2511
|
-
E(this.contentEl
|
|
2396
|
+
E(this.contentEl);
|
|
2512
2397
|
await this.updateComplete;
|
|
2513
2398
|
this.dispatchEvent(new CustomEvent("shown", { bubbles: true, composed: true }));
|
|
2514
2399
|
}
|
|
2515
2400
|
close() {
|
|
2516
2401
|
this.handleListeners("removeEventListener");
|
|
2517
|
-
this.dialogEl.
|
|
2518
|
-
this.dialogEl.
|
|
2402
|
+
this.dialogEl.classList.add("close");
|
|
2403
|
+
this.dialogEl.addEventListener(
|
|
2519
2404
|
"animationend",
|
|
2520
2405
|
async () => {
|
|
2521
|
-
this.dialogEl.
|
|
2522
|
-
this.dialogEl.
|
|
2406
|
+
this.dialogEl.classList.remove("close");
|
|
2407
|
+
this.dialogEl.close();
|
|
2523
2408
|
T();
|
|
2524
2409
|
await this.updateComplete;
|
|
2525
2410
|
this.dispatchEvent(new CustomEvent("hidden", { bubbles: true, composed: true }));
|
|
@@ -2529,10 +2414,10 @@ var ModalMain = class extends ProvidesCanCloseToSlotsMixin(WarpElement3) {
|
|
|
2529
2414
|
}
|
|
2530
2415
|
render() {
|
|
2531
2416
|
return html5`
|
|
2532
|
-
<dialog
|
|
2533
|
-
<div
|
|
2417
|
+
<dialog class="dialog-el">
|
|
2418
|
+
<div class="dialog-inner-el">
|
|
2534
2419
|
<slot name="header" @slotchange="${this.handleSlotChange}"></slot>
|
|
2535
|
-
<div
|
|
2420
|
+
<div class="content-el" id=${this.contentId}>
|
|
2536
2421
|
<slot name="content" @slotchange="${this.handleSlotChange}"></slot>
|
|
2537
2422
|
</div>
|
|
2538
2423
|
<slot name="footer" @slotchange="${this.handleSlotChange}"></slot>
|
|
@@ -2540,25 +2425,22 @@ var ModalMain = class extends ProvidesCanCloseToSlotsMixin(WarpElement3) {
|
|
|
2540
2425
|
</dialog>
|
|
2541
2426
|
`;
|
|
2542
2427
|
}
|
|
2543
|
-
|
|
2428
|
+
updated(changedProperties) {
|
|
2544
2429
|
if (changedProperties.has("show")) this[this.show ? "open" : "close"]();
|
|
2545
2430
|
}
|
|
2546
2431
|
handleListeners(verb = "addEventListener") {
|
|
2547
2432
|
document[verb]("keydown", this.interceptEscape);
|
|
2548
|
-
if (!this
|
|
2549
|
-
this.dialogEl
|
|
2550
|
-
this.dialogEl
|
|
2551
|
-
this.dialogInnerEl
|
|
2433
|
+
if (!this.ignoreBackdropClicks) this.dialogEl[verb]("mousedown", this.closeOnBackdropClick);
|
|
2434
|
+
this.dialogEl[verb]("close", this.eventPreventer);
|
|
2435
|
+
this.dialogEl[verb]("cancel", this.eventPreventer);
|
|
2436
|
+
this.dialogInnerEl[verb]("transitionend", this.modifyBorderRadius);
|
|
2552
2437
|
}
|
|
2553
|
-
/** @param {Event} evt */
|
|
2554
2438
|
eventPreventer(evt) {
|
|
2555
2439
|
evt.preventDefault();
|
|
2556
2440
|
}
|
|
2557
|
-
/** @param {MouseEvent} evt */
|
|
2558
2441
|
closeOnBackdropClick(evt) {
|
|
2559
|
-
if (this.dialogEl
|
|
2442
|
+
if (this.dialogEl === evt.target) this.close();
|
|
2560
2443
|
}
|
|
2561
|
-
/** @param {KeyboardEvent} evt */
|
|
2562
2444
|
interceptEscape(evt) {
|
|
2563
2445
|
if (evt.key === "Escape") {
|
|
2564
2446
|
evt.preventDefault();
|
|
@@ -2566,36 +2448,93 @@ var ModalMain = class extends ProvidesCanCloseToSlotsMixin(WarpElement3) {
|
|
|
2566
2448
|
}
|
|
2567
2449
|
}
|
|
2568
2450
|
modifyBorderRadius() {
|
|
2569
|
-
if (this.dialogInnerEl.
|
|
2570
|
-
else this.dialogInnerEl.
|
|
2451
|
+
if (this.dialogInnerEl.scrollHeight * 1.02 > innerHeight) this.dialogInnerEl.style.borderRadius = "0px";
|
|
2452
|
+
else this.dialogInnerEl.style.borderRadius = null;
|
|
2571
2453
|
}
|
|
2572
2454
|
};
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
[NO_BACKDROP_CLICKS]: { type: Boolean }
|
|
2577
|
-
});
|
|
2578
|
-
__publicField(ModalMain, "styles", [
|
|
2579
|
-
WarpElement3.styles,
|
|
2580
|
-
css`
|
|
2581
|
-
.w-modal {
|
|
2455
|
+
ModalMain.styles = [
|
|
2456
|
+
css3`
|
|
2457
|
+
.dialog-el {
|
|
2582
2458
|
--w-modal-translate-distance: 100%;
|
|
2459
|
+
--w-modal-max-height:80%;
|
|
2460
|
+
--w-modal-width:640px;
|
|
2461
|
+
background-color:transparent;
|
|
2462
|
+
border-width:0;
|
|
2463
|
+
align-items:flex-end;
|
|
2464
|
+
inset:0rem;
|
|
2465
|
+
height:unset;
|
|
2466
|
+
max-height:unset;
|
|
2467
|
+
max-width:unset;
|
|
2468
|
+
width:unset;
|
|
2469
|
+
margin:auto;
|
|
2470
|
+
padding:0rem;
|
|
2471
|
+
backface-visibility:hidden;
|
|
2472
|
+
}
|
|
2473
|
+
.dialog-inner-el {
|
|
2474
|
+
will-change:height;
|
|
2475
|
+
border-radius:8px;
|
|
2476
|
+
display:flex;
|
|
2477
|
+
flex-direction:column;
|
|
2478
|
+
overflow:hidden;
|
|
2479
|
+
position:relative;
|
|
2480
|
+
background-color:var(--w-s-color-background);
|
|
2481
|
+
box-shadow:var(--w-shadow-m);
|
|
2482
|
+
height:var(--w-modal-height);
|
|
2483
|
+
max-height:var(--w-modal-max-height);
|
|
2484
|
+
min-height:var(--w-modal-min-height);
|
|
2485
|
+
width:var(--w-modal-width);
|
|
2486
|
+
backface-visibility:hidden;
|
|
2487
|
+
padding-bottom:calc(32px + env(safe-area-inset-bottom, 0px));
|
|
2488
|
+
transition-property:all;
|
|
2489
|
+
transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);
|
|
2490
|
+
transition-duration:150ms;
|
|
2491
|
+
transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);
|
|
2492
|
+
}
|
|
2493
|
+
.content-el {
|
|
2494
|
+
display:block;
|
|
2495
|
+
flex-shrink:1;
|
|
2496
|
+
flex-grow:1;
|
|
2497
|
+
overflow-x:hidden;
|
|
2498
|
+
overflow-y:auto;
|
|
2499
|
+
position:relative;
|
|
2500
|
+
margin-bottom:0rem;
|
|
2501
|
+
padding-left:1.6rem;
|
|
2502
|
+
padding-right:1.6rem;
|
|
2583
2503
|
}
|
|
2584
2504
|
@media (min-width: 480px) {
|
|
2585
|
-
.
|
|
2505
|
+
.dialog-el {
|
|
2586
2506
|
--w-modal-translate-distance: 50%;
|
|
2507
|
+
place-content:center;
|
|
2508
|
+
place-items:center;
|
|
2509
|
+
}
|
|
2510
|
+
.dialog-inner-el {
|
|
2511
|
+
margin-left:1.6rem;
|
|
2512
|
+
margin-right:1.6rem;
|
|
2513
|
+
padding-bottom:3.2rem;
|
|
2514
|
+
}
|
|
2515
|
+
.content-el {
|
|
2516
|
+
padding-left:3.2rem;
|
|
2517
|
+
padding-right:3.2rem;
|
|
2587
2518
|
}
|
|
2588
2519
|
}
|
|
2589
|
-
|
|
2520
|
+
@media (max-width: 479.9px){
|
|
2521
|
+
.dialog-inner-el {
|
|
2522
|
+
border-bottom-left-radius:0;
|
|
2523
|
+
border-bottom-right-radius:0;
|
|
2524
|
+
}
|
|
2525
|
+
}
|
|
2526
|
+
.dialog-el[open] {
|
|
2590
2527
|
animation: w-modal-in 0.3s ease-in-out forwards;
|
|
2528
|
+
display:flex;
|
|
2529
|
+
position:fixed;
|
|
2591
2530
|
}
|
|
2592
|
-
.
|
|
2531
|
+
.dialog-el.close {
|
|
2593
2532
|
animation: w-modal-out 0.3s ease-in-out forwards;
|
|
2594
2533
|
}
|
|
2595
|
-
.
|
|
2534
|
+
.dialog-el[open]::backdrop {
|
|
2596
2535
|
animation: backdrop-in 0.3s ease-in-out forwards;
|
|
2597
2536
|
}
|
|
2598
|
-
.
|
|
2537
|
+
.dialog-el.close::backdrop {
|
|
2599
2538
|
animation: backdrop-out 0.3s ease-in-out forwards;
|
|
2600
2539
|
}
|
|
2601
2540
|
/* shouldn't need two (in/out) animations declared here, but reversing is being weird */
|
|
@@ -2636,7 +2575,25 @@ __publicField(ModalMain, "styles", [
|
|
|
2636
2575
|
}
|
|
2637
2576
|
}
|
|
2638
2577
|
`
|
|
2639
|
-
]
|
|
2578
|
+
];
|
|
2579
|
+
__decorateClass([
|
|
2580
|
+
property2({ type: Boolean })
|
|
2581
|
+
], ModalMain.prototype, "show", 2);
|
|
2582
|
+
__decorateClass([
|
|
2583
|
+
property2({ type: String, attribute: "content-id" })
|
|
2584
|
+
], ModalMain.prototype, "contentId", 2);
|
|
2585
|
+
__decorateClass([
|
|
2586
|
+
property2({ type: Boolean, attribute: "ignore-backdrop-clicks" })
|
|
2587
|
+
], ModalMain.prototype, "ignoreBackdropClicks", 2);
|
|
2588
|
+
__decorateClass([
|
|
2589
|
+
query2(".dialog-el")
|
|
2590
|
+
], ModalMain.prototype, "dialogEl", 2);
|
|
2591
|
+
__decorateClass([
|
|
2592
|
+
query2(".dialog-inner-el")
|
|
2593
|
+
], ModalMain.prototype, "dialogInnerEl", 2);
|
|
2594
|
+
__decorateClass([
|
|
2595
|
+
query2(".content-el")
|
|
2596
|
+
], ModalMain.prototype, "contentEl", 2);
|
|
2640
2597
|
|
|
2641
2598
|
// packages/modal/index.js
|
|
2642
2599
|
if (!customElements.get("w-modal")) {
|