@oslokommune/punkt-react 16.7.0 → 16.7.1
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/CHANGELOG.md +18 -0
- package/dist/punkt-react.es.js +148 -132
- package/dist/punkt-react.umd.js +14 -11
- package/package.json +4 -4
- package/src/components/timepicker/Timepicker.tsx +8 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,24 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [16.7.1](https://github.com/oslokommune/punkt/compare/16.7.0...16.7.1) (2026-04-13)
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
Ingen
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
Ingen
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
* Time picker, fiks kolon og klikk (#3411).
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Chores
|
|
21
|
+
Ingen
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
|
|
8
26
|
## [16.7.0](https://github.com/oslokommune/punkt/compare/16.6.2...16.7.0) (2026-04-10)
|
|
9
27
|
|
|
10
28
|
### ⚠ BREAKING CHANGES
|
package/dist/punkt-react.es.js
CHANGED
|
@@ -10713,7 +10713,13 @@ let Wn = class extends fe {
|
|
|
10713
10713
|
var n, e, t, s, i, r, a, o;
|
|
10714
10714
|
const l = ((n = this.strings.timepicker) == null ? void 0 : n.hours) ?? "Timer", d = ((e = this.strings.timepicker) == null ? void 0 : e.minutes) ?? "Minutter", f = this.label ? `${l}, ${this.label}` : l, m = this.label ? `${d}, ${this.label}` : d;
|
|
10715
10715
|
return k`
|
|
10716
|
-
<div
|
|
10716
|
+
<div
|
|
10717
|
+
class="pkt-input__container"
|
|
10718
|
+
@click=${(p) => {
|
|
10719
|
+
var v;
|
|
10720
|
+
p.target.closest("button, input") || (v = this.hoursInputRef.value) == null || v.focus();
|
|
10721
|
+
}}
|
|
10722
|
+
>
|
|
10717
10723
|
${this.stepArrows ? k`
|
|
10718
10724
|
<button
|
|
10719
10725
|
class="pkt-input-icon pkt-btn pkt-btn--icon-only pkt-btn--tertiary pkt-timepicker__button pkt-timepicker__button--prev"
|
|
@@ -18571,137 +18577,147 @@ const Xb = Le((n, e) => {
|
|
|
18571
18577
|
/* @__PURE__ */ c("div", { className: "pkt-timepicker-popup__col", role: "listbox", "aria-label": a, "aria-orientation": "vertical", children: i.minuteOptions.map((p) => d(p, "minute")) })
|
|
18572
18578
|
]
|
|
18573
18579
|
}
|
|
18574
|
-
), m = () => /* @__PURE__ */ x(
|
|
18575
|
-
|
|
18576
|
-
|
|
18577
|
-
|
|
18578
|
-
|
|
18579
|
-
|
|
18580
|
-
"
|
|
18581
|
-
|
|
18582
|
-
|
|
18583
|
-
|
|
18584
|
-
|
|
18585
|
-
|
|
18586
|
-
|
|
18587
|
-
|
|
18588
|
-
|
|
18589
|
-
|
|
18590
|
-
|
|
18591
|
-
|
|
18592
|
-
|
|
18593
|
-
|
|
18594
|
-
|
|
18595
|
-
|
|
18596
|
-
|
|
18597
|
-
|
|
18598
|
-
|
|
18599
|
-
|
|
18600
|
-
|
|
18601
|
-
|
|
18602
|
-
|
|
18603
|
-
|
|
18604
|
-
|
|
18605
|
-
|
|
18606
|
-
|
|
18607
|
-
|
|
18608
|
-
|
|
18609
|
-
|
|
18610
|
-
|
|
18611
|
-
|
|
18612
|
-
|
|
18613
|
-
|
|
18614
|
-
|
|
18615
|
-
|
|
18616
|
-
|
|
18617
|
-
|
|
18618
|
-
|
|
18619
|
-
|
|
18620
|
-
|
|
18621
|
-
|
|
18622
|
-
|
|
18623
|
-
|
|
18624
|
-
|
|
18625
|
-
|
|
18626
|
-
|
|
18627
|
-
|
|
18628
|
-
|
|
18629
|
-
|
|
18630
|
-
|
|
18631
|
-
|
|
18632
|
-
|
|
18633
|
-
|
|
18634
|
-
|
|
18635
|
-
|
|
18636
|
-
|
|
18637
|
-
|
|
18638
|
-
|
|
18639
|
-
|
|
18640
|
-
|
|
18641
|
-
|
|
18642
|
-
|
|
18643
|
-
|
|
18644
|
-
|
|
18645
|
-
|
|
18646
|
-
|
|
18647
|
-
|
|
18648
|
-
|
|
18649
|
-
|
|
18650
|
-
|
|
18651
|
-
|
|
18652
|
-
|
|
18653
|
-
|
|
18654
|
-
|
|
18655
|
-
|
|
18656
|
-
|
|
18657
|
-
|
|
18658
|
-
|
|
18659
|
-
|
|
18660
|
-
|
|
18661
|
-
|
|
18662
|
-
|
|
18663
|
-
|
|
18664
|
-
"
|
|
18665
|
-
|
|
18666
|
-
|
|
18667
|
-
|
|
18668
|
-
|
|
18669
|
-
|
|
18670
|
-
|
|
18671
|
-
|
|
18672
|
-
|
|
18673
|
-
|
|
18674
|
-
|
|
18675
|
-
|
|
18676
|
-
|
|
18677
|
-
|
|
18678
|
-
|
|
18679
|
-
|
|
18680
|
-
|
|
18681
|
-
|
|
18682
|
-
|
|
18683
|
-
|
|
18684
|
-
|
|
18685
|
-
|
|
18686
|
-
|
|
18687
|
-
|
|
18688
|
-
|
|
18689
|
-
|
|
18690
|
-
|
|
18691
|
-
|
|
18692
|
-
|
|
18693
|
-
|
|
18694
|
-
|
|
18695
|
-
|
|
18696
|
-
|
|
18697
|
-
|
|
18698
|
-
|
|
18699
|
-
|
|
18700
|
-
|
|
18701
|
-
|
|
18702
|
-
|
|
18703
|
-
|
|
18704
|
-
|
|
18580
|
+
), m = () => /* @__PURE__ */ x(
|
|
18581
|
+
"div",
|
|
18582
|
+
{
|
|
18583
|
+
className: "pkt-input__container",
|
|
18584
|
+
onClick: (p) => {
|
|
18585
|
+
var g;
|
|
18586
|
+
p.target.closest("button, input") || (g = i.hoursInputRef.current) == null || g.focus();
|
|
18587
|
+
},
|
|
18588
|
+
children: [
|
|
18589
|
+
i.stepArrows && /* @__PURE__ */ x(
|
|
18590
|
+
"button",
|
|
18591
|
+
{
|
|
18592
|
+
type: "button",
|
|
18593
|
+
className: "pkt-input-icon pkt-btn pkt-btn--icon-only pkt-btn--tertiary pkt-timepicker__button pkt-timepicker__button--prev",
|
|
18594
|
+
"aria-label": i.strings.prevTime,
|
|
18595
|
+
disabled: i.disabled,
|
|
18596
|
+
onClick: () => i.stepTimeDelta(-1),
|
|
18597
|
+
children: [
|
|
18598
|
+
/* @__PURE__ */ c(ie, { name: "chevron-thin-left" }),
|
|
18599
|
+
/* @__PURE__ */ c("span", { className: "pkt-btn__text", children: i.strings.prevTime })
|
|
18600
|
+
]
|
|
18601
|
+
}
|
|
18602
|
+
),
|
|
18603
|
+
/* @__PURE__ */ c(
|
|
18604
|
+
"input",
|
|
18605
|
+
{
|
|
18606
|
+
ref: i.hoursInputRef,
|
|
18607
|
+
type: "text",
|
|
18608
|
+
inputMode: "numeric",
|
|
18609
|
+
maxLength: 2,
|
|
18610
|
+
size: 2,
|
|
18611
|
+
className: "pkt-input pkt-timepicker__input",
|
|
18612
|
+
id: i.hoursId,
|
|
18613
|
+
"data-min": "0",
|
|
18614
|
+
"data-max": "23",
|
|
18615
|
+
value: i.hours,
|
|
18616
|
+
placeholder: "––",
|
|
18617
|
+
"aria-label": o,
|
|
18618
|
+
role: "spinbutton",
|
|
18619
|
+
"aria-invalid": i.hasError || i.isInvalid || void 0,
|
|
18620
|
+
"aria-valuemin": 0,
|
|
18621
|
+
"aria-valuemax": 23,
|
|
18622
|
+
"aria-valuenow": i.hours !== "" ? parseInt(i.hours, 10) : void 0,
|
|
18623
|
+
"aria-valuetext": i.hours !== "" ? `${i.hours} ${r.toLowerCase()}` : void 0,
|
|
18624
|
+
autoComplete: "off",
|
|
18625
|
+
disabled: i.disabled,
|
|
18626
|
+
onKeyDown: i.handleHoursKeydown,
|
|
18627
|
+
onBlur: i.handleHoursBlur,
|
|
18628
|
+
onFocus: (p) => {
|
|
18629
|
+
p.currentTarget.select();
|
|
18630
|
+
},
|
|
18631
|
+
onChange: () => {
|
|
18632
|
+
},
|
|
18633
|
+
onPaste: (p) => p.preventDefault()
|
|
18634
|
+
}
|
|
18635
|
+
),
|
|
18636
|
+
/* @__PURE__ */ c("span", { className: "pkt-timepicker__separator", children: ":" }),
|
|
18637
|
+
/* @__PURE__ */ c(
|
|
18638
|
+
"input",
|
|
18639
|
+
{
|
|
18640
|
+
ref: i.minutesInputRef,
|
|
18641
|
+
type: "text",
|
|
18642
|
+
inputMode: "numeric",
|
|
18643
|
+
maxLength: 2,
|
|
18644
|
+
size: 2,
|
|
18645
|
+
className: "pkt-input pkt-timepicker__input",
|
|
18646
|
+
id: i.minutesId,
|
|
18647
|
+
"data-min": "0",
|
|
18648
|
+
"data-max": "59",
|
|
18649
|
+
value: i.minutes,
|
|
18650
|
+
placeholder: "––",
|
|
18651
|
+
"aria-label": l,
|
|
18652
|
+
role: "spinbutton",
|
|
18653
|
+
"aria-invalid": i.hasError || i.isInvalid || void 0,
|
|
18654
|
+
"aria-valuemin": 0,
|
|
18655
|
+
"aria-valuemax": 59,
|
|
18656
|
+
"aria-valuenow": i.minutes !== "" ? parseInt(i.minutes, 10) : void 0,
|
|
18657
|
+
"aria-valuetext": i.minutes !== "" ? `${i.minutes} ${a.toLowerCase()}` : void 0,
|
|
18658
|
+
autoComplete: "off",
|
|
18659
|
+
disabled: i.disabled,
|
|
18660
|
+
onKeyDown: i.handleMinutesKeydown,
|
|
18661
|
+
onBlur: i.handleMinutesBlur,
|
|
18662
|
+
onFocus: (p) => {
|
|
18663
|
+
p.currentTarget.select();
|
|
18664
|
+
},
|
|
18665
|
+
onChange: () => {
|
|
18666
|
+
},
|
|
18667
|
+
onPaste: (p) => p.preventDefault()
|
|
18668
|
+
}
|
|
18669
|
+
),
|
|
18670
|
+
i.hidePicker && !i.stepArrows && /* @__PURE__ */ c(ie, { className: "pkt-input-icon pkt-timepicker__icon", name: "clock", "aria-hidden": !0 }),
|
|
18671
|
+
!i.hidePicker && !i.stepArrows && /* @__PURE__ */ x(
|
|
18672
|
+
"button",
|
|
18673
|
+
{
|
|
18674
|
+
ref: i.buttonRef,
|
|
18675
|
+
type: "button",
|
|
18676
|
+
className: "pkt-input-icon pkt-btn pkt-btn--icon-only pkt-btn--tertiary pkt-timepicker__button",
|
|
18677
|
+
"aria-label": i.strings.openPicker,
|
|
18678
|
+
"aria-haspopup": "listbox",
|
|
18679
|
+
"aria-expanded": i.isOpen,
|
|
18680
|
+
"aria-controls": i.popupId,
|
|
18681
|
+
disabled: i.disabled,
|
|
18682
|
+
onClick: i.handleClockButtonClick,
|
|
18683
|
+
children: [
|
|
18684
|
+
/* @__PURE__ */ c(ie, { name: "clock" }),
|
|
18685
|
+
/* @__PURE__ */ c("span", { className: "pkt-btn__text", children: i.strings.openPicker })
|
|
18686
|
+
]
|
|
18687
|
+
}
|
|
18688
|
+
),
|
|
18689
|
+
i.stepArrows && /* @__PURE__ */ x(
|
|
18690
|
+
"button",
|
|
18691
|
+
{
|
|
18692
|
+
type: "button",
|
|
18693
|
+
className: "pkt-input-icon pkt-btn pkt-btn--icon-only pkt-btn--tertiary pkt-timepicker__button pkt-timepicker__button--next",
|
|
18694
|
+
"aria-label": i.strings.nextTime,
|
|
18695
|
+
disabled: i.disabled,
|
|
18696
|
+
onClick: () => i.stepTimeDelta(1),
|
|
18697
|
+
children: [
|
|
18698
|
+
/* @__PURE__ */ c(ie, { name: "chevron-thin-right" }),
|
|
18699
|
+
/* @__PURE__ */ c("span", { className: "pkt-btn__text", children: i.strings.nextTime })
|
|
18700
|
+
]
|
|
18701
|
+
}
|
|
18702
|
+
),
|
|
18703
|
+
/* @__PURE__ */ c(
|
|
18704
|
+
"input",
|
|
18705
|
+
{
|
|
18706
|
+
ref: i.changeInputRef,
|
|
18707
|
+
type: "time",
|
|
18708
|
+
hidden: !0,
|
|
18709
|
+
name: i.name,
|
|
18710
|
+
id: i.hiddenInputId,
|
|
18711
|
+
disabled: i.disabled,
|
|
18712
|
+
tabIndex: -1,
|
|
18713
|
+
"aria-hidden": !0,
|
|
18714
|
+
onChange: t,
|
|
18715
|
+
onInput: s
|
|
18716
|
+
}
|
|
18717
|
+
)
|
|
18718
|
+
]
|
|
18719
|
+
}
|
|
18720
|
+
);
|
|
18705
18721
|
return /* @__PURE__ */ c(
|
|
18706
18722
|
"div",
|
|
18707
18723
|
{
|