mada-design-system 0.5.3 → 0.5.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/index.cjs10.js +1 -1
- package/index.cjs100.js +1 -1
- package/index.cjs101.js +1 -1
- package/index.cjs102.js +1 -1
- package/index.cjs103.js +1 -1
- package/index.cjs104.js +1 -1
- package/index.cjs105.js +1 -1
- package/index.cjs106.js +5 -1
- package/index.cjs107.js +1 -5
- package/index.cjs108.js +1 -1
- package/index.cjs109.js +1 -1
- package/index.cjs110.js +1 -1
- package/index.cjs111.js +1 -1
- package/index.cjs112.js +1 -1
- package/index.cjs113.js +1 -1
- package/index.cjs114.js +1 -1
- package/index.cjs115.js +1 -1
- package/index.cjs116.js +1 -1
- package/index.cjs117.js +1 -1
- package/index.cjs118.js +1 -1
- package/index.cjs119.js +4 -1
- package/index.cjs12.js +1 -1
- package/index.cjs120.js +1 -4
- package/index.cjs121.js +2 -1
- package/index.cjs122.js +1 -2
- package/index.cjs123.js +2 -1
- package/index.cjs124.js +1 -2
- package/index.cjs125.js +1 -1
- package/index.cjs126.js +1 -1
- package/index.cjs127.js +1 -1
- package/index.cjs128.js +1 -1
- package/index.cjs129.js +1 -1
- package/index.cjs13.js +1 -1
- package/index.cjs130.js +1 -1
- package/index.cjs131.js +1 -1
- package/index.cjs132.js +20 -1
- package/index.cjs133.js +1 -20
- package/index.cjs134.js +1 -1
- package/index.cjs135.js +1 -1
- package/index.cjs136.js +1 -1
- package/index.cjs137.js +1 -1
- package/index.cjs138.js +1 -1
- package/index.cjs139.js +1 -1
- package/index.cjs140.js +1 -1
- package/index.cjs141.js +1 -1
- package/index.cjs142.js +1 -1
- package/index.cjs143.js +1 -1
- package/index.cjs144.js +1 -1
- package/index.cjs145.js +1 -1
- package/index.cjs146.js +1 -1
- package/index.cjs147.js +1 -1
- package/index.cjs148.js +1 -1
- package/index.cjs149.js +1 -1
- package/index.cjs15.js +1 -1
- package/index.cjs150.js +1 -1
- package/index.cjs151.js +1 -1
- package/index.cjs152.js +1 -1
- package/index.cjs153.js +1 -1
- package/index.cjs154.js +1 -1
- package/index.cjs155.js +1 -1
- package/index.cjs156.js +1 -1
- package/index.cjs157.js +1 -1
- package/index.cjs158.js +1 -1
- package/index.cjs159.js +1 -1
- package/index.cjs160.js +1 -1
- package/index.cjs161.js +1 -1
- package/index.cjs162.js +1 -1
- package/index.cjs163.js +1 -1
- package/index.cjs164.js +1 -1
- package/index.cjs165.js +1 -1
- package/index.cjs166.js +1 -1
- package/index.cjs167.js +1 -1
- package/index.cjs168.js +1 -1
- package/index.cjs169.js +1 -1
- package/index.cjs17.js +1 -1
- package/index.cjs170.js +1 -1
- package/index.cjs171.js +1 -1
- package/index.cjs172.js +1 -1
- package/index.cjs173.js +1 -1
- package/index.cjs174.js +1 -1
- package/index.cjs179.js +1 -1
- package/index.cjs181.js +1 -1
- package/index.cjs182.js +1 -1
- package/index.cjs183.js +1 -1
- package/index.cjs185.js +1 -1
- package/index.cjs186.js +1 -1
- package/index.cjs187.js +1 -1
- package/index.cjs20.js +1 -1
- package/index.cjs200.js +1 -1
- package/index.cjs201.js +1 -1
- package/index.cjs202.js +1 -1
- package/index.cjs21.js +1 -1
- package/index.cjs213.js +1 -1
- package/index.cjs214.js +1 -1
- package/index.cjs215.js +1 -1
- package/index.cjs216.js +1 -1
- package/index.cjs217.js +1 -1
- package/index.cjs22.js +1 -1
- package/index.cjs220.js +1 -1
- package/index.cjs228.js +1 -1
- package/index.cjs229.js +1 -1
- package/index.cjs23.js +1 -1
- package/index.cjs230.js +1 -1
- package/index.cjs25.js +1 -1
- package/index.cjs251.js +1 -1
- package/index.cjs252.js +1 -1
- package/index.cjs254.js +1 -1
- package/index.cjs255.js +1 -1
- package/index.cjs256.js +1 -1
- package/index.cjs257.js +1 -1
- package/index.cjs259.js +1 -1
- package/index.cjs263.js +1 -1
- package/index.cjs264.js +1 -1
- package/index.cjs266.js +1 -1
- package/index.cjs27.js +1 -1
- package/index.cjs29.js +1 -1
- package/index.cjs296.js +1 -1
- package/index.cjs297.js +1 -1
- package/index.cjs298.js +1 -1
- package/index.cjs299.js +1 -1
- package/index.cjs30.js +1 -1
- package/index.cjs300.js +1 -1
- package/index.cjs301.js +1 -1
- package/index.cjs302.js +1 -1
- package/index.cjs303.js +1 -1
- package/index.cjs304.js +1 -1
- package/index.cjs308.js +1 -1
- package/index.cjs309.js +1 -1
- package/index.cjs31.js +1 -1
- package/index.cjs310.js +1 -1
- package/index.cjs311.js +1 -1
- package/index.cjs312.js +1 -1
- package/index.cjs313.js +1 -1
- package/index.cjs314.js +1 -1
- package/index.cjs315.js +1 -1
- package/index.cjs316.js +1 -1
- package/index.cjs317.js +1 -1
- package/index.cjs318.js +1 -1
- package/index.cjs319.js +1 -1
- package/index.cjs32.js +1 -1
- package/index.cjs320.js +1 -1
- package/index.cjs321.js +1 -1
- package/index.cjs33.js +1 -1
- package/index.cjs338.js +1 -1
- package/index.cjs34.js +1 -1
- package/index.cjs343.js +1 -1
- package/index.cjs354.js +1 -1
- package/index.cjs355.js +1 -1
- package/index.cjs356.js +1 -1
- package/index.cjs362.js +1 -1
- package/index.cjs363.js +1 -1
- package/index.cjs364.js +1 -1
- package/index.cjs365.js +1 -1
- package/index.cjs366.js +1 -1
- package/index.cjs367.js +1 -1
- package/index.cjs368.js +1 -1
- package/index.cjs369.js +1 -1
- package/index.cjs37.js +1 -1
- package/index.cjs370.js +1 -1
- package/index.cjs371.js +1 -1
- package/index.cjs372.js +1 -1
- package/index.cjs373.js +1 -1
- package/index.cjs375.js +1 -1
- package/index.cjs376.js +1 -1
- package/index.cjs377.js +1 -1
- package/index.cjs378.js +1 -1
- package/index.cjs379.js +1 -1
- package/index.cjs38.js +1 -1
- package/index.cjs380.js +1 -1
- package/index.cjs381.js +1 -1
- package/index.cjs382.js +1 -1
- package/index.cjs383.js +1 -1
- package/index.cjs386.js +1 -1
- package/index.cjs387.js +1 -1
- package/index.cjs388.js +1 -1
- package/index.cjs39.js +1 -1
- package/index.cjs390.js +1 -1
- package/index.cjs392.js +1 -1
- package/index.cjs396.js +1 -1
- package/index.cjs4.js +1 -1
- package/index.cjs40.js +1 -1
- package/index.cjs402.js +1 -74
- package/index.cjs403.js +1 -1
- package/index.cjs404.js +1 -1
- package/index.cjs405.js +74 -1
- package/index.cjs406.js +1 -1
- package/index.cjs407.js +1 -1
- package/index.cjs408.js +1 -1
- package/index.cjs41.js +1 -1
- package/index.cjs414.js +1 -1
- package/index.cjs415.js +1 -1
- package/index.cjs416.js +1 -1
- package/index.cjs417.js +1 -1
- package/index.cjs418.js +1 -1
- package/index.cjs419.js +1 -1
- package/index.cjs42.js +1 -1
- package/index.cjs420.js +1 -1
- package/index.cjs421.js +1 -1
- package/index.cjs422.js +1 -1
- package/index.cjs423.js +1 -1
- package/index.cjs424.js +1 -1
- package/index.cjs425.js +1 -1
- package/index.cjs428.js +1 -1
- package/index.cjs43.js +1 -1
- package/index.cjs45.js +1 -1
- package/index.cjs46.js +1 -1
- package/index.cjs47.js +1 -1
- package/index.cjs48.js +1 -1
- package/index.cjs49.js +1 -1
- package/index.cjs51.js +1 -1
- package/index.cjs52.js +1 -1
- package/index.cjs53.js +1 -1
- package/index.cjs54.js +1 -1
- package/index.cjs55.js +1 -1
- package/index.cjs56.js +1 -1
- package/index.cjs57.js +1 -1
- package/index.cjs61.js +1 -1
- package/index.cjs63.js +1 -1
- package/index.cjs64.js +1 -1
- package/index.cjs66.js +1 -1
- package/index.cjs67.js +1 -1
- package/index.cjs7.js +1 -1
- package/index.cjs72.js +1 -1
- package/index.cjs73.js +1 -1
- package/index.cjs74.js +1 -1
- package/index.cjs75.js +1 -1
- package/index.cjs76.js +1 -1
- package/index.cjs8.js +1 -1
- package/index.cjs81.js +1 -1
- package/index.cjs85.js +1 -1
- package/index.cjs86.js +1 -1
- package/index.cjs87.js +1 -1
- package/index.cjs89.js +1 -1
- package/index.cjs9.js +1 -1
- package/index.cjs96.js +1 -1
- package/index.es10.js +3 -3
- package/index.es100.js +10 -470
- package/index.es101.js +87 -10
- package/index.es102.js +19 -86
- package/index.es103.js +22 -19
- package/index.es104.js +1712 -23
- package/index.es105.js +34 -1712
- package/index.es106.js +2594 -33
- package/index.es107.js +287 -2561
- package/index.es108.js +10 -321
- package/index.es109.js +5 -5
- package/index.es110.js +5 -5
- package/index.es111.js +7 -10
- package/index.es112.js +33 -8
- package/index.es113.js +37 -32
- package/index.es114.js +11 -38
- package/index.es115.js +5 -5
- package/index.es116.js +5 -5
- package/index.es117.js +5 -5
- package/index.es118.js +5 -5
- package/index.es119.js +2567 -9
- package/index.es12.js +3 -3
- package/index.es120.js +139 -2567
- package/index.es121.js +118 -142
- package/index.es122.js +136 -116
- package/index.es123.js +162 -76
- package/index.es124.js +515 -222
- package/index.es125.js +11 -516
- package/index.es126.js +5 -5
- package/index.es127.js +5 -5
- package/index.es128.js +378 -10
- package/index.es129.js +10 -378
- package/index.es13.js +2 -2
- package/index.es130.js +5 -5
- package/index.es131.js +5 -5
- package/index.es132.js +205 -11
- package/index.es133.js +11 -205
- package/index.es134.js +4 -10
- package/index.es135.js +10 -4
- package/index.es136.js +5 -5
- package/index.es137.js +5 -5
- package/index.es138.js +5 -5
- package/index.es139.js +5 -5
- package/index.es140.js +5 -5
- package/index.es141.js +5 -5
- package/index.es142.js +2 -11
- package/index.es143.js +1 -1
- package/index.es144.js +1 -1
- package/index.es145.js +1 -1
- package/index.es146.js +1 -1
- package/index.es147.js +1 -1
- package/index.es148.js +11 -2
- package/index.es149.js +4 -4
- package/index.es15.js +5 -5
- package/index.es150.js +5 -5
- package/index.es151.js +5 -5
- package/index.es152.js +3 -11
- package/index.es153.js +11 -3
- package/index.es154.js +5 -5
- package/index.es155.js +5 -5
- package/index.es156.js +5 -5
- package/index.es157.js +2 -11
- package/index.es158.js +1 -1
- package/index.es159.js +11 -2
- package/index.es160.js +4 -4
- package/index.es161.js +5 -5
- package/index.es162.js +5 -5
- package/index.es163.js +5 -5
- package/index.es164.js +22 -11
- package/index.es165.js +11 -22
- package/index.es166.js +22 -11
- package/index.es167.js +11 -22
- package/index.es168.js +5 -5
- package/index.es169.js +12 -11
- package/index.es17.js +1 -1
- package/index.es170.js +11 -12
- package/index.es171.js +4 -4
- package/index.es172.js +5 -5
- package/index.es173.js +5 -5
- package/index.es174.js +470 -10
- package/index.es179.js +1 -1
- package/index.es181.js +468 -221
- package/index.es182.js +231 -52
- package/index.es183.js +51 -477
- package/index.es185.js +38 -30
- package/index.es186.js +30 -11
- package/index.es187.js +11 -38
- package/index.es20.js +1 -1
- package/index.es200.js +1 -1
- package/index.es201.js +1 -1
- package/index.es202.js +1 -1
- package/index.es21.js +3 -3
- package/index.es213.js +1 -1
- package/index.es214.js +1 -1
- package/index.es215.js +1 -1
- package/index.es216.js +1 -1
- package/index.es217.js +3 -3
- package/index.es22.js +1 -1
- package/index.es220.js +1 -1
- package/index.es228.js +5 -5
- package/index.es229.js +8 -8
- package/index.es23.js +6 -6
- package/index.es230.js +1 -1
- package/index.es25.js +1 -1
- package/index.es251.js +1 -1
- package/index.es252.js +4 -4
- package/index.es254.js +1 -1
- package/index.es255.js +4 -4
- package/index.es256.js +2 -2
- package/index.es257.js +3 -3
- package/index.es259.js +1 -1
- package/index.es263.js +3 -3
- package/index.es264.js +2 -2
- package/index.es266.js +3 -3
- package/index.es27.js +1 -1
- package/index.es29.js +2 -2
- package/index.es296.js +120 -8
- package/index.es297.js +7 -351
- package/index.es298.js +8 -3
- package/index.es299.js +8 -206
- package/index.es30.js +16 -16
- package/index.es300.js +348 -8
- package/index.es301.js +3 -120
- package/index.es302.js +206 -7
- package/index.es303.js +11 -8
- package/index.es304.js +1 -1
- package/index.es308.js +6 -15
- package/index.es309.js +5 -5
- package/index.es31.js +2 -2
- package/index.es310.js +3 -7
- package/index.es311.js +117 -3
- package/index.es312.js +5 -3
- package/index.es313.js +7 -2
- package/index.es314.js +3 -6
- package/index.es315.js +3 -5
- package/index.es316.js +3 -4
- package/index.es317.js +4 -117
- package/index.es318.js +15 -2
- package/index.es319.js +2 -45
- package/index.es32.js +3 -3
- package/index.es320.js +42 -49
- package/index.es321.js +51 -3
- package/index.es33.js +1 -1
- package/index.es338.js +1 -1
- package/index.es34.js +1 -1
- package/index.es343.js +1 -1
- package/index.es354.js +6 -24
- package/index.es355.js +14 -11
- package/index.es356.js +21 -6
- package/index.es362.js +5 -5
- package/index.es363.js +4 -6
- package/index.es364.js +4 -29
- package/index.es365.js +6 -4
- package/index.es366.js +19 -5
- package/index.es367.js +4 -7
- package/index.es368.js +6 -19
- package/index.es369.js +3 -4
- package/index.es37.js +1 -1
- package/index.es370.js +71 -5
- package/index.es371.js +4 -3
- package/index.es372.js +6 -71
- package/index.es373.js +29 -3
- package/index.es375.js +6 -7
- package/index.es376.js +7 -6
- package/index.es377.js +2 -2
- package/index.es378.js +71 -2
- package/index.es379.js +92 -2
- package/index.es38.js +1 -1
- package/index.es380.js +2 -71
- package/index.es381.js +2 -92
- package/index.es382.js +2 -2
- package/index.es383.js +2 -2
- package/index.es386.js +10 -8
- package/index.es387.js +3 -10
- package/index.es388.js +8 -3
- package/index.es39.js +1 -1
- package/index.es390.js +2 -2
- package/index.es392.js +1 -1
- package/index.es396.js +3 -3
- package/index.es4.js +4 -4
- package/index.es40.js +2 -2
- package/index.es402.js +6 -251
- package/index.es403.js +3 -7
- package/index.es404.js +2 -3
- package/index.es405.js +251 -6
- package/index.es406.js +7 -3
- package/index.es407.js +3 -2
- package/index.es408.js +1 -1
- package/index.es41.js +1 -1
- package/index.es414.js +248 -7
- package/index.es415.js +19 -6
- package/index.es416.js +51 -20
- package/index.es417.js +7 -51
- package/index.es418.js +41 -247
- package/index.es419.js +14 -41
- package/index.es42.js +2 -2
- package/index.es420.js +10 -16
- package/index.es421.js +48 -10
- package/index.es422.js +25 -47
- package/index.es423.js +127 -24
- package/index.es424.js +102 -119
- package/index.es425.js +8 -112
- package/index.es428.js +1 -1
- package/index.es43.js +7 -7
- package/index.es45.js +4 -4
- package/index.es46.js +4 -4
- package/index.es47.js +10 -10
- package/index.es48.js +2 -2
- package/index.es49.js +12 -12
- package/index.es51.js +1 -1
- package/index.es52.js +5 -5
- package/index.es53.js +1 -1
- package/index.es54.js +1 -1
- package/index.es55.js +2 -2
- package/index.es56.js +2 -2
- package/index.es57.js +3 -3
- package/index.es61.js +2 -2
- package/index.es63.js +2 -2
- package/index.es64.js +5 -5
- package/index.es66.js +7 -7
- package/index.es67.js +3 -3
- package/index.es7.js +1 -1
- package/index.es72.js +1 -1
- package/index.es73.js +1 -1
- package/index.es74.js +3 -3
- package/index.es75.js +4 -4
- package/index.es76.js +1 -1
- package/index.es8.js +1 -1
- package/index.es81.js +1 -1
- package/index.es85.js +3 -3
- package/index.es86.js +1 -1
- package/index.es87.js +1 -1
- package/index.es89.js +1 -1
- package/index.es9.js +6 -6
- package/index.es96.js +2 -2
- package/package.json +1 -1
package/index.es129.js
CHANGED
|
@@ -1,381 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { getDigitalClockUtilityClass as De } from "./index.es226.js";
|
|
9
|
-
import { useViews as ye } from "./index.es203.js";
|
|
10
|
-
import { DIGITAL_CLOCK_VIEW_HEIGHT as he } from "./index.es209.js";
|
|
11
|
-
import { useControlledValueWithTimezone as Te } from "./index.es207.js";
|
|
12
|
-
import { singleItemValueManager as Ve } from "./index.es208.js";
|
|
13
|
-
import { useClockReferenceDate as ke } from "./index.es227.js";
|
|
14
|
-
import { jsx as D } from "react/jsx-runtime";
|
|
15
|
-
import y from "./index.es210.js";
|
|
16
|
-
import { PickerViewRoot as we } from "./index.es211.js";
|
|
17
|
-
import Ie from "./index.es228.js";
|
|
18
|
-
import Pe from "./index.es229.js";
|
|
19
|
-
import Oe from "./index.es230.js";
|
|
20
|
-
import xe from "./index.es219.js";
|
|
21
|
-
import Re from "./index.es214.js";
|
|
22
|
-
import $ from "./index.es215.js";
|
|
23
|
-
import Me from "./index.es218.js";
|
|
24
|
-
import { alpha as A } from "./index.es231.js";
|
|
25
|
-
const Se = ["ampm", "timeStep", "autoFocus", "components", "componentsProps", "slots", "slotProps", "value", "defaultValue", "referenceDate", "disableIgnoringDatePartForTimeValidation", "maxTime", "minTime", "disableFuture", "disablePast", "minutesStep", "shouldDisableClock", "shouldDisableTime", "onChange", "view", "openTo", "onViewChange", "focusedView", "onFocusedViewChange", "className", "disabled", "readOnly", "views", "skipDisabled", "timezone"], Fe = (o) => {
|
|
26
|
-
const {
|
|
27
|
-
classes: a
|
|
28
|
-
} = o;
|
|
29
|
-
return Me({
|
|
30
|
-
root: ["root"],
|
|
31
|
-
list: ["list"],
|
|
32
|
-
item: ["item"]
|
|
33
|
-
}, De, a);
|
|
34
|
-
}, _e = y(we, {
|
|
35
|
-
name: "MuiDigitalClock",
|
|
36
|
-
slot: "Root",
|
|
37
|
-
overridesResolver: (o, a) => a.root
|
|
38
|
-
})(({
|
|
39
|
-
ownerState: o
|
|
40
|
-
}) => ({
|
|
41
|
-
overflowY: "auto",
|
|
42
|
-
width: "100%",
|
|
43
|
-
"@media (prefers-reduced-motion: no-preference)": {
|
|
44
|
-
scrollBehavior: o.alreadyRendered ? "smooth" : "auto"
|
|
45
|
-
},
|
|
46
|
-
maxHeight: he
|
|
47
|
-
})), Ne = y(Ie, {
|
|
48
|
-
name: "MuiDigitalClock",
|
|
49
|
-
slot: "List",
|
|
50
|
-
overridesResolver: (o, a) => a.list
|
|
51
|
-
})({
|
|
52
|
-
padding: 0
|
|
53
|
-
}), je = y(Pe, {
|
|
54
|
-
name: "MuiDigitalClock",
|
|
55
|
-
slot: "Item",
|
|
56
|
-
overridesResolver: (o, a) => a.item
|
|
57
|
-
})(({
|
|
58
|
-
theme: o
|
|
59
|
-
}) => ({
|
|
60
|
-
padding: "8px 16px",
|
|
61
|
-
margin: "2px 4px",
|
|
62
|
-
"&:first-of-type": {
|
|
63
|
-
marginTop: 4
|
|
64
|
-
},
|
|
65
|
-
"&:hover": {
|
|
66
|
-
backgroundColor: o.vars ? `rgba(${o.vars.palette.primary.mainChannel} / ${o.vars.palette.action.hoverOpacity})` : A(o.palette.primary.main, o.palette.action.hoverOpacity)
|
|
67
|
-
},
|
|
68
|
-
"&.Mui-selected": {
|
|
69
|
-
backgroundColor: (o.vars || o).palette.primary.main,
|
|
70
|
-
color: (o.vars || o).palette.primary.contrastText,
|
|
71
|
-
"&:focus-visible, &:hover": {
|
|
72
|
-
backgroundColor: (o.vars || o).palette.primary.dark
|
|
1
|
+
import t from "./index.es186.js";
|
|
2
|
+
const o = t("ChevronRight", [
|
|
3
|
+
[
|
|
4
|
+
"path",
|
|
5
|
+
{
|
|
6
|
+
d: "M9.70492 6L8.29492 7.41L12.8749 12L8.29492 16.59L9.70492 18L15.7049 12L9.70492 6Z",
|
|
7
|
+
key: "xcu7tv"
|
|
73
8
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
backgroundColor: o.vars ? `rgba(${o.vars.palette.primary.mainChannel} / ${o.vars.palette.action.focusOpacity})` : A(o.palette.primary.main, o.palette.action.focusOpacity)
|
|
77
|
-
}
|
|
78
|
-
})), Le = /* @__PURE__ */ i.forwardRef(function(a, h) {
|
|
79
|
-
var T, V, k;
|
|
80
|
-
const r = be(), l = i.useRef(null), H = Oe(h, l), n = xe({
|
|
81
|
-
props: a,
|
|
82
|
-
name: "MuiDigitalClock"
|
|
83
|
-
}), {
|
|
84
|
-
ampm: G = r.is12HourCycleInCurrentLocale(),
|
|
85
|
-
timeStep: c = 30,
|
|
86
|
-
autoFocus: U,
|
|
87
|
-
components: w,
|
|
88
|
-
componentsProps: I,
|
|
89
|
-
slots: P,
|
|
90
|
-
slotProps: O,
|
|
91
|
-
value: W,
|
|
92
|
-
defaultValue: q,
|
|
93
|
-
referenceDate: B,
|
|
94
|
-
disableIgnoringDatePartForTimeValidation: x = !1,
|
|
95
|
-
maxTime: u,
|
|
96
|
-
minTime: m,
|
|
97
|
-
disableFuture: R,
|
|
98
|
-
disablePast: M,
|
|
99
|
-
minutesStep: S = 1,
|
|
100
|
-
shouldDisableClock: p,
|
|
101
|
-
shouldDisableTime: f,
|
|
102
|
-
onChange: J,
|
|
103
|
-
view: K,
|
|
104
|
-
openTo: Y,
|
|
105
|
-
onViewChange: Q,
|
|
106
|
-
focusedView: F,
|
|
107
|
-
onFocusedViewChange: X,
|
|
108
|
-
className: Z,
|
|
109
|
-
disabled: ee,
|
|
110
|
-
readOnly: d,
|
|
111
|
-
views: oe = ["hours"],
|
|
112
|
-
skipDisabled: te = !1,
|
|
113
|
-
timezone: re
|
|
114
|
-
} = n, se = fe(n, Se), {
|
|
115
|
-
value: _,
|
|
116
|
-
handleValueChange: ae,
|
|
117
|
-
timezone: N
|
|
118
|
-
} = Te({
|
|
119
|
-
name: "DigitalClock",
|
|
120
|
-
timezone: re,
|
|
121
|
-
value: W,
|
|
122
|
-
defaultValue: q,
|
|
123
|
-
onChange: J,
|
|
124
|
-
valueManager: Ve
|
|
125
|
-
}), ie = ge(), b = Ce(N), j = i.useMemo(() => v({}, n, {
|
|
126
|
-
alreadyRendered: !!l.current
|
|
127
|
-
}), [n]), g = Fe(j), L = (T = (V = P == null ? void 0 : P.digitalClockItem) != null ? V : w == null ? void 0 : w.DigitalClockItem) != null ? T : je, le = Re({
|
|
128
|
-
elementType: L,
|
|
129
|
-
externalSlotProps: (k = O == null ? void 0 : O.digitalClockItem) != null ? k : I == null ? void 0 : I.digitalClockItem,
|
|
130
|
-
ownerState: {},
|
|
131
|
-
className: g.item
|
|
132
|
-
}), z = ke({
|
|
133
|
-
value: _,
|
|
134
|
-
referenceDate: B,
|
|
135
|
-
utils: r,
|
|
136
|
-
props: n,
|
|
137
|
-
timezone: N
|
|
138
|
-
}), ne = $((t) => ae(t, "finish", "hours")), {
|
|
139
|
-
setValueAndGoToNextView: ce
|
|
140
|
-
} = ye({
|
|
141
|
-
view: K,
|
|
142
|
-
views: oe,
|
|
143
|
-
openTo: Y,
|
|
144
|
-
onViewChange: Q,
|
|
145
|
-
onChange: ne,
|
|
146
|
-
focusedView: F,
|
|
147
|
-
onFocusedViewChange: X
|
|
148
|
-
}), ue = $((t) => {
|
|
149
|
-
ce(t, "finish");
|
|
150
|
-
});
|
|
151
|
-
i.useEffect(() => {
|
|
152
|
-
if (l.current === null)
|
|
153
|
-
return;
|
|
154
|
-
const t = l.current.querySelector('[role="listbox"] [role="option"][aria-selected="true"]');
|
|
155
|
-
if (!t)
|
|
156
|
-
return;
|
|
157
|
-
const s = t.offsetTop;
|
|
158
|
-
l.current.scrollTop = s - 4;
|
|
159
|
-
});
|
|
160
|
-
const E = i.useCallback((t) => {
|
|
161
|
-
const s = ve(x, r), C = () => !(m && s(m, t) || u && s(t, u) || R && s(t, b) || M && s(b, t)), pe = () => r.getMinutes(t) % S !== 0 || p != null && p(r.toJsDate(t).getTime(), "hours") ? !1 : f ? !f(t, "hours") : !0;
|
|
162
|
-
return !C() || !pe();
|
|
163
|
-
}, [x, r, m, u, R, b, M, S, p, f]), me = i.useMemo(() => {
|
|
164
|
-
const t = r.startOfDay(z);
|
|
165
|
-
return [t, ...Array.from({
|
|
166
|
-
length: Math.ceil(24 * 60 / c) - 1
|
|
167
|
-
}, (s, C) => r.addMinutes(t, c * (C + 1)))];
|
|
168
|
-
}, [z, c, r]);
|
|
169
|
-
return /* @__PURE__ */ D(_e, v({
|
|
170
|
-
ref: H,
|
|
171
|
-
className: de(g.root, Z),
|
|
172
|
-
ownerState: j
|
|
173
|
-
}, se, {
|
|
174
|
-
children: /* @__PURE__ */ D(Ne, {
|
|
175
|
-
autoFocusItem: U || !!F,
|
|
176
|
-
role: "listbox",
|
|
177
|
-
"aria-label": ie.timePickerToolbarTitle,
|
|
178
|
-
className: g.list,
|
|
179
|
-
children: me.map((t) => {
|
|
180
|
-
if (te && E(t))
|
|
181
|
-
return null;
|
|
182
|
-
const s = r.isEqual(t, _);
|
|
183
|
-
return /* @__PURE__ */ D(L, v({
|
|
184
|
-
onClick: () => !d && ue(t),
|
|
185
|
-
selected: s,
|
|
186
|
-
disabled: ee || E(t),
|
|
187
|
-
disableRipple: d,
|
|
188
|
-
role: "option",
|
|
189
|
-
"aria-disabled": d,
|
|
190
|
-
"aria-selected": s
|
|
191
|
-
}, le, {
|
|
192
|
-
children: r.format(t, G ? "fullTime12h" : "fullTime24h")
|
|
193
|
-
}), r.toISO(t));
|
|
194
|
-
})
|
|
195
|
-
})
|
|
196
|
-
}));
|
|
197
|
-
});
|
|
198
|
-
process.env.NODE_ENV !== "production" && (Le.propTypes = {
|
|
199
|
-
// ----------------------------- Warning --------------------------------
|
|
200
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
201
|
-
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
202
|
-
// ----------------------------------------------------------------------
|
|
203
|
-
/**
|
|
204
|
-
* 12h/24h view for hour selection clock.
|
|
205
|
-
* @default `utils.is12HourCycleInCurrentLocale()`
|
|
206
|
-
*/
|
|
207
|
-
ampm: e.bool,
|
|
208
|
-
/**
|
|
209
|
-
* If `true`, the main element is focused during the first mount.
|
|
210
|
-
* This main element is:
|
|
211
|
-
* - the element chosen by the visible view if any (i.e: the selected day on the `day` view).
|
|
212
|
-
* - the `input` element if there is a field rendered.
|
|
213
|
-
*/
|
|
214
|
-
autoFocus: e.bool,
|
|
215
|
-
/**
|
|
216
|
-
* Override or extend the styles applied to the component.
|
|
217
|
-
*/
|
|
218
|
-
classes: e.object,
|
|
219
|
-
className: e.string,
|
|
220
|
-
/**
|
|
221
|
-
* Overrideable components.
|
|
222
|
-
* @default {}
|
|
223
|
-
* @deprecated Please use `slots`.
|
|
224
|
-
*/
|
|
225
|
-
components: e.object,
|
|
226
|
-
/**
|
|
227
|
-
* The props used for each component slot.
|
|
228
|
-
* @default {}
|
|
229
|
-
* @deprecated Please use `slotProps`.
|
|
230
|
-
*/
|
|
231
|
-
componentsProps: e.object,
|
|
232
|
-
/**
|
|
233
|
-
* The default selected value.
|
|
234
|
-
* Used when the component is not controlled.
|
|
235
|
-
*/
|
|
236
|
-
defaultValue: e.any,
|
|
237
|
-
/**
|
|
238
|
-
* If `true`, the picker views and text field are disabled.
|
|
239
|
-
* @default false
|
|
240
|
-
*/
|
|
241
|
-
disabled: e.bool,
|
|
242
|
-
/**
|
|
243
|
-
* If `true`, disable values after the current date for date components, time for time components and both for date time components.
|
|
244
|
-
* @default false
|
|
245
|
-
*/
|
|
246
|
-
disableFuture: e.bool,
|
|
247
|
-
/**
|
|
248
|
-
* Do not ignore date part when validating min/max time.
|
|
249
|
-
* @default false
|
|
250
|
-
*/
|
|
251
|
-
disableIgnoringDatePartForTimeValidation: e.bool,
|
|
252
|
-
/**
|
|
253
|
-
* If `true`, disable values before the current date for date components, time for time components and both for date time components.
|
|
254
|
-
* @default false
|
|
255
|
-
*/
|
|
256
|
-
disablePast: e.bool,
|
|
257
|
-
/**
|
|
258
|
-
* Controlled focused view.
|
|
259
|
-
*/
|
|
260
|
-
focusedView: e.oneOf(["hours"]),
|
|
261
|
-
/**
|
|
262
|
-
* Maximal selectable time.
|
|
263
|
-
* The date part of the object will be ignored unless `props.disableIgnoringDatePartForTimeValidation === true`.
|
|
264
|
-
*/
|
|
265
|
-
maxTime: e.any,
|
|
266
|
-
/**
|
|
267
|
-
* Minimal selectable time.
|
|
268
|
-
* The date part of the object will be ignored unless `props.disableIgnoringDatePartForTimeValidation === true`.
|
|
269
|
-
*/
|
|
270
|
-
minTime: e.any,
|
|
271
|
-
/**
|
|
272
|
-
* Step over minutes.
|
|
273
|
-
* @default 1
|
|
274
|
-
*/
|
|
275
|
-
minutesStep: e.number,
|
|
276
|
-
/**
|
|
277
|
-
* Callback fired when the value changes.
|
|
278
|
-
* @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
|
|
279
|
-
* @template TView The view type. Will be one of date or time views.
|
|
280
|
-
* @param {TValue} value The new value.
|
|
281
|
-
* @param {PickerSelectionState | undefined} selectionState Indicates if the date selection is complete.
|
|
282
|
-
* @param {TView | undefined} selectedView Indicates the view in which the selection has been made.
|
|
283
|
-
*/
|
|
284
|
-
onChange: e.func,
|
|
285
|
-
/**
|
|
286
|
-
* Callback fired on focused view change.
|
|
287
|
-
* @template TView
|
|
288
|
-
* @param {TView} view The new view to focus or not.
|
|
289
|
-
* @param {boolean} hasFocus `true` if the view should be focused.
|
|
290
|
-
*/
|
|
291
|
-
onFocusedViewChange: e.func,
|
|
292
|
-
/**
|
|
293
|
-
* Callback fired on view change.
|
|
294
|
-
* @template TView
|
|
295
|
-
* @param {TView} view The new view.
|
|
296
|
-
*/
|
|
297
|
-
onViewChange: e.func,
|
|
298
|
-
/**
|
|
299
|
-
* The default visible view.
|
|
300
|
-
* Used when the component view is not controlled.
|
|
301
|
-
* Must be a valid option from `views` list.
|
|
302
|
-
*/
|
|
303
|
-
openTo: e.oneOf(["hours"]),
|
|
304
|
-
/**
|
|
305
|
-
* If `true`, the picker views and text field are read-only.
|
|
306
|
-
* @default false
|
|
307
|
-
*/
|
|
308
|
-
readOnly: e.bool,
|
|
309
|
-
/**
|
|
310
|
-
* The date used to generate the new value when both `value` and `defaultValue` are empty.
|
|
311
|
-
* @default The closest valid time using the validation props, except callbacks such as `shouldDisableTime`.
|
|
312
|
-
*/
|
|
313
|
-
referenceDate: e.any,
|
|
314
|
-
/**
|
|
315
|
-
* Disable specific clock time.
|
|
316
|
-
* @param {number} clockValue The value to check.
|
|
317
|
-
* @param {TimeView} view The clock type of the timeValue.
|
|
318
|
-
* @returns {boolean} If `true` the time will be disabled.
|
|
319
|
-
* @deprecated Consider using `shouldDisableTime`.
|
|
320
|
-
*/
|
|
321
|
-
shouldDisableClock: e.func,
|
|
322
|
-
/**
|
|
323
|
-
* Disable specific time.
|
|
324
|
-
* @template TDate
|
|
325
|
-
* @param {TDate} value The value to check.
|
|
326
|
-
* @param {TimeView} view The clock type of the timeValue.
|
|
327
|
-
* @returns {boolean} If `true` the time will be disabled.
|
|
328
|
-
*/
|
|
329
|
-
shouldDisableTime: e.func,
|
|
330
|
-
/**
|
|
331
|
-
* If `true`, disabled digital clock items will not be rendered.
|
|
332
|
-
* @default false
|
|
333
|
-
*/
|
|
334
|
-
skipDisabled: e.bool,
|
|
335
|
-
/**
|
|
336
|
-
* The props used for each component slot.
|
|
337
|
-
* @default {}
|
|
338
|
-
*/
|
|
339
|
-
slotProps: e.object,
|
|
340
|
-
/**
|
|
341
|
-
* Overrideable component slots.
|
|
342
|
-
* @default {}
|
|
343
|
-
*/
|
|
344
|
-
slots: e.object,
|
|
345
|
-
/**
|
|
346
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
347
|
-
*/
|
|
348
|
-
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
|
|
349
|
-
/**
|
|
350
|
-
* The time steps between two time options.
|
|
351
|
-
* For example, if `timeStep = 45`, then the available time options will be `[00:00, 00:45, 01:30, 02:15, 03:00, etc.]`.
|
|
352
|
-
* @default 30
|
|
353
|
-
*/
|
|
354
|
-
timeStep: e.number,
|
|
355
|
-
/**
|
|
356
|
-
* Choose which timezone to use for the value.
|
|
357
|
-
* Example: "default", "system", "UTC", "America/New_York".
|
|
358
|
-
* If you pass values from other timezones to some props, they will be converted to this timezone before being used.
|
|
359
|
-
* @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documention} for more details.
|
|
360
|
-
* @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.
|
|
361
|
-
*/
|
|
362
|
-
timezone: e.string,
|
|
363
|
-
/**
|
|
364
|
-
* The selected value.
|
|
365
|
-
* Used when the component is controlled.
|
|
366
|
-
*/
|
|
367
|
-
value: e.any,
|
|
368
|
-
/**
|
|
369
|
-
* The visible view.
|
|
370
|
-
* Used when the component view is controlled.
|
|
371
|
-
* Must be a valid option from `views` list.
|
|
372
|
-
*/
|
|
373
|
-
view: e.oneOf(["hours"]),
|
|
374
|
-
/**
|
|
375
|
-
* Available views.
|
|
376
|
-
*/
|
|
377
|
-
views: e.arrayOf(e.oneOf(["hours"]))
|
|
378
|
-
});
|
|
9
|
+
]
|
|
10
|
+
]);
|
|
379
11
|
export {
|
|
380
|
-
|
|
12
|
+
o as default
|
|
381
13
|
};
|
package/index.es13.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as r, jsxs as d } from "react/jsx-runtime";
|
|
2
2
|
import a from "react";
|
|
3
|
-
import { useMediaQuery as l } from "./index.
|
|
3
|
+
import { useMediaQuery as l } from "./index.es103.js";
|
|
4
4
|
import { cn as m } from "./index.es85.js";
|
|
5
5
|
import { Button as n } from "./index.es22.js";
|
|
6
6
|
import { Sheet as i, SheetTrigger as c, SheetContent as p, SheetHeader as f, SheetClose as h, SheetFooter as u } from "./index.es66.js";
|
|
7
|
-
import S from "./index.
|
|
7
|
+
import S from "./index.es108.js";
|
|
8
8
|
const T = i, b = a.forwardRef(({ className: e, ...o }, t) => /* @__PURE__ */ r(c, { asChild: !0, children: /* @__PURE__ */ r(n, { ref: t, colors: "primary", className: m("flex items-center gap-space-02", e), ...o }) }));
|
|
9
9
|
b.displayName = "SheetFormTrigger";
|
|
10
10
|
const x = a.forwardRef(({ className: e, ...o }, t) => {
|
package/index.es130.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
const
|
|
1
|
+
import e from "./index.es186.js";
|
|
2
|
+
const c = e("Check", [
|
|
3
3
|
[
|
|
4
4
|
"path",
|
|
5
5
|
{
|
|
6
|
-
d: "
|
|
7
|
-
key: "
|
|
6
|
+
d: "M8.79508 15.8749L4.62508 11.7049L3.20508 13.1149L8.79508 18.7049L20.7951 6.70492L19.3851 5.29492L8.79508 15.8749Z",
|
|
7
|
+
key: "5stcsf"
|
|
8
8
|
}
|
|
9
9
|
]
|
|
10
10
|
]);
|
|
11
11
|
export {
|
|
12
|
-
|
|
12
|
+
c as default
|
|
13
13
|
};
|
package/index.es131.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import e from "./index.
|
|
2
|
-
const
|
|
1
|
+
import e from "./index.es186.js";
|
|
2
|
+
const t = e("Circle", [
|
|
3
3
|
[
|
|
4
4
|
"path",
|
|
5
5
|
{
|
|
6
|
-
d: "
|
|
7
|
-
key: "
|
|
6
|
+
d: "M12 2C6.47 2 2 6.47 2 12C2 17.53 6.47 22 12 22C17.53 22 22 17.53 22 12C22 6.47 17.53 2 12 2Z",
|
|
7
|
+
key: "arly8y"
|
|
8
8
|
}
|
|
9
9
|
]
|
|
10
10
|
]);
|
|
11
11
|
export {
|
|
12
|
-
|
|
12
|
+
t as default
|
|
13
13
|
};
|
package/index.es132.js
CHANGED
|
@@ -1,13 +1,207 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import * as t from "react";
|
|
2
|
+
var Me = Object.defineProperty, xe = Object.defineProperties, ke = Object.getOwnPropertyDescriptors, J = Object.getOwnPropertySymbols, me = Object.prototype.hasOwnProperty, fe = Object.prototype.propertyIsEnumerable, de = (r, a, l) => a in r ? Me(r, a, { enumerable: !0, configurable: !0, writable: !0, value: l }) : r[a] = l, Re = (r, a) => {
|
|
3
|
+
for (var l in a || (a = {}))
|
|
4
|
+
me.call(a, l) && de(r, l, a[l]);
|
|
5
|
+
if (J)
|
|
6
|
+
for (var l of J(a))
|
|
7
|
+
fe.call(a, l) && de(r, l, a[l]);
|
|
8
|
+
return r;
|
|
9
|
+
}, Te = (r, a) => xe(r, ke(a)), De = (r, a) => {
|
|
10
|
+
var l = {};
|
|
11
|
+
for (var s in r)
|
|
12
|
+
me.call(r, s) && a.indexOf(s) < 0 && (l[s] = r[s]);
|
|
13
|
+
if (r != null && J)
|
|
14
|
+
for (var s of J(r))
|
|
15
|
+
a.indexOf(s) < 0 && fe.call(r, s) && (l[s] = r[s]);
|
|
16
|
+
return l;
|
|
17
|
+
};
|
|
18
|
+
function Oe(r) {
|
|
19
|
+
let a = setTimeout(r, 0), l = setTimeout(r, 10), s = setTimeout(r, 50);
|
|
20
|
+
return [a, l, s];
|
|
21
|
+
}
|
|
22
|
+
function We(r) {
|
|
23
|
+
let a = t.useRef();
|
|
24
|
+
return t.useEffect(() => {
|
|
25
|
+
a.current = r;
|
|
26
|
+
}), a.current;
|
|
27
|
+
}
|
|
28
|
+
var Ae = 18, ve = 40, Be = `${ve}px`, je = ["[data-lastpass-icon-root]", "com-1password-button", "[data-dashlanecreated]", '[style$="2147483647 !important;"]'].join(",");
|
|
29
|
+
function Ie({ containerRef: r, inputRef: a, pushPasswordManagerStrategy: l, isFocused: s }) {
|
|
30
|
+
let [M, p] = t.useState(!1), [_, x] = t.useState(!1), [W, F] = t.useState(!1), H = t.useMemo(() => l === "none" ? !1 : (l === "increase-width" || l === "experimental-no-flickering") && M && _, [M, _, l]), A = t.useCallback(() => {
|
|
31
|
+
let f = r.current, y = a.current;
|
|
32
|
+
if (!f || !y || W || l === "none")
|
|
33
|
+
return;
|
|
34
|
+
let g = f, E = g.getBoundingClientRect().left + g.offsetWidth, B = g.getBoundingClientRect().top + g.offsetHeight / 2, i = E - Ae, L = B;
|
|
35
|
+
document.querySelectorAll(je).length === 0 && document.elementFromPoint(i, L) === f || (p(!0), F(!0));
|
|
36
|
+
}, [r, a, W, l]);
|
|
37
|
+
return t.useEffect(() => {
|
|
38
|
+
let f = r.current;
|
|
39
|
+
if (!f || l === "none")
|
|
40
|
+
return;
|
|
41
|
+
function y() {
|
|
42
|
+
let E = window.innerWidth - f.getBoundingClientRect().right;
|
|
43
|
+
x(E >= ve);
|
|
44
|
+
}
|
|
45
|
+
y();
|
|
46
|
+
let g = setInterval(y, 1e3);
|
|
47
|
+
return () => {
|
|
48
|
+
clearInterval(g);
|
|
49
|
+
};
|
|
50
|
+
}, [r, l]), t.useEffect(() => {
|
|
51
|
+
let f = s || document.activeElement === a.current;
|
|
52
|
+
if (l === "none" || !f)
|
|
53
|
+
return;
|
|
54
|
+
let y = setTimeout(A, 0), g = setTimeout(A, 2e3), E = setTimeout(A, 5e3), B = setTimeout(() => {
|
|
55
|
+
F(!0);
|
|
56
|
+
}, 6e3);
|
|
57
|
+
return () => {
|
|
58
|
+
clearTimeout(y), clearTimeout(g), clearTimeout(E), clearTimeout(B);
|
|
59
|
+
};
|
|
60
|
+
}, [a, s, l, A]), { hasPWMBadge: M, willPushPWMBadge: H, PWM_BADGE_SPACE_WIDTH: Be };
|
|
61
|
+
}
|
|
62
|
+
var _e = t.createContext({}), Fe = t.forwardRef((r, a) => {
|
|
63
|
+
var l = r, { value: s, onChange: M, maxLength: p, textAlign: _ = "left", pattern: x, placeholder: W, inputMode: F = "numeric", onComplete: H, pushPasswordManagerStrategy: A = "increase-width", pasteTransformer: f, containerClassName: y, noScriptCSSFallback: g = He, render: E, children: B } = l, i = De(l, ["value", "onChange", "maxLength", "textAlign", "pattern", "placeholder", "inputMode", "onComplete", "pushPasswordManagerStrategy", "pasteTransformer", "containerClassName", "noScriptCSSFallback", "render", "children"]), L, ee, te, ne, re;
|
|
64
|
+
let [he, ge] = t.useState(typeof i.defaultValue == "string" ? i.defaultValue : ""), u = s ?? he, k = We(u), $ = t.useCallback((e) => {
|
|
65
|
+
M == null || M(e), ge(e);
|
|
66
|
+
}, [M]), w = t.useMemo(() => x ? typeof x == "string" ? new RegExp(x) : x : null, [x]), c = t.useRef(null), K = t.useRef(null), Q = t.useRef({ value: u, onChange: $, isIOS: typeof window < "u" && ((ee = (L = window == null ? void 0 : window.CSS) == null ? void 0 : L.supports) == null ? void 0 : ee.call(L, "-webkit-touch-callout", "none")) }), q = t.useRef({ prev: [(te = c.current) == null ? void 0 : te.selectionStart, (ne = c.current) == null ? void 0 : ne.selectionEnd, (re = c.current) == null ? void 0 : re.selectionDirection] });
|
|
67
|
+
t.useImperativeHandle(a, () => c.current, []), t.useEffect(() => {
|
|
68
|
+
let e = c.current, n = K.current;
|
|
69
|
+
if (!e || !n)
|
|
70
|
+
return;
|
|
71
|
+
Q.current.value !== e.value && Q.current.onChange(e.value), q.current.prev = [e.selectionStart, e.selectionEnd, e.selectionDirection];
|
|
72
|
+
function d() {
|
|
73
|
+
if (document.activeElement !== e) {
|
|
74
|
+
N(null), z(null);
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
let o = e.selectionStart, m = e.selectionEnd, Z = e.selectionDirection, b = e.maxLength, T = e.value, S = q.current.prev, P = -1, C = -1, D;
|
|
78
|
+
if (T.length !== 0 && o !== null && m !== null) {
|
|
79
|
+
let ye = o === m, Pe = o === T.length && T.length < b;
|
|
80
|
+
if (ye && !Pe) {
|
|
81
|
+
let O = o;
|
|
82
|
+
if (O === 0)
|
|
83
|
+
P = 0, C = 1, D = "forward";
|
|
84
|
+
else if (O === b)
|
|
85
|
+
P = O - 1, C = O, D = "backward";
|
|
86
|
+
else if (b > 1 && T.length > 1) {
|
|
87
|
+
let Y = 0;
|
|
88
|
+
if (S[0] !== null && S[1] !== null) {
|
|
89
|
+
D = O < S[1] ? "backward" : "forward";
|
|
90
|
+
let Ce = S[0] === S[1] && S[0] < b;
|
|
91
|
+
D === "backward" && !Ce && (Y = -1);
|
|
92
|
+
}
|
|
93
|
+
P = Y + O, C = Y + O + 1;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
P !== -1 && C !== -1 && P !== C && c.current.setSelectionRange(P, C, D);
|
|
97
|
+
}
|
|
98
|
+
let se = P !== -1 ? P : o, pe = C !== -1 ? C : m, Se = D ?? Z;
|
|
99
|
+
N(se), z(pe), q.current.prev = [se, pe, Se];
|
|
100
|
+
}
|
|
101
|
+
if (document.addEventListener("selectionchange", d, { capture: !0 }), d(), document.activeElement === e && U(!0), !document.getElementById("input-otp-style")) {
|
|
102
|
+
let o = document.createElement("style");
|
|
103
|
+
if (o.id = "input-otp-style", document.head.appendChild(o), o.sheet) {
|
|
104
|
+
let m = "background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";
|
|
105
|
+
V(o.sheet, "[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"), V(o.sheet, `[data-input-otp]:autofill { ${m} }`), V(o.sheet, `[data-input-otp]:-webkit-autofill { ${m} }`), V(o.sheet, "@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"), V(o.sheet, "[data-input-otp] + * { pointer-events: all !important; }");
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
let v = () => {
|
|
109
|
+
n && n.style.setProperty("--root-height", `${e.clientHeight}px`);
|
|
110
|
+
};
|
|
111
|
+
v();
|
|
112
|
+
let h = new ResizeObserver(v);
|
|
113
|
+
return h.observe(e), () => {
|
|
114
|
+
document.removeEventListener("selectionchange", d, { capture: !0 }), h.disconnect();
|
|
115
|
+
};
|
|
116
|
+
}, []);
|
|
117
|
+
let [le, ae] = t.useState(!1), [G, U] = t.useState(!1), [R, N] = t.useState(null), [j, z] = t.useState(null);
|
|
118
|
+
t.useEffect(() => {
|
|
119
|
+
Oe(() => {
|
|
120
|
+
var e, n, d, v;
|
|
121
|
+
(e = c.current) == null || e.dispatchEvent(new Event("input"));
|
|
122
|
+
let h = (n = c.current) == null ? void 0 : n.selectionStart, o = (d = c.current) == null ? void 0 : d.selectionEnd, m = (v = c.current) == null ? void 0 : v.selectionDirection;
|
|
123
|
+
h !== null && o !== null && (N(h), z(o), q.current.prev = [h, o, m]);
|
|
124
|
+
});
|
|
125
|
+
}, [u, G]), t.useEffect(() => {
|
|
126
|
+
k !== void 0 && u !== k && k.length < p && u.length === p && (H == null || H(u));
|
|
127
|
+
}, [p, H, k, u]);
|
|
128
|
+
let I = Ie({ containerRef: K, inputRef: c, pushPasswordManagerStrategy: A, isFocused: G }), oe = t.useCallback((e) => {
|
|
129
|
+
let n = e.currentTarget.value.slice(0, p);
|
|
130
|
+
if (n.length > 0 && w && !w.test(n)) {
|
|
131
|
+
e.preventDefault();
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
typeof k == "string" && n.length < k.length && document.dispatchEvent(new Event("selectionchange")), $(n);
|
|
135
|
+
}, [p, $, k, w]), ie = t.useCallback(() => {
|
|
136
|
+
var e;
|
|
137
|
+
if (c.current) {
|
|
138
|
+
let n = Math.min(c.current.value.length, p - 1), d = c.current.value.length;
|
|
139
|
+
(e = c.current) == null || e.setSelectionRange(n, d), N(n), z(d);
|
|
140
|
+
}
|
|
141
|
+
U(!0);
|
|
142
|
+
}, [p]), ue = t.useCallback((e) => {
|
|
143
|
+
var n, d;
|
|
144
|
+
let v = c.current;
|
|
145
|
+
if (!f && (!Q.current.isIOS || !e.clipboardData || !v))
|
|
146
|
+
return;
|
|
147
|
+
let h = e.clipboardData.getData("text/plain"), o = f ? f(h) : h;
|
|
148
|
+
e.preventDefault();
|
|
149
|
+
let m = (n = c.current) == null ? void 0 : n.selectionStart, Z = (d = c.current) == null ? void 0 : d.selectionEnd, b = (m !== Z ? u.slice(0, m) + o + u.slice(Z) : u.slice(0, m) + o + u.slice(m)).slice(0, p);
|
|
150
|
+
if (b.length > 0 && w && !w.test(b))
|
|
151
|
+
return;
|
|
152
|
+
v.value = b, $(b);
|
|
153
|
+
let T = Math.min(b.length, p - 1), S = b.length;
|
|
154
|
+
v.setSelectionRange(T, S), N(T), z(S);
|
|
155
|
+
}, [p, $, w, u]), be = t.useMemo(() => ({ position: "relative", cursor: i.disabled ? "default" : "text", userSelect: "none", WebkitUserSelect: "none", pointerEvents: "none" }), [i.disabled]), ce = t.useMemo(() => ({ position: "absolute", inset: 0, width: I.willPushPWMBadge ? `calc(100% + ${I.PWM_BADGE_SPACE_WIDTH})` : "100%", clipPath: I.willPushPWMBadge ? `inset(0 ${I.PWM_BADGE_SPACE_WIDTH} 0 0)` : void 0, height: "100%", display: "flex", textAlign: _, opacity: "1", color: "transparent", pointerEvents: "all", background: "transparent", caretColor: "transparent", border: "0 solid transparent", outline: "0 solid transparent", boxShadow: "none", lineHeight: "1", letterSpacing: "-.5em", fontSize: "var(--root-height)", fontFamily: "monospace", fontVariantNumeric: "tabular-nums" }), [I.PWM_BADGE_SPACE_WIDTH, I.willPushPWMBadge, _]), we = t.useMemo(() => t.createElement("input", Te(Re({ autoComplete: i.autoComplete || "one-time-code" }, i), { "data-input-otp": !0, "data-input-otp-placeholder-shown": u.length === 0 || void 0, "data-input-otp-mss": R, "data-input-otp-mse": j, inputMode: F, pattern: w == null ? void 0 : w.source, "aria-placeholder": W, style: ce, maxLength: p, value: u, ref: c, onPaste: (e) => {
|
|
156
|
+
var n;
|
|
157
|
+
ue(e), (n = i.onPaste) == null || n.call(i, e);
|
|
158
|
+
}, onChange: oe, onMouseOver: (e) => {
|
|
159
|
+
var n;
|
|
160
|
+
ae(!0), (n = i.onMouseOver) == null || n.call(i, e);
|
|
161
|
+
}, onMouseLeave: (e) => {
|
|
162
|
+
var n;
|
|
163
|
+
ae(!1), (n = i.onMouseLeave) == null || n.call(i, e);
|
|
164
|
+
}, onFocus: (e) => {
|
|
165
|
+
var n;
|
|
166
|
+
ie(), (n = i.onFocus) == null || n.call(i, e);
|
|
167
|
+
}, onBlur: (e) => {
|
|
168
|
+
var n;
|
|
169
|
+
U(!1), (n = i.onBlur) == null || n.call(i, e);
|
|
170
|
+
} })), [oe, ie, ue, F, ce, p, j, R, i, w == null ? void 0 : w.source, u]), X = t.useMemo(() => ({ slots: Array.from({ length: p }).map((e, n) => {
|
|
171
|
+
var d;
|
|
172
|
+
let v = G && R !== null && j !== null && (R === j && n === R || n >= R && n < j), h = u[n] !== void 0 ? u[n] : null, o = u[0] !== void 0 ? null : (d = W == null ? void 0 : W[n]) != null ? d : null;
|
|
173
|
+
return { char: h, placeholderChar: o, isActive: v, hasFakeCaret: v && h === null };
|
|
174
|
+
}), isFocused: G, isHovering: !i.disabled && le }), [G, le, p, j, R, i.disabled, u]), Ee = t.useMemo(() => E ? E(X) : t.createElement(_e.Provider, { value: X }, B), [B, X, E]);
|
|
175
|
+
return t.createElement(t.Fragment, null, g !== null && t.createElement("noscript", null, t.createElement("style", null, g)), t.createElement("div", { ref: K, "data-input-otp-container": !0, style: be, className: y }, Ee, t.createElement("div", { style: { position: "absolute", inset: 0, pointerEvents: "none" } }, we)));
|
|
176
|
+
});
|
|
177
|
+
Fe.displayName = "Input";
|
|
178
|
+
function V(r, a) {
|
|
179
|
+
try {
|
|
180
|
+
r.insertRule(a);
|
|
181
|
+
} catch {
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
var He = `
|
|
185
|
+
[data-input-otp] {
|
|
186
|
+
--nojs-bg: white !important;
|
|
187
|
+
--nojs-fg: black !important;
|
|
188
|
+
|
|
189
|
+
background-color: var(--nojs-bg) !important;
|
|
190
|
+
color: var(--nojs-fg) !important;
|
|
191
|
+
caret-color: var(--nojs-fg) !important;
|
|
192
|
+
letter-spacing: .25em !important;
|
|
193
|
+
text-align: center !important;
|
|
194
|
+
border: 1px solid var(--nojs-fg) !important;
|
|
195
|
+
border-radius: 4px !important;
|
|
196
|
+
width: 100% !important;
|
|
197
|
+
}
|
|
198
|
+
@media (prefers-color-scheme: dark) {
|
|
199
|
+
[data-input-otp] {
|
|
200
|
+
--nojs-bg: black !important;
|
|
201
|
+
--nojs-fg: white !important;
|
|
202
|
+
}
|
|
203
|
+
}`;
|
|
11
204
|
export {
|
|
12
|
-
|
|
205
|
+
Fe as OTPInput,
|
|
206
|
+
_e as OTPInputContext
|
|
13
207
|
};
|