@pismo/marola 2.0.1 → 2.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/{Button-cCziLrIy.js → Button-Bh6rpTyY.js} +2 -2
- package/dist/{ClickAwayListener-CUayzVlD.js → ClickAwayListener-BjqhGzJh.js} +3 -3
- package/dist/DatePicker.module-CmT9Zbbu.js +45 -0
- package/dist/{Popup-C7AXLoP0.js → Popup-aWlctE1C.js} +3 -3
- package/dist/{Portal-CYV5TK_i.js → Portal-Dc9ej3DW.js} +2 -2
- package/dist/{RadioButton.module-B4kmS66R.js → RadioButton.module-VF7v9SuY.js} +1 -1
- package/dist/{Toggle-DEVeyo2f.js → Toggle-DeMSbC0N.js} +16 -15
- package/dist/_commonjsHelpers-C6fGbg64.js +6 -0
- package/dist/assets/DatePicker.css +1 -0
- package/dist/{combineHooksSlotProps-BCXoX9Nx.js → combineHooksSlotProps-CNWfgylM.js} +1 -1
- package/dist/components/Autocomplete/Autocomplete.d.ts +6 -2
- package/dist/components/Autocomplete/Autocomplete.js +249 -247
- package/dist/components/Autocomplete/Autocomplete.stories.d.ts +3 -1
- package/dist/components/Autocomplete/Autocomplete.test.d.ts +1 -0
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Chip/Chip.js +4 -3
- package/dist/components/DatePicker/DatePicker.d.ts +30 -0
- package/dist/components/DatePicker/DatePicker.js +1534 -0
- package/dist/components/DatePicker/DatePicker.stories.d.ts +45 -0
- package/dist/components/DatePicker/DatePicker.test.d.ts +1 -0
- package/dist/components/DatePicker/dateUtils.d.ts +96 -0
- package/dist/components/DatePicker/dateUtils.js +70 -0
- package/dist/components/DatePicker/dateUtils.test.d.ts +0 -0
- package/dist/components/DatePicker/keyboardNavigation.d.ts +14 -0
- package/dist/components/DatePicker/keyboardNavigation.js +26 -0
- package/dist/components/DatePicker/keyboardNavigation.test.d.ts +1 -0
- package/dist/components/DatePicker/renderCalendarDays.d.ts +25 -0
- package/dist/components/DatePicker/renderCalendarDays.js +85 -0
- package/dist/components/DatePicker/renderCalendarDays.test.d.ts +2 -0
- package/dist/components/DatePicker/renderDualCalendarHeader.d.ts +8 -0
- package/dist/components/DatePicker/renderDualCalendarHeader.js +51 -0
- package/dist/components/DatePicker/renderDualCalendarHeader.test.d.ts +0 -0
- package/dist/components/DatePicker/renderHeader.d.ts +11 -0
- package/dist/components/DatePicker/renderHeader.js +41 -0
- package/dist/components/DatePicker/renderHeader.test.d.ts +0 -0
- package/dist/components/DatePicker/renderNavigatorInput.d.ts +16 -0
- package/dist/components/DatePicker/renderNavigatorInput.js +73 -0
- package/dist/components/DatePicker/renderNavigatorInput.test.d.ts +1 -0
- package/dist/components/DatePicker/renderPeriodSelection.d.ts +17 -0
- package/dist/components/DatePicker/renderPeriodSelection.js +81 -0
- package/dist/components/DatePicker/renderPeriodSelection.test.d.ts +1 -0
- package/dist/components/Dialog/CloseIconButton.js +1 -1
- package/dist/components/Dialog/Dialog.js +4 -4
- package/dist/components/Icon/Icon.js +167 -163
- package/dist/components/Icon/types.d.ts +1 -1
- package/dist/components/IconButton/IconButton.js +1 -1
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Popover/Popover.js +2 -2
- package/dist/components/RadioButton/RadioButton.js +7 -6
- package/dist/components/RadioButton/RadioOption.js +7 -6
- package/dist/components/ResultWithChips/ResultWithChips.js +1 -1
- package/dist/components/RowItem/RowItem.js +4 -3
- package/dist/components/Select/Select.js +5 -5
- package/dist/components/Snackbar/Snackbar.js +3 -3
- package/dist/components/Tabs/Tab.js +3 -3
- package/dist/components/Tabs/TabPanel.js +1 -1
- package/dist/components/Tabs/Tabs.js +3 -3
- package/dist/components/Toggle/Toggle.js +1 -1
- package/dist/components/ToggleGroup/Toggle.js +3 -2
- package/dist/components/ToggleGroup/ToggleGroup.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +3 -3
- package/dist/contexts/SnackbarProvider/SnackbarProvider.js +1 -1
- package/dist/dayjs.min-ClQKmc--.js +285 -0
- package/dist/{index-CATDT7fJ.js → index-Bppuplgd.js} +6 -5
- package/dist/main.d.ts +1 -0
- package/dist/main.js +106 -105
- package/dist/{ownerDocument-CAHSRRik.js → ownerDocument-CXvpb_nj.js} +2 -1
- package/dist/{useButton-eF8MXAli.js → useButton-B8Y1xR88.js} +1 -1
- package/dist/{useList-CPY2roI7.js → useList-9gbS2r78.js} +2 -2
- package/dist/{useSlotProps-DSnfx453.js → useSlotProps-C7dqSmdM.js} +109 -112
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { g as T, a as _, _ as x, b as i, c as B, d as O, e as D, P as e } from "./useSlotProps-
|
|
1
|
+
import { g as T, a as _, _ as x, b as i, c as B, d as O, e as D, P as e } from "./useSlotProps-C7dqSmdM.js";
|
|
2
2
|
import * as c from "react";
|
|
3
3
|
import { jsx as F } from "react/jsx-runtime";
|
|
4
|
-
import { u as S } from "./useButton-
|
|
4
|
+
import { u as S } from "./useButton-B8Y1xR88.js";
|
|
5
5
|
const m = "Button";
|
|
6
6
|
function U(s) {
|
|
7
7
|
return T(m, s);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as t from "react";
|
|
2
|
-
import { u as C, P as f } from "./useSlotProps-
|
|
2
|
+
import { u as C, P as f } from "./useSlotProps-C7dqSmdM.js";
|
|
3
3
|
import { jsx as w } from "react/jsx-runtime";
|
|
4
4
|
import { u as L } from "./useEventCallback-BAQJJ3ye.js";
|
|
5
|
-
import { o as h, e as b } from "./ownerDocument-
|
|
6
|
-
import { e as g } from "./index-
|
|
5
|
+
import { o as h, e as b } from "./ownerDocument-CXvpb_nj.js";
|
|
6
|
+
import { e as g } from "./index-Bppuplgd.js";
|
|
7
7
|
function T(c) {
|
|
8
8
|
return c.substring(2).toLowerCase();
|
|
9
9
|
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import './assets/DatePicker.css';const e = "_header_57qu7_158", _ = "_calendar_57qu7_104", a = "_weekdayNames_57qu7_186", t = "_days_57qu7_187", n = "_weekdayName_57qu7_186", d = "_day_57qu7_187", o = "_disabled_57qu7_209", r = "_selected_57qu7_209", u = "_faded_57qu7_218", c = "_months_57qu7_256", s = "_years_57qu7_257", q = "_month_57qu7_124", y = "_year_57qu7_257", l = "_rotate_57qu7_337", h = {
|
|
2
|
+
"input-container": "_input-container_57qu7_85",
|
|
3
|
+
"datepicker-input": "_datepicker-input_57qu7_98",
|
|
4
|
+
"calendar-icon": "_calendar-icon_57qu7_104",
|
|
5
|
+
"datepicker-container": "_datepicker-container_57qu7_108",
|
|
6
|
+
"range-mode": "_range-mode_57qu7_121",
|
|
7
|
+
"month-header": "_month-header_57qu7_124",
|
|
8
|
+
"month-header-row": "_month-header-row_57qu7_135",
|
|
9
|
+
"nav-button": "_nav-button_57qu7_147",
|
|
10
|
+
header: e,
|
|
11
|
+
calendar: _,
|
|
12
|
+
weekdayNames: a,
|
|
13
|
+
days: t,
|
|
14
|
+
weekdayName: n,
|
|
15
|
+
day: d,
|
|
16
|
+
disabled: o,
|
|
17
|
+
selected: r,
|
|
18
|
+
"range-start": "_range-start_57qu7_209",
|
|
19
|
+
"range-end": "_range-end_57qu7_209",
|
|
20
|
+
"range-selected": "_range-selected_57qu7_209",
|
|
21
|
+
faded: u,
|
|
22
|
+
months: c,
|
|
23
|
+
years: s,
|
|
24
|
+
month: q,
|
|
25
|
+
year: y,
|
|
26
|
+
"today-footer": "_today-footer_57qu7_296",
|
|
27
|
+
"today-button": "_today-button_57qu7_302",
|
|
28
|
+
rotate: l,
|
|
29
|
+
"current-day": "_current-day_57qu7_341",
|
|
30
|
+
"hovered-range": "_hovered-range_57qu7_346",
|
|
31
|
+
"hovered-date": "_hovered-date_57qu7_351",
|
|
32
|
+
"would-be-end-date": "_would-be-end-date_57qu7_357",
|
|
33
|
+
"would-be-start-date": "_would-be-start-date_57qu7_363",
|
|
34
|
+
"dual-calendar-container": "_dual-calendar-container_57qu7_370",
|
|
35
|
+
"navigator-input": "_navigator-input_57qu7_381",
|
|
36
|
+
"nav-month-button": "_nav-month-button_57qu7_410",
|
|
37
|
+
"nav-year-button": "_nav-year-button_57qu7_411",
|
|
38
|
+
"auto-width": "_auto-width_57qu7_419",
|
|
39
|
+
"month-selector": "_month-selector_57qu7_424",
|
|
40
|
+
"year-selector": "_year-selector_57qu7_425",
|
|
41
|
+
"nav-calendar-static": "_nav-calendar-static_57qu7_457"
|
|
42
|
+
};
|
|
43
|
+
export {
|
|
44
|
+
h as s
|
|
45
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { g as jt, a as zt, _ as It, u as Ut, b as ut, c as Xt, d as Yt, e as Kt, P as x } from "./useSlotProps-
|
|
1
|
+
import { g as jt, a as zt, _ as It, u as Ut, b as ut, c as Xt, d as Yt, e as Kt, P as x } from "./useSlotProps-C7dqSmdM.js";
|
|
2
2
|
import * as b from "react";
|
|
3
3
|
import { useLayoutEffect as Gt, useEffect as Jt } from "react";
|
|
4
|
-
import { r as Qt } from "./index-
|
|
4
|
+
import { r as Qt } from "./index-Bppuplgd.js";
|
|
5
5
|
import { jsx as Z } from "react/jsx-runtime";
|
|
6
6
|
import { u as Zt } from "./useEnhancedEffect-CJGo-L3B.js";
|
|
7
|
-
import { P as qt, H as gt } from "./Portal-
|
|
7
|
+
import { P as qt, H as gt } from "./Portal-Dc9ej3DW.js";
|
|
8
8
|
const et = Math.min, z = Math.max, nt = Math.round, q = Math.floor, H = (t) => ({
|
|
9
9
|
x: t,
|
|
10
10
|
y: t
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as o from "react";
|
|
2
|
-
import { r as P, e as y } from "./index-
|
|
3
|
-
import { u as T, s as a, P as i } from "./useSlotProps-
|
|
2
|
+
import { r as P, e as y } from "./index-Bppuplgd.js";
|
|
3
|
+
import { u as T, s as a, P as i } from "./useSlotProps-C7dqSmdM.js";
|
|
4
4
|
import { jsx as c } from "react/jsx-runtime";
|
|
5
5
|
import { u as f } from "./useEnhancedEffect-CJGo-L3B.js";
|
|
6
6
|
function N(t, l, s, n, u) {
|
|
@@ -8,6 +8,7 @@ import "./components/Avatar/Avatar.js";
|
|
|
8
8
|
import "./components/Button/Button.js";
|
|
9
9
|
import { Adornment as v } from "./components/Adornment/Adornment.js";
|
|
10
10
|
import "./components/Dialog/Dialog.js";
|
|
11
|
+
import "./components/DatePicker/DatePicker.js";
|
|
11
12
|
import { Skeleton as f } from "./components/Skeleton/Skeleton.js";
|
|
12
13
|
import "./components/IconButton/IconButton.js";
|
|
13
14
|
import "./components/InputSearch/InputSearch.js";
|
|
@@ -17,7 +18,7 @@ import "./components/Table/Table.js";
|
|
|
17
18
|
import "./components/Tabs/Tabs.js";
|
|
18
19
|
import { s as y } from "./Group-Cyc1W1kV.js";
|
|
19
20
|
import "./contexts/SnackbarProvider/SnackbarProvider.js";
|
|
20
|
-
import { B as x } from "./Button-
|
|
21
|
+
import { B as x } from "./Button-Bh6rpTyY.js";
|
|
21
22
|
import './assets/Toggle2.css';const I = "_chip_1wvod_61", P = "_chip__adornment_1wvod_116", z = "_chip__remove_1wvod_121", n = {
|
|
22
23
|
"u-typography-h1": "_u-typography-h1_1wvod_1",
|
|
23
24
|
"u-typography-h2": "_u-typography-h2_1wvod_8",
|
|
@@ -61,7 +62,7 @@ import './assets/Toggle2.css';const I = "_chip_1wvod_61", P = "_chip__adornment_
|
|
|
61
62
|
children: _
|
|
62
63
|
}
|
|
63
64
|
)) : /* @__PURE__ */ i("span", { "data-testid": t["data-testid"], ref: d, className: e, children: _ });
|
|
64
|
-
}),
|
|
65
|
+
}), Y = u((t, d) => {
|
|
65
66
|
const {
|
|
66
67
|
label: _,
|
|
67
68
|
className: o,
|
|
@@ -100,8 +101,8 @@ import './assets/Toggle2.css';const I = "_chip_1wvod_61", P = "_chip__adornment_
|
|
|
100
101
|
role: "button",
|
|
101
102
|
tabIndex: e ? -1 : 0,
|
|
102
103
|
"aria-label": "remove",
|
|
103
|
-
onClick: (
|
|
104
|
-
|
|
104
|
+
onClick: (p) => {
|
|
105
|
+
p == null || p.stopPropagation(), p == null || p.nativeEvent.stopImmediatePropagation(), m();
|
|
105
106
|
},
|
|
106
107
|
"aria-disabled": e,
|
|
107
108
|
children: /* @__PURE__ */ i(C, { icon: "circle-xmark", size: "1.125rem", color: "rgba(var(--gray-95-rgb), 0.45)" })
|
|
@@ -115,15 +116,15 @@ import './assets/Toggle2.css';const I = "_chip_1wvod_61", P = "_chip__adornment_
|
|
|
115
116
|
"row-item--clickable": "_row-item--clickable_8z1a0_13",
|
|
116
117
|
"row-item--disabled": "_row-item--disabled_8z1a0_19",
|
|
117
118
|
"row-item__content": "_row-item__content_8z1a0_22"
|
|
118
|
-
},
|
|
119
|
+
}, Z = u((t, d) => {
|
|
119
120
|
const { children: _, leftAdornment: o, disabled: r, onClick: a, buttons: s, ariaLabel: e, className: g } = t, m = l(o == null ? void 0 : o.className, h["row-item__adornment"]), w = {
|
|
120
|
-
onClick: (
|
|
121
|
-
r || a && a(
|
|
121
|
+
onClick: (c) => {
|
|
122
|
+
r || a && a(c);
|
|
122
123
|
},
|
|
123
124
|
tabIndex: 0,
|
|
124
125
|
"aria-label": e,
|
|
125
126
|
role: "button"
|
|
126
|
-
},
|
|
127
|
+
}, p = o != null && o.customIcon ? o : { size: "1rem", ...o };
|
|
127
128
|
return /* @__PURE__ */ k(
|
|
128
129
|
"div",
|
|
129
130
|
{
|
|
@@ -137,13 +138,13 @@ import './assets/Toggle2.css';const I = "_chip_1wvod_61", P = "_chip__adornment_
|
|
|
137
138
|
...!!a && w,
|
|
138
139
|
ref: d,
|
|
139
140
|
children: [
|
|
140
|
-
o && /* @__PURE__ */ i(v, { ...
|
|
141
|
+
o && /* @__PURE__ */ i(v, { ...p, className: m, disabled: r }),
|
|
141
142
|
/* @__PURE__ */ i("span", { className: l(h["row-item__content"]), children: _ }),
|
|
142
143
|
s && /* @__PURE__ */ i(
|
|
143
144
|
"div",
|
|
144
145
|
{
|
|
145
|
-
onClick: (
|
|
146
|
-
|
|
146
|
+
onClick: (c) => {
|
|
147
|
+
c == null || c.stopPropagation(), c == null || c.nativeEvent.stopImmediatePropagation();
|
|
147
148
|
},
|
|
148
149
|
children: s
|
|
149
150
|
}
|
|
@@ -151,7 +152,7 @@ import './assets/Toggle2.css';const I = "_chip_1wvod_61", P = "_chip__adornment_
|
|
|
151
152
|
]
|
|
152
153
|
}
|
|
153
154
|
);
|
|
154
|
-
}),
|
|
155
|
+
}), A = u((t, d) => {
|
|
155
156
|
const { text: _, isSelected: o = !1, value: r, onChange: a, disabled: s } = t;
|
|
156
157
|
return /* @__PURE__ */ k(
|
|
157
158
|
"label",
|
|
@@ -183,7 +184,7 @@ import './assets/Toggle2.css';const I = "_chip_1wvod_61", P = "_chip__adornment_
|
|
|
183
184
|
);
|
|
184
185
|
});
|
|
185
186
|
export {
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
187
|
+
Y as C,
|
|
188
|
+
Z as R,
|
|
189
|
+
A as T
|
|
189
190
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._u-typography-h1_57qu7_1{font-size:var(--heading-font-size-1);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-1);margin:0}._u-typography-h2_57qu7_8{font-size:var(--heading-font-size-2);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-2);margin:0}._u-typography-h3_57qu7_15{font-size:var(--heading-font-size-3);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-3);margin:0}._u-typography-h4_57qu7_22{font-size:var(--heading-font-size-4);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-4);margin:0}._u-typography-h5_57qu7_29{font-size:var(--heading-font-size-5);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-5);margin:0}._u-typography-h6_57qu7_36{font-size:var(--heading-font-size-6);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-6);margin:0}._u-typography-base_57qu7_43{margin:0;font-size:var(--base-font-size);font-weight:var(--base-weight);line-height:var(--base-line-height)}._u-typography-base--xxl_57qu7_49{font-size:var(--base-font-size-xxl);line-height:var(--base-line-height-xxl)}._u-typography-base--xl_57qu7_53{font-size:var(--base-font-size-xl);line-height:var(--base-line-height-xl)}._u-typography-base--lg_57qu7_57{font-size:var(--base-font-size-lg);line-height:var(--base-line-height-lg)}._u-typography-base--sm_57qu7_61{font-size:var(--base-font-size-sm);line-height:var(--base-line-height-sm)}._u-typography-base--bold_57qu7_65{font-weight:var(--base-bold)}._u-typography-base--strikethrough_57qu7_68{text-decoration:line-through}._u-typography-base--underlined_57qu7_71{text-decoration:underline}._u-typography-base--strikethrough-underlined_57qu7_74{text-decoration:underline line-through}._datepicker-wrapper_57qu7_79{position:relative;display:inline-block;width:100%}._input-container_57qu7_85{display:flex;align-items:center;padding:.5rem .75rem;cursor:pointer;background:#fff;border:.0625rem solid var(--colors-neutral-border-color-border);border-radius:.5rem;transition:border .2s ease-in-out}._input-container_57qu7_85:hover{border-color:var(--colors-brand-primary-color-primary)}._input-container_57qu7_85 ._datepicker-input_57qu7_98{width:100%;font-size:1rem;border:none;outline:none}._input-container_57qu7_85 ._calendar-icon_57qu7_104{cursor:pointer}._datepicker-container_57qu7_108{position:absolute;left:0;z-index:100;width:max-content;padding:1rem;margin-top:.5rem;background:#fff;border:.0625rem solid #ddd;border-radius:.375rem;box-shadow:0 .25rem .625rem #0000001a;animation:_fadeIn_57qu7_1 .2s ease-in-out,_slideUp_57qu7_1 .2s ease-in-out}._datepicker-container_57qu7_108._range-mode_57qu7_121{width:max-content}._datepicker-container_57qu7_108._range-mode_57qu7_121 ._month-headers_57qu7_124{display:flex;justify-content:space-between;width:100%;margin-bottom:.625rem}._datepicker-container_57qu7_108._range-mode_57qu7_121 ._month-headers_57qu7_124 ._month-header_57qu7_124{flex:1;font-weight:700;text-align:center}._datepicker-container_57qu7_108._range-mode_57qu7_121 ._month-header-row_57qu7_135{display:flex;align-items:center;justify-content:space-between;width:100%;margin-bottom:.625rem}._datepicker-container_57qu7_108._range-mode_57qu7_121 ._month-header-row_57qu7_135 ._month-header_57qu7_124{flex:1;font-weight:700;text-align:center}._datepicker-container_57qu7_108._range-mode_57qu7_121 ._month-header-row_57qu7_135 ._nav-button_57qu7_147{padding:.3125rem;font-size:1rem;cursor:pointer;background:none;border:none;transition:.2s ease}._datepicker-container_57qu7_108._range-mode_57qu7_121 ._month-header-row_57qu7_135 ._nav-button_57qu7_147:hover{color:var(--colors-brand-primary-color-primary)}._datepicker-container_57qu7_108 ._header_57qu7_158{width:100%}._header_57qu7_158{display:flex;align-items:center;justify-content:space-between;padding-bottom:.625rem;font-weight:700}._header_57qu7_158 button{padding:.3125rem;font-size:1rem;cursor:pointer;background:none;border:none;transition:.2s ease}._header_57qu7_158 button:hover{color:var(--colors-brand-primary-color-primary)}._calendar_57qu7_104{display:flex;flex-direction:column}._weekdayNames_57qu7_186,._days_57qu7_187{display:grid;grid-template-columns:repeat(7,auto);gap:0}._weekdayName_57qu7_186,._day_57qu7_187{display:flex;align-items:center;justify-content:center;width:2.75rem;height:2.75rem;padding:.3125rem 0;font-size:1rem;font-weight:700;cursor:pointer;background-color:transparent;border:none;border-radius:.5rem;transition:background .2s ease-in-out}._weekdayName_57qu7_186:hover:not(._disabled_57qu7_209,._selected_57qu7_209,._range-start_57qu7_209,._range-end_57qu7_209,._range-selected_57qu7_209),._day_57qu7_187:hover:not(._disabled_57qu7_209,._selected_57qu7_209,._range-start_57qu7_209,._range-end_57qu7_209,._range-selected_57qu7_209){background-color:#fafafa}._weekdayName_57qu7_186._selected_57qu7_209,._day_57qu7_187._selected_57qu7_209{color:#fff;background:var(--colors-brand-primary-color-primary)}._weekdayName_57qu7_186._faded_57qu7_218:not(._disabled_57qu7_209),._day_57qu7_187._faded_57qu7_218:not(._disabled_57qu7_209){color:#3f3d4b40}._weekdayName_57qu7_186._disabled_57qu7_209,._day_57qu7_187._disabled_57qu7_209{color:#aaa;cursor:not-allowed}._weekdayName_57qu7_186._range-selected_57qu7_209:not(._range-start_57qu7_209,._range-end_57qu7_209),._day_57qu7_187._range-selected_57qu7_209:not(._range-start_57qu7_209,._range-end_57qu7_209){background:var(--colors-brand-primary-color-primary-bg);border-radius:0}._weekdayName_57qu7_186._range-start_57qu7_209,._day_57qu7_187._range-start_57qu7_209{color:#fff;background:var(--colors-brand-primary-color-primary);border-top-right-radius:0;border-bottom-right-radius:0}._weekdayName_57qu7_186._range-end_57qu7_209,._day_57qu7_187._range-end_57qu7_209{color:#fff;background:var(--colors-brand-primary-color-primary);border-top-left-radius:0;border-bottom-left-radius:0}._day_57qu7_187{margin-bottom:.25rem;color:#3f3d4be0}._weekdayName_57qu7_186{color:#3f3d4b73}._months_57qu7_256,._years_57qu7_257{display:grid;grid-template-columns:repeat(3,auto);gap:0}._months_57qu7_256 ._month_57qu7_124,._months_57qu7_256 ._year_57qu7_257,._years_57qu7_257 ._month_57qu7_124,._years_57qu7_257 ._year_57qu7_257{display:flex;align-items:center;justify-content:center;width:7.5rem;height:2.5rem;padding:.5rem .625rem;margin:.25rem;font-size:1rem;font-weight:700;color:#3f3d4be0;cursor:pointer;background-color:transparent;border:none;border-radius:.5rem;transition:background .2s ease-in-out}._months_57qu7_256 ._month_57qu7_124:hover:not(._selected_57qu7_209),._months_57qu7_256 ._year_57qu7_257:hover:not(._selected_57qu7_209),._years_57qu7_257 ._month_57qu7_124:hover:not(._selected_57qu7_209),._years_57qu7_257 ._year_57qu7_257:hover:not(._selected_57qu7_209){background-color:#fafafa}._months_57qu7_256 ._month_57qu7_124._selected_57qu7_209,._months_57qu7_256 ._year_57qu7_257._selected_57qu7_209,._years_57qu7_257 ._month_57qu7_124._selected_57qu7_209,._years_57qu7_257 ._year_57qu7_257._selected_57qu7_209{color:#fff;background:var(--colors-brand-primary-color-primary)}._today-footer_57qu7_296{display:flex;justify-content:center;margin-top:.625rem}._today-button_57qu7_302{display:block;width:100%;height:2.5rem;padding:.5rem;font-size:1rem;font-weight:700;color:#3f3d4be0;text-align:center;cursor:pointer;background:transparent;border:.0625rem solid #ddd;border-radius:.375rem;transition:background .2s ease-in-out}._today-button_57qu7_302:hover{background-color:#fafafa}@keyframes _fadeIn_57qu7_1{0%{opacity:0}to{opacity:1}}@keyframes _slideUp_57qu7_1{0%{transform:translateY(.625rem)}to{transform:translateY(0)}}._rotate_57qu7_337{transform:rotate(180deg)}._current-day_57qu7_341{background:none;border:.125rem solid var(--colors-brand-primary-color-primary)}._hovered-range_57qu7_346:not(._range-start_57qu7_209,._range-end_57qu7_209){background:var(--colors-brand-primary-color-primary-bg);border-radius:0}._hovered-date_57qu7_351{background:#c5eeff!important}._hovered-date_57qu7_351:not(._range-start_57qu7_209,._range-end_57qu7_209){border-radius:0}._hovered-date_57qu7_351._would-be-end-date_57qu7_357{color:#fff;background:#1897f3cc!important;border-top-right-radius:.5rem;border-bottom-right-radius:.5rem}._hovered-date_57qu7_351._would-be-start-date_57qu7_363{color:#fff;background:#1897f3cc!important;border-top-left-radius:0;border-bottom-left-radius:0}._dual-calendar-container_57qu7_370{display:flex;gap:2rem;justify-content:center;width:max-content}._dual-calendar-container_57qu7_370 ._calendar_57qu7_104{flex:0 0 auto;width:max-content}._navigator-input_57qu7_381{display:flex;align-items:center;justify-content:space-between;width:11.25rem;height:2.5rem;padding:.5rem .75rem;cursor:pointer;background:var(--input-bg, #ffffff);border:.0625rem solid var(--input-border, var(--colors-neutral-border-color-border));border-radius:.5rem}._navigator-input_57qu7_381 ._nav-button_57qu7_147{display:flex;align-items:center;justify-content:center;padding:.25rem;cursor:pointer;background:none;border:none}._navigator-input_57qu7_381 ._nav-button_57qu7_147:hover{background-color:#0000000d;border-radius:.25rem}._navigator-input_57qu7_381 ._nav-calendar-icon_57qu7_406{margin:0 .25rem;color:var(--icon-color, #666)}._navigator-input_57qu7_381 ._nav-month-button_57qu7_410,._navigator-input_57qu7_381 ._nav-year-button_57qu7_411{padding:0;margin:0 .125rem;font-size:.875rem;cursor:pointer;background:none;border:none}._navigator-input_57qu7_381._auto-width_57qu7_419{width:fit-content;min-width:min-content}._month-selector_57qu7_424,._year-selector_57qu7_425{padding:0;font-size:inherit;font-weight:inherit;color:inherit;cursor:pointer;background:none;border:none}._month-selector_57qu7_424:hover,._year-selector_57qu7_425:hover{color:inherit;text-decoration:none;cursor:pointer;background:transparent;border:none;outline:none;box-shadow:none}._auto-width_57qu7_419{display:inline-flex;align-items:center;width:auto}._nav-month-button_57qu7_410,._nav-year-button_57qu7_411{padding:0 .25rem;white-space:nowrap}._nav-calendar-static_57qu7_457{display:inline-flex;align-items:center;justify-content:center;margin:0 .25rem;color:inherit;cursor:default}._nav-calendar-static_57qu7_457 svg{pointer-events:none}._nav-calendar-static_57qu7_457:hover,._nav-calendar-static_57qu7_457:focus,._nav-calendar-static_57qu7_457:active{color:inherit;cursor:default;background:transparent;outline:none;box-shadow:none}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import { SyntheticEvent } from 'react';
|
|
1
|
+
import { default as React, SyntheticEvent } from 'react';
|
|
2
2
|
import { InputProps } from '../Input/Input.tsx';
|
|
3
3
|
export type AutocompleteProps<T> = Omit<InputProps, 'onChange' | 'value'> & {
|
|
4
4
|
/** Object key to be used as label when options are an array of object */
|
|
5
5
|
labelKey?: T extends object ? keyof T : never;
|
|
6
6
|
/** Object key to be used as value when options are an array of object */
|
|
7
7
|
valueKey?: T extends object ? keyof T : never;
|
|
8
|
+
/** Method which returns a custom label for options */
|
|
9
|
+
renderOption?: (option: T) => React.ReactNode;
|
|
10
|
+
/** Method which returns a custom label for the selected */
|
|
11
|
+
customSelectedOptionLabel?: (option: T) => string;
|
|
8
12
|
/** Value */
|
|
9
13
|
value?: T;
|
|
10
14
|
/** Options array */
|
|
@@ -16,4 +20,4 @@ export type AutocompleteProps<T> = Omit<InputProps, 'onChange' | 'value'> & {
|
|
|
16
20
|
/** callback when characters are entered into the input box */
|
|
17
21
|
onInputChange?: (event: SyntheticEvent<Element, Event>, newValue: string) => void;
|
|
18
22
|
};
|
|
19
|
-
export declare const Autocomplete: <T extends string | object>({ labelKey, valueKey, options, type, value, onChange, onInputChange, classNameWrapper, "data-testid-wrapper": dataTestId, classNameInputWrapper, ...props }: AutocompleteProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare const Autocomplete: <T extends string | object>({ labelKey, valueKey, renderOption, customSelectedOptionLabel, options, type, value, onChange, onInputChange, classNameWrapper, "data-testid-wrapper": dataTestId, classNameInputWrapper, ...props }: AutocompleteProps<T>) => import("react/jsx-runtime").JSX.Element;
|