bmi-next-brokers 3.0.8 → 3.1.0
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/Select.module-DaH0FOvY.js +59 -0
- package/dist/assets/Select.css +1 -1
- package/dist/assets/Switch.css +1 -1
- package/dist/assets/index14.css +1 -1
- package/dist/components/SearchableInputGroup/index.js +1 -1
- package/dist/components/Select/Select.js +29 -28
- package/dist/components/Switch/Switch.d.ts +5 -1
- package/dist/components/Switch/Switch.js +75 -77
- package/dist/components/sheet/index.js +21 -21
- package/dist/icons/Icon.js +1 -1
- package/dist/icons/components/Gobierno.d.ts +3 -0
- package/dist/icons/components/Gobierno.js +14 -0
- package/dist/icons/components/NombrePropio.d.ts +3 -0
- package/dist/icons/components/NombrePropio.js +14 -0
- package/dist/icons/index.d.ts +2 -0
- package/dist/icons/index.js +370 -366
- package/dist/index-CsBuQLgj.js +480 -0
- package/dist/main.d.ts +0 -1
- package/dist/main.js +24 -26
- package/package.json +1 -1
- package/dist/Select.module-Bj2SfYZl.js +0 -59
- package/dist/hooks/useCloseOnBack.d.ts +0 -27
- package/dist/hooks/useCloseOnBack.js +0 -16
- package/dist/index-BxZPcrI0.js +0 -476
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import './assets/Select.css';const e = "_selectContainer_12y3j_19", o = "_disabled_12y3j_35", t = "_selectContainer_medium_12y3j_53", n = "_selectContainer_large_12y3j_61", _ = "_selectContainer_extraLarge_12y3j_63", r = "_label_12y3j_81", c = "_label_large_12y3j_103", i = "_label_extraLarge_12y3j_105", l = "_label_inverted_12y3j_113", a = "_selectWrapper_12y3j_131", s = "_select_12y3j_19", p = "_open_12y3j_213", d = "_small_12y3j_237", y = "_medium_12y3j_259", j = "_large_12y3j_281", h = "_extraLarge_12y3j_303", b = "_selectValue_12y3j_331", u = "_selectInput_12y3j_351", g = "_placeholder_12y3j_401", m = "_error_12y3j_429", v = "_btc_12y3j_457", w = "_errorShake_12y3j_1", C = "_inverted_12y3j_585", W = "_chevron_12y3j_629", x = "_icon_inverted_12y3j_637", S = "_chevronOpen_12y3j_729", D = "_icon_12y3j_637", L = "_iconLabel_12y3j_773", k = "_optionIcon_12y3j_795", I = "_required_12y3j_817", V = "_required_inverted_12y3j_827", q = "_dropdown_12y3j_845", H = "_highlight_12y3j_879", T = "_isDrawer_12y3j_895", O = "_dropdownPortal_12y3j_941", P = "_drawerSelect_12y3j_967", R = "_drawerSelectHeader_12y3j_975", f = "_drawerSearchInput_12y3j_983", z = "_option_12y3j_795", A = "_optionSelected_12y3j_1017", B = "_optionWithCheckbox_12y3j_1109", E = "_optionCheckbox_12y3j_1121", F = "_optionWithDescriptionWrapper_12y3j_1209", G = "_optionWithDescription_12y3j_1209", J = "_optionWithDescriptionLabel_12y3j_1241", K = "_optionWithDescriptionValue_12y3j_1253", M = "_dropdownTable_12y3j_1273", N = "_optionTable_12y3j_1283", Q = "_tableColumn_12y3j_1299", U = "_columnHeader_12y3j_1315", X = "_columnValue_12y3j_1331", Y = "_noResults_12y3j_1365", Z = "_dropdown_inverted_12y3j_1393", $ = "_option_inverted_12y3j_1439", ee = {
|
|
2
|
+
selectContainer: e,
|
|
3
|
+
disabled: o,
|
|
4
|
+
selectContainer_medium: t,
|
|
5
|
+
selectContainer_large: n,
|
|
6
|
+
selectContainer_extraLarge: _,
|
|
7
|
+
label: r,
|
|
8
|
+
label_large: c,
|
|
9
|
+
label_extraLarge: i,
|
|
10
|
+
label_inverted: l,
|
|
11
|
+
selectWrapper: a,
|
|
12
|
+
select: s,
|
|
13
|
+
open: p,
|
|
14
|
+
small: d,
|
|
15
|
+
medium: y,
|
|
16
|
+
large: j,
|
|
17
|
+
extraLarge: h,
|
|
18
|
+
selectValue: b,
|
|
19
|
+
selectInput: u,
|
|
20
|
+
placeholder: g,
|
|
21
|
+
error: m,
|
|
22
|
+
btc: v,
|
|
23
|
+
errorShake: w,
|
|
24
|
+
inverted: C,
|
|
25
|
+
chevron: W,
|
|
26
|
+
icon_inverted: x,
|
|
27
|
+
chevronOpen: S,
|
|
28
|
+
icon: D,
|
|
29
|
+
iconLabel: L,
|
|
30
|
+
optionIcon: k,
|
|
31
|
+
required: I,
|
|
32
|
+
required_inverted: V,
|
|
33
|
+
dropdown: q,
|
|
34
|
+
highlight: H,
|
|
35
|
+
isDrawer: T,
|
|
36
|
+
dropdownPortal: O,
|
|
37
|
+
drawerSelect: P,
|
|
38
|
+
drawerSelectHeader: R,
|
|
39
|
+
drawerSearchInput: f,
|
|
40
|
+
option: z,
|
|
41
|
+
optionSelected: A,
|
|
42
|
+
optionWithCheckbox: B,
|
|
43
|
+
optionCheckbox: E,
|
|
44
|
+
optionWithDescriptionWrapper: F,
|
|
45
|
+
optionWithDescription: G,
|
|
46
|
+
optionWithDescriptionLabel: J,
|
|
47
|
+
optionWithDescriptionValue: K,
|
|
48
|
+
dropdownTable: M,
|
|
49
|
+
optionTable: N,
|
|
50
|
+
tableColumn: Q,
|
|
51
|
+
columnHeader: U,
|
|
52
|
+
columnValue: X,
|
|
53
|
+
noResults: Y,
|
|
54
|
+
dropdown_inverted: Z,
|
|
55
|
+
option_inverted: $
|
|
56
|
+
};
|
|
57
|
+
export {
|
|
58
|
+
ee as s
|
|
59
|
+
};
|
package/dist/assets/Select.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._selectContainer_1u5bn_19{display:flex;flex-direction:column;width:100%;min-width:0;gap:4px}._selectContainer_1u5bn_19._disabled_1u5bn_35{cursor:not-allowed;opacity:.3}._selectContainer_1u5bn_19 *{font-family:var(--font-regular)}._selectContainer_medium_1u5bn_53{gap:6px}._selectContainer_large_1u5bn_61,._selectContainer_extraLarge_1u5bn_63{gap:8px}._label_1u5bn_81{font-size:13px;color:var(--Content-Neutral-Default-Active, #000);font-weight:500;padding-left:4px}._label_1u5bn_81._disabled_1u5bn_35{cursor:not-allowed}._label_large_1u5bn_103,._label_extraLarge_1u5bn_105{font-size:15px}._label_inverted_1u5bn_113{color:#fff!important}._selectWrapper_1u5bn_131{position:relative;display:flex;align-items:center;width:100%;min-width:0}._select_1u5bn_19{border:1px solid #ddd;outline:none;border-radius:16px;transition:all .2s ease;width:100%;min-width:0;background-color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:space-between;padding-right:12px;box-sizing:border-box}._select_1u5bn_19._disabled_1u5bn_35{cursor:not-allowed;pointer-events:none}._select_1u5bn_19:hover{border:1px solid var(--Stroke-Neutral-Primary, #94a3b8)}._select_1u5bn_19:active,._select_1u5bn_19:focus,._select_1u5bn_19:has(input:focus),._select_1u5bn_19._open_1u5bn_213{border:1px solid var(--Stroke-Neutral-Primary, #94a3b8);box-shadow:0 0 0 3px var(--ui-blue-400, #7eaae6)}._small_1u5bn_237 *{font-size:12px}._select_1u5bn_19._small_1u5bn_237{height:30px;padding-inline:8px;border-radius:10px}._medium_1u5bn_259 *{font-size:14px}._select_1u5bn_19._medium_1u5bn_259{height:36px;padding-inline:10px;border-radius:12px}._large_1u5bn_281 *{font-size:15px}._select_1u5bn_19._large_1u5bn_281{padding-inline:12px;height:42px;border-radius:14px}._extraLarge_1u5bn_303 *{font-size:16px}._select_1u5bn_19._extraLarge_1u5bn_303{padding-inline:14px;height:48px}._selectValue_1u5bn_331{flex:1 1 0%;text-align:left;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}._selectInput_1u5bn_351{flex:1 1 0%;text-align:left;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:none;outline:none;background:transparent;width:100%;max-width:100%;padding:0;cursor:text;box-sizing:border-box}._selectInput_1u5bn_351::placeholder{color:var(--Content-Neutral-Default-Default, #a3a3a3)}._selectInput_1u5bn_351:read-only{cursor:pointer}._selectInput_1u5bn_351._placeholder_1u5bn_401,._placeholder_1u5bn_401{color:var(--Content-Neutral-Default-Default, #a3a3a3)}._error_1u5bn_429 ._selectInput_1u5bn_351{color:var(--Content-Negative-Default-Active, #dc2626)}._error_1u5bn_429 ._selectInput_1u5bn_351::placeholder{color:var(--Content-Negative-Default-Active, #dc2626)}._select_1u5bn_19._btc_1u5bn_457:active,._select_1u5bn_19._btc_1u5bn_457:focus,._select_1u5bn_19._btc_1u5bn_457:has(input:focus),._select_1u5bn_19._btc_1u5bn_457._open_1u5bn_213{border:1px solid #45c2d6;box-shadow:3px 3px 0 0 var(--Complementarios-Turquesa-Compl-2-Turquesa, #45c2d6)}._error_1u5bn_429{border:1px solid var(--Stroke-Negative-Active, #dc2626);background:var(--Fill-Neutral-Primary, #fff);color:var(--Content-Negative-Default-Active, #dc2626);animation:_errorShake_1u5bn_1 .4s ease-in-out}._error_1u5bn_429 ._placeholder_1u5bn_401{color:var(--Content-Negative-Default-Active, #dc2626)}._error_1u5bn_429:hover{border:1px solid var(--Stroke-Negative-Active, #dc2626)}._error_1u5bn_429:active{border:1px solid transparent;box-shadow:0 0 0 3px var(--ui-red-400, #f87171)}._error_1u5bn_429:focus,._error_1u5bn_429:has(input:focus),._error_1u5bn_429._open_1u5bn_213{border:1px solid transparent;box-shadow:0 0 0 3px var(--ui-red-400, #f87171)}._error_1u5bn_429._btc_1u5bn_457::placeholder{color:#dc2626}._error_1u5bn_429._btc_1u5bn_457:active,._error_1u5bn_429._btc_1u5bn_457:focus,._error_1u5bn_429._btc_1u5bn_457:has(input:focus),._error_1u5bn_429._btc_1u5bn_457._open_1u5bn_213{border:1px solid #dc2626;box-shadow:3px 3px #dc2626}._inverted_1u5bn_585{border:1px solid var(--Stroke-Neutral-Secondary, #c9e1f6);background-color:transparent!important;color:#fff!important}._inverted_1u5bn_585:hover{border:1px solid white!important}._inverted_1u5bn_585 ._placeholder_1u5bn_401{color:#ffffffb3!important}._inverted_1u5bn_585 ._selectInput_1u5bn_351{color:#fff!important}._inverted_1u5bn_585 ._selectInput_1u5bn_351::placeholder{color:#ffffffb3!important}._inverted_1u5bn_585 ._chevron_1u5bn_629,._icon_inverted_1u5bn_637{color:#fff!important}._inverted_1u5bn_585._error_1u5bn_429{border:1px solid var(--Stroke-Negative-Active, #ef4444)!important;color:var(--Content-Negative-Default-Active, #f87171)!important}._inverted_1u5bn_585._error_1u5bn_429 ._placeholder_1u5bn_401{color:var(--Content-Negative-Default-Active, #f87171)!important}._inverted_1u5bn_585._error_1u5bn_429:hover{border:1px solid var(--Stroke-Negative-Active, #ef4444)!important}._inverted_1u5bn_585._error_1u5bn_429:active{border:1px solid transparent!important;box-shadow:0 0 0 3px var(--ui-red-400, #f87171)!important}._inverted_1u5bn_585._error_1u5bn_429:focus{border:1px solid transparent!important;box-shadow:0 0 0 3px var(--ui-red-400, #f87171)!important}._inverted_1u5bn_585._error_1u5bn_429._open_1u5bn_213{border:1px solid transparent!important}._chevron_1u5bn_629{transition:transform .2s ease;color:var(--Content-Neutral-Default, #475569)}._chevronOpen_1u5bn_729{transform:rotate(180deg)}._icon_1u5bn_637{color:var(--Content-Neutral-Default, #475569);pointer-events:none;display:flex;align-items:center;justify-content:center}._iconLabel_1u5bn_773{display:flex;justify-content:center;align-items:center;gap:6px;min-width:0;flex:1 1 auto;overflow:hidden;width:100%}._optionIcon_1u5bn_795{display:flex;align-items:center;justify-content:center}._required_1u5bn_817{color:var(--Content-Negative-Default-Active, #dc2626);margin-left:2px}._required_inverted_1u5bn_827{color:var(--Content-Negative-Default-Active, #f87171)}._dropdown_1u5bn_845{position:absolute;top:100%;left:0;right:0;z-index:1000;background:#fff;border:1px solid var(--Stroke-Neutral-Primary, #94a3b8);border-radius:16px;max-height:200px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:none;scrollbar-color:rgba(0,0,0,.3) transparent}._highlight_1u5bn_879{background:transparent;color:#2054a5;font-family:var(--font-medium)!important;font-weight:600!important;font-size:inherit!important}._dropdown_1u5bn_845._isDrawer_1u5bn_895{position:relative;width:100%;max-height:100%;border-radius:0;border-right:0;border-left:0}._dropdown_1u5bn_845 *{font-family:var(--font-regular)}._dropdown_1u5bn_845::-webkit-scrollbar{width:8px}._dropdown_1u5bn_845::-webkit-scrollbar-track{background:transparent;margin:4px 0}._dropdownPortal_1u5bn_941{position:fixed;top:0;left:0;right:auto;z-index:9000}._drawerSelect_1u5bn_967{padding:0!important}._drawerSelectHeader_1u5bn_975{padding-inline:15px}._drawerSearchInput_1u5bn_983{padding-inline:15px;width:100%}._option_1u5bn_795{width:100%;padding:8px 12px;border-bottom:1px solid var(--Stroke-Neutral-Primary, #94a3b8);cursor:pointer;display:flex;align-items:center;gap:8px;transition:background-color .2s ease}._option_1u5bn_795:not(._optionSelected_1u5bn_1015):hover{background-color:#f8f9fa}._option_1u5bn_795:last-child{border-bottom:none}._optionSelected_1u5bn_1015{background-color:#f0f0f0;color:#000}._option_1u5bn_795:not(._isDrawer_1u5bn_895):first-child{border-top-left-radius:16px;border-top-right-radius:16px}._option_1u5bn_795:not(._isDrawer_1u5bn_895):last-child{border-bottom-left-radius:16px;border-bottom-right-radius:16px}._small_1u5bn_237+._dropdown_1u5bn_845 ._option_1u5bn_795{padding:8px 11px 8px 14px}._medium_1u5bn_259+._dropdown_1u5bn_845 ._option_1u5bn_795{padding:8px 12px}._large_1u5bn_281+._dropdown_1u5bn_845 ._option_1u5bn_795{padding:11px 12px}._extraLarge_1u5bn_303+._dropdown_1u5bn_845 ._option_1u5bn_795{padding:11px 12px}._optionWithCheckbox_1u5bn_1107{display:flex;align-items:center;gap:12px}._optionCheckbox_1u5bn_1119{width:14px;height:14px;cursor:pointer;flex-shrink:0;-moz-appearance:none;appearance:none;-webkit-appearance:none;border:1.5px solid var(--Stroke-Neutral-Primary, #94a3b8);border-radius:2px;background-color:#fff;position:relative}._optionCheckbox_1u5bn_1119:checked{background-color:var(--Fill-Brand-Inverted-Active, #2054a5)!important;border-color:var(--Fill-Brand-Inverted-Active, #2054a5)!important}._optionCheckbox_1u5bn_1119:checked:after{content:"";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%) rotate(45deg);width:3px;height:6px;border:solid white;border-width:0 1.5px 1.5px 0;border-color:#fff!important}._optionWithCheckbox_1u5bn_1107:not(._optionSelected_1u5bn_1015):hover{background-color:transparent}._optionWithCheckbox_1u5bn_1107._optionSelected_1u5bn_1015{background-color:transparent}._optionWithDescriptionWrapper_1u5bn_1207{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:8px}._optionWithDescription_1u5bn_1207{display:flex;flex-direction:column;gap:12px;text-align:start;line-height:1}._optionWithDescriptionLabel_1u5bn_1239{color:#030c24;font-size:14px;font-family:var(--font-medium)}._optionWithDescriptionValue_1u5bn_1251{font-size:12px;color:#030c2499}._dropdownTable_1u5bn_1271{max-height:400px;min-width:0}._optionTable_1u5bn_1281{display:flex;gap:16px;padding:12px 16px;align-items:flex-start;flex-direction:row}._tableColumn_1u5bn_1297{flex:1;display:flex;flex-direction:column;gap:2px;min-width:0}._columnHeader_1u5bn_1313{opacity:.6;text-transform:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._columnValue_1u5bn_1329{font-weight:600;color:var(--Content-Neutral-Default-Active, #000);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._optionTable_1u5bn_1281._optionSelected_1u5bn_1015 ._columnValue_1u5bn_1329{color:#000}._noResults_1u5bn_1363{display:flex;justify-content:center;align-items:center;padding:12px;text-align:center;color:var(--Content-Neutral-Default-Default, #a3a3a3)}._dropdown_inverted_1u5bn_1391{background:var(--Fill-Brand-Default-Active, #2054a5);border:1px solid var(--Stroke-Neutral-Primary, #e0e9f8);scrollbar-color:rgba(255,255,255,.3) transparent}._dropdown_inverted_1u5bn_1391::-webkit-scrollbar-thumb{background:#ffffff4d}._dropdown_inverted_1u5bn_1391::-webkit-scrollbar-thumb:hover{background:#ffffff80}._dropdown_inverted_1u5bn_1391 ._noResults_1u5bn_1363{color:#ffffffb3}._option_inverted_1u5bn_1437{color:#fff!important;border-bottom-color:1px solid var(--Stroke-Neutral-Primary, #e0e9f8)}._option_inverted_1u5bn_1437:hover{background-color:#ffffff1a!important}._option_inverted_1u5bn_1437._optionSelected_1u5bn_1015{background-color:#ffffff26!important;color:#fff!important}._option_inverted_1u5bn_1437._optionWithCheckbox_1u5bn_1107:hover,._option_inverted_1u5bn_1437._optionWithCheckbox_1u5bn_1107._optionSelected_1u5bn_1015{background-color:transparent!important}._dropdown_inverted_1u5bn_1391 ._optionCheckbox_1u5bn_1119{border-color:var(--Stroke-Neutral-Primary, #e0e9f8);background-color:var(--Stroke-Neutral-Primary, #e0e9f8)}._dropdown_inverted_1u5bn_1391 ._optionCheckbox_1u5bn_1119:checked{background-color:var(--Fill-Brand-Inverted-Active, #2054a5)!important;border-color:var(--Fill-Brand-Inverted-Active, #2054a5)!important}._dropdown_inverted_1u5bn_1391 ._optionCheckbox_1u5bn_1119:checked:after{border-color:#fff!important}@keyframes _errorShake_1u5bn_1{0%,to{transform:translate(0)}10%,30%,50%,70%,90%{transform:translate(-2px)}20%,40%,60%,80%{transform:translate(2px)}}
|
|
1
|
+
._selectContainer_12y3j_19{display:flex;flex-direction:column;width:100%;min-width:0;gap:4px}._selectContainer_12y3j_19._disabled_12y3j_35{cursor:not-allowed;opacity:.3}._selectContainer_12y3j_19 *{font-family:var(--font-regular)}._selectContainer_medium_12y3j_53{gap:6px}._selectContainer_large_12y3j_61,._selectContainer_extraLarge_12y3j_63{gap:8px}._label_12y3j_81{font-size:13px;color:var(--Content-Neutral-Default-Active, #000);font-weight:500;padding-left:4px}._label_12y3j_81._disabled_12y3j_35{cursor:not-allowed}._label_large_12y3j_103,._label_extraLarge_12y3j_105{font-size:15px}._label_inverted_12y3j_113{color:#fff!important}._selectWrapper_12y3j_131{position:relative;display:flex;align-items:center;width:100%;min-width:0}._select_12y3j_19{border:1px solid #ddd;outline:none;border-radius:16px;transition:all .2s ease;width:100%;min-width:0;background-color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:space-between;padding-right:12px;box-sizing:border-box}._select_12y3j_19._disabled_12y3j_35{cursor:not-allowed;pointer-events:none}._select_12y3j_19:hover{border:1px solid var(--Stroke-Neutral-Primary, #94a3b8)}._select_12y3j_19:active,._select_12y3j_19:focus,._select_12y3j_19:has(input:focus),._select_12y3j_19._open_12y3j_213{border:1px solid var(--Stroke-Neutral-Primary, #94a3b8);box-shadow:0 0 0 3px var(--ui-blue-400, #7eaae6)}._small_12y3j_237 *{font-size:12px}._select_12y3j_19._small_12y3j_237{height:30px;padding-inline:8px;border-radius:10px}._medium_12y3j_259 *{font-size:14px}._select_12y3j_19._medium_12y3j_259{height:36px;padding-inline:10px;border-radius:12px}._large_12y3j_281 *{font-size:15px}._select_12y3j_19._large_12y3j_281{padding-inline:12px;height:42px;border-radius:14px}._extraLarge_12y3j_303 *{font-size:16px}._select_12y3j_19._extraLarge_12y3j_303{padding-inline:14px;height:48px}._selectValue_12y3j_331{flex:1 1 0%;text-align:left;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}._selectInput_12y3j_351{flex:1 1 0%;text-align:left;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:none;outline:none;background:transparent;width:100%;max-width:100%;padding:0;cursor:text;box-sizing:border-box}._selectInput_12y3j_351::placeholder{color:var(--Content-Neutral-Default-Default, #a3a3a3)}._selectInput_12y3j_351:read-only{cursor:pointer}._selectInput_12y3j_351._placeholder_12y3j_401,._placeholder_12y3j_401{color:var(--Content-Neutral-Default-Default, #a3a3a3)}._error_12y3j_429 ._selectInput_12y3j_351{color:var(--Content-Negative-Default-Active, #dc2626)}._error_12y3j_429 ._selectInput_12y3j_351::placeholder{color:var(--Content-Negative-Default-Active, #dc2626)}._select_12y3j_19._btc_12y3j_457:active,._select_12y3j_19._btc_12y3j_457:focus,._select_12y3j_19._btc_12y3j_457:has(input:focus),._select_12y3j_19._btc_12y3j_457._open_12y3j_213{border:1px solid #45c2d6;box-shadow:3px 3px 0 0 var(--Complementarios-Turquesa-Compl-2-Turquesa, #45c2d6)}._error_12y3j_429{border:1px solid var(--Stroke-Negative-Active, #dc2626);background:var(--Fill-Neutral-Primary, #fff);color:var(--Content-Negative-Default-Active, #dc2626);animation:_errorShake_12y3j_1 .4s ease-in-out}._error_12y3j_429 ._placeholder_12y3j_401{color:var(--Content-Negative-Default-Active, #dc2626)}._error_12y3j_429:hover{border:1px solid var(--Stroke-Negative-Active, #dc2626)}._error_12y3j_429:active{border:1px solid transparent;box-shadow:0 0 0 3px var(--ui-red-400, #f87171)}._error_12y3j_429:focus,._error_12y3j_429:has(input:focus),._error_12y3j_429._open_12y3j_213{border:1px solid transparent;box-shadow:0 0 0 3px var(--ui-red-400, #f87171)}._error_12y3j_429._btc_12y3j_457::placeholder{color:#dc2626}._error_12y3j_429._btc_12y3j_457:active,._error_12y3j_429._btc_12y3j_457:focus,._error_12y3j_429._btc_12y3j_457:has(input:focus),._error_12y3j_429._btc_12y3j_457._open_12y3j_213{border:1px solid #dc2626;box-shadow:3px 3px #dc2626}._inverted_12y3j_585{border:1px solid var(--Stroke-Neutral-Secondary, #c9e1f6);background-color:transparent!important;color:#fff!important}._inverted_12y3j_585:hover{border:1px solid white!important}._inverted_12y3j_585 ._placeholder_12y3j_401{color:#ffffffb3!important}._inverted_12y3j_585 ._selectInput_12y3j_351{color:#fff!important}._inverted_12y3j_585 ._selectInput_12y3j_351::placeholder{color:#ffffffb3!important}._inverted_12y3j_585 ._chevron_12y3j_629,._icon_inverted_12y3j_637{color:#fff!important}._inverted_12y3j_585._error_12y3j_429{border:1px solid var(--Stroke-Negative-Active, #ef4444)!important;color:var(--Content-Negative-Default-Active, #f87171)!important}._inverted_12y3j_585._error_12y3j_429 ._placeholder_12y3j_401{color:var(--Content-Negative-Default-Active, #f87171)!important}._inverted_12y3j_585._error_12y3j_429:hover{border:1px solid var(--Stroke-Negative-Active, #ef4444)!important}._inverted_12y3j_585._error_12y3j_429:active{border:1px solid transparent!important;box-shadow:0 0 0 3px var(--ui-red-400, #f87171)!important}._inverted_12y3j_585._error_12y3j_429:focus{border:1px solid transparent!important;box-shadow:0 0 0 3px var(--ui-red-400, #f87171)!important}._inverted_12y3j_585._error_12y3j_429._open_12y3j_213{border:1px solid transparent!important}._chevron_12y3j_629{transition:transform .2s ease;color:var(--Content-Neutral-Default, #475569)}._chevronOpen_12y3j_729{transform:rotate(180deg)}._icon_12y3j_637{color:var(--Content-Neutral-Default, #475569);pointer-events:none;display:flex;align-items:center;justify-content:center}._iconLabel_12y3j_773{display:flex;justify-content:center;align-items:center;gap:6px;min-width:0;flex:1 1 auto;overflow:hidden;width:100%}._optionIcon_12y3j_795{display:flex;align-items:center;justify-content:center}._required_12y3j_817{color:var(--Content-Negative-Default-Active, #dc2626);margin-left:2px}._required_inverted_12y3j_827{color:var(--Content-Negative-Default-Active, #f87171)}._dropdown_12y3j_845{position:absolute;top:100%;left:0;right:0;z-index:1000;background:#fff;border:1px solid var(--Stroke-Neutral-Primary, #94a3b8);border-radius:16px;max-height:200px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:none;scrollbar-color:rgba(0,0,0,.3) transparent}._highlight_12y3j_879{background:transparent;color:#2054a5;font-family:var(--font-medium)!important;font-weight:600!important;font-size:inherit!important}._dropdown_12y3j_845._isDrawer_12y3j_895{position:relative;width:100%;max-height:100%;border-radius:0;border-right:0;border-left:0}._dropdown_12y3j_845 *{font-family:var(--font-regular)}._dropdown_12y3j_845::-webkit-scrollbar{width:8px}._dropdown_12y3j_845::-webkit-scrollbar-track{background:transparent;margin:4px 0}._dropdownPortal_12y3j_941{position:fixed;top:0;left:0;right:auto;z-index:9000}._drawerSelect_12y3j_967{padding:0!important}._drawerSelectHeader_12y3j_975{padding-inline:15px}._drawerSearchInput_12y3j_983{padding-inline:15px;width:100%;padding-top:3px}._option_12y3j_795{width:100%;padding:8px 12px;border-bottom:1px solid var(--Stroke-Neutral-Primary, #94a3b8);cursor:pointer;display:flex;align-items:center;gap:8px;transition:background-color .2s ease}._option_12y3j_795:not(._optionSelected_12y3j_1017):hover{background-color:#f8f9fa}._option_12y3j_795:last-child{border-bottom:none}._optionSelected_12y3j_1017{background-color:#f0f0f0;color:#000}._option_12y3j_795:not(._isDrawer_12y3j_895):first-child{border-top-left-radius:16px;border-top-right-radius:16px}._option_12y3j_795:not(._isDrawer_12y3j_895):last-child{border-bottom-left-radius:16px;border-bottom-right-radius:16px}._small_12y3j_237+._dropdown_12y3j_845 ._option_12y3j_795{padding:8px 11px 8px 14px}._medium_12y3j_259+._dropdown_12y3j_845 ._option_12y3j_795{padding:8px 12px}._large_12y3j_281+._dropdown_12y3j_845 ._option_12y3j_795{padding:11px 12px}._extraLarge_12y3j_303+._dropdown_12y3j_845 ._option_12y3j_795{padding:11px 12px}._optionWithCheckbox_12y3j_1109{display:flex;align-items:center;gap:12px}._optionCheckbox_12y3j_1121{width:14px;height:14px;cursor:pointer;flex-shrink:0;-moz-appearance:none;appearance:none;-webkit-appearance:none;border:1.5px solid var(--Stroke-Neutral-Primary, #94a3b8);border-radius:2px;background-color:#fff;position:relative}._optionCheckbox_12y3j_1121:checked{background-color:var(--Fill-Brand-Inverted-Active, #2054a5)!important;border-color:var(--Fill-Brand-Inverted-Active, #2054a5)!important}._optionCheckbox_12y3j_1121:checked:after{content:"";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%) rotate(45deg);width:3px;height:6px;border:solid white;border-width:0 1.5px 1.5px 0;border-color:#fff!important}._optionWithCheckbox_12y3j_1109:not(._optionSelected_12y3j_1017):hover{background-color:transparent}._optionWithCheckbox_12y3j_1109._optionSelected_12y3j_1017{background-color:transparent}._optionWithDescriptionWrapper_12y3j_1209{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:8px}._optionWithDescription_12y3j_1209{display:flex;flex-direction:column;gap:12px;text-align:start;line-height:1}._optionWithDescriptionLabel_12y3j_1241{color:#030c24;font-size:14px;font-family:var(--font-medium)}._optionWithDescriptionValue_12y3j_1253{font-size:12px;color:#030c2499}._dropdownTable_12y3j_1273{max-height:400px;min-width:0}._optionTable_12y3j_1283{display:flex;gap:16px;padding:12px 16px;align-items:flex-start;flex-direction:row}._tableColumn_12y3j_1299{flex:1;display:flex;flex-direction:column;gap:2px;min-width:0}._columnHeader_12y3j_1315{opacity:.6;text-transform:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._columnValue_12y3j_1331{font-weight:600;color:var(--Content-Neutral-Default-Active, #000);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._optionTable_12y3j_1283._optionSelected_12y3j_1017 ._columnValue_12y3j_1331{color:#000}._noResults_12y3j_1365{display:flex;justify-content:center;align-items:center;padding:12px;text-align:center;color:var(--Content-Neutral-Default-Default, #a3a3a3)}._dropdown_inverted_12y3j_1393{background:var(--Fill-Brand-Default-Active, #2054a5);border:1px solid var(--Stroke-Neutral-Primary, #e0e9f8);scrollbar-color:rgba(255,255,255,.3) transparent}._dropdown_inverted_12y3j_1393::-webkit-scrollbar-thumb{background:#ffffff4d}._dropdown_inverted_12y3j_1393::-webkit-scrollbar-thumb:hover{background:#ffffff80}._dropdown_inverted_12y3j_1393 ._noResults_12y3j_1365{color:#ffffffb3}._option_inverted_12y3j_1439{color:#fff!important;border-bottom-color:1px solid var(--Stroke-Neutral-Primary, #e0e9f8)}._option_inverted_12y3j_1439:hover{background-color:#ffffff1a!important}._option_inverted_12y3j_1439._optionSelected_12y3j_1017{background-color:#ffffff26!important;color:#fff!important}._option_inverted_12y3j_1439._optionWithCheckbox_12y3j_1109:hover,._option_inverted_12y3j_1439._optionWithCheckbox_12y3j_1109._optionSelected_12y3j_1017{background-color:transparent!important}._dropdown_inverted_12y3j_1393 ._optionCheckbox_12y3j_1121{border-color:var(--Stroke-Neutral-Primary, #e0e9f8);background-color:var(--Stroke-Neutral-Primary, #e0e9f8)}._dropdown_inverted_12y3j_1393 ._optionCheckbox_12y3j_1121:checked{background-color:var(--Fill-Brand-Inverted-Active, #2054a5)!important;border-color:var(--Fill-Brand-Inverted-Active, #2054a5)!important}._dropdown_inverted_12y3j_1393 ._optionCheckbox_12y3j_1121:checked:after{border-color:#fff!important}@keyframes _errorShake_12y3j_1{0%,to{transform:translate(0)}10%,30%,50%,70%,90%{transform:translate(-2px)}20%,40%,60%,80%{transform:translate(2px)}}
|
package/dist/assets/Switch.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._switch_1l66v_1{--switch-bg: var(--ui-blue-100);--switch-active-bg: #2054a5;--switch-active-text: #ffffff;--switch-inactive-text: #2054a5;--switch-height: 40px;--switch-inset: 4px;--switch-pad-y: 7px;--switch-pad-x: 12px;--switch-font: 16px;--switch-line-height: 19.2px;position:relative;min-height:var(--switch-height);display:flex;flex-direction:row;gap:0;padding:var(--switch-inset);border-radius:1000px;background:var(--switch-bg);width:fit-content}._switch_1l66v_1._fullWidth_1l66v_26{width:100%}._switch_1l66v_1._fullWidth_1l66v_26 ._option_1l66v_30{flex:1}._extraSmall_1l66v_35{--switch-height: 28px;--switch-inset: 3px;--switch-pad-y: 6px;--switch-pad-x: 12px;--switch-font: 12px;--switch-line-height: 14.4px}._small_1l66v_44{--switch-height: 32px;--switch-inset: 3px;--switch-pad-y: 6px;--switch-pad-x: 12px;--switch-font: 14px;--switch-line-height: 16.8px}._large_1l66v_53{--switch-height: 46px;--switch-inset: 4px;--switch-pad-y: 10px;--switch-pad-x: 16px;--switch-font: 18px;--switch-line-height: 21.6px}._extraLarge_1l66v_62{--switch-height: 52px;--switch-inset: 6px;--switch-pad-y: 6px;--switch-pad-x: 14px;--switch-font: 20px;--switch-line-height: 24px}._switch_1l66v_1 ._indicator_1l66v_72{position:absolute;top:var(--switch-inset);bottom:var(--switch-inset);left:0;background:#2054a5;border-radius:1000px;transition:transform .24s cubic-bezier(.4,0,.2,1),width .24s cubic-bezier(.4,0,.2,1);pointer-events:none;z-index:0}._switch_1l66v_1._simple_1l66v_88 ._indicator_1l66v_72,._switch_1l66v_1._simple_1l66v_88 ._option_1l66v_30{transition:none}._switch_1l66v_1 ._option_1l66v_30{position:relative;z-index:1;border:none;background:transparent;color:var(--switch-inactive-text);font-family:var(--font-medium);font-size:var(--switch-font);line-height:var(--switch-line-height);cursor:pointer;transition:color .3s ease;white-space:nowrap;display:flex;align-items:center;justify-content:center;gap:4px;padding:var(--switch-pad-y) var(--switch-pad-x);border-radius:1000px}._switch_1l66v_1 ._option_1l66v_30._active_1l66v_114{color:var(--switch-active-text)}
|
package/dist/assets/index14.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._overlay_q0941_1{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#fff;display:flex;justify-content:center;align-items:center;z-index:2000;animation:_fadeIn_q0941_1 .25s ease-in-out;overflow:hidden}._overlay_q0941_1._closing_q0941_16{animation:_fadeOut_q0941_1 .25s ease-in-out forwards}._nav_q0941_20{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;width:100%;gap:10px;margin-block:16px;color:#2054a5;padding-inline:16px}._arrowBack_q0941_32{cursor:pointer}._title_q0941_36{font-family:var(--font-medium);font-size:22px;font-weight:600;line-height:normal}._content_q0941_43{width:100%;display:flex;flex-direction:column;padding-bottom:env(safe-area-inset-bottom);background-color:#fff}._mainContent_q0941_51{display:flex;height:100%;width:100%;animation:_slideIn_q0941_1 .45s cubic-bezier(.4,0,.2,1) forwards;transform:translate(0)}._closing_q0941_16{animation:_slideOut_q0941_1 .45s cubic-bezier(.4,0,.2,1) forwards}._contentInner_q0941_63{display:flex;flex-direction:column;align-items:center;box-sizing:border-box;overflow-y:auto;overscroll-behavior:none;flex:1;padding-inline:16px;padding-bottom:16px}._contentInner_q0941_63::-webkit-scrollbar{display:none}@keyframes _fadeIn_q0941_1{0%{opacity:0}to{opacity:1}}@keyframes _fadeOut_q0941_1{0%{opacity:1}to{opacity:0}}@keyframes _slideIn_q0941_1{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes _slideOut_q0941_1{0%{transform:translate(0)}to{transform:translate(100%)}}@media (max-width: 440px){._title_q0941_36{font-size:16px}}
|
|
@@ -2,7 +2,7 @@ import { jsxs as O, jsx as i } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as N, useRef as w, useMemo as Y, useEffect as _ } from "react";
|
|
3
3
|
import { createPortal as Z } from "react-dom";
|
|
4
4
|
import { Input as z } from "../Input/Input.js";
|
|
5
|
-
import { s as e } from "../../Select.module-
|
|
5
|
+
import { s as e } from "../../Select.module-DaH0FOvY.js";
|
|
6
6
|
import { useBTC as I } from "../../hooks/btcContext/useBtcContext.js";
|
|
7
7
|
import { useDropdownPosition as R } from "../../hooks/useDropdownPosition.js";
|
|
8
8
|
import '../../assets/index4.css';const rr = "_container_1kajw_1", nr = "_inputs_1kajw_7", tr = "_inputWrapper_1kajw_13", $ = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as p, jsx as l, Fragment as G } from "react/jsx-runtime";
|
|
2
2
|
import { useState as J, useRef as L, useEffect as K, useMemo as de } from "react";
|
|
3
3
|
import { createPortal as Re } from "react-dom";
|
|
4
|
-
import { s as e } from "../../Select.module-
|
|
4
|
+
import { s as e } from "../../Select.module-DaH0FOvY.js";
|
|
5
5
|
import { Icon as P } from "../../icons/Icon.js";
|
|
6
6
|
import { HelperText as We } from "../helperText/index.js";
|
|
7
7
|
import { FieldError as xe } from "../fieldError/index.js";
|
|
@@ -12,7 +12,7 @@ import { Input as je } from "../Input/Input.js";
|
|
|
12
12
|
import { useBTC as Me } from "../../hooks/btcContext/useBtcContext.js";
|
|
13
13
|
import { useDropdownPosition as Be } from "../../hooks/useDropdownPosition.js";
|
|
14
14
|
const nr = ({
|
|
15
|
-
size:
|
|
15
|
+
size: s = "medium",
|
|
16
16
|
label: V,
|
|
17
17
|
error: U,
|
|
18
18
|
helperText: F,
|
|
@@ -40,7 +40,7 @@ const nr = ({
|
|
|
40
40
|
highlightMatch: Ne = !1,
|
|
41
41
|
...Se
|
|
42
42
|
}) => {
|
|
43
|
-
const B = !!M, { btc: ve } = Me(), ye = X ?? ve, [i, y] = J(!1), [m, be] = J(""),
|
|
43
|
+
const B = !!M, { btc: ve } = Me(), ye = X ?? ve, [i, y] = J(!1), [m, be] = J(""), c = pe || T, $ = T, A = L(null), Oe = L(null), Q = L(null), z = L(null), b = L(null), [D, w] = J([]), De = i && !v, Ce = Pe(`(max-width: ${we}px)`), R = ge && Ce && !v;
|
|
44
44
|
K(() => {
|
|
45
45
|
if ($)
|
|
46
46
|
if (Array.isArray(h) && h.length > 0) {
|
|
@@ -61,7 +61,7 @@ const nr = ({
|
|
|
61
61
|
}, [h, O, $]);
|
|
62
62
|
const _ = D.map((r) => r.value), o = D[0] ?? null, N = (r) => typeof r == "string" ? r.normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/\s+/g, "").toLowerCase() : "", ee = L("");
|
|
63
63
|
K(() => {
|
|
64
|
-
if (!
|
|
64
|
+
if (!c) return;
|
|
65
65
|
const r = m.trim(), n = ee.current.trim();
|
|
66
66
|
if ($) {
|
|
67
67
|
if (r.length > 0) {
|
|
@@ -79,21 +79,21 @@ const nr = ({
|
|
|
79
79
|
o,
|
|
80
80
|
D,
|
|
81
81
|
$,
|
|
82
|
-
|
|
82
|
+
c,
|
|
83
83
|
a
|
|
84
84
|
]);
|
|
85
|
-
const re = de(() =>
|
|
86
|
-
|
|
85
|
+
const re = de(() => c ? i ? m : !$ && o ? o.label : $ && _.length > 0 ? `${_.length} ${_.length === 1 ? "seleccionado" : "seleccionados"}` : "" : "", [
|
|
86
|
+
c,
|
|
87
87
|
i,
|
|
88
88
|
m,
|
|
89
89
|
o,
|
|
90
90
|
_,
|
|
91
91
|
$
|
|
92
|
-
]), te = (r) => D.some((n) => n.value === r), W = de(() => !
|
|
92
|
+
]), te = (r) => D.some((n) => n.value === r), W = de(() => !c || !m || B ? O : O.filter(
|
|
93
93
|
(r) => N(r.label).includes(N(m))
|
|
94
|
-
), [O, m,
|
|
94
|
+
), [O, m, c, B]), k = (() => {
|
|
95
95
|
if (U) return U;
|
|
96
|
-
if (
|
|
96
|
+
if (c && m && m.trim().length > 0 && W.length === 0 && !i && !h)
|
|
97
97
|
return Y;
|
|
98
98
|
})();
|
|
99
99
|
K(() => {
|
|
@@ -103,19 +103,19 @@ const nr = ({
|
|
|
103
103
|
return document.addEventListener("mousedown", r), () => {
|
|
104
104
|
document.removeEventListener("mousedown", r);
|
|
105
105
|
};
|
|
106
|
-
}, [
|
|
106
|
+
}, [c, B, o]);
|
|
107
107
|
const Le = [
|
|
108
108
|
e.select,
|
|
109
109
|
ye && e.btc,
|
|
110
|
-
e[
|
|
110
|
+
e[s],
|
|
111
111
|
k ? e.error : "",
|
|
112
112
|
v ? e.disabled : "",
|
|
113
113
|
i ? e.open : "",
|
|
114
114
|
g ? e.inverted : "",
|
|
115
115
|
ue
|
|
116
|
-
].filter(Boolean).join(" "), C =
|
|
116
|
+
].filter(Boolean).join(" "), C = s === "small" ? 16 : s === "large" ? 20 : s === "extraLarge" ? 24 : 18, ne = fe && (o != null && o.icon) && !(c && i) ? o.icon : I, Ie = () => {
|
|
117
117
|
var r;
|
|
118
|
-
v || (y(!i),
|
|
118
|
+
v || (y(!i), c && !i && (se(), (r = b.current) == null || r.focus()));
|
|
119
119
|
}, q = (r, n = !0) => {
|
|
120
120
|
if (a)
|
|
121
121
|
if ($) {
|
|
@@ -129,7 +129,7 @@ const nr = ({
|
|
|
129
129
|
}, se = () => {
|
|
130
130
|
i || y(!0);
|
|
131
131
|
}, _e = (r) => {
|
|
132
|
-
R && (r.preventDefault(), r.stopPropagation()),
|
|
132
|
+
R && (r.preventDefault(), r.stopPropagation()), c && (r.stopPropagation(), i || (y(!0), b.current && (b.current.readOnly = !1, b.current.focus())));
|
|
133
133
|
}, H = (r, n) => {
|
|
134
134
|
if (!Ne || !n.trim()) return r;
|
|
135
135
|
const d = N(r), t = N(n.trim());
|
|
@@ -148,7 +148,7 @@ const nr = ({
|
|
|
148
148
|
isOpen: i,
|
|
149
149
|
containerRef: z,
|
|
150
150
|
dropdownRef: Q,
|
|
151
|
-
size:
|
|
151
|
+
size: s,
|
|
152
152
|
optionsLength: W.length,
|
|
153
153
|
label: V,
|
|
154
154
|
helperText: F,
|
|
@@ -179,8 +179,8 @@ const nr = ({
|
|
|
179
179
|
}
|
|
180
180
|
),
|
|
181
181
|
t.columns ? /* @__PURE__ */ l(G, { children: E && Object.entries(E).map(([f, S]) => /* @__PURE__ */ p("div", { className: e.tableColumn, children: [
|
|
182
|
-
/* @__PURE__ */ l("div", { className: `${e.columnHeader} ${e[
|
|
183
|
-
/* @__PURE__ */ l("div", { className: `${e.columnValue} ${e[
|
|
182
|
+
/* @__PURE__ */ l("div", { className: `${e.columnHeader} ${e[s]}`, children: S }),
|
|
183
|
+
/* @__PURE__ */ l("div", { className: `${e.columnValue} ${e[s]}`, children: H(
|
|
184
184
|
String(t.columns[f] ?? ""),
|
|
185
185
|
m
|
|
186
186
|
) })
|
|
@@ -222,7 +222,7 @@ const nr = ({
|
|
|
222
222
|
return /* @__PURE__ */ l(
|
|
223
223
|
"div",
|
|
224
224
|
{
|
|
225
|
-
className: `${e.dropdown} ${e.isDrawer} ${e[
|
|
225
|
+
className: `${e.dropdown} ${e.isDrawer} ${e[s]} ${g ? e.dropdown_inverted : ""} ${E ? e.dropdownTable : ""} ${c ? e.dropdownSearchable : ""}`,
|
|
226
226
|
children: /* @__PURE__ */ l(
|
|
227
227
|
ce,
|
|
228
228
|
{
|
|
@@ -237,13 +237,13 @@ const nr = ({
|
|
|
237
237
|
"div",
|
|
238
238
|
{
|
|
239
239
|
ref: z,
|
|
240
|
-
className: `${e.selectContainer} ${
|
|
240
|
+
className: `${e.selectContainer} ${s === "medium" ? e.selectContainer_medium : s === "large" ? e.selectContainer_large : s === "extraLarge" ? e.selectContainer_extraLarge : ""} ${v ? e.disabled : ""}`,
|
|
241
241
|
...Se,
|
|
242
242
|
children: [
|
|
243
243
|
V && /* @__PURE__ */ p(
|
|
244
244
|
"label",
|
|
245
245
|
{
|
|
246
|
-
className: `${e.label} ${
|
|
246
|
+
className: `${e.label} ${s === "large" ? e.label_large : ""} ${s === "extraLarge" ? e.label_extraLarge : ""} ${g ? e.label_inverted : ""} ${v ? e.disabled : ""} `,
|
|
247
247
|
children: [
|
|
248
248
|
V,
|
|
249
249
|
/* @__PURE__ */ l(
|
|
@@ -266,21 +266,21 @@ const nr = ({
|
|
|
266
266
|
style: Z ? { borderColor: Z } : void 0,
|
|
267
267
|
children: [
|
|
268
268
|
/* @__PURE__ */ p("div", { className: e.iconLabel, children: [
|
|
269
|
-
(
|
|
269
|
+
(c || ne && he) && /* @__PURE__ */ l(
|
|
270
270
|
"div",
|
|
271
271
|
{
|
|
272
272
|
className: `${e.icon} ${g ? e.icon_inverted : ""}`,
|
|
273
273
|
children: /* @__PURE__ */ l(
|
|
274
274
|
P,
|
|
275
275
|
{
|
|
276
|
-
name:
|
|
276
|
+
name: c ? "SearchIcon" : ne,
|
|
277
277
|
width: C,
|
|
278
278
|
height: C
|
|
279
279
|
}
|
|
280
280
|
)
|
|
281
281
|
}
|
|
282
282
|
),
|
|
283
|
-
|
|
283
|
+
c ? /* @__PURE__ */ l(
|
|
284
284
|
"input",
|
|
285
285
|
{
|
|
286
286
|
ref: b,
|
|
@@ -326,10 +326,11 @@ const nr = ({
|
|
|
326
326
|
title: $e,
|
|
327
327
|
zIndex: 1,
|
|
328
328
|
children: [
|
|
329
|
-
|
|
329
|
+
c && /* @__PURE__ */ l("div", { className: e.drawerSearchInput, children: /* @__PURE__ */ l(
|
|
330
330
|
je,
|
|
331
331
|
{
|
|
332
332
|
placeholder: j,
|
|
333
|
+
size: s,
|
|
333
334
|
icon: "SearchIcon",
|
|
334
335
|
value: re,
|
|
335
336
|
onChange: le,
|
|
@@ -344,7 +345,7 @@ const nr = ({
|
|
|
344
345
|
"div",
|
|
345
346
|
{
|
|
346
347
|
ref: Q,
|
|
347
|
-
className: `${e.dropdown} ${e[
|
|
348
|
+
className: `${e.dropdown} ${e[s]} ${e.dropdownPortal} ${g ? e.dropdown_inverted : ""} ${E ? e.dropdownTable : ""} ${c ? e.dropdownSearchable : ""}`,
|
|
348
349
|
style: ke,
|
|
349
350
|
children: /* @__PURE__ */ l(ce, {})
|
|
350
351
|
}
|
|
@@ -352,8 +353,8 @@ const nr = ({
|
|
|
352
353
|
document.getElementById("root") || document.body
|
|
353
354
|
)
|
|
354
355
|
] }),
|
|
355
|
-
k && /* @__PURE__ */ l(xe, { message: k, size:
|
|
356
|
-
F && !k && /* @__PURE__ */ l(We, { message: F, size:
|
|
356
|
+
k && /* @__PURE__ */ l(xe, { message: k, size: s, inverted: g }),
|
|
357
|
+
F && !k && /* @__PURE__ */ l(We, { message: F, size: s, inverted: g })
|
|
357
358
|
]
|
|
358
359
|
}
|
|
359
360
|
);
|
|
@@ -14,7 +14,7 @@ export interface SwitchProps {
|
|
|
14
14
|
onChange?: (index: number) => void;
|
|
15
15
|
/** tamaño que determina el alto del control */
|
|
16
16
|
size?: SwitchSize;
|
|
17
|
-
/** si es true, usa un deslizamiento
|
|
17
|
+
/** si es true, usa un deslizamiento aún más corto/plano */
|
|
18
18
|
simpleAnimation?: boolean;
|
|
19
19
|
/** tamaño del icono en px; si se omite, escala según `size` */
|
|
20
20
|
iconSize?: number;
|
|
@@ -34,4 +34,8 @@ export interface SwitchProps {
|
|
|
34
34
|
/** estilos inline aplicados a todos los botones de opción */
|
|
35
35
|
optionStyle?: React.CSSProperties;
|
|
36
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* Control segmentado tipo píldora con indicador deslizante.
|
|
39
|
+
* Todas las opciones se igualan al ancho de la más larga (salvo `equalWidth={false}`).
|
|
40
|
+
*/
|
|
37
41
|
export declare const Switch: ({ options, active, onChange, size, simpleAnimation, iconSize, className, activeColor, activeTextColor, inactiveTextColor, background, equalWidth, fullWidth, optionStyle, }: SwitchProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,112 +1,110 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { Icon as
|
|
4
|
-
import '../../assets/Switch.css';const
|
|
5
|
-
switch: "
|
|
6
|
-
fullWidth:
|
|
7
|
-
option:
|
|
8
|
-
extraSmall:
|
|
9
|
-
small:
|
|
10
|
-
large:
|
|
11
|
-
extraLarge:
|
|
12
|
-
indicator:
|
|
13
|
-
simple:
|
|
14
|
-
active:
|
|
15
|
-
|
|
16
|
-
pop: F
|
|
17
|
-
}, G = {
|
|
1
|
+
import { jsxs as S, jsx as _ } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as $, useState as O, useCallback as E, useLayoutEffect as Z, useEffect as z } from "react";
|
|
3
|
+
import { Icon as A } from "../../icons/Icon.js";
|
|
4
|
+
import '../../assets/Switch.css';const B = "_fullWidth_1l66v_26", K = "_option_1l66v_30", M = "_extraSmall_1l66v_35", V = "_small_1l66v_44", X = "_large_1l66v_53", Y = "_extraLarge_1l66v_62", q = "_indicator_1l66v_72", F = "_simple_1l66v_88", G = "_active_1l66v_114", l = {
|
|
5
|
+
switch: "_switch_1l66v_1",
|
|
6
|
+
fullWidth: B,
|
|
7
|
+
option: K,
|
|
8
|
+
extraSmall: M,
|
|
9
|
+
small: V,
|
|
10
|
+
large: X,
|
|
11
|
+
extraLarge: Y,
|
|
12
|
+
indicator: q,
|
|
13
|
+
simple: F,
|
|
14
|
+
active: G
|
|
15
|
+
}, H = {
|
|
18
16
|
extraSmall: 15,
|
|
19
17
|
small: 15,
|
|
20
18
|
medium: 19,
|
|
21
19
|
large: 19,
|
|
22
20
|
extraLarge: 19
|
|
23
|
-
},
|
|
24
|
-
options:
|
|
25
|
-
active:
|
|
21
|
+
}, U = ({
|
|
22
|
+
options: m = [],
|
|
23
|
+
active: i = 0,
|
|
26
24
|
onChange: c,
|
|
27
|
-
size:
|
|
28
|
-
simpleAnimation:
|
|
29
|
-
iconSize:
|
|
30
|
-
className:
|
|
31
|
-
activeColor:
|
|
32
|
-
activeTextColor:
|
|
33
|
-
inactiveTextColor:
|
|
34
|
-
background:
|
|
35
|
-
equalWidth:
|
|
25
|
+
size: a = "medium",
|
|
26
|
+
simpleAnimation: I = !1,
|
|
27
|
+
iconSize: W,
|
|
28
|
+
className: L = "",
|
|
29
|
+
activeColor: d,
|
|
30
|
+
activeTextColor: u,
|
|
31
|
+
inactiveTextColor: p,
|
|
32
|
+
background: h,
|
|
33
|
+
equalWidth: v = !0,
|
|
36
34
|
fullWidth: N = !1,
|
|
37
|
-
optionStyle:
|
|
35
|
+
optionStyle: R
|
|
38
36
|
}) => {
|
|
39
|
-
const
|
|
37
|
+
const w = $(null), n = $([]), [y, g] = O({
|
|
40
38
|
left: 0,
|
|
41
39
|
width: 0
|
|
42
|
-
})
|
|
43
|
-
|
|
44
|
-
const t = _.current[a], e = _.current[$.current];
|
|
45
|
-
if (!t) return;
|
|
46
|
-
const l = _.current.filter(
|
|
40
|
+
}), f = E(() => {
|
|
41
|
+
const t = n.current.filter(
|
|
47
42
|
(s) => s !== null
|
|
48
43
|
);
|
|
49
|
-
if (
|
|
50
|
-
const s = Math.max(...
|
|
51
|
-
|
|
44
|
+
if (t.forEach((s) => s.style.width = "auto"), v) {
|
|
45
|
+
const s = Math.max(0, ...t.map((e) => e.offsetWidth));
|
|
46
|
+
t.forEach((e) => e.style.width = `${s}px`);
|
|
52
47
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
...
|
|
70
|
-
...
|
|
48
|
+
}, [v]), o = E(() => {
|
|
49
|
+
f();
|
|
50
|
+
const t = n.current[i];
|
|
51
|
+
t && g({ left: t.offsetLeft, width: t.offsetWidth });
|
|
52
|
+
}, [i, f]);
|
|
53
|
+
Z(() => {
|
|
54
|
+
o();
|
|
55
|
+
}, [i, m, a, f]), z(() => {
|
|
56
|
+
var e;
|
|
57
|
+
const t = w.current;
|
|
58
|
+
if (!t) return;
|
|
59
|
+
const s = new ResizeObserver(o);
|
|
60
|
+
return s.observe(t), (e = document.fonts) != null && e.ready && document.fonts.ready.then(o).catch(() => {
|
|
61
|
+
}), () => s.disconnect();
|
|
62
|
+
}, [o]);
|
|
63
|
+
const k = W ?? H[a], j = {
|
|
64
|
+
...d && { "--switch-active-bg": d },
|
|
65
|
+
...u && { "--switch-active-text": u },
|
|
66
|
+
...p && { "--switch-inactive-text": p },
|
|
67
|
+
...h && { "--switch-bg": h }
|
|
71
68
|
};
|
|
72
|
-
return /* @__PURE__ */
|
|
69
|
+
return /* @__PURE__ */ S(
|
|
73
70
|
"div",
|
|
74
71
|
{
|
|
75
|
-
|
|
72
|
+
ref: w,
|
|
73
|
+
className: `${l.switch} ${l[a]} ${I ? l.simple : ""} ${N ? l.fullWidth : ""} ${L}`,
|
|
76
74
|
style: j,
|
|
77
75
|
children: [
|
|
78
|
-
/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ _(
|
|
79
77
|
"span",
|
|
80
78
|
{
|
|
81
|
-
className:
|
|
79
|
+
className: l.indicator,
|
|
82
80
|
style: {
|
|
83
|
-
transform: `translateX(${
|
|
84
|
-
width: `${
|
|
81
|
+
transform: `translateX(${y.left}px)`,
|
|
82
|
+
width: `${y.width}px`
|
|
85
83
|
}
|
|
86
84
|
}
|
|
87
85
|
),
|
|
88
|
-
|
|
89
|
-
const
|
|
90
|
-
return /* @__PURE__ */
|
|
86
|
+
m.map((t, s) => {
|
|
87
|
+
const e = typeof t == "string", x = e ? t : t.label, b = e ? null : t.icon, D = i === s;
|
|
88
|
+
return /* @__PURE__ */ S(
|
|
91
89
|
"div",
|
|
92
90
|
{
|
|
93
|
-
ref: (
|
|
94
|
-
|
|
91
|
+
ref: (r) => {
|
|
92
|
+
n.current[s] = r;
|
|
95
93
|
},
|
|
96
94
|
role: "button",
|
|
97
95
|
tabIndex: 0,
|
|
98
|
-
onClick: () => c == null ? void 0 : c(
|
|
99
|
-
onKeyDown: (
|
|
100
|
-
(
|
|
96
|
+
onClick: () => c == null ? void 0 : c(s),
|
|
97
|
+
onKeyDown: (r) => {
|
|
98
|
+
(r.key === "Enter" || r.key === " ") && (r.preventDefault(), c == null || c(s));
|
|
101
99
|
},
|
|
102
|
-
className: `${
|
|
103
|
-
style:
|
|
100
|
+
className: `${l.option} ${D ? l.active : ""}`,
|
|
101
|
+
style: R,
|
|
104
102
|
children: [
|
|
105
|
-
|
|
106
|
-
|
|
103
|
+
b && /* @__PURE__ */ _(A, { name: b, size: k }),
|
|
104
|
+
x && /* @__PURE__ */ _("span", { className: l.label, children: x })
|
|
107
105
|
]
|
|
108
106
|
},
|
|
109
|
-
|
|
107
|
+
s
|
|
110
108
|
);
|
|
111
109
|
})
|
|
112
110
|
]
|
|
@@ -114,5 +112,5 @@ import '../../assets/Switch.css';const T = "_fullWidth_wo4ya_24", Z = "_option_w
|
|
|
114
112
|
);
|
|
115
113
|
};
|
|
116
114
|
export {
|
|
117
|
-
|
|
115
|
+
U as Switch
|
|
118
116
|
};
|