@jars-labs/jars-components 1.0.76 → 1.0.78
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/{index-aS57XSQF.js → index-CMN3FIXA.js} +5 -6
- package/dist/index-CMN3FIXA.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/{lottie-Dpn2VHtt.js → lottie-BuLYA0Xp.js} +2 -2
- package/dist/{lottie-Dpn2VHtt.js.map → lottie-BuLYA0Xp.js.map} +1 -1
- package/dist/types/Autocomplete/Autocomplete.d.ts +0 -1
- package/dist/types/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/dist/types/DateInput/DateInput.d.ts.map +1 -1
- package/dist/types/Input/Input.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/index-aS57XSQF.js.map +0 -1
|
@@ -183,7 +183,7 @@ var Animation = function (_a) {
|
|
|
183
183
|
var refVector = useRef(null);
|
|
184
184
|
var _b = useState(null), lottie = _b[0], setLottie = _b[1];
|
|
185
185
|
useEffect(function () {
|
|
186
|
-
import('./lottie-
|
|
186
|
+
import('./lottie-BuLYA0Xp.js').then(function (n) { return n.l; }).then(function (Lottie) { return setLottie(Lottie.default); });
|
|
187
187
|
}, []);
|
|
188
188
|
useEffect(function () {
|
|
189
189
|
if (lottie && refVector.current) {
|
|
@@ -445,7 +445,7 @@ var Input = function (_a) {
|
|
|
445
445
|
var _k = useState(false), isFocused = _k[0], setIsFocused = _k[1];
|
|
446
446
|
var _l = useState(false), isHovered = _l[0], setIsHovered = _l[1];
|
|
447
447
|
var showLabel = !hideLabel && (isFocused || value.trim());
|
|
448
|
-
var placeHolderValue = placeholder
|
|
448
|
+
var placeHolderValue = placeholder && isFocused ? placeholder : (label !== null && label !== undefined ? label : placeholder);
|
|
449
449
|
var ErrorSection = useMemo(function () {
|
|
450
450
|
return holdSpace && (jsxs(Flex, { className: classNames(styles$m.error, error ? styles$m.errorVisible : styles$m.errorHidden), gap: 4, ml: 0, style: { alignItems: 'flex-start' }, children: [jsx(Flex, { style: { flexShrink: 0 }, children: jsx(Info, { width: "18px", height: "18px", viewBox: "0 0 24 24", stroke: "var(--color-red-300)" }) }), jsx(Text, { variant: "xs", className: classNames(styles$m.errorText), as: "span", children: capitalizeFirstSentenceLetter(error) })] }));
|
|
451
451
|
}, [error]);
|
|
@@ -474,7 +474,6 @@ Loader.displayName = 'Loader';
|
|
|
474
474
|
* Autocomplete user input with any list of options
|
|
475
475
|
*
|
|
476
476
|
* @param options - list of options to display in dropdown (array of AutocompleteOption)
|
|
477
|
-
* @param label - input label
|
|
478
477
|
* @param placeholder - input placeholder
|
|
479
478
|
* @param onOptionSubmit - function to call when option is selected by click or enter (option: AutocompleteOption | null)
|
|
480
479
|
* @param onClear - function to call when clear button is clicked
|
|
@@ -512,7 +511,7 @@ var Autocomplete = function (_a) {
|
|
|
512
511
|
var _f = useState(false), touched = _f[0], setTouched = _f[1];
|
|
513
512
|
var _g = useState(false), hasClearedInitial = _g[0], setHasClearedInitial = _g[1];
|
|
514
513
|
var inputValue = touched || hasClearedInitial ? searchValue : initialValue || '';
|
|
515
|
-
return (jsx(Dropdown, { options: renderOptions(), maxHeight: 250, closeOnSelect: true, children: function (store) { return (jsx(Input, { hideLabel: true,
|
|
514
|
+
return (jsx(Dropdown, { options: renderOptions(), maxHeight: 250, closeOnSelect: true, children: function (store) { return (jsx(Input, { hideLabel: true, placeholder: placeholder, onClick: function () {
|
|
516
515
|
return !disabled &&
|
|
517
516
|
searchValue.length >= minCharactersToShowDropdown &&
|
|
518
517
|
store.toggleDropdown();
|
|
@@ -833,7 +832,7 @@ var DateInput = function (_a) {
|
|
|
833
832
|
var _g = useState(false), isFocused = _g[0], setIsFocused = _g[1];
|
|
834
833
|
var _h = useState(false), isHovered = _h[0], setIsHovered = _h[1];
|
|
835
834
|
var showLabel = !hideLabel && (isFocused || value);
|
|
836
|
-
var placeHolderValue = placeholder !== null &&
|
|
835
|
+
var placeHolderValue = placeholder && isFocused ? placeholder : (label !== null && label !== undefined ? label : placeholder);
|
|
837
836
|
var ErrorSection = useMemo(function () {
|
|
838
837
|
return holdSpace && (jsxs(Flex, { className: styles$m.error, gap: 4, ml: 16, style: {
|
|
839
838
|
visibility: error ? 'visible' : 'hidden',
|
|
@@ -2052,4 +2051,4 @@ var World = function (_a) {
|
|
|
2052
2051
|
World.displayName = 'World';
|
|
2053
2052
|
|
|
2054
2053
|
export { Bell as $, Accordion as A, Badge as B, Card as C, DateInput as D, EnterCodeInput as E, FileInput as F, Text as G, Textarea as H, IncrementNumber as I, ToastContainer as J, Tooltip as K, Link as L, Message as M, NavBar as N, AIGenerate as O, Pagination as P, AIPrompt as Q, RadioButton as R, SegmentedControl as S, Table as T, AIRedo as U, AISearch as V, Alert as W, Archive as X, Arrow as Y, Attachment as Z, AvatarPlaceholder as _, AccordionItem as a, Calendar as a0, Camera as a1, Cat as a2, Chat as a3, Check as a4, Chevron as a5, ChevronCollapse as a6, Clock as a7, Close as a8, Cloud as a9, Refresh as aA, Remove as aB, Search as aC, Shield as aD, StepIndicator as aE, ThreeDots as aF, ThumbsDown as aG, Tick as aH, Umbrello as aI, Upload as aJ, Visa as aK, Warning as aL, World as aM, capitalizeFirstSentenceLetter as aN, CloudUpload as aa, CreditCard as ab, Delete as ac, Document as ad, Dog as ae, EyeHide as af, EyeShow as ag, Fingerprint as ah, Google as ai, Grid as aj, Hamburger as ak, HappyFace as al, House as am, HouseTime as an, Identification as ao, Info as ap, Location as aq, Mail as ar, Menu as as, MenuTouched as at, Notification as au, Open as av, Pets as aw, Phone as ax, Plaid as ay, Plus as az, AccordionControl as b, AccordionPanel as c, ActionIcon as d, Animation as e, Autocomplete as f, getDefaultExportFromCjs as g, badgeVariantMap as h, Button as i, cardStatusVariantMap as j, CardStatus as k, Checkbox as l, Chip as m, Dropdown as n, FileUpload as o, Input as p, LinkModal as q, Loader as r, Modal as s, Multiselect as t, NavBarSide as u, PasswordInput as v, Select as w, StatusBadge as x, Stepper as y, Tabs as z };
|
|
2055
|
-
//# sourceMappingURL=index-
|
|
2054
|
+
//# sourceMappingURL=index-CMN3FIXA.js.map
|