@oslokommune/punkt-elements 12.11.2 → 12.11.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.
- package/dist/{class-map-DpN1m5lh.js → class-map-BQ3-MseA.js} +1 -1
- package/dist/{class-map-B9m-NycN.cjs → class-map-DLFPHEre.cjs} +1 -1
- package/dist/{helptext-B0Frb38k.js → helptext-D-5_-HAW.js} +3 -3
- package/dist/{helptext-0fI9cWEe.cjs → helptext-WCq0-Dq8.cjs} +1 -1
- package/dist/{index-Dw-V4--g.js → index-BQ9BMXel.js} +31 -27
- package/dist/{index-DmedytuY.js → index-BR7EVgX9.js} +3 -3
- package/dist/{index-CBFF6OHE.cjs → index-BVbNUNAa.cjs} +5 -5
- package/dist/{index-DkLa0YLm.js → index-BfUPq43a.js} +1 -1
- package/dist/{index-CqWQt14b.cjs → index-DYiD-o1w.cjs} +1 -1
- package/dist/{index-aLVFdclF.cjs → index-DyL6sqFY.cjs} +1 -1
- package/dist/index.d.ts +3 -14
- package/dist/{modal-FnkYHLoK.cjs → modal-BXKX0dxk.cjs} +1 -1
- package/dist/{modal-D6J8TqCp.js → modal-CYx_wrz1.js} +4 -4
- package/dist/pkt-alert.cjs +1 -1
- package/dist/pkt-alert.js +4 -4
- package/dist/pkt-calendar.cjs +1 -1
- package/dist/pkt-calendar.js +4 -4
- package/dist/pkt-card.cjs +1 -1
- package/dist/pkt-card.js +4 -4
- package/dist/pkt-component-template.cjs +1 -1
- package/dist/pkt-component-template.js +3 -3
- package/dist/pkt-datepicker.cjs +42 -37
- package/dist/pkt-datepicker.js +194 -173
- package/dist/pkt-element.cjs +1 -1
- package/dist/pkt-element.js +1 -1
- package/dist/pkt-helptext.cjs +1 -1
- package/dist/pkt-helptext.js +1 -1
- package/dist/pkt-icon.cjs +1 -1
- package/dist/pkt-icon.js +2 -2
- package/dist/pkt-index.cjs +1 -1
- package/dist/pkt-index.js +4 -4
- package/dist/pkt-input-wrapper.cjs +1 -1
- package/dist/pkt-input-wrapper.js +5 -5
- package/dist/pkt-link.cjs +1 -1
- package/dist/pkt-link.js +4 -4
- package/dist/pkt-messagebox.cjs +1 -1
- package/dist/pkt-messagebox.js +4 -4
- package/dist/pkt-modal.cjs +1 -1
- package/dist/pkt-modal.js +1 -1
- package/dist/pkt-tag.cjs +1 -1
- package/dist/pkt-tag.js +4 -4
- package/dist/{ref-D5FOI49b.js → ref-BjO0bKwt.js} +1 -1
- package/dist/{ref-3QXuhm6y.cjs → ref-CIjJrMxp.cjs} +1 -1
- package/package.json +3 -3
- package/src/components/datepicker/index.ts +42 -23
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BVbNUNAa.cjs"),h=require("./ref-CIjJrMxp.cjs"),k=require("./index-DYiD-o1w.cjs"),n=require("./class-map-DLFPHEre.cjs"),$=require("./custom-element-B-TlBwRu.cjs");require("./helptext-WCq0-Dq8.cjs");/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2020 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { P as w, v, s as o, E as u, x as p, n as r } from "./index-
|
|
2
|
-
import { e as k, P as m, n as _ } from "./ref-
|
|
3
|
-
import { o as T } from "./index-
|
|
4
|
-
import { e as c } from "./class-map-
|
|
1
|
+
import { P as w, v, s as o, E as u, x as p, n as r } from "./index-BQ9BMXel.js";
|
|
2
|
+
import { e as k, P as m, n as _ } from "./ref-BjO0bKwt.js";
|
|
3
|
+
import { o as T } from "./index-BfUPq43a.js";
|
|
4
|
+
import { e as c } from "./class-map-BQ3-MseA.js";
|
|
5
5
|
import { t as D } from "./custom-element-CWfU4dcr.js";
|
|
6
|
-
import "./helptext-
|
|
6
|
+
import "./helptext-D-5_-HAW.js";
|
|
7
7
|
/**
|
|
8
8
|
* @license
|
|
9
9
|
* Copyright 2020 Google LLC
|
package/dist/pkt-link.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BVbNUNAa.cjs"),c=require("./ref-CIjJrMxp.cjs"),k=require("./class-map-DLFPHEre.cjs"),h=require("./custom-element-B-TlBwRu.cjs");require("./index-DYiD-o1w.cjs");const f="pkt-link",u=!0,d={href:{name:"URL",description:"URL til lenken",type:"string",default:"#"},target:{name:"Mål",description:"Mål for lenken",type:["_blank","_self","_parent","_top"],default:"_self"},iconName:{name:"Ikon",description:"Ikon som skal vises ved siden av lenketeksten",type:"icon"},iconPosition:{name:"Ikonposisjon",description:"Posisjonen til ikonet i forhold til lenketeksten",type:["left","right"]},external:{name:"Ekstern lenke",description:"Vis ikon for ekstern lenke",type:"boolean",default:!1}},m={default:{description:"Innholdet i lenken"}},p={name:f,"css-class":"pkt-link","dark-mode":!0,isElement:u,props:d,slots:m};var P=Object.defineProperty,y=Object.getOwnPropertyDescriptor,i=(s,n,r,o)=>{for(var t=o>1?void 0:o?y(n,r):n,l=s.length-1,a;l>=0;l--)(a=s[l])&&(t=(o?a(n,r,t):a(t))||t);return o&&t&&P(n,r,t),t};exports.PktLink=class extends e.PktElement{constructor(){super(),this.defaultSlot=c.e(),this.href=p.props.href.default,this.iconName=void 0,this.iconPosition=void 0,this.external=p.props.external.default,this.target=p.props.target.default,this.slotController=new c.PktSlotController(this,this.defaultSlot)}render(){const n={"pkt-link":!0,"pkt-link--icon-left":!!this.iconName&&this.iconPosition==="left"||!!(this.iconName&&!this.iconPosition),"pkt-link--icon-right":!!this.iconName&&this.iconPosition==="right","pkt-link--external":this.external};return e.x`<a
|
|
2
2
|
class=${k.e(n)}
|
|
3
3
|
href=${this.href}
|
|
4
4
|
@click=${this.handleClick}
|
package/dist/pkt-link.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { P as f, x as k, E as h, n as i } from "./index-
|
|
2
|
-
import { e as m, P as d, n as u } from "./ref-
|
|
3
|
-
import { e as P } from "./class-map-
|
|
1
|
+
import { P as f, x as k, E as h, n as i } from "./index-BQ9BMXel.js";
|
|
2
|
+
import { e as m, P as d, n as u } from "./ref-BjO0bKwt.js";
|
|
3
|
+
import { e as P } from "./class-map-BQ3-MseA.js";
|
|
4
4
|
import { t as y } from "./custom-element-CWfU4dcr.js";
|
|
5
|
-
import "./index-
|
|
5
|
+
import "./index-BfUPq43a.js";
|
|
6
6
|
const g = "pkt-link", v = !0, _ = {
|
|
7
7
|
href: {
|
|
8
8
|
name: "URL",
|
package/dist/pkt-messagebox.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BVbNUNAa.cjs"),c=require("./ref-CIjJrMxp.cjs"),b=require("./class-map-DLFPHEre.cjs"),k=require("./custom-element-B-TlBwRu.cjs");require("./index-DYiD-o1w.cjs");const d="pkt-messagebox",u=!0,m={onClose:{description:"React: Event som trigges når meldingsboksen lukkes"},"on-close":{description:"Vue: Event som trigges når meldingsboksen lukkes"}},g={title:{name:"Tittel",description:"Tittelen på meldingsboksen",type:"string"},skin:{name:"Utseende",description:"Velg farge på meldingsboksen",type:["beige","blue","red","green"],default:"beige"},compact:{name:"Kompakt",description:"Gjør meldingsboksen mindre",type:"boolean",default:!1},closable:{name:"Kan lukkes",description:"Viser lukkeknapp",type:"boolean",default:!1}},h={default:{description:"Innholdet i meldingsboksen"}},p={name:d,"css-class":"pkt-messagebox",isElement:u,events:m,props:g,slots:h};var f=Object.defineProperty,x=Object.getOwnPropertyDescriptor,o=(i,t,n,l)=>{for(var s=l>1?void 0:l?x(t,n):t,r=i.length-1,a;r>=0;r--)(a=i[r])&&(s=(l?a(t,n,s):a(s))||s);return l&&s&&f(t,n,s),s};exports.PktMessagebox=class extends e.PktElement{constructor(){super(),this.defaultSlot=c.e(),this.closable=p.props.closable.default,this.compact=p.props.compact.default,this.title="",this.skin=p.props.skin.default,this._isClosed=!1,this.close=t=>{this._isClosed=!0,this.dispatchEvent(new CustomEvent("close",{detail:{origin:t},bubbles:!0})),this.dispatchEvent(new CustomEvent("on-close",{detail:{origin:t},bubbles:!0}))},this.slotController=new c.PktSlotController(this,this.defaultSlot),this._isClosed=!1}render(){const t={"pkt-messagebox":!0,"pkt-messagebox--compact":this.compact,[`pkt-messagebox--${this.skin}`]:this.skin,"pkt-messagebox--closable":this.closable,"pkt-hide":this._isClosed};return e.x`<div class=${b.e(t)}>
|
|
2
2
|
${this.closable?e.x`<div class="pkt-messagebox__close">
|
|
3
3
|
<button
|
|
4
4
|
@click=${this.close}
|
package/dist/pkt-messagebox.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r as b, P as k, x as c, E as d, n } from "./index-
|
|
2
|
-
import { e as u, P as g, n as h } from "./ref-
|
|
3
|
-
import { e as f } from "./class-map-
|
|
1
|
+
import { r as b, P as k, x as c, E as d, n } from "./index-BQ9BMXel.js";
|
|
2
|
+
import { e as u, P as g, n as h } from "./ref-BjO0bKwt.js";
|
|
3
|
+
import { e as f } from "./class-map-BQ3-MseA.js";
|
|
4
4
|
import { t as v } from "./custom-element-CWfU4dcr.js";
|
|
5
|
-
import "./index-
|
|
5
|
+
import "./index-BfUPq43a.js";
|
|
6
6
|
const _ = "pkt-messagebox", x = !0, y = {
|
|
7
7
|
onClose: {
|
|
8
8
|
description: "React: Event som trigges når meldingsboksen lukkes"
|
package/dist/pkt-modal.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./modal-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./modal-BXKX0dxk.cjs"),t=e.PktModal;Object.defineProperty(exports,"PktModal",{enumerable:!0,get:()=>e.PktModal});exports.default=t;
|
package/dist/pkt-modal.js
CHANGED
package/dist/pkt-tag.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./class-map-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./class-map-DLFPHEre.cjs"),g=require("./custom-element-B-TlBwRu.cjs"),t=require("./index-BVbNUNAa.cjs"),o=require("./ref-CIjJrMxp.cjs");require("./index-DYiD-o1w.cjs");const h="pkt-tag",k=!0,d={closeTag:{type:"boolean",required:!1,default:!1},size:{required:!1,default:"medium",type:["small","medium","large"]},iconName:{type:"string",required:!1},skin:{required:!1,default:"blue",type:["blue","green","red","beige","yellow","gray","blue-light"]},textStyle:{required:!1,default:"normal-text",type:["thin-text","normal-text"]},type:{required:!1,default:"button",type:["button","submit","reset"]},ariaLabel:{type:"string",required:!1,default:"Lukk"}},f={default:{description:"Teksten til tag"}},a={name:h,"css-class":"pkt-tag",isElement:k,props:d,slots:f};var y=Object.defineProperty,m=Object.getOwnPropertyDescriptor,s=(n,e,l,r)=>{for(var i=r>1?void 0:r?m(e,l):e,p=n.length-1,c;p>=0;p--)(c=n[p])&&(i=(r?c(e,l,i):c(i))||i);return r&&i&&y(e,l,i),i};exports.PktTag=class extends t.PktElement{constructor(){super(),this.defaultSlot=o.e(),this.closeTag=a.props.closeTag.default,this.size=a.props.size.default,this.skin=a.props.skin.default,this.textStyle=a.props.textStyle.default,this.iconName=void 0,this.type=a.props.type.default,this.ariaLabel=a.props.ariaLabel.default,this._isClosed=!1,this.close=e=>{this._isClosed=!0,this.dispatchEvent(new CustomEvent("close",{detail:{origin:e},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("on-close",{detail:{origin:e},bubbles:!0,composed:!0}))},this.slotController=new o.PktSlotController(this,this.defaultSlot),this._isClosed=!1}render(){const e={"pkt-tag":!0,[`pkt-tag--${this.size}`]:!!this.size,[`pkt-tag--${this.skin}`]:!!this.skin,[`pkt-tag--${this.textStyle}`]:!!this.textStyle},l={"pkt-tag":!0,"pkt-btn":!0,"pkt-btn--tertiary":!0,[`pkt-tag--${this.size}`]:!!this.size,[`pkt-tag--${this.skin}`]:!!this.skin,[`pkt-tag--${this.textStyle}`]:!!this.textStyle,"pkt-btn--icons-right-and-left":this.closeTag&&!!this.iconName,"pkt-hide":this._isClosed};return this.closeTag?t.x`
|
|
2
2
|
<button
|
|
3
3
|
class=${u.e(l)}
|
|
4
4
|
type=${this.type}
|
package/dist/pkt-tag.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { e as h } from "./class-map-
|
|
1
|
+
import { e as h } from "./class-map-BQ3-MseA.js";
|
|
2
2
|
import { t as d } from "./custom-element-CWfU4dcr.js";
|
|
3
|
-
import { r as y, P as g, x as p, n as l } from "./index-
|
|
4
|
-
import { e as m, P as k, n as f } from "./ref-
|
|
5
|
-
import "./index-
|
|
3
|
+
import { r as y, P as g, x as p, n as l } from "./index-BQ9BMXel.js";
|
|
4
|
+
import { e as m, P as k, n as f } from "./ref-BjO0bKwt.js";
|
|
5
|
+
import "./index-BfUPq43a.js";
|
|
6
6
|
const b = "pkt-tag", S = !0, $ = {
|
|
7
7
|
closeTag: {
|
|
8
8
|
type: "boolean",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const A=require("./index-
|
|
1
|
+
"use strict";const A=require("./index-BVbNUNAa.cjs"),$=require("./custom-element-B-TlBwRu.cjs");class v{constructor(e,...t){this.nodes=[],this.host=e,this.host.addController(this),this.slots=t,this.nodes=[],this.observer=new MutationObserver(i=>this.handleMutations(i))}hostConnected(){this.updateNodes(),this.observer.observe(this.host,{childList:!0})}hostDisconnected(){this.observer.disconnect()}hostUpdated(){this.updateSlots()}updateNodes(){this.nodes=[],Array.from(this.host.childNodes).forEach(t=>{var i;if(t.nodeType===Node.TEXT_NODE&&((i=t.nodeValue)!=null&&i.trim())){const o=document==null?void 0:document.createElement("template");o.content.appendChild(t),this.nodes.push(o)}else this.isSlotElement(t)||this.nodes.push(t)})}updateSlots(){this.slots.forEach(e=>{if(!e.value)return;const t=e.value.getAttribute("name"),o=this.nodes.flatMap(n=>n.getAttribute&&n.getAttribute("slot")==t?this.nodeFromElement(n,e):[]).filter(n=>e.value&&!e.value.contains(n)&&!n.contains(e.value));o.length>0&&e.value.replaceChildren(...o)})}handleMutations(e){let t=!1;e.forEach(i=>{i.type==="childList"&&(i.addedNodes.forEach(o=>{var h;const n=o.nodeType===Node.ELEMENT_NODE&&!this.isSlotElement(o),l=o.nodeType===Node.TEXT_NODE&&((h=o.nodeValue)==null?void 0:h.trim());if(n)this.nodes.push(o),t=!0;else if(l){const d=document==null?void 0:document.createElement("template");d.content.appendChild(o),this.nodes.push(d),t=!0}}),i.removedNodes.forEach(o=>{this.nodes=this.nodes.filter(n=>n!==o),t=!0}))}),t&&this.updateSlots()}isSlotElement(e){return this.slots.some(t=>t.value===e)}nodeFromElement(e,t){var i;return e===((i=t.value)==null?void 0:i.parentNode)?[]:e instanceof HTMLTemplateElement?Array.from(e.content.childNodes):[e]}}/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2020 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oslokommune/punkt-elements",
|
|
3
|
-
"version": "12.11.
|
|
3
|
+
"version": "12.11.4",
|
|
4
4
|
"description": "Komponentbiblioteket til Punkt, et designsystem laget av Oslo Origo",
|
|
5
5
|
"homepage": "https://punkt.oslo.kommune.no",
|
|
6
6
|
"author": "Team Designsystem, Oslo Origo",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@oslokommune/punkt-assets": "^12.7.3",
|
|
32
|
-
"@oslokommune/punkt-css": "^12.11.
|
|
32
|
+
"@oslokommune/punkt-css": "^12.11.4",
|
|
33
33
|
"sass": "^1.78.0",
|
|
34
34
|
"typescript": "^5.6.2",
|
|
35
35
|
"vite": "^5.4.4",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"url": "https://github.com/oslokommune/punkt/issues"
|
|
57
57
|
},
|
|
58
58
|
"license": "MIT",
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "bde8823df25a77a385effd5b4001a1162c7f5132"
|
|
60
60
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { html, nothing, PropertyValues } from 'lit'
|
|
2
|
-
import { customElement, property } from 'lit/decorators.js'
|
|
2
|
+
import { customElement, property, state } from 'lit/decorators.js'
|
|
3
3
|
import { Ref, createRef, ref } from 'lit/directives/ref.js'
|
|
4
4
|
import { classMap } from 'lit/directives/class-map.js'
|
|
5
5
|
import { repeat } from 'lit/directives/repeat.js'
|
|
@@ -44,6 +44,9 @@ export class PktDatepicker extends PktInputElement {
|
|
|
44
44
|
@property({ type: Boolean, reflect: true })
|
|
45
45
|
range: boolean = specs.props.range.default
|
|
46
46
|
|
|
47
|
+
@property({ type: Boolean })
|
|
48
|
+
showRangeLabels: boolean = false
|
|
49
|
+
|
|
47
50
|
@property({ type: String })
|
|
48
51
|
min: string | null = null
|
|
49
52
|
|
|
@@ -77,6 +80,9 @@ export class PktDatepicker extends PktInputElement {
|
|
|
77
80
|
@property({ type: String })
|
|
78
81
|
timezone: string = 'Europe/Oslo'
|
|
79
82
|
|
|
83
|
+
@state() inputClasses = {}
|
|
84
|
+
@state() buttonClasses = {}
|
|
85
|
+
|
|
80
86
|
/**
|
|
81
87
|
* Housekeeping / lifecycle methods
|
|
82
88
|
*/
|
|
@@ -182,23 +188,6 @@ export class PktDatepicker extends PktInputElement {
|
|
|
182
188
|
calRef: Ref<PktCalendar> = createRef()
|
|
183
189
|
popupRef: Ref<HTMLDivElement> = createRef()
|
|
184
190
|
|
|
185
|
-
/**
|
|
186
|
-
* CSS classes
|
|
187
|
-
*/
|
|
188
|
-
|
|
189
|
-
inputClasses = {
|
|
190
|
-
'pkt-input': true,
|
|
191
|
-
'pkt-datepicker__input': true,
|
|
192
|
-
'pkt-input--fullwidth': this.fullwidth,
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
buttonClasses = {
|
|
196
|
-
'pkt-input-icon': true,
|
|
197
|
-
'pkt-btn': true,
|
|
198
|
-
'pkt-btn--icon-only': true,
|
|
199
|
-
'pkt-btn--tertiary': true,
|
|
200
|
-
}
|
|
201
|
-
|
|
202
191
|
/**
|
|
203
192
|
* Rendering
|
|
204
193
|
*/
|
|
@@ -251,8 +240,14 @@ export class PktDatepicker extends PktInputElement {
|
|
|
251
240
|
}
|
|
252
241
|
|
|
253
242
|
renderRangeInput() {
|
|
243
|
+
const rangeLabelClasses = {
|
|
244
|
+
'pkt-input-prefix': this.showRangeLabels,
|
|
245
|
+
'pkt-hide': !this.showRangeLabels,
|
|
246
|
+
}
|
|
254
247
|
return html`
|
|
255
|
-
|
|
248
|
+
${this.showRangeLabels
|
|
249
|
+
? html` <div class="pkt-input-prefix">${this.strings.generic.from}</div> `
|
|
250
|
+
: nothing}
|
|
256
251
|
<input
|
|
257
252
|
class=${classMap(this.inputClasses)}
|
|
258
253
|
.type=${this.inputType}
|
|
@@ -303,7 +298,10 @@ export class PktDatepicker extends PktInputElement {
|
|
|
303
298
|
}}
|
|
304
299
|
${ref(this.inputRef)}
|
|
305
300
|
/>
|
|
306
|
-
<div class="
|
|
301
|
+
<div class="${classMap(rangeLabelClasses)}" id="${this.id}-to-label">
|
|
302
|
+
${this.strings.generic.to}
|
|
303
|
+
</div>
|
|
304
|
+
${!this.showRangeLabels ? html` <div class="pkt-input-separator">–</div> ` : nothing}
|
|
307
305
|
<input
|
|
308
306
|
class=${classMap(this.inputClasses)}
|
|
309
307
|
.type=${this.inputType}
|
|
@@ -373,13 +371,14 @@ export class PktDatepicker extends PktInputElement {
|
|
|
373
371
|
}
|
|
374
372
|
|
|
375
373
|
renderMultipleInput() {
|
|
374
|
+
console.log('renderMultipleInput', this.inputClasses, this.multiple)
|
|
376
375
|
return html`
|
|
377
376
|
<input
|
|
378
377
|
class=${classMap(this.inputClasses)}
|
|
379
378
|
.type=${this.inputType}
|
|
380
379
|
id="${this.id}-input"
|
|
381
|
-
min=${this.min}
|
|
382
|
-
max=${this.max}
|
|
380
|
+
.min=${this.min || nothing}
|
|
381
|
+
.max=${this.max || nothing}
|
|
383
382
|
@click=${(e: MouseEvent) => {
|
|
384
383
|
e.preventDefault()
|
|
385
384
|
this.showCalendar()
|
|
@@ -490,6 +489,22 @@ export class PktDatepicker extends PktInputElement {
|
|
|
490
489
|
}
|
|
491
490
|
|
|
492
491
|
render() {
|
|
492
|
+
this.inputClasses = {
|
|
493
|
+
'pkt-input': true,
|
|
494
|
+
'pkt-datepicker__input': true,
|
|
495
|
+
'pkt-input--fullwidth': this.fullwidth,
|
|
496
|
+
'pkt-datepicker--hasrangelabels': this.showRangeLabels,
|
|
497
|
+
'pkt-datepicker--multiple': this.multiple,
|
|
498
|
+
'pkt-datepicker--range': this.range,
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
this.buttonClasses = {
|
|
502
|
+
'pkt-input-icon': true,
|
|
503
|
+
'pkt-btn': true,
|
|
504
|
+
'pkt-btn--icon-only': true,
|
|
505
|
+
'pkt-btn--tertiary': true,
|
|
506
|
+
}
|
|
507
|
+
|
|
493
508
|
return html`
|
|
494
509
|
<pkt-input-wrapper
|
|
495
510
|
label="${this.label}"
|
|
@@ -512,7 +527,11 @@ export class PktDatepicker extends PktInputElement {
|
|
|
512
527
|
class="pkt-datepicker"
|
|
513
528
|
>
|
|
514
529
|
${this.multiple ? this.renderTags() : nothing}
|
|
515
|
-
<div
|
|
530
|
+
<div
|
|
531
|
+
class="pkt-datepicker__inputs ${this.range && this.showRangeLabels
|
|
532
|
+
? 'pkt-input__range-inputs'
|
|
533
|
+
: ''}"
|
|
534
|
+
>
|
|
516
535
|
<div class="pkt-input__container">
|
|
517
536
|
${this.range
|
|
518
537
|
? this.renderRangeInput()
|