daisyui 2.2.3 → 2.2.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ab063470f9b99ad71dc3f9478536d3df9a07373fc6755a3c396b32a7d0a99bc7
4
- data.tar.gz: a49ac6b55190c2e2c0043d4cec89eaa11445545b74b77c4d91cdcd9eba107f7d
3
+ metadata.gz: e5b1aef3857af3a5ad3d0219e498a2ec51e8f57801a9dd5f42ec420cb63934f8
4
+ data.tar.gz: b80b3f2c4c0b3863364a12246c62d42f31668a63f91fcfd4ced9e4cfcbeaf5e5
5
5
  SHA512:
6
- metadata.gz: cb6541c2ffed9f0fa4d3d3d59630fd88a18fdf266d414c582c709591e53c8a3095b1260b65997f2133cb3ef9f12edcfb22c47a08758a78e6240e98c908f89871
7
- data.tar.gz: dff649b560f90152a45011f8534a343d97bb21d40c886275eb6d411933421e8dc190c43e84be192bde43ddc1b50a8b735b0806ccd178fe59dcd25876f7ff17af
6
+ metadata.gz: 23b87a9d555d2bbf256d0e45444c10251618dc491746f7a7eecbc265b57799ebde4a46f6a6e50d3a8e194ec20eb45382791d03b007440063dd3facfb852841dc
7
+ data.tar.gz: 494c414242227f80a4c2e51cd2c354d023ac0c37618bc397120fa28c8f31bdb9a302694f58a53ccddedcfca93cf14a45aacc5760de8b53a220484002f13c6e17
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ### Changed
4
+
5
+ - `Otp` raises `ArgumentError` for `digits:` outside 1..8 (or not an
6
+ Integer); daisyUI sizes `.otp` for one to eight boxes, so a ninth rendered
7
+ with the width of eight. Docs: the OTP page gains "In a form" and "Disabled"
8
+ examples, the docs site builds on daisyUI 5.7, and the docs CSS makes
9
+ `.otp > input` inherit its font-size, which `@tailwindcss/forms` had reset
10
+ to 1rem so typed digits drifted out of their boxes (#78).
11
+
3
12
  ### Fixed
4
13
 
5
14
  - A `:popover` `Tooltip` opens on a touch screen. The `daisy-tooltip`
@@ -1381,6 +1381,11 @@
1381
1381
  "otp-xs"
1382
1382
  ],
1383
1383
  "classes": [
1384
+ "be",
1385
+ "digits",
1386
+ "for",
1387
+ "got",
1388
+ "must",
1384
1389
  "one-time-code",
1385
1390
  "otp",
1386
1391
  "otp-accent",
@@ -1396,7 +1401,10 @@
1396
1401
  "otp-success",
1397
1402
  "otp-warning",
1398
1403
  "otp-xl",
1399
- "otp-xs"
1404
+ "otp-xs",
1405
+ "sizes",
1406
+ "to",
1407
+ "within"
1400
1408
  ]
1401
1409
  },
1402
1410
  "Pagination": {
data/lib/daisy_ui/otp.rb CHANGED
@@ -4,7 +4,12 @@ module DaisyUI
4
4
  class Otp < Base
5
5
  self.component_class = :otp
6
6
 
7
+ # daisyUI sizes the container with `.otp:has(> span:nth-child(1..8))` only.
8
+ DIGITS = (1..8)
9
+
7
10
  def initialize(*, digits: 4, as: :label, input_attributes: {}, **)
11
+ raise ArgumentError, "digits must be within #{DIGITS} (daisyUI sizes .otp for 1 to 8 boxes), got #{digits.inspect}" unless digits.is_a?(Integer) && DIGITS.cover?(digits)
12
+
8
13
  super(*, as:, **)
9
14
  @digits = digits
10
15
  @input_attributes = input_attributes
@@ -3,5 +3,5 @@
3
3
  module DaisyUI
4
4
  # This timestamp is automatically updated when releasing a new version
5
5
  # Format: YYYY-MM-DD HH:MM:SS UTC
6
- UPDATED_AT = "2026-10-27 20:04:59 UTC"
6
+ UPDATED_AT = "2026-11-09 17:11:55 UTC"
7
7
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DaisyUI
4
- VERSION = "2.2.3"
4
+ VERSION = "2.2.4"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: daisyui
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.3
4
+ version: 2.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mikael Henriksson