@warp-ds/elements 2.0.0-next.2 → 2.0.0-next.4

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.
Files changed (53) hide show
  1. package/dist/api.js +3 -6
  2. package/dist/api.js.map +1 -1
  3. package/dist/index.js +519 -603
  4. package/dist/index.js.map +4 -4
  5. package/dist/packages/affix/index.d.ts +13 -6
  6. package/dist/packages/affix/index.js +66 -113
  7. package/dist/packages/affix/index.js.map +4 -4
  8. package/dist/packages/alert/index.js +48 -114
  9. package/dist/packages/alert/index.js.map +3 -3
  10. package/dist/packages/attention/index.js +147 -179
  11. package/dist/packages/attention/index.js.map +4 -4
  12. package/dist/packages/badge/index.js +27 -77
  13. package/dist/packages/badge/index.js.map +4 -4
  14. package/dist/packages/box/index.d.ts +1 -1
  15. package/dist/packages/box/index.js +26 -68
  16. package/dist/packages/box/index.js.map +4 -4
  17. package/dist/packages/breadcrumbs/index.js +42 -103
  18. package/dist/packages/breadcrumbs/index.js.map +3 -3
  19. package/dist/packages/broadcast/index.js +2 -6
  20. package/dist/packages/broadcast/index.js.map +1 -1
  21. package/dist/packages/button/index.d.ts +6 -0
  22. package/dist/packages/button/index.js +101 -156
  23. package/dist/packages/button/index.js.map +3 -3
  24. package/dist/packages/card/index.d.ts +5 -5
  25. package/dist/packages/card/index.js +1462 -96
  26. package/dist/packages/card/index.js.map +4 -4
  27. package/dist/packages/card/locales/da/messages.d.mts +1 -0
  28. package/dist/packages/card/locales/en/messages.d.mts +1 -0
  29. package/dist/packages/card/locales/fi/messages.d.mts +1 -0
  30. package/dist/packages/card/locales/nb/messages.d.mts +1 -0
  31. package/dist/packages/expandable/index.d.ts +1 -6
  32. package/dist/packages/expandable/index.js +104 -135
  33. package/dist/packages/expandable/index.js.map +4 -4
  34. package/dist/packages/modal/index.js +51 -119
  35. package/dist/packages/modal/index.js.map +3 -3
  36. package/dist/packages/modal/modal-header.d.ts +1 -1
  37. package/dist/packages/modal/modal-main.d.ts +3 -3
  38. package/dist/packages/pill/index.js +53 -119
  39. package/dist/packages/pill/index.js.map +3 -3
  40. package/dist/packages/select/index.d.ts +9 -0
  41. package/dist/packages/select/index.js +90 -155
  42. package/dist/packages/select/index.js.map +3 -3
  43. package/dist/packages/textfield/index.d.ts +9 -5
  44. package/dist/packages/textfield/index.js +54 -89
  45. package/dist/packages/textfield/index.js.map +4 -4
  46. package/dist/packages/toast/api.d.ts +1 -1
  47. package/dist/packages/toast/index.js +118 -195
  48. package/dist/packages/toast/index.js.map +4 -4
  49. package/dist/packages/toast/toast-container.d.ts +1 -1
  50. package/dist/packages/toast/toast.d.ts +1 -2
  51. package/dist/packages/utils/index.d.ts +1 -1
  52. package/dist/packages/utils/unstyled-heading.d.ts +1 -1
  53. package/package.json +29 -30
@@ -1,9 +1,14 @@
1
- export class WarpAffix {
2
- static styles: any[];
1
+ declare const WarpAffix_base: {
2
+ new (): {
3
+ [x: string]: any;
4
+ };
5
+ [x: string]: any;
6
+ createProperty(name: any, options: any): void;
7
+ };
8
+ export class WarpAffix extends WarpAffix_base {
3
9
  static properties: {
4
10
  ariaLabel: {
5
11
  type: StringConstructor;
6
- attribute: string;
7
12
  };
8
13
  clear: {
9
14
  type: BooleanConstructor;
@@ -15,12 +20,14 @@ export class WarpAffix {
15
20
  type: StringConstructor;
16
21
  };
17
22
  };
18
- get _classBase(): typeof suffix;
19
- get _classes(): import(".pnpm/lit-html@3.1.4/node_modules/lit-html/directive").DirectiveResult<typeof import(".pnpm/lit-html@3.1.4/node_modules/lit-html/directives/class-map").ClassMapDirective>;
23
+ static styles: any[];
24
+ get _classBase(): typeof ccSuffix;
25
+ get _classes(): string;
20
26
  get _searchButton(): import("lit").TemplateResult<1>;
21
27
  get _clearButton(): import("lit").TemplateResult<1>;
22
28
  get _text(): import("lit").TemplateResult<1>;
23
29
  get _markup(): import("lit").TemplateResult<1>;
24
30
  render(): import("lit").TemplateResult<1>;
25
31
  }
26
- import { suffix } from '@warp-ds/css/component-classes';
32
+ import { suffix as ccSuffix } from '@warp-ds/css/component-classes';
33
+ export {};
@@ -49,10 +49,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
49
49
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
50
50
  mod
51
51
  ));
52
- var __publicField = (obj, key, value) => {
53
- __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
54
- return value;
55
- };
52
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
56
53
 
57
54
  // node_modules/.pnpm/unraw@3.0.0/node_modules/unraw/dist/errors.js
58
55
  var require_errors = __commonJS({
@@ -225,8 +222,7 @@ var require_moo = __commonJS({
225
222
  return "(" + s + ")";
226
223
  }
227
224
  function reUnion(regexps) {
228
- if (!regexps.length)
229
- return "(?!)";
225
+ if (!regexps.length) return "(?!)";
230
226
  var source = regexps.map(function(s) {
231
227
  return "(?:" + s + ")";
232
228
  }).join("|");
@@ -236,14 +232,10 @@ var require_moo = __commonJS({
236
232
  if (typeof obj === "string") {
237
233
  return "(?:" + reEscape(obj) + ")";
238
234
  } else if (isRegExp(obj)) {
239
- if (obj.ignoreCase)
240
- throw new Error("RegExp /i flag not allowed");
241
- if (obj.global)
242
- throw new Error("RegExp /g flag is implied");
243
- if (obj.sticky)
244
- throw new Error("RegExp /y flag is implied");
245
- if (obj.multiline)
246
- throw new Error("RegExp /m flag is implied");
235
+ if (obj.ignoreCase) throw new Error("RegExp /i flag not allowed");
236
+ if (obj.global) throw new Error("RegExp /g flag is implied");
237
+ if (obj.sticky) throw new Error("RegExp /y flag is implied");
238
+ if (obj.multiline) throw new Error("RegExp /m flag is implied");
247
239
  return obj.source;
248
240
  } else {
249
241
  throw new Error("Not a pattern: " + obj);
@@ -292,16 +284,14 @@ var require_moo = __commonJS({
292
284
  var match = [];
293
285
  rules.forEach(function(rule) {
294
286
  if (isObject(rule)) {
295
- if (match.length)
296
- result.push(ruleOptions(key, match));
287
+ if (match.length) result.push(ruleOptions(key, match));
297
288
  result.push(ruleOptions(key, rule));
298
289
  match = [];
299
290
  } else {
300
291
  match.push(rule);
301
292
  }
302
293
  });
303
- if (match.length)
304
- result.push(ruleOptions(key, match));
294
+ if (match.length) result.push(ruleOptions(key, match));
305
295
  }
306
296
  return result;
307
297
  }
@@ -436,8 +426,7 @@ var require_moo = __commonJS({
436
426
  var fallbackRule = errorRule && errorRule.fallback;
437
427
  var flags = hasSticky && !fallbackRule ? "ym" : "gm";
438
428
  var suffix2 = hasSticky || fallbackRule ? "" : "|";
439
- if (unicodeFlag === true)
440
- flags += "u";
429
+ if (unicodeFlag === true) flags += "u";
441
430
  var combined = new RegExp(reUnion(parts) + suffix2, flags);
442
431
  return { regexp: combined, groups, fast, error: errorRule || defaultErrorRule };
443
432
  }
@@ -458,8 +447,7 @@ var require_moo = __commonJS({
458
447
  var all = states.$all ? toRules(states.$all) : [];
459
448
  delete states.$all;
460
449
  var keys = Object.getOwnPropertyNames(states);
461
- if (!start)
462
- start = keys[0];
450
+ if (!start) start = keys[0];
463
451
  var ruleMap = /* @__PURE__ */ Object.create(null);
464
452
  for (var i = 0; i < keys.length; i++) {
465
453
  var key = keys[i];
@@ -471,8 +459,7 @@ var require_moo = __commonJS({
471
459
  var included = /* @__PURE__ */ Object.create(null);
472
460
  for (var j = 0; j < rules.length; j++) {
473
461
  var rule = rules[j];
474
- if (!rule.include)
475
- continue;
462
+ if (!rule.include) continue;
476
463
  var splice = [j, 1];
477
464
  if (rule.include !== key && !included[rule.include]) {
478
465
  included[rule.include] = true;
@@ -482,8 +469,7 @@ var require_moo = __commonJS({
482
469
  }
483
470
  for (var k = 0; k < newRules.length; k++) {
484
471
  var newRule = newRules[k];
485
- if (rules.indexOf(newRule) !== -1)
486
- continue;
472
+ if (rules.indexOf(newRule) !== -1) continue;
487
473
  splice.push(newRule);
488
474
  }
489
475
  }
@@ -564,8 +550,7 @@ var require_moo = __commonJS({
564
550
  };
565
551
  };
566
552
  Lexer.prototype.setState = function(state) {
567
- if (!state || this.state === state)
568
- return;
553
+ if (!state || this.state === state) return;
569
554
  this.state = state;
570
555
  var info = this.states[state];
571
556
  this.groups = info.groups;
@@ -669,12 +654,9 @@ var require_moo = __commonJS({
669
654
  var err = new Error(this.formatError(token, "invalid syntax"));
670
655
  throw err;
671
656
  }
672
- if (group.pop)
673
- this.popState();
674
- else if (group.push)
675
- this.pushState(group.push);
676
- else if (group.next)
677
- this.setState(group.next);
657
+ if (group.pop) this.popState();
658
+ else if (group.push) this.pushState(group.push);
659
+ else if (group.next) this.setState(group.next);
678
660
  return token;
679
661
  };
680
662
  if (typeof Symbol !== "undefined" && Symbol.iterator) {
@@ -1027,41 +1009,17 @@ var require_parser = __commonJS({
1027
1009
  // packages/affix/index.js
1028
1010
  import { html as html3 } from "lit";
1029
1011
 
1030
- // node_modules/.pnpm/@warp-ds+css@2.0.0-next.4_@warp-ds+uno@2.0.0_unocss@0.58.5_postcss@8.4.38_rollup@4.18.0_vite@_d2fzbudswaxjysaqn4v4imsdwy/node_modules/@warp-ds/css/component-classes/index.js
1031
- var box = {
1032
- box: "group block relative break-words last-child:mb-0 p-16 rounded-8",
1033
- // Relative here enables w-clickable
1034
- bleed: "-mx-16 sm:mx-0 rounded-l-0 rounded-r-0 sm:rounded-8",
1035
- // We target L and R to override the default rounded-8
1036
- info: "s-bg-info-subtle",
1037
- neutral: "s-surface-sunken",
1038
- bordered: "border-2 s-border s-bg"
1039
- };
1040
- var buttonReset = "focus:outline-none appearance-none cursor-pointer bg-transparent border-0 m-0 p-0 inline-block";
1041
- var expandable = {
1042
- expandable: "will-change-height",
1043
- expandableTitle: "font-bold s-text",
1044
- expandableBox: "s-surface-sunken hover:s-bg-hover active:s-bg-active py-0 px-0 " + box.box,
1045
- expandableInfo: "s-bg-info-subtle! hover:s-bg-info-subtle-hover!",
1046
- expandableBleed: box.bleed,
1047
- chevron: "inline-block align-middle s-icon",
1048
- chevronNonBox: "ml-8",
1049
- chevronBox: "",
1050
- chevronTransform: "transform transition-transform transform-gpu ease-in-out",
1051
- chevronExpand: "-rotate-180",
1052
- chevronCollapse: "rotate-180",
1053
- elementsTransformChevronDownPart: "part-[w-icon-chevron-down-16-part]:transform part-[w-icon-chevron-down-16-part]:transition-transform part-[w-icon-chevron-down-16-part]:transform-gpu part-[w-icon-chevron-down-16-part]:ease-in-out",
1054
- elementsChevronDownExpandPart: "part-[w-icon-chevron-down-16-part]:-rotate-180",
1055
- elementsTransformChevronUpPart: "part-[w-icon-chevron-up-16-part]:transform part-[w-icon-chevron-up-16-part]:transition-transform part-[w-icon-chevron-up-16-part]:transform-gpu part-[w-icon-chevron-up-16-part]:ease-in-out",
1056
- elementsChevronUpCollapsePart: "part-[w-icon-chevron-up-16-part]:rotate-180",
1057
- expansion: "overflow-hidden",
1058
- expansionNotExpanded: "h-0 invisible",
1059
- button: buttonReset + " hover:underline focus-visible:underline",
1060
- buttonBox: "w-full text-left relative inline-flex items-center justify-between " + box.box,
1061
- paddingTop: "pt-0",
1062
- title: "flex w-full justify-between items-center",
1063
- titleType: "h4"
1012
+ // node_modules/.pnpm/@chbphone55+classnames@2.0.0/node_modules/@chbphone55/classnames/dist/index.m.js
1013
+ var r = function() {
1014
+ for (var t = [], n = arguments.length; n--; ) t[n] = arguments[n];
1015
+ return t.reduce(function(t2, n2) {
1016
+ return t2.concat("string" == typeof n2 ? n2 : Array.isArray(n2) ? r.apply(void 0, n2) : "object" == typeof n2 && n2 ? Object.keys(n2).map(function(r2) {
1017
+ return n2[r2] ? r2 : "";
1018
+ }) : "");
1019
+ }, []).join(" ");
1064
1020
  };
1021
+
1022
+ // node_modules/.pnpm/@warp-ds+css@2.0.0_@warp-ds+uno@2.0.0_unocss@0.62.0_postcss@8.4.41_rollup@4.20.0_vite@5.3.3_@_vyiy5vwpqfzwy5hpmfkwp3zmle/node_modules/@warp-ds/css/component-classes/index.js
1065
1023
  var buttonDefaultStyling = "font-bold focusable justify-center transition-colors ease-in-out";
1066
1024
  var buttonColors = {
1067
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]",
@@ -1179,7 +1137,7 @@ var button = {
1179
1137
  };
1180
1138
  var modal = {
1181
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]",
1182
- modal: "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",
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",
1183
1141
  content: "block overflow-y-auto overflow-x-hidden last-child:mb-0 grow shrink px-16 sm:px-32 relative",
1184
1142
  footer: "flex justify-end shrink-0 px-16 sm:px-32",
1185
1143
  transitionTitle: "transition-all duration-300",
@@ -1193,19 +1151,15 @@ var modal = {
1193
1151
  titleButtonIcon: "h-16 w-16 sm:h-24 sm:w-24",
1194
1152
  titleButtonIconRotated: "transform rotate-90"
1195
1153
  };
1196
- var label = {
1197
- label: "antialiased block relative text-s font-bold pb-4 cursor-pointer s-text",
1198
- optional: "pl-8 font-normal text-s s-text-subtle"
1199
- };
1200
- var prefixSuffixWrapperBase = "absolute top-0 bottom-0 flex justify-center items-center focusable rounded-4 focus:[--w-outline-offset:-2px] bg-transparent ";
1154
+ var prefixSuffixWrapper = "absolute top-0 bottom-0 flex justify-center items-center focusable rounded-4 focus:[--w-outline-offset:-2px] bg-transparent ";
1201
1155
  var suffix = {
1202
- wrapper: prefixSuffixWrapperBase + "right-0",
1156
+ wrapper: prefixSuffixWrapper + "right-0",
1203
1157
  wrapperWithLabel: "w-max pr-12",
1204
1158
  wrapperWithIcon: "w-40",
1205
1159
  label: "antialiased block relative cursor-default pb-0 font-bold text-xs s-text"
1206
1160
  };
1207
1161
  var prefix = {
1208
- wrapper: prefixSuffixWrapperBase + "left-0",
1162
+ wrapper: prefixSuffixWrapper + "left-0",
1209
1163
  wrapperWithLabel: "w-max pl-12",
1210
1164
  wrapperWithIcon: "w-40",
1211
1165
  label: "antialiased block relative cursor-default pb-0 font-bold text-xs s-text"
@@ -1262,15 +1216,9 @@ var deadToggle = {
1262
1216
  wrapper: `${toggle.wrapper} h-20 w-20 pointer-events-none`,
1263
1217
  input: `${toggle.input} hidden`,
1264
1218
  inputVue: "hidden",
1219
+ labelVue: "-mt-2",
1265
1220
  labelRadio: `${toggle.label} ${toggle.labelBefore} ${toggle.radio}`,
1266
- labelCheckbox: `${toggle.label} ${toggle.labelBefore} ${toggle.checkbox}`,
1267
- labelVue: "-mt-2"
1268
- };
1269
- var clickable = {
1270
- toggle: "absolute inset-0 h-full w-full appearance-none cursor-pointer focusable focusable-inset",
1271
- label: `px-12 ${label.label} py-8! cursor-pointer focusable focusable-inset`,
1272
- buttonOrLink: "bg-transparent focusable",
1273
- buttonOrLinkStretch: "inset-0 absolute"
1221
+ labelCheckbox: `${toggle.label} ${toggle.labelBefore} ${toggle.checkbox}`
1274
1222
  };
1275
1223
  var attention = {
1276
1224
  base: "border-2 relative flex items-start",
@@ -1304,14 +1252,14 @@ var attention = {
1304
1252
  import WarpElement from "@warp-ds/elements-core";
1305
1253
  import { ifDefined } from "lit/directives/if-defined.js";
1306
1254
 
1307
- // node_modules/.pnpm/@warp-ds+icons@2.0.1/node_modules/@warp-ds/icons/dist/elements/search-16.js
1255
+ // node_modules/.pnpm/@warp-ds+icons@2.0.2/node_modules/@warp-ds/icons/dist/elements/search-16.js
1308
1256
  import { LitElement } from "lit";
1309
1257
  import { unsafeStatic, html } from "lit/static-html.js";
1310
1258
 
1311
- // node_modules/.pnpm/@lingui+core@4.7.1/node_modules/@lingui/core/dist/index.mjs
1259
+ // node_modules/.pnpm/@lingui+core@4.11.2/node_modules/@lingui/core/dist/index.mjs
1312
1260
  var import_unraw = __toESM(require_dist(), 1);
1313
1261
 
1314
- // node_modules/.pnpm/@lingui+message-utils@4.7.1/node_modules/@lingui/message-utils/dist/compileMessage.mjs
1262
+ // node_modules/.pnpm/@lingui+message-utils@4.11.2/node_modules/@lingui/message-utils/dist/compileMessage.mjs
1315
1263
  var import_parser = __toESM(require_parser(), 1);
1316
1264
  function processTokens(tokens, mapText) {
1317
1265
  if (!tokens.filter((token) => token.type !== "content").length) {
@@ -1335,11 +1283,9 @@ function processTokens(tokens, mapText) {
1335
1283
  }
1336
1284
  const offset = token.pluralOffset;
1337
1285
  const formatProps = {};
1338
- token.cases.forEach((item) => {
1339
- formatProps[item.key.replace(/^=(.)+/, "$1")] = processTokens(
1340
- item.tokens,
1341
- mapText
1342
- );
1286
+ token.cases.forEach(({ key, tokens: tokens2 }) => {
1287
+ const prop = key[0] === "=" ? key.slice(1) : key;
1288
+ formatProps[prop] = processTokens(tokens2, mapText);
1343
1289
  });
1344
1290
  return [
1345
1291
  token.arg,
@@ -1361,7 +1307,7 @@ Message: ${message}`);
1361
1307
  }
1362
1308
  }
1363
1309
 
1364
- // node_modules/.pnpm/@lingui+core@4.7.1/node_modules/@lingui/core/dist/index.mjs
1310
+ // node_modules/.pnpm/@lingui+core@4.11.2/node_modules/@lingui/core/dist/index.mjs
1365
1311
  var isString = (s) => typeof s === "string";
1366
1312
  var isFunction = (f) => typeof f === "function";
1367
1313
  var cache = /* @__PURE__ */ new Map();
@@ -1447,11 +1393,11 @@ var selectFormatter = (value, rules) => {
1447
1393
  function interpolate(translation, locale, locales) {
1448
1394
  return (values = {}, formats) => {
1449
1395
  const formatters = getDefaultFormats(locale, locales, formats);
1450
- const formatMessage = (tokens) => {
1396
+ const formatMessage = (tokens, replaceOctothorpe = false) => {
1451
1397
  if (!Array.isArray(tokens))
1452
1398
  return tokens;
1453
1399
  return tokens.reduce((message, token) => {
1454
- if (token === "#") {
1400
+ if (token === "#" && replaceOctothorpe) {
1455
1401
  return message + OCTOTHORPE_PH;
1456
1402
  }
1457
1403
  if (isString(token)) {
@@ -1462,7 +1408,10 @@ function interpolate(translation, locale, locales) {
1462
1408
  if (type === "plural" || type === "selectordinal" || type === "select") {
1463
1409
  Object.entries(format).forEach(
1464
1410
  ([key, value2]) => {
1465
- interpolatedFormat[key] = formatMessage(value2);
1411
+ interpolatedFormat[key] = formatMessage(
1412
+ value2,
1413
+ type === "plural" || type === "selectordinal"
1414
+ );
1466
1415
  }
1467
1416
  );
1468
1417
  } else {
@@ -1630,6 +1579,9 @@ var I18n = class extends EventEmitter {
1630
1579
  }
1631
1580
  _(id, values, options) {
1632
1581
  let message = options == null ? void 0 : options.message;
1582
+ if (!id) {
1583
+ id = "";
1584
+ }
1633
1585
  if (!isString(id)) {
1634
1586
  values = id.values || values;
1635
1587
  message = id.message;
@@ -1670,7 +1622,7 @@ function setupI18n(params = {}) {
1670
1622
  }
1671
1623
  var i18n = setupI18n();
1672
1624
 
1673
- // node_modules/.pnpm/@warp-ds+icons@2.0.1/node_modules/@warp-ds/icons/dist/elements/search-16.js
1625
+ // node_modules/.pnpm/@warp-ds+icons@2.0.2/node_modules/@warp-ds/icons/dist/elements/search-16.js
1674
1626
  var messages = JSON.parse('{"icon.title.search":"Forst\xF8rrelsesglass"}');
1675
1627
  var messages2 = JSON.parse('{"icon.title.search":"Magnifying glass"}');
1676
1628
  var messages3 = JSON.parse('{"icon.title.search":"Suurennuslasi"}');
@@ -1759,7 +1711,7 @@ if (!customElements.get("w-icon-search-16")) {
1759
1711
  customElements.define("w-icon-search-16", IconSearch16);
1760
1712
  }
1761
1713
 
1762
- // node_modules/.pnpm/@warp-ds+icons@2.0.1/node_modules/@warp-ds/icons/dist/elements/close-16.js
1714
+ // node_modules/.pnpm/@warp-ds+icons@2.0.2/node_modules/@warp-ds/icons/dist/elements/close-16.js
1763
1715
  import { LitElement as LitElement2 } from "lit";
1764
1716
  import { unsafeStatic as unsafeStatic2, html as html2 } from "lit/static-html.js";
1765
1717
  var messages4 = JSON.parse('{"icon.title.close":"Kryss"}');
@@ -1852,27 +1804,28 @@ if (!customElements.get("w-icon-close-16")) {
1852
1804
 
1853
1805
  // packages/utils/index.js
1854
1806
  import { classMap } from "lit/directives/class-map.js";
1855
- function fclasses(definition) {
1856
- const defn = {};
1857
- for (const [key, value] of Object.entries(definition)) {
1858
- for (const className of key.split(" ")) {
1859
- defn[className] = value;
1807
+ var camelCaseToKebabCase = (str) => str.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
1808
+ function kebabCaseAttributes(constructor) {
1809
+ return class extends constructor {
1810
+ static createProperty(name, options) {
1811
+ let customOptions = options;
1812
+ if (typeof (options == null ? void 0 : options.attribute) === "undefined" || (options == null ? void 0 : options.attribute) === true) {
1813
+ customOptions = Object.assign({}, options, {
1814
+ attribute: camelCaseToKebabCase(name.toString())
1815
+ });
1816
+ }
1817
+ super.createProperty(name, customOptions);
1860
1818
  }
1861
- }
1862
- return classMap(defn);
1819
+ };
1863
1820
  }
1864
1821
 
1865
1822
  // packages/affix/index.js
1866
- var WarpAffix = class extends WarpElement {
1823
+ var WarpAffix = class extends kebabCaseAttributes(WarpElement) {
1867
1824
  get _classBase() {
1868
1825
  return this.slot === "suffix" ? suffix : prefix;
1869
1826
  }
1870
1827
  get _classes() {
1871
- return fclasses({
1872
- [this._classBase.wrapper]: true,
1873
- [this._classBase.wrapperWithLabel]: this.label,
1874
- [this._classBase.wrapperWithIcon]: !this.label
1875
- });
1828
+ return r([this._classBase.wrapper, this.label ? this._classBase.wrapperWithLabel : this._classBase.wrapperWithIcon]);
1876
1829
  }
1877
1830
  get _searchButton() {
1878
1831
  return html3`
@@ -1908,13 +1861,13 @@ var WarpAffix = class extends WarpElement {
1908
1861
  return html3`${this._markup}`;
1909
1862
  }
1910
1863
  };
1911
- __publicField(WarpAffix, "styles", [WarpElement.styles]);
1912
1864
  __publicField(WarpAffix, "properties", {
1913
- ariaLabel: { type: String, attribute: "aria-label" },
1865
+ ariaLabel: { type: String },
1914
1866
  clear: { type: Boolean },
1915
1867
  search: { type: Boolean },
1916
1868
  label: { type: String }
1917
1869
  });
1870
+ __publicField(WarpAffix, "styles", [WarpElement.styles]);
1918
1871
  if (!customElements.get("w-affix")) {
1919
1872
  customElements.define("w-affix", WarpAffix);
1920
1873
  }