@oslokommune/punkt-elements 11.19.2 → 12.0.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.
Files changed (31) hide show
  1. package/dist/{src/components → components}/calendar/index.d.ts +0 -1
  2. package/dist/{src/components → components}/component-template/index.d.ts +0 -1
  3. package/dist/{src/components → components}/element/index.d.ts +1 -2
  4. package/dist/{src/components → components}/icon/index.d.ts +0 -1
  5. package/dist/{src/controllers → controllers}/pkt-slot-controller.d.ts +0 -1
  6. package/dist/converters-Bi8tmNvQ.cjs +5 -0
  7. package/dist/{converters-c2bad255.js → converters-DMveycvc.js} +13 -18
  8. package/dist/{directive-1053a959.js → directive-C7mkmyiy.js} +145 -178
  9. package/dist/directive-DfhMJ1ie.cjs +23 -0
  10. package/dist/{index-8cd06749.js → index-0PZgk9Oc.js} +26 -40
  11. package/dist/index-xoVy6sfy.cjs +13 -0
  12. package/dist/pkt-el-calendar.cjs +14 -14
  13. package/dist/pkt-el-calendar.js +295 -303
  14. package/dist/pkt-el-component-template.cjs +6 -6
  15. package/dist/pkt-el-component-template.js +8 -8
  16. package/dist/pkt-el-element.cjs +1 -1
  17. package/dist/pkt-el-element.js +2 -2
  18. package/dist/pkt-el-icon.cjs +3 -3
  19. package/dist/pkt-el-icon.js +27 -32
  20. package/dist/pkt-el-index.cjs +1 -1
  21. package/dist/pkt-el-index.js +6 -10
  22. package/dist/{property-dd1c41a8.js → property-BBVRv-DT.js} +1 -1
  23. package/dist/{property-607ef6c9.cjs → property-CK6SFc5B.cjs} +1 -1
  24. package/package.json +8 -8
  25. package/dist/converters-b87c8d9f.cjs +0 -5
  26. package/dist/directive-47ed6f74.cjs +0 -23
  27. package/dist/index-c6f5a3e8.cjs +0 -13
  28. package/dist/vite.config.d.ts +0 -2
  29. /package/dist/{src/components → components}/index.d.ts +0 -0
  30. /package/dist/{src/helpers → helpers}/converters.d.ts +0 -0
  31. /package/dist/{src/index.d.ts → index.d.ts} +0 -0
@@ -1,5 +1,4 @@
1
1
  import { PktElement } from '../element';
2
-
3
2
  export declare class PktCalendar extends PktElement {
4
3
  /**
5
4
  * Element attributes
@@ -1,5 +1,4 @@
1
1
  import { PktElement } from '../element';
2
-
3
2
  export declare class PktComponent extends PktElement {
4
3
  /**
5
4
  * Element attributes => props
@@ -1,7 +1,6 @@
1
1
  import { LitElement } from 'lit';
2
2
  import { Ref } from 'lit/directives/ref.js';
3
- import { PktSlotController } from '../../controllers/pkt-slot-controller';
4
-
3
+ import { PktSlotController } from '../../src/controllers/pkt-slot-controller';
5
4
  export declare class PktElement extends LitElement {
6
5
  /**
7
6
  * Runs on mount, used to set up various values and whatever you need to run
@@ -1,5 +1,4 @@
1
1
  import { LitElement } from 'lit';
2
-
3
2
  export declare class PktIcon extends LitElement {
4
3
  /**
5
4
  * Element attributes
@@ -1,6 +1,5 @@
1
1
  import { LitElement, ReactiveController, ReactiveControllerHost } from 'lit';
2
2
  import { Ref } from 'lit/directives/ref.js';
3
-
4
3
  export declare class PktSlotController implements ReactiveController {
5
4
  host: LitElement & ReactiveControllerHost;
6
5
  nodes: Element[];
@@ -0,0 +1,5 @@
1
+ "use strict";const s=require("./directive-DfhMJ1ie.cjs");/**
2
+ * @license
3
+ * Copyright 2018 Google LLC
4
+ * SPDX-License-Identifier: BSD-3-Clause
5
+ */const d=s.e(class extends s.i{constructor(t){var e;if(super(t),t.type!==s.t.ATTRIBUTE||t.name!=="class"||((e=t.strings)==null?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter(e=>t[e]).join(" ")+" "}update(t,[e]){var i,a;if(this.st===void 0){this.st=new Set,t.strings!==void 0&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter(r=>r!=="")));for(const r in e)e[r]&&!((i=this.nt)!=null&&i.has(r))&&this.st.add(r);return this.render(e)}const n=t.element.classList;for(const r of this.st)r in e||(n.remove(r),this.st.delete(r));for(const r in e){const o=!!e[r];o===this.st.has(r)||(a=this.nt)!=null&&a.has(r)||(o?(n.add(r),this.st.add(r)):(n.remove(r),this.st.delete(r)))}return s.R}}),h={hi:"Hei!"},c={days:["Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag","Søndag"],daysShort:["Man","Tir","Ons","Tor","Fre","Lør","Søn"],months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des"],week:"Uke",prevMonth:"Forrige måned",nextMonth:"Neste måned"},u={example:h,dates:c},g=t=>{if(Array.isArray(t))return t;if(typeof t=="string")return t.split(",")},p=t=>t?new Date(t):void 0,l=t=>{if(typeof t=="string")return t.split(",").map(e=>new Date(e));if(Array.isArray(t))return t.map(e=>new Date(e))};exports.Rt=d;exports.csvToArray=g;exports.stringToDate=p;exports.stringsToDate=l;exports.translations=u;
@@ -1,4 +1,4 @@
1
- import { e as o, i as d, t as h, w as c } from "./directive-1053a959.js";
1
+ import { e as o, i as d, t as h, R as c } from "./directive-C7mkmyiy.js";
2
2
  /**
3
3
  * @license
4
4
  * Copyright 2018 Google LLC
@@ -7,26 +7,23 @@ import { e as o, i as d, t as h, w as c } from "./directive-1053a959.js";
7
7
  const m = o(class extends d {
8
8
  constructor(t) {
9
9
  var e;
10
- if (super(t), t.type !== h.ATTRIBUTE || t.name !== "class" || ((e = t.strings) == null ? void 0 : e.length) > 2)
11
- throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
10
+ if (super(t), t.type !== h.ATTRIBUTE || t.name !== "class" || ((e = t.strings) == null ? void 0 : e.length) > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
12
11
  }
13
12
  render(t) {
14
13
  return " " + Object.keys(t).filter((e) => t[e]).join(" ") + " ";
15
14
  }
16
15
  update(t, [e]) {
17
- var n, a;
16
+ var n, i;
18
17
  if (this.st === void 0) {
19
- this.st = /* @__PURE__ */ new Set(), t.strings !== void 0 && (this.nt = new Set(t.strings.join(" ").split(/\s/).filter((s) => s !== "")));
20
- for (const s in e)
21
- e[s] && !((n = this.nt) != null && n.has(s)) && this.st.add(s);
18
+ this.st = /* @__PURE__ */ new Set(), t.strings !== void 0 && (this.nt = new Set(t.strings.join(" ").split(/\s/).filter((r) => r !== "")));
19
+ for (const r in e) e[r] && !((n = this.nt) != null && n.has(r)) && this.st.add(r);
22
20
  return this.render(e);
23
21
  }
24
- const r = t.element.classList;
25
- for (const s of this.st)
26
- s in e || (r.remove(s), this.st.delete(s));
27
- for (const s in e) {
28
- const i = !!e[s];
29
- i === this.st.has(s) || (a = this.nt) != null && a.has(s) || (i ? (r.add(s), this.st.add(s)) : (r.remove(s), this.st.delete(s)));
22
+ const s = t.element.classList;
23
+ for (const r of this.st) r in e || (s.remove(r), this.st.delete(r));
24
+ for (const r in e) {
25
+ const a = !!e[r];
26
+ a === this.st.has(r) || (i = this.nt) != null && i.has(r) || (a ? (s.add(r), this.st.add(r)) : (s.remove(r), this.st.delete(r)));
30
27
  }
31
28
  return c;
32
29
  }
@@ -86,10 +83,8 @@ const m = o(class extends d {
86
83
  example: p,
87
84
  dates: u
88
85
  }, l = (t) => {
89
- if (Array.isArray(t))
90
- return t;
91
- if (typeof t == "string")
92
- return t.split(",");
86
+ if (Array.isArray(t)) return t;
87
+ if (typeof t == "string") return t.split(",");
93
88
  }, y = (t) => t ? new Date(t) : void 0, b = (t) => {
94
89
  if (typeof t == "string")
95
90
  return t.split(",").map((e) => new Date(e));
@@ -97,9 +92,9 @@ const m = o(class extends d {
97
92
  return t.map((e) => new Date(e));
98
93
  };
99
94
  export {
95
+ m as R,
100
96
  b as a,
101
97
  l as c,
102
- m as e,
103
98
  y as s,
104
99
  f as t
105
100
  };