@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 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
@@ -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 class="pkt-input__container">
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("div", { className: "pkt-input__container", children: [
18575
- i.stepArrows && /* @__PURE__ */ x(
18576
- "button",
18577
- {
18578
- type: "button",
18579
- className: "pkt-input-icon pkt-btn pkt-btn--icon-only pkt-btn--tertiary pkt-timepicker__button pkt-timepicker__button--prev",
18580
- "aria-label": i.strings.prevTime,
18581
- disabled: i.disabled,
18582
- onClick: () => i.stepTimeDelta(-1),
18583
- children: [
18584
- /* @__PURE__ */ c(ie, { name: "chevron-thin-left" }),
18585
- /* @__PURE__ */ c("span", { className: "pkt-btn__text", children: i.strings.prevTime })
18586
- ]
18587
- }
18588
- ),
18589
- /* @__PURE__ */ c(
18590
- "input",
18591
- {
18592
- ref: i.hoursInputRef,
18593
- type: "text",
18594
- inputMode: "numeric",
18595
- maxLength: 2,
18596
- size: 2,
18597
- className: "pkt-input pkt-timepicker__input",
18598
- id: i.hoursId,
18599
- "data-min": "0",
18600
- "data-max": "23",
18601
- value: i.hours,
18602
- placeholder: "––",
18603
- "aria-label": o,
18604
- role: "spinbutton",
18605
- "aria-invalid": i.hasError || i.isInvalid || void 0,
18606
- "aria-valuemin": 0,
18607
- "aria-valuemax": 23,
18608
- "aria-valuenow": i.hours !== "" ? parseInt(i.hours, 10) : void 0,
18609
- "aria-valuetext": i.hours !== "" ? `${i.hours} ${r.toLowerCase()}` : void 0,
18610
- autoComplete: "off",
18611
- disabled: i.disabled,
18612
- onKeyDown: i.handleHoursKeydown,
18613
- onBlur: i.handleHoursBlur,
18614
- onFocus: (p) => {
18615
- p.currentTarget.select();
18616
- },
18617
- onChange: () => {
18618
- },
18619
- onPaste: (p) => p.preventDefault()
18620
- }
18621
- ),
18622
- /* @__PURE__ */ c("span", { className: "pkt-timepicker__separator", children: ":" }),
18623
- /* @__PURE__ */ c(
18624
- "input",
18625
- {
18626
- ref: i.minutesInputRef,
18627
- type: "text",
18628
- inputMode: "numeric",
18629
- maxLength: 2,
18630
- size: 2,
18631
- className: "pkt-input pkt-timepicker__input",
18632
- id: i.minutesId,
18633
- "data-min": "0",
18634
- "data-max": "59",
18635
- value: i.minutes,
18636
- placeholder: "––",
18637
- "aria-label": l,
18638
- role: "spinbutton",
18639
- "aria-invalid": i.hasError || i.isInvalid || void 0,
18640
- "aria-valuemin": 0,
18641
- "aria-valuemax": 59,
18642
- "aria-valuenow": i.minutes !== "" ? parseInt(i.minutes, 10) : void 0,
18643
- "aria-valuetext": i.minutes !== "" ? `${i.minutes} ${a.toLowerCase()}` : void 0,
18644
- autoComplete: "off",
18645
- disabled: i.disabled,
18646
- onKeyDown: i.handleMinutesKeydown,
18647
- onBlur: i.handleMinutesBlur,
18648
- onFocus: (p) => {
18649
- p.currentTarget.select();
18650
- },
18651
- onChange: () => {
18652
- },
18653
- onPaste: (p) => p.preventDefault()
18654
- }
18655
- ),
18656
- i.hidePicker && !i.stepArrows && /* @__PURE__ */ c(ie, { className: "pkt-input-icon pkt-timepicker__icon", name: "clock", "aria-hidden": !0 }),
18657
- !i.hidePicker && !i.stepArrows && /* @__PURE__ */ x(
18658
- "button",
18659
- {
18660
- ref: i.buttonRef,
18661
- type: "button",
18662
- className: "pkt-input-icon pkt-btn pkt-btn--icon-only pkt-btn--tertiary pkt-timepicker__button",
18663
- "aria-label": i.strings.openPicker,
18664
- "aria-haspopup": "listbox",
18665
- "aria-expanded": i.isOpen,
18666
- "aria-controls": i.popupId,
18667
- disabled: i.disabled,
18668
- onClick: i.handleClockButtonClick,
18669
- children: [
18670
- /* @__PURE__ */ c(ie, { name: "clock" }),
18671
- /* @__PURE__ */ c("span", { className: "pkt-btn__text", children: i.strings.openPicker })
18672
- ]
18673
- }
18674
- ),
18675
- i.stepArrows && /* @__PURE__ */ x(
18676
- "button",
18677
- {
18678
- type: "button",
18679
- className: "pkt-input-icon pkt-btn pkt-btn--icon-only pkt-btn--tertiary pkt-timepicker__button pkt-timepicker__button--next",
18680
- "aria-label": i.strings.nextTime,
18681
- disabled: i.disabled,
18682
- onClick: () => i.stepTimeDelta(1),
18683
- children: [
18684
- /* @__PURE__ */ c(ie, { name: "chevron-thin-right" }),
18685
- /* @__PURE__ */ c("span", { className: "pkt-btn__text", children: i.strings.nextTime })
18686
- ]
18687
- }
18688
- ),
18689
- /* @__PURE__ */ c(
18690
- "input",
18691
- {
18692
- ref: i.changeInputRef,
18693
- type: "time",
18694
- hidden: !0,
18695
- name: i.name,
18696
- id: i.hiddenInputId,
18697
- disabled: i.disabled,
18698
- tabIndex: -1,
18699
- "aria-hidden": !0,
18700
- onChange: t,
18701
- onInput: s
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
  {