softable-pixels-web 1.2.33 → 1.2.35
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/{BasePopover-aHgl90XE.js → BasePopover-CY-9StFD.js} +1 -1
- package/dist/{BasePopover-aHgl90XE.js.map → BasePopover-CY-9StFD.js.map} +1 -1
- package/dist/{Breadcrumb-CBCBNcIC.js → Breadcrumb--lRHi6sr.js} +2 -2
- package/dist/{Breadcrumb-CBCBNcIC.js.map → Breadcrumb--lRHi6sr.js.map} +1 -1
- package/dist/{Button-BnPQoBEH.js → Button-o_4n7GFO.js} +3 -3
- package/dist/{Button-BnPQoBEH.js.map → Button-o_4n7GFO.js.map} +1 -1
- package/dist/{CheckItem-D45HN7Ir.js → CheckItem-C2NriXyN.js} +2 -2
- package/dist/{CheckItem-D45HN7Ir.js.map → CheckItem-C2NriXyN.js.map} +1 -1
- package/dist/{Checkbox-ClKDCBdz.js → Checkbox-qoUWy3Nj.js} +2 -2
- package/dist/{Checkbox-ClKDCBdz.js.map → Checkbox-qoUWy3Nj.js.map} +1 -1
- package/dist/{Chip-r5K3xdb9.js → Chip-DJVwuXlv.js} +2 -2
- package/dist/{Chip-r5K3xdb9.js.map → Chip-DJVwuXlv.js.map} +1 -1
- package/dist/{ChipList-DLehs_z2.js → ChipList-D7J-hTLW.js} +4 -4
- package/dist/{ChipList-DLehs_z2.js.map → ChipList-D7J-hTLW.js.map} +1 -1
- package/dist/{ColorPicker-v5ULLhFP.js → ColorPicker-sqs31Md7.js} +3 -3
- package/dist/{ColorPicker-v5ULLhFP.js.map → ColorPicker-sqs31Md7.js.map} +1 -1
- package/dist/{ContextMenu-DOIbV9BE.js → ContextMenu-CrVwvqGG.js} +6 -4
- package/dist/ContextMenu-CrVwvqGG.js.map +1 -0
- package/dist/{DatePicker-Cj_fGnhg.js → DatePicker-FL9pUwup.js} +7 -7
- package/dist/{DatePicker-Cj_fGnhg.js.map → DatePicker-FL9pUwup.js.map} +1 -1
- package/dist/{ErrorMessage-kAHOafpg.js → ErrorMessage-6pG4hFId.js} +1 -1
- package/dist/{ErrorMessage-kAHOafpg.js.map → ErrorMessage-6pG4hFId.js.map} +1 -1
- package/dist/{FileInput-CFaWGwh1.js → FileInput-CfUBqmTu.js} +4 -4
- package/dist/{FileInput-CFaWGwh1.js.map → FileInput-CfUBqmTu.js.map} +1 -1
- package/dist/{IconButton-izpMeHBl.js → IconButton-C7nGG3_D.js} +1 -1
- package/dist/{IconButton-izpMeHBl.js.map → IconButton-C7nGG3_D.js.map} +1 -1
- package/dist/{InfoSummary-BLsz7swQ.js → InfoSummary-B6k4_vpG.js} +2 -2
- package/dist/{InfoSummary-BLsz7swQ.js.map → InfoSummary-B6k4_vpG.js.map} +1 -1
- package/dist/{Input-BWk-tP51.js → Input-BLnysNxN.js} +15 -7
- package/dist/Input-BLnysNxN.js.map +1 -0
- package/dist/{Label-lzG8Cp8P.js → Label-VE3hoSbt.js} +2 -2
- package/dist/{Label-lzG8Cp8P.js.map → Label-VE3hoSbt.js.map} +1 -1
- package/dist/{Loader-D21KyoAr.js → Loader-BTp8PCMz.js} +1 -1
- package/dist/{Loader-D21KyoAr.js.map → Loader-BTp8PCMz.js.map} +1 -1
- package/dist/{MaskModule-DKpEoLUF.js → MaskModule-DZko7F_e.js} +7 -7
- package/dist/MaskModule-DZko7F_e.js.map +1 -0
- package/dist/{Pagination-CqVu9N0h.js → Pagination-D-eoDEIJ.js} +4 -4
- package/dist/{Pagination-CqVu9N0h.js.map → Pagination-D-eoDEIJ.js.map} +1 -1
- package/dist/{ScrollPaginationContainer-C_VJlEww.js → ScrollPaginationContainer-isAA4BsG.js} +1 -1
- package/dist/{ScrollPaginationContainer-C_VJlEww.js.map → ScrollPaginationContainer-isAA4BsG.js.map} +1 -1
- package/dist/{SearchInput-BdscRWx2.js → SearchInput-vI-WcTPT.js} +2 -2
- package/dist/{SearchInput-BdscRWx2.js.map → SearchInput-vI-WcTPT.js.map} +1 -1
- package/dist/{Select-DCtpaxaW.js → Select-ChVwX-7Z.js} +68 -31
- package/dist/Select-ChVwX-7Z.js.map +1 -0
- package/dist/{Switch-CaoMMeS7.js → Switch-DlZXMyGG.js} +11 -4
- package/dist/Switch-DlZXMyGG.js.map +1 -0
- package/dist/{TabSwitch-2PNcQRsB.js → TabSwitch-Co6kaDbi.js} +2 -2
- package/dist/{TabSwitch-2PNcQRsB.js.map → TabSwitch-Co6kaDbi.js.map} +1 -1
- package/dist/{TextArea-NeN7ynND.js → TextArea-s6HdNSc5.js} +4 -4
- package/dist/{TextArea-NeN7ynND.js.map → TextArea-s6HdNSc5.js.map} +1 -1
- package/dist/{Typography-D1dxTP-6.js → Typography-u0BPHgCr.js} +1 -1
- package/dist/{Typography-D1dxTP-6.js.map → Typography-u0BPHgCr.js.map} +1 -1
- package/dist/base-popover.js +1 -1
- package/dist/breadcrumb.js +2 -2
- package/dist/button.js +3 -3
- package/dist/check-item.js +2 -2
- package/dist/checkbox.js +2 -2
- package/dist/chip-list.js +5 -5
- package/dist/chip.js +2 -2
- package/dist/color-picker.js +4 -4
- package/dist/context-menu.js +4 -4
- package/dist/date-picker.js +8 -8
- package/dist/file-input.js +4 -4
- package/dist/icon-button.js +1 -1
- package/dist/{index-BxDK_Go8.d.ts → index-D6on4J-S.d.ts} +2 -2
- package/dist/{index-B0g1F3X4.d.ts → index-DoLWDzDX.d.ts} +2 -1
- package/dist/{index-DAAEXO7G.d.ts → index-j6W-PwB7.d.ts} +7 -3
- package/dist/{index-DFfPk9_X.d.ts → index-qPJuO65u.d.ts} +8 -3
- package/dist/index.d.ts +4 -4
- package/dist/index.js +26 -26
- package/dist/info-summary.js +2 -2
- package/dist/input.d.ts +1 -1
- package/dist/input.js +5 -5
- package/dist/mask-modules.js +1 -1
- package/dist/pagination.js +5 -5
- package/dist/scroll-pagination-container.js +1 -1
- package/dist/searchInput.js +3 -3
- package/dist/select.d.ts +1 -1
- package/dist/select.js +9 -7
- package/dist/switch.d.ts +1 -1
- package/dist/switch.js +2 -2
- package/dist/tab-switch.js +2 -2
- package/dist/text-area.d.ts +1 -1
- package/dist/text-area.js +4 -4
- package/dist/typography.js +1 -1
- package/package.json +1 -1
- package/dist/ContextMenu-DOIbV9BE.js.map +0 -1
- package/dist/Input-BWk-tP51.js.map +0 -1
- package/dist/MaskModule-DKpEoLUF.js.map +0 -1
- package/dist/Select-DCtpaxaW.js.map +0 -1
- package/dist/Switch-CaoMMeS7.js.map +0 -1
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
import { n as styled, t as useThemedStyles } from "./useThemedStyles-Dco_54KA.js";
|
|
2
|
-
import { t as Typography } from "./Typography-
|
|
2
|
+
import { t as Typography } from "./Typography-u0BPHgCr.js";
|
|
3
3
|
import { t as Icon } from "./Icon-bV19y393.js";
|
|
4
|
-
import { t as BasePopover } from "./BasePopover-
|
|
5
|
-
import { t as Label } from "./Label-
|
|
6
|
-
import { t as ErrorMessage } from "./ErrorMessage-
|
|
7
|
-
import { t as Loader } from "./Loader-
|
|
8
|
-
import { r as ScrollDirection, t as ScrollPaginationContainer } from "./ScrollPaginationContainer-
|
|
4
|
+
import { t as BasePopover } from "./BasePopover-CY-9StFD.js";
|
|
5
|
+
import { t as Label } from "./Label-VE3hoSbt.js";
|
|
6
|
+
import { t as ErrorMessage } from "./ErrorMessage-6pG4hFId.js";
|
|
7
|
+
import { t as Loader } from "./Loader-BTp8PCMz.js";
|
|
8
|
+
import { r as ScrollDirection, t as ScrollPaginationContainer } from "./ScrollPaginationContainer-isAA4BsG.js";
|
|
9
|
+
import { t as Input } from "./Input-BLnysNxN.js";
|
|
9
10
|
import { forwardRef, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
10
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
12
|
|
|
13
|
+
//#region src/utils/functions/normalizeString.ts
|
|
14
|
+
function normalizeString(value) {
|
|
15
|
+
if (!value || typeof value !== "string") return "";
|
|
16
|
+
return value.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toUpperCase().trim();
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
12
20
|
//#region src/components/commons/inputs/Select/components/OptionItem/styles.ts
|
|
13
21
|
function createOptionsStyles(props) {
|
|
14
22
|
const { isSelected } = props;
|
|
@@ -93,7 +101,7 @@ function findFirstEnabled(count, isDisabled) {
|
|
|
93
101
|
for (let i = 0; i < count; i++) if (!isDisabled(i)) return i;
|
|
94
102
|
return 0;
|
|
95
103
|
}
|
|
96
|
-
function useCompositeListNavigation({ open, itemCount, initialIndex, setOpen, makeMeta, onCloseByTab }) {
|
|
104
|
+
function useCompositeListNavigation({ open, itemCount, autoFocusFirstOption = true, initialIndex, setOpen, makeMeta, onCloseByTab }) {
|
|
97
105
|
const listRef = useRef(null);
|
|
98
106
|
const itemRefs = useRef([]);
|
|
99
107
|
const isDisabled = useCallback((i) => !!makeMeta(i).disabled, [makeMeta]);
|
|
@@ -106,10 +114,12 @@ function useCompositeListNavigation({ open, itemCount, initialIndex, setOpen, ma
|
|
|
106
114
|
}, []);
|
|
107
115
|
const openAndFocus = useCallback((index) => {
|
|
108
116
|
setOpen(true);
|
|
117
|
+
if (!autoFocusFirstOption) return;
|
|
109
118
|
const next = typeof index === "number" ? index : typeof initialIndex === "number" ? initialIndex : findFirstEnabled(itemCount, isDisabled);
|
|
110
119
|
setActiveIndex(next);
|
|
111
120
|
requestAnimationFrame(() => focusItem(next));
|
|
112
121
|
}, [
|
|
122
|
+
autoFocusFirstOption,
|
|
113
123
|
focusItem,
|
|
114
124
|
initialIndex,
|
|
115
125
|
isDisabled,
|
|
@@ -117,11 +127,12 @@ function useCompositeListNavigation({ open, itemCount, initialIndex, setOpen, ma
|
|
|
117
127
|
setOpen
|
|
118
128
|
]);
|
|
119
129
|
useEffect(() => {
|
|
120
|
-
if (!open) return;
|
|
130
|
+
if (!open || !autoFocusFirstOption) return;
|
|
121
131
|
requestAnimationFrame(() => focusItem(activeIndex));
|
|
122
132
|
}, [
|
|
123
133
|
open,
|
|
124
134
|
activeIndex,
|
|
135
|
+
autoFocusFirstOption,
|
|
125
136
|
focusItem
|
|
126
137
|
]);
|
|
127
138
|
const move = useCallback((dir) => {
|
|
@@ -142,10 +153,6 @@ function useCompositeListNavigation({ open, itemCount, initialIndex, setOpen, ma
|
|
|
142
153
|
const onListKeyDown = useCallback((e) => {
|
|
143
154
|
if (!open) return;
|
|
144
155
|
switch (e.key) {
|
|
145
|
-
case "Tab":
|
|
146
|
-
onCloseByTab?.();
|
|
147
|
-
setOpen(false);
|
|
148
|
-
return;
|
|
149
156
|
case "ArrowDown":
|
|
150
157
|
e.preventDefault();
|
|
151
158
|
move(1);
|
|
@@ -154,6 +161,11 @@ function useCompositeListNavigation({ open, itemCount, initialIndex, setOpen, ma
|
|
|
154
161
|
e.preventDefault();
|
|
155
162
|
move(-1);
|
|
156
163
|
return;
|
|
164
|
+
case "Escape":
|
|
165
|
+
e.preventDefault();
|
|
166
|
+
setOpen(false);
|
|
167
|
+
onCloseByTab?.();
|
|
168
|
+
return;
|
|
157
169
|
case "Home": {
|
|
158
170
|
e.preventDefault();
|
|
159
171
|
const first = findFirstEnabled(itemCount, isDisabled);
|
|
@@ -173,14 +185,9 @@ function useCompositeListNavigation({ open, itemCount, initialIndex, setOpen, ma
|
|
|
173
185
|
return;
|
|
174
186
|
}
|
|
175
187
|
case "Enter":
|
|
176
|
-
case " ":
|
|
177
188
|
e.preventDefault();
|
|
178
189
|
activate();
|
|
179
190
|
return;
|
|
180
|
-
case "Escape":
|
|
181
|
-
e.preventDefault();
|
|
182
|
-
setOpen(false);
|
|
183
|
-
return;
|
|
184
191
|
case "ArrowRight": {
|
|
185
192
|
e.preventDefault();
|
|
186
193
|
const meta = makeMeta(activeIndex);
|
|
@@ -197,12 +204,12 @@ function useCompositeListNavigation({ open, itemCount, initialIndex, setOpen, ma
|
|
|
197
204
|
itemCount,
|
|
198
205
|
activeIndex,
|
|
199
206
|
move,
|
|
200
|
-
setOpen,
|
|
201
207
|
activate,
|
|
202
208
|
makeMeta,
|
|
203
209
|
focusItem,
|
|
204
210
|
isDisabled,
|
|
205
|
-
onCloseByTab
|
|
211
|
+
onCloseByTab,
|
|
212
|
+
setOpen
|
|
206
213
|
]);
|
|
207
214
|
const getTriggerProps = useCallback(() => {
|
|
208
215
|
return { onKeyDown: (e) => {
|
|
@@ -249,14 +256,21 @@ function useCompositeListNavigation({ open, itemCount, initialIndex, setOpen, ma
|
|
|
249
256
|
|
|
250
257
|
//#endregion
|
|
251
258
|
//#region src/components/commons/inputs/Select/hooks/useSelect/index.ts
|
|
252
|
-
function useSelect({ value, options, multiple, disabled, canClear, onChange }) {
|
|
259
|
+
function useSelect({ value, options, multiple, disabled, canClear, withSearch, onChange, onSearchChange }) {
|
|
260
|
+
const timeoutRef = useRef(null);
|
|
253
261
|
const [open, setOpen] = useState(false);
|
|
262
|
+
const [search, setSearch] = useState("");
|
|
263
|
+
const [availableOptions, setAvailableOptions] = useState([]);
|
|
254
264
|
const nav = useCompositeListNavigation({
|
|
255
265
|
open,
|
|
256
|
-
itemCount:
|
|
257
|
-
|
|
258
|
-
makeMeta
|
|
266
|
+
itemCount: availableOptions.length,
|
|
267
|
+
autoFocusFirstOption: !withSearch,
|
|
268
|
+
makeMeta,
|
|
269
|
+
setOpen: changeOpen
|
|
259
270
|
});
|
|
271
|
+
useEffect(() => {
|
|
272
|
+
setAvailableOptions(options ?? []);
|
|
273
|
+
}, [options]);
|
|
260
274
|
function handleOptionClick(option) {
|
|
261
275
|
const isAlreadySelected = value.includes(option);
|
|
262
276
|
if (!multiple) {
|
|
@@ -272,13 +286,15 @@ function useSelect({ value, options, multiple, disabled, canClear, onChange }) {
|
|
|
272
286
|
else onChange([...value, option]);
|
|
273
287
|
}
|
|
274
288
|
function makeMeta(index) {
|
|
275
|
-
const opt =
|
|
289
|
+
const opt = availableOptions[index];
|
|
276
290
|
return { onActivate: () => {
|
|
277
291
|
if (opt) handleOptionClick(opt.value);
|
|
278
292
|
} };
|
|
279
293
|
}
|
|
280
294
|
function changeOpen(value$1) {
|
|
281
295
|
setOpen(value$1);
|
|
296
|
+
setSearch("");
|
|
297
|
+
setAvailableOptions(options);
|
|
282
298
|
}
|
|
283
299
|
function togglePanel() {
|
|
284
300
|
if (disabled) return;
|
|
@@ -287,14 +303,27 @@ function useSelect({ value, options, multiple, disabled, canClear, onChange }) {
|
|
|
287
303
|
function closePanel() {
|
|
288
304
|
setOpen(false);
|
|
289
305
|
}
|
|
306
|
+
function handleSearchChange(value$1) {
|
|
307
|
+
setSearch(value$1);
|
|
308
|
+
if (onSearchChange) return onSearchChange(value$1);
|
|
309
|
+
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
310
|
+
if (!search) return setAvailableOptions(options);
|
|
311
|
+
timeoutRef.current = setTimeout(() => {
|
|
312
|
+
const normalizedSearch = normalizeString(value$1);
|
|
313
|
+
setAvailableOptions(options.filter((opt) => normalizeString(opt.label).includes(normalizedSearch)));
|
|
314
|
+
}, 500);
|
|
315
|
+
}
|
|
290
316
|
return {
|
|
291
317
|
nav,
|
|
292
318
|
open,
|
|
319
|
+
search,
|
|
320
|
+
availableOptions,
|
|
293
321
|
makeMeta,
|
|
294
322
|
changeOpen,
|
|
295
323
|
togglePanel,
|
|
296
324
|
closePanel,
|
|
297
|
-
handleOptionClick
|
|
325
|
+
handleOptionClick,
|
|
326
|
+
handleSearchChange
|
|
298
327
|
};
|
|
299
328
|
}
|
|
300
329
|
|
|
@@ -363,7 +392,7 @@ var types_exports = {};
|
|
|
363
392
|
//#endregion
|
|
364
393
|
//#region src/components/commons/inputs/Select/index.tsx
|
|
365
394
|
const Select = (props) => {
|
|
366
|
-
const { nav, open, changeOpen, handleOptionClick } = useSelect(props);
|
|
395
|
+
const { nav, open, search, availableOptions, changeOpen, handleOptionClick, handleSearchChange } = useSelect(props);
|
|
367
396
|
const { styles, classes } = useThemedStyles(props, createSelectStyles, {
|
|
368
397
|
pick: (p) => [
|
|
369
398
|
p.disabled,
|
|
@@ -437,12 +466,12 @@ const Select = (props) => {
|
|
|
437
466
|
});
|
|
438
467
|
}
|
|
439
468
|
function renderOptions() {
|
|
440
|
-
if (
|
|
469
|
+
if (availableOptions.length === 0) return /* @__PURE__ */ jsx(Typography, {
|
|
441
470
|
variant: "b2",
|
|
442
471
|
textAlign: "center",
|
|
443
472
|
children: "No options"
|
|
444
473
|
});
|
|
445
|
-
return
|
|
474
|
+
return availableOptions.map((option, idx) => /* @__PURE__ */ jsx(OptionItem, {
|
|
446
475
|
option,
|
|
447
476
|
onClick: handleOptionClick,
|
|
448
477
|
isSelected: props.value.includes(option.value),
|
|
@@ -475,11 +504,19 @@ const Select = (props) => {
|
|
|
475
504
|
fillFlex: true,
|
|
476
505
|
direction: ScrollDirection.Vertical,
|
|
477
506
|
verticalPagination: props.pagination,
|
|
478
|
-
children: /* @__PURE__ */
|
|
507
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
479
508
|
style: styles.panel,
|
|
480
509
|
role: "listbox",
|
|
481
510
|
...nav.getListProps(),
|
|
482
|
-
children:
|
|
511
|
+
children: [props.withSearch ? /* @__PURE__ */ jsx(Input, {
|
|
512
|
+
hideLabel: true,
|
|
513
|
+
autoFocus: true,
|
|
514
|
+
mb: "0.5rem",
|
|
515
|
+
value: search,
|
|
516
|
+
label: "Search",
|
|
517
|
+
placeholder: props.searchPlaceholder ?? "Pesquisar...",
|
|
518
|
+
onChange: handleSearchChange
|
|
519
|
+
}) : null, renderOptions()]
|
|
483
520
|
})
|
|
484
521
|
})
|
|
485
522
|
}),
|
|
@@ -490,4 +527,4 @@ const Select = (props) => {
|
|
|
490
527
|
|
|
491
528
|
//#endregion
|
|
492
529
|
export { types_exports as n, Select as t };
|
|
493
|
-
//# sourceMappingURL=Select-
|
|
530
|
+
//# sourceMappingURL=Select-ChVwX-7Z.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select-ChVwX-7Z.js","names":["value","Select: React.FC<SelectProps>","result: React.ReactNode[] | string"],"sources":["../src/utils/functions/normalizeString.ts","../src/components/commons/inputs/Select/components/OptionItem/styles.ts","../src/components/commons/inputs/Select/components/OptionItem/index.tsx","../src/hooks/useCompositeListNavigation/index.ts","../src/components/commons/inputs/Select/hooks/useSelect/index.ts","../src/components/commons/inputs/Select/styles.ts","../src/components/commons/inputs/Select/types.ts","../src/components/commons/inputs/Select/index.tsx"],"sourcesContent":["export function normalizeString(value: string) {\n if (!value || typeof value !== 'string') return ''\n\n return value\n .normalize('NFD')\n .replace(/[\\u0300-\\u036f]/g, '')\n .toUpperCase()\n .trim()\n}\n","import type { OptionItemProps } from './types'\nimport { styled } from '@hooks/useThemedStyles/types'\n\nexport function createOptionsStyles(\n props: OptionItemProps & { ['data-active']?: string }\n) {\n const { isSelected } = props\n const isActive = props['data-active'] === 'true'\n const highlighted = isSelected || isActive\n\n return styled({\n container: {\n width: '100%',\n\n display: 'flex',\n alignItems: 'center',\n textAlign: 'left',\n\n borderRadius: '0.25rem',\n padding: '0.5rem 0.75rem',\n\n cursor: 'pointer',\n transition: 'background-color 0.2s ease-out',\n\n backgroundColor: highlighted\n ? 'var(--px-background-card-hover)'\n : 'transparent',\n\n __rules: {\n '&:hover': {\n backgroundColor: 'var(--px-background-card-hover) !important'\n },\n\n '&:focus': {\n outlineOffset: '-2px',\n outline: '2px solid var(--px-color-primary)'\n }\n }\n },\n\n text: {\n flex: 1,\n\n fontSize: '1rem',\n fontWeight: 500,\n lineHeight: '1.5rem',\n fontFamily: 'inherit',\n color: 'var(--px-text-primary)',\n\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis'\n },\n\n optionContent: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n columnGap: '0.25rem'\n }\n })\n}\n","/** biome-ignore-all lint/a11y/useSemanticElements: It's a custom select component */\nimport type React from 'react'\nimport { forwardRef } from 'react'\n\n// Hooks\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Types\nimport type { OptionItemProps } from './types'\n\n// Styles\nimport { createOptionsStyles } from './styles'\n\ntype NativeButtonProps = Omit<\n React.ComponentPropsWithoutRef<'button'>,\n 'onClick'\n>\n\nexport const OptionItem = forwardRef<\n HTMLButtonElement,\n OptionItemProps & NativeButtonProps\n>((props, ref) => {\n const { styles, classes } = useThemedStyles(props, createOptionsStyles)\n\n const { option, isSelected, onClick, ...rest } = props\n\n return (\n <button\n {...rest}\n ref={ref}\n type=\"button\"\n role=\"option\"\n style={styles.container}\n className={classes.container}\n aria-label={option.label}\n aria-selected={isSelected}\n onClick={() => onClick(option.value)}\n >\n <div style={styles.optionContent}>\n {option.startIcon}\n <span style={styles.text}> {option.label}</span>\n </div>\n </button>\n )\n})\n\nOptionItem.displayName = 'OptionItem'\n","// External Libraries\nimport { useCallback, useEffect, useRef, useState } from 'react'\n\nexport type CompositeItemMeta = {\n disabled?: boolean\n hasChildren?: boolean\n onActivate?: () => void\n onOpenChildren?: () => void\n onCloseChildren?: () => void\n}\n\ntype Params = {\n open: boolean\n itemCount: number\n autoFocusFirstOption?: boolean\n initialIndex?: number\n onCloseByTab?: () => void\n setOpen: (v: boolean) => void\n makeMeta: (index: number) => CompositeItemMeta\n}\n\nfunction findNextEnabled(\n start: number,\n dir: 1 | -1,\n count: number,\n isDisabled: (i: number) => boolean\n) {\n if (count <= 0) return 0\n let i = start\n for (let step = 0; step < count; step++) {\n i = (i + dir + count) % count\n if (!isDisabled(i)) return i\n }\n return start\n}\n\nfunction findFirstEnabled(count: number, isDisabled: (i: number) => boolean) {\n for (let i = 0; i < count; i++) if (!isDisabled(i)) return i\n return 0\n}\n\nexport function useCompositeListNavigation({\n open,\n itemCount,\n autoFocusFirstOption = true,\n initialIndex,\n setOpen,\n makeMeta,\n onCloseByTab\n}: Params) {\n const listRef = useRef<HTMLElement | null>(null)\n const itemRefs = useRef<Array<HTMLButtonElement | null>>([])\n\n const isDisabled = useCallback(\n (i: number) => !!makeMeta(i).disabled,\n [makeMeta]\n )\n\n const [activeIndex, setActiveIndex] = useState(0)\n\n const focusItem = useCallback((i: number) => {\n const el = itemRefs.current[i]\n if (!el) return\n el.focus({ preventScroll: true })\n el.scrollIntoView({ block: 'nearest' })\n }, [])\n\n const openAndFocus = useCallback(\n (index?: number) => {\n setOpen(true)\n\n if (!autoFocusFirstOption) return\n\n const next =\n typeof index === 'number'\n ? index\n : typeof initialIndex === 'number'\n ? initialIndex\n : findFirstEnabled(itemCount, isDisabled)\n\n setActiveIndex(next)\n requestAnimationFrame(() => focusItem(next))\n },\n [\n autoFocusFirstOption,\n focusItem,\n initialIndex,\n isDisabled,\n itemCount,\n setOpen\n ]\n )\n\n useEffect(() => {\n if (!open || !autoFocusFirstOption) return\n requestAnimationFrame(() => focusItem(activeIndex))\n }, [open, activeIndex, autoFocusFirstOption, focusItem])\n\n const move = useCallback(\n (dir: 1 | -1) => {\n const next = findNextEnabled(activeIndex, dir, itemCount, isDisabled)\n setActiveIndex(next)\n requestAnimationFrame(() => focusItem(next))\n },\n [activeIndex, itemCount, isDisabled, focusItem]\n )\n\n const activate = useCallback(() => {\n const meta = makeMeta(activeIndex)\n if (meta.disabled) return\n meta.onActivate?.()\n }, [activeIndex, makeMeta])\n\n const onListKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (!open) return\n\n switch (e.key) {\n case 'ArrowDown':\n e.preventDefault()\n move(+1)\n return\n\n case 'ArrowUp':\n e.preventDefault()\n move(-1)\n return\n\n case 'Escape':\n e.preventDefault()\n setOpen(false)\n onCloseByTab?.()\n return\n\n case 'Home': {\n e.preventDefault()\n const first = findFirstEnabled(itemCount, isDisabled)\n setActiveIndex(first)\n requestAnimationFrame(() => focusItem(first))\n return\n }\n\n case 'End': {\n e.preventDefault()\n let last = itemCount - 1\n for (let i = itemCount - 1; i >= 0; i--) {\n if (!isDisabled(i)) {\n last = i\n break\n }\n }\n setActiveIndex(last)\n requestAnimationFrame(() => focusItem(last))\n return\n }\n\n case 'Enter': {\n e.preventDefault()\n activate()\n return\n }\n\n case 'ArrowRight': {\n e.preventDefault()\n const meta = makeMeta(activeIndex)\n if (meta.hasChildren) meta.onOpenChildren?.()\n return\n }\n\n case 'ArrowLeft': {\n e.preventDefault()\n const meta = makeMeta(activeIndex)\n meta.onCloseChildren?.()\n return\n }\n }\n },\n [\n open,\n itemCount,\n activeIndex,\n move,\n activate,\n makeMeta,\n focusItem,\n isDisabled,\n onCloseByTab,\n setOpen\n ]\n )\n\n const getTriggerProps = useCallback(() => {\n return {\n onKeyDown: (e: React.KeyboardEvent) => {\n if (e.key === 'Enter' || e.key === ' ' || e.key === 'ArrowDown') {\n e.preventDefault()\n if (!open) openAndFocus()\n return\n }\n\n if (e.key === 'ArrowUp') {\n e.preventDefault()\n if (!open) openAndFocus(itemCount > 0 ? itemCount - 1 : 0)\n }\n }\n }\n }, [open, openAndFocus, itemCount])\n\n const getListProps = useCallback(() => {\n return {\n ref: (el: HTMLElement | null) => {\n listRef.current = el\n },\n onKeyDown: onListKeyDown\n }\n }, [onListKeyDown])\n\n const getItemProps = useCallback(\n (index: number) => {\n const isActive = index === activeIndex\n return {\n ref: (el: HTMLButtonElement | null) => {\n itemRefs.current[index] = el\n },\n tabIndex: isActive ? 0 : -1,\n 'data-active': isActive ? 'true' : 'false'\n } as const\n },\n [activeIndex]\n )\n\n return {\n activeIndex,\n getListProps,\n getItemProps,\n openAndFocus,\n setActiveIndex,\n getTriggerProps\n }\n}\n","// External Libraries\nimport { useEffect, useRef, useState } from 'react'\n\n// Hooks\nimport { useCompositeListNavigation } from '@hooks/useCompositeListNavigation'\n\n// Utils\nimport { normalizeString } from '@utils/functions'\n\n// Types\nimport type { SelectOption, SelectProps } from '../../types'\n\nexport function useSelect({\n value,\n options,\n multiple,\n disabled,\n canClear,\n withSearch,\n onChange,\n onSearchChange\n}: SelectProps) {\n // Refs\n const timeoutRef = useRef<NodeJS.Timeout>(null)\n\n // States\n const [open, setOpen] = useState(false)\n const [search, setSearch] = useState('')\n const [availableOptions, setAvailableOptions] = useState<SelectOption[]>([])\n\n // Hooks\n const nav = useCompositeListNavigation({\n open,\n itemCount: availableOptions.length,\n autoFocusFirstOption: !withSearch,\n makeMeta: makeMeta,\n setOpen: changeOpen\n })\n\n useEffect(() => {\n setAvailableOptions(options ?? [])\n }, [options])\n\n // Functions\n function handleOptionClick(option: string) {\n const isAlreadySelected = value.includes(option)\n\n if (!multiple) {\n if (isAlreadySelected) {\n if (canClear) onChange([])\n } else onChange([option])\n\n setOpen(false)\n return\n }\n\n if (isAlreadySelected) {\n if (value.length === 1) {\n if (canClear) onChange([])\n } else onChange(value.filter(v => v !== option))\n } else onChange([...value, option])\n }\n\n function makeMeta(index: number) {\n const opt = availableOptions[index]\n\n return {\n onActivate: () => {\n if (opt) handleOptionClick(opt.value)\n }\n }\n }\n\n function changeOpen(value: boolean) {\n setOpen(value)\n setSearch('')\n setAvailableOptions(options)\n }\n\n function togglePanel() {\n if (disabled) return\n if (!open) nav.openAndFocus()\n }\n\n function closePanel() {\n setOpen(false)\n }\n\n function handleSearchChange(value: string) {\n setSearch(value)\n if (onSearchChange) return onSearchChange(value)\n\n if (timeoutRef.current) clearTimeout(timeoutRef.current)\n\n if (!search) return setAvailableOptions(options)\n\n timeoutRef.current = setTimeout(() => {\n const normalizedSearch = normalizeString(value)\n const filteredOptions = options.filter(opt =>\n normalizeString(opt.label).includes(normalizedSearch)\n )\n\n setAvailableOptions(filteredOptions)\n }, 500)\n }\n\n return {\n nav,\n open,\n search,\n availableOptions,\n makeMeta,\n changeOpen,\n togglePanel,\n closePanel,\n handleOptionClick,\n handleSearchChange\n }\n}\n","import { styled } from '@hooks/useThemedStyles/types'\nimport type { SelectProps } from './types'\n\nexport function createSelectStyles(props: SelectProps) {\n return styled({\n container: {\n width: '100%',\n\n display: 'flex',\n flexDirection: 'column',\n position: 'relative',\n\n rowGap: '0.375rem'\n },\n\n content: {\n width: '100%',\n height: '2.75rem',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n\n borderWidth: 1,\n columnGap: '0.25rem',\n borderRadius: '0.5rem',\n padding: '0.625rem 0.875rem',\n\n opacity: props.disabled || props.isLoading ? 0.5 : 1,\n cursor: props.isLoading\n ? 'progress'\n : props.disabled\n ? 'not-allowed'\n : 'pointer',\n boxShadow: 'var(--px-shadow-default)',\n borderColor: props.errorMessage\n ? 'var(--px-color-error)'\n : 'var(--px-border-primary)',\n\n __rules: {\n '&:focus-within': {\n outlineOffset: '-1px !important',\n outline: `2px solid var(${props.errorMessage ? '--px-color-error' : '--px-color-primary'}) !important`\n }\n }\n },\n\n text: {\n flex: 1,\n\n textAlign: 'left',\n\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n\n fontSize: '1rem',\n lineHeight: '1.5rem',\n fontFamily: 'inherit',\n fontWeight: props.value.length ? 500 : 400,\n color: props.value.length\n ? 'var(--px-text-primary)'\n : 'var(--px-text-secondary)'\n },\n\n panel: { width: '100%' },\n\n contentValueImage: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n columnGap: '0.25rem'\n },\n\n iconContainer: {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n maxWidth: '1rem'\n }\n })\n}\n","import type {\n TextProps,\n LayoutProps,\n MarginProps,\n TypeStyles\n} from '@hooks/useThemedStyles/types'\nimport type { createSelectStyles } from './styles'\nimport type { FloatingOptions } from '@hooks/useFloating/types'\nimport type { PopoverProps } from '@components/commons/toolkit/Popover/types'\nimport type { Pagination } from '@components/commons/toolkit/ScrollPaginationContainer/types'\n\nexport interface SelectProps extends LayoutProps, MarginProps {\n label: string\n value: string[]\n placeholder?: string\n options: SelectOption[]\n isLoading?: boolean\n\n portalId?: PopoverProps['portalId']\n strategy?: FloatingOptions['strategy']\n placement?: FloatingOptions['placement']\n scrollContainerId?: FloatingOptions['scrollContainerId']\n absoluteReference?: FloatingOptions['absoluteReference']\n\n canClear?: boolean\n multiple?: boolean\n required?: boolean\n disabled?: boolean\n hideLabel?: boolean\n withSearch?: boolean\n autoFocusFirstOption?: boolean\n errorMessage?: string\n maxVisibleItems?: number\n maxHeightPopover?: string\n searchPlaceholder?: string\n\n pagination?: Pagination\n\n startIcon?: React.ReactNode\n styles?: TypeStyles<typeof createSelectStyles>\n\n requiredColor?: string\n labelConfig?: TextProps\n\n onChange: (value: string[]) => void\n onSearchChange?: (value: string) => void\n}\n\nexport interface SelectOption {\n label: string\n value: string\n startIcon?: React.ReactNode\n}\n","/** biome-ignore-all lint/a11y/useSemanticElements: It's a custom select component */\n// External Libraries\nimport type React from 'react'\nimport { useMemo } from 'react'\n\n// Components\nimport { Input } from '../Input'\nimport { OptionItem } from './components/OptionItem'\nimport { Icon } from '@components/commons/toolkit/Icon'\nimport { Label } from '@components/commons/toolkit/Label'\nimport { ErrorMessage } from '../../toolkit/ErrorMessage'\nimport { Loader } from '@components/commons/toolkit/Loader'\nimport { Typography } from '@components/commons/toolkit/Typography'\nimport { BasePopover } from '@components/commons/structure/BasePopover'\nimport { ScrollPaginationContainer } from '@components/commons/toolkit/ScrollPaginationContainer'\n\n// Hooks\nimport { useSelect } from './hooks/useSelect'\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Types\nimport type { SelectProps } from './types'\nimport type { PopoverTriggerRenderProps } from '@components/commons/toolkit/Popover/types'\nimport { ScrollDirection } from '@components/commons/toolkit/ScrollPaginationContainer/types'\n\n// Styles\nimport { createSelectStyles } from './styles'\n\nexport * as SelectTypes from './types'\n\nexport const Select: React.FC<SelectProps> = props => {\n const {\n nav,\n open,\n search,\n availableOptions,\n changeOpen,\n handleOptionClick,\n handleSearchChange\n } = useSelect(props)\n const { styles, classes } = useThemedStyles(props, createSelectStyles, {\n pick: p => [p.disabled, p.errorMessage, p.value, p.isLoading],\n override: props.styles,\n applyCommonProps: true,\n commonSlot: 'container'\n })\n\n const maxVisible = props.maxVisibleItems ?? Infinity\n const optionsMap = useMemo(\n () =>\n new Map(\n props.options.map(option => [\n option.value,\n { label: option.label, startIcon: option.startIcon }\n ])\n ),\n [props.options]\n )\n\n // Functions\n function renderContent() {\n if (!props.value?.length) return props.placeholder\n\n const resolvedValues = props.value.map(\n val => optionsMap.get(val) ?? { label: val, startIcon: null }\n )\n const visibleItems = resolvedValues.slice(0, maxVisible)\n const hiddenCount = resolvedValues.length - visibleItems.length\n\n let result: React.ReactNode[] | string = []\n\n if (props.multiple) {\n result = visibleItems.map(i => i.label).join(', ')\n } else {\n result = visibleItems.map(i => (\n <span key={i.label} style={styles.contentValueImage}>\n {i.startIcon ? i.startIcon : null}\n <span style={styles.text}>{i.label}</span>\n </span>\n ))\n }\n\n if (typeof result === 'object' && hiddenCount > 0)\n result.push(<span key=\"hidden-count\">{hiddenCount}</span>)\n\n if (typeof result === 'string' && hiddenCount > 0)\n result = `${result} ${hiddenCount}`\n\n return result\n }\n\n function renderTrigger({\n ref,\n ariaExpanded,\n onClick\n }: PopoverTriggerRenderProps) {\n const triggerKeyProps = nav.getTriggerProps()\n\n return (\n <button\n ref={ref as React.RefObject<HTMLButtonElement>}\n dir=\"ltr\"\n type=\"button\"\n role=\"combobox\"\n style={styles.content}\n aria-autocomplete=\"none\"\n aria-label={props.label}\n className={classes.content}\n aria-expanded={ariaExpanded}\n disabled={props.disabled || props.isLoading}\n {...triggerKeyProps}\n onClick={onClick}\n >\n {props.value.length ? props.startIcon : null}\n\n <span id=\"text-content\" style={styles.text}>\n {renderContent()}\n </span>\n\n {props.isLoading ? (\n <Loader size=\"1rem\" color=\"var(--px-color-primary)\" />\n ) : (\n <div style={styles.iconContainer}>\n <Icon size=\"sm\" name=\"chevrons-down\" />\n </div>\n )}\n </button>\n )\n }\n\n function renderOptions() {\n if (availableOptions.length === 0) {\n return (\n <Typography variant=\"b2\" textAlign=\"center\">\n No options\n </Typography>\n )\n }\n\n return availableOptions.map((option, idx) => (\n <OptionItem\n key={option.value}\n option={option}\n onClick={handleOptionClick}\n isSelected={props.value.includes(option.value)}\n {...nav.getItemProps(idx)}\n />\n ))\n }\n\n return (\n <div style={styles.container}>\n {props.hideLabel ? null : (\n <Label\n label={props.label}\n required={props.required}\n requiredColor={props.requiredColor}\n {...props.labelConfig}\n />\n )}\n\n <BasePopover\n open={open}\n portalId={props.portalId}\n absoluteReference={props.absoluteReference}\n maxHeight={props.maxHeightPopover}\n floatingOptions={{\n viewportMargin: 0,\n strategy: props.strategy,\n placement: props.placement,\n scrollContainerId: props.scrollContainerId\n }}\n trigger={renderTrigger}\n onOpenChange={changeOpen}\n >\n <ScrollPaginationContainer\n fillFlex\n direction={ScrollDirection.Vertical}\n verticalPagination={props.pagination}\n >\n <div style={styles.panel} role=\"listbox\" {...nav.getListProps()}>\n {props.withSearch ? (\n <Input\n hideLabel\n autoFocus\n mb=\"0.5rem\"\n value={search}\n label=\"Search\"\n placeholder={props.searchPlaceholder ?? 'Pesquisar...'}\n onChange={handleSearchChange}\n />\n ) : null}\n\n {renderOptions()}\n </div>\n </ScrollPaginationContainer>\n </BasePopover>\n\n {props.errorMessage ? (\n <ErrorMessage message={props.errorMessage} />\n ) : null}\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;AAAA,SAAgB,gBAAgB,OAAe;AAC7C,KAAI,CAAC,SAAS,OAAO,UAAU,SAAU,QAAO;AAEhD,QAAO,MACJ,UAAU,MAAM,CAChB,QAAQ,oBAAoB,GAAG,CAC/B,aAAa,CACb,MAAM;;;;;ACJX,SAAgB,oBACd,OACA;CACA,MAAM,EAAE,eAAe;CACvB,MAAM,WAAW,MAAM,mBAAmB;AAG1C,QAAO,OAAO;EACZ,WAAW;GACT,OAAO;GAEP,SAAS;GACT,YAAY;GACZ,WAAW;GAEX,cAAc;GACd,SAAS;GAET,QAAQ;GACR,YAAY;GAEZ,iBAhBgB,cAAc,WAiB1B,oCACA;GAEJ,SAAS;IACP,WAAW,EACT,iBAAiB,8CAClB;IAED,WAAW;KACT,eAAe;KACf,SAAS;KACV;IACF;GACF;EAED,MAAM;GACJ,MAAM;GAEN,UAAU;GAC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,oBAAC,gBAAa,SAAS,MAAM,eAAgB,GAC3C;;GACA"}
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import { n as styled, t as useThemedStyles } from "./useThemedStyles-Dco_54KA.js";
|
|
2
|
-
import { t as Typography } from "./Typography-
|
|
2
|
+
import { t as Typography } from "./Typography-u0BPHgCr.js";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/components/commons/toolkit/Switch/styles.ts
|
|
6
|
-
function createSwitchThumbStyles({ checked, colorActive, colorInactive, colorIndicator }) {
|
|
6
|
+
function createSwitchThumbStyles({ checked, fitContent, colorActive, colorInactive, colorIndicator }) {
|
|
7
7
|
return styled({
|
|
8
|
+
wrapper: {
|
|
9
|
+
width: fitContent ? "fit-content" : "100%",
|
|
10
|
+
display: "flex",
|
|
11
|
+
alignItems: "center",
|
|
12
|
+
justifyContent: "space-between",
|
|
13
|
+
columnGap: "0.5rem"
|
|
14
|
+
},
|
|
8
15
|
container: {
|
|
9
16
|
width: "2.5rem",
|
|
10
17
|
height: "1.5rem",
|
|
@@ -46,7 +53,7 @@ const Switch = (props) => {
|
|
|
46
53
|
onChange?.(!checked);
|
|
47
54
|
}
|
|
48
55
|
return /* @__PURE__ */ jsxs("div", {
|
|
49
|
-
|
|
56
|
+
style: styles.wrapper,
|
|
50
57
|
children: [label ? /* @__PURE__ */ jsx(Typography, {
|
|
51
58
|
variant: "b2",
|
|
52
59
|
color: "var(px-text-primary)",
|
|
@@ -61,4 +68,4 @@ const Switch = (props) => {
|
|
|
61
68
|
|
|
62
69
|
//#endregion
|
|
63
70
|
export { Switch as t };
|
|
64
|
-
//# sourceMappingURL=Switch-
|
|
71
|
+
//# sourceMappingURL=Switch-DlZXMyGG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Switch-DlZXMyGG.js","names":["Switch: React.FC<SwitchThumbProps>"],"sources":["../src/components/commons/toolkit/Switch/styles.ts","../src/components/commons/toolkit/Switch/index.tsx"],"sourcesContent":["// Types\nimport type { SwitchThumbProps } from './types'\n\n// Styles\nimport { styled } from '@hooks/useThemedStyles/types'\n\nexport function createSwitchThumbStyles({\n checked,\n fitContent,\n colorActive,\n colorInactive,\n colorIndicator\n}: SwitchThumbProps) {\n return styled({\n wrapper: {\n width: fitContent ? 'fit-content' : '100%',\n\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n\n columnGap: '0.5rem'\n },\n container: {\n width: '2.5rem',\n height: '1.5rem',\n\n position: 'relative',\n\n display: 'inline-flex',\n alignItems: 'center',\n marginLeft: '0.5rem',\n\n borderRadius: '2rem',\n padding: '0.125rem',\n\n transition: 'background-color 0.5s',\n backgroundColor: checked\n ? (colorActive ?? 'var(--px-color-success)')\n : (colorInactive ?? 'var(--px-color-disabled)')\n },\n\n indicator: {\n height: '1.25rem',\n width: '1.25rem',\n\n position: 'absolute',\n left: '0.125rem',\n top: '0.125rem',\n\n borderRadius: '9999px',\n backgroundColor: colorIndicator ?? 'var(--px-surface)',\n\n transition: 'transform 0.5s',\n transform: checked ? 'translateX(1rem)' : 'translateX(0)',\n willChange: 'transform'\n }\n })\n}\n","// External Libraries\n/** biome-ignore-all lint/a11y/noStaticElementInteractions: Not Needed */\n/** biome-ignore-all lint/a11y/useKeyWithClickEvents: Not Needed */\nimport type React from 'react'\nimport type { MouseEvent } from 'react'\n\n// Components\nimport { Typography } from '../Typography'\n\n// Hooks\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Types\nimport type { SwitchThumbProps } from './types'\n\n// Styles\nimport { createSwitchThumbStyles } from './styles'\n\nexport const Switch: React.FC<SwitchThumbProps> = props => {\n const { label, checked, onChange } = props\n\n // Hooks\n const { styles } = useThemedStyles(props, createSwitchThumbStyles, {\n applyCommonProps: true,\n pick: p => [p.checked]\n })\n\n // Functions\n function handleChange(e: MouseEvent<HTMLSpanElement>) {\n e.stopPropagation()\n e.preventDefault()\n\n onChange?.(!checked)\n }\n\n return (\n <div style={styles.wrapper}>\n {label ? (\n <Typography variant=\"b2\" color=\"var(px-text-primary)\">\n {label}\n </Typography>\n ) : null}\n\n <span style={styles.container} onClick={handleChange}>\n <span style={styles.indicator} />\n </span>\n </div>\n )\n}\n"],"mappings":";;;;;AAMA,SAAgB,wBAAwB,EACtC,SACA,YACA,aACA,eACA,kBACmB;AACnB,QAAO,OAAO;EACZ,SAAS;GACP,OAAO,aAAa,gBAAgB;GAEpC,SAAS;GACT,YAAY;GACZ,gBAAgB;GAEhB,WAAW;GACZ;EACD,WAAW;GACT,OAAO;GACP,QAAQ;GAER,UAAU;GAEV,SAAS;GACT,YAAY;GACZ,YAAY;GAEZ,cAAc;GACd,SAAS;GAET,YAAY;GACZ,iBAAiB,UACZ,eAAe,4BACf,iBAAiB;GACvB;EAED,WAAW;GACT,QAAQ;GACR,OAAO;GAEP,UAAU;GACV,MAAM;GACN,KAAK;GAEL,cAAc;GACd,iBAAiB,kBAAkB;GAEnC,YAAY;GACZ,WAAW,UAAU,qBAAqB;GAC1C,YAAY;GACb;EACF,CAAC;;;;;ACvCJ,MAAaA,UAAqC,UAAS;CACzD,MAAM,EAAE,OAAO,SAAS,aAAa;CAGrC,MAAM,EAAE,WAAW,gBAAgB,OAAO,yBAAyB;EACjE,kBAAkB;EAClB,OAAM,MAAK,CAAC,EAAE,QAAQ;EACvB,CAAC;CAGF,SAAS,aAAa,GAAgC;AACpD,IAAE,iBAAiB;AACnB,IAAE,gBAAgB;AAElB,aAAW,CAAC,QAAQ;;AAGtB,QACE,qBAAC;EAAI,OAAO,OAAO;aAChB,QACC,oBAAC;GAAW,SAAQ;GAAK,OAAM;aAC5B;IACU,GACX,MAEJ,oBAAC;GAAK,OAAO,OAAO;GAAW,SAAS;aACtC,oBAAC,UAAK,OAAO,OAAO,YAAa;IAC5B;GACH"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as styled, t as useThemedStyles } from "./useThemedStyles-Dco_54KA.js";
|
|
2
|
-
import { t as Typography } from "./Typography-
|
|
2
|
+
import { t as Typography } from "./Typography-u0BPHgCr.js";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { motion } from "framer-motion";
|
|
5
5
|
|
|
@@ -127,4 +127,4 @@ const TabSwitch = (props) => {
|
|
|
127
127
|
|
|
128
128
|
//#endregion
|
|
129
129
|
export { types_exports as n, TabSwitch as t };
|
|
130
|
-
//# sourceMappingURL=TabSwitch-
|
|
130
|
+
//# sourceMappingURL=TabSwitch-Co6kaDbi.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabSwitch-
|
|
1
|
+
{"version":3,"file":"TabSwitch-Co6kaDbi.js","names":[],"sources":["../src/components/commons/toolkit/TabSwitch/components/TabSwitchItem/styles.ts","../src/components/commons/toolkit/TabSwitch/components/TabSwitchItem/index.tsx","../src/components/commons/toolkit/TabSwitch/styles.ts","../src/components/commons/toolkit/TabSwitch/types.ts","../src/components/commons/toolkit/TabSwitch/index.tsx"],"sourcesContent":["// External Libraries\nimport { styled } from '@hooks/useThemedStyles/types'\n\ninterface Params {\n disabled?: boolean\n selected?: boolean\n selectedColor?: string\n variant: 'default' | 'underline'\n}\n\nexport function createTabSwitchItemStyles({\n variant,\n disabled,\n selected,\n selectedColor\n}: Params) {\n const accent = selectedColor ?? 'var(--px-color-primary)'\n\n return styled({\n item: {\n minHeight: '1.25rem',\n position: 'relative',\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n gap: 4,\n background: 'transparent',\n border: 0,\n padding: '8px 10px',\n cursor: disabled ? 'not-allowed' : 'pointer',\n opacity: disabled ? 0.5 : 1,\n userSelect: 'none',\n whiteSpace: 'nowrap',\n __rules: { '& > p': { zIndex: 1 } }\n },\n\n selectedBg:\n variant === 'default'\n ? {\n position: 'absolute',\n inset: 0,\n borderRadius: 6,\n border: '1px solid var(--px-border-primary)',\n background: selected ? accent : 'transparent'\n }\n : {\n position: 'absolute',\n left: 0,\n right: 0,\n bottom: -2,\n height: 2,\n background: selected ? accent : 'transparent'\n }\n })\n}\n","// External Libraries\nimport { motion } from 'framer-motion'\n\n// Components\nimport { Typography } from '@components/commons/toolkit/Typography'\n\n// Hooks\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Types\nimport type { SwitchOption } from '../../types'\n\n// Styles\nimport { createTabSwitchItemStyles } from './styles'\n\ntype Props<T> = {\n option: SwitchOption<T>\n selected: boolean\n layoutId?: string\n disabled?: boolean\n selectedColor?: string\n selectedLabelColor?: string\n variant: 'default' | 'underline'\n onClick: (value: T) => void\n}\n\nexport const SwitchItem = <T,>(props: Props<T>) => {\n const { option, disabled, selected, layoutId, onClick } = props\n\n const { styles, classes } = useThemedStyles(\n props,\n createTabSwitchItemStyles,\n {\n pick: p => [p.variant, p.selectedColor, p.selectedLabelColor, p.selected]\n }\n )\n\n const isDisabled = disabled || option.disabled\n\n return (\n <button\n type=\"button\"\n style={styles.item}\n className={classes.item}\n tabIndex={isDisabled ? -1 : 0}\n onClick={() => !isDisabled && onClick(option.value)}\n >\n {selected ? (\n <motion.div\n layoutId={layoutId || 'pixel-tabswitch-selected'}\n style={styles.selectedBg}\n />\n ) : null}\n\n {option.icon ? (\n <span style={{ display: 'inline-flex' }}>{option.icon}</span>\n ) : null}\n\n {option.label ? (\n <Typography variant=\"b1\" fontWeight=\"bold\">\n {option.label}\n </Typography>\n ) : null}\n </button>\n )\n}\n","// Types\nimport type { TabSwitchProps } from './types'\nimport { styled } from '@hooks/useThemedStyles/types'\n\nexport function createTabSwitchStyles<T>(props: TabSwitchProps<T>) {\n const { fitContent, backgroundColor, variant } = props\n\n return styled({\n container: {\n display: 'flex',\n padding: '3px',\n flexDirection: 'row',\n alignItems: 'center',\n borderRadius: '0.5rem',\n color: 'var(--px-text-primary, #4b5563)',\n width: fitContent ? 'fit-content' : '100%',\n backgroundColor: backgroundColor ?? 'transparent',\n borderBottom:\n variant === 'underline'\n ? '1px solid var(--px-border-primary, #e5e7eb)'\n : 'unset',\n gap: 0,\n __rules: { '& svg': { zIndex: 1 } }\n }\n })\n}\n","// Types\nimport type { CommonStyleProps, TypeStyles } from '@hooks/useThemedStyles/types'\nimport type { ReactNode } from 'react'\nimport type { createTabSwitchStyles } from './styles'\n\nexport interface SwitchOption<T> {\n value: T\n label?: string\n disabled?: boolean\n\n icon?: ReactNode\n}\n\nexport interface TabSwitchProps<T> extends CommonStyleProps {\n currentValue: T\n options: SwitchOption<T>[]\n\n disabled?: boolean\n fitContent?: boolean\n\n layoutId?: string\n\n selectedColor?: string\n backgroundColor?: string\n selectedLabelColor?: string\n\n variant?: 'default' | 'underline'\n\n styles?: TypeStyles<typeof createTabSwitchStyles>\n\n onChange: (value: T) => void\n}\n","// Hooks\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Components\nimport { SwitchItem } from './components/TabSwitchItem'\n\n// Types\nimport type { TabSwitchProps } from './types'\n\n// Styles\nimport { createTabSwitchStyles } from './styles'\n\nexport * as TabSwitchTypes from './types'\n\nexport const TabSwitch = <T,>(props: TabSwitchProps<T>) => {\n {\n const {\n options,\n disabled,\n layoutId,\n currentValue,\n variant = 'default',\n onChange\n } = props\n\n const { styles, classes } = useThemedStyles(props, createTabSwitchStyles, {\n pick: p => [p.disabled, p.currentValue],\n override: props.styles,\n applyCommonProps: true\n })\n\n return (\n <div style={styles.container} className={classes.container}>\n {options.map(opt => (\n <SwitchItem\n key={String(opt.value)}\n option={opt}\n variant={variant}\n layoutId={layoutId}\n disabled={disabled}\n selectedColor={props.selectedColor}\n selected={currentValue === opt.value}\n selectedLabelColor={props.selectedLabelColor}\n onClick={onChange}\n />\n ))}\n </div>\n )\n }\n}\n"],"mappings":";;;;;;AAUA,SAAgB,0BAA0B,EACxC,SACA,UACA,UACA,iBACS;CACT,MAAM,SAAS,iBAAiB;AAEhC,QAAO,OAAO;EACZ,MAAM;GACJ,WAAW;GACX,UAAU;GACV,SAAS;GACT,YAAY;GACZ,gBAAgB;G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AAK;EACL,SAAS,EAAE,SAAS,EAAE,QAAQ,GAAG,EAAE;EACpC,EACF,CAAC;;;;;;;;;AEVJ,MAAa,aAAiB,UAA6B;CACzD;EACE,MAAM,EACJ,SACA,UACA,UACA,cACA,UAAU,WACV,aACE;EAEJ,MAAM,EAAE,QAAQ,YAAY,gBAAgB,OAAO,uBAAuB;GACxE,OAAM,MAAK,CAAC,EAAE,UAAU,EAAE,aAAa;GACvC,UAAU,MAAM;GAChB,kBAAkB;GACnB,CAAC;AAEF,SACE,oBAAC;GAAI,OAAO,OAAO;GAAW,WAAW,QAAQ;aAC9C,QAAQ,KAAI,QACX,oBAAC;IAEC,QAAQ;IACC;IACC;IACA;IACV,eAAe,MAAM;IACrB,UAAU,iBAAiB,IAAI;IAC/B,oBAAoB,MAAM;IAC1B,SAAS;MARJ,OAAO,IAAI,MAAM,CAStB,CACF;IACE"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as styled, t as useThemedStyles } from "./useThemedStyles-Dco_54KA.js";
|
|
2
|
-
import { t as Typography } from "./Typography-
|
|
3
|
-
import { t as Label } from "./Label-
|
|
4
|
-
import { t as ErrorMessage } from "./ErrorMessage-
|
|
2
|
+
import { t as Typography } from "./Typography-u0BPHgCr.js";
|
|
3
|
+
import { t as Label } from "./Label-VE3hoSbt.js";
|
|
4
|
+
import { t as ErrorMessage } from "./ErrorMessage-6pG4hFId.js";
|
|
5
5
|
import { useId, useRef, useState } from "react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
|
|
@@ -116,4 +116,4 @@ const TextArea = (props) => {
|
|
|
116
116
|
|
|
117
117
|
//#endregion
|
|
118
118
|
export { TextArea as t };
|
|
119
|
-
//# sourceMappingURL=TextArea-
|
|
119
|
+
//# sourceMappingURL=TextArea-s6HdNSc5.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea-
|
|
1
|
+
{"version":3,"file":"TextArea-s6HdNSc5.js","names":["value"],"sources":["../src/components/commons/inputs/TextArea/styles.ts","../src/components/commons/inputs/TextArea/index.tsx"],"sourcesContent":["// Types\nimport { styled } from '@hooks/useThemedStyles/types'\nimport type { TextAreaProps } from './types'\n\nexport function createTextAreaStyles(props: TextAreaProps) {\n const { height = '8rem', readOnly } = props\n\n return styled({\n container: {\n width: '100%',\n\n display: 'flex',\n flexDirection: 'column',\n\n rowGap: '0.375rem'\n },\n iconContainer: {\n position: 'absolute',\n left: '0.75rem',\n top: '1.375rem',\n transform: 'translateY(-50%)'\n },\n textArea: {\n height,\n width: '100%',\n paddingBlock: '0.75rem',\n paddingInline: '0.875rem',\n borderWidth: 1,\n borderRadius: '0.5rem',\n resize: 'none',\n\n fontWeight: '400',\n fontSize: '1rem',\n color: 'var(--px-text-primary)',\n\n borderColor: props.errorMessage\n ? 'var(--px-color-error)'\n : 'var(--px-border-primary)',\n outlineOffset: '-1px',\n\n cursor: readOnly ? 'default' : undefined,\n\n __rules: {\n '&::placeholder': {\n fontWeight: 400,\n color: 'var(--px-text-secondary)'\n },\n\n '&:focus-within': {\n outlineOffset: '-1px',\n outline: `2px solid var(${props.errorMessage ? '--px-color-error' : '--px-color-primary'})`\n }\n }\n }\n })\n}\n","// External Libraries\nimport { useId, useRef, useState } from 'react'\n\n// Types\nimport type { TextAreaProps } from './types'\n\n// Components\nimport { Label } from '@components/commons/toolkit/Label'\nimport { Typography } from '@components/commons/toolkit/Typography'\nimport { ErrorMessage } from '@components/commons/toolkit/ErrorMessage'\n\n// Hooks\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Styles\nimport { createTextAreaStyles } from './styles'\n\nexport const TextArea = (props: TextAreaProps) => {\n const {\n value,\n delay,\n disabled,\n readOnly,\n maxLength,\n hideMaxLength,\n textMaxLength,\n placeholder,\n errorMessage,\n\n label,\n required,\n requiredColor,\n labelConfig,\n onChange\n } = props\n\n // Refs\n const timeoutRef = useRef<NodeJS.Timeout>(null)\n\n // States\n const [inputValue, setInputValue] = useState(value)\n\n // Hooks\n const inputId = useId()\n\n const { styles, classes } = useThemedStyles(props, createTextAreaStyles, {\n pick: p => [p.height, p.readOnly, p.placeholderColor, p.focusedRingColor],\n override: props.styles,\n applyCommonProps: true\n })\n\n // Functions\n function handleChange(e: React.ChangeEvent<HTMLTextAreaElement>) {\n if (disabled || readOnly) return\n\n const value = e.target.value\n\n setInputValue(value)\n\n if (timeoutRef.current) clearTimeout(timeoutRef.current)\n\n if (!delay) onChange?.(value)\n else {\n timeoutRef.current = setTimeout(() => onChange?.(value), delay)\n }\n }\n\n function renderLabel() {\n if (!label) return null\n\n return (\n <div>\n <Label\n label={label}\n htmlFor={inputId}\n required={required}\n requiredColor={requiredColor}\n {...labelConfig}\n />\n </div>\n )\n }\n\n return (\n <div style={styles.container}>\n {renderLabel()}\n\n <textarea\n value={inputValue}\n disabled={disabled}\n readOnly={readOnly}\n maxLength={maxLength}\n placeholder={placeholder}\n style={styles.textArea}\n className={classes.textArea}\n onChange={handleChange}\n />\n\n {maxLength && !hideMaxLength ? (\n <Typography variant=\"b2\" styles={{ text: { marginLeft: 'auto' } }}>\n {value?.length}/{maxLength} {textMaxLength}\n </Typography>\n ) : null}\n\n {errorMessage ? <ErrorMessage message={errorMessage} /> : null}\n </div>\n )\n}\n"],"mappings":";;;;;;;;AAIA,SAAgB,qBAAqB,OAAsB;CACzD,MAAM,EAAE,SAAS,QAAQ,aAAa;AAEtC,QAAO,OAAO;EACZ,WAAW;GACT,OAAO;GAEP,SAAS;GACT,eAAe;GAEf,QAAQ;GACT;EACD,eAAe;GACb,UAAU;GACV,MAAM;GACN,KAAK;GACL,WAAW;GACZ;EACD,UAAU;GACR;GACA,OAAO;GACP,cAAc;GACd,eAAe;GACf,aAAa;GACb,cAAc;GACd,QAAQ;GAER,YAAY;GACZ,UAAU;GACV,OAAO;GAEP,aAAa,MAAM,eACf,0BACA;GACJ,eAAe;GAEf,QAAQ,WAAW,YAAY;GAE/B,SAAS;IACP,kBAAkB;KAChB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ACtD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Typography-
|
|
1
|
+
{"version":3,"file":"Typography-u0BPHgCr.js","names":["typographyVariants: Record<TypographyVariant, SlotStyle>","variantToElement: Record<\n TypographyVariant,\n keyof JSX.IntrinsicElements\n>","alignText: Record<TextAlign, SlotStyle>","Typography: React.FC<TypographyProps>"],"sources":["../src/components/commons/toolkit/Typography/utils.ts","../src/components/commons/toolkit/Typography/config.ts","../src/components/commons/toolkit/Typography/style.ts","../src/components/commons/toolkit/Typography/index.tsx"],"sourcesContent":["export function getPlaceholder(content: React.ReactNode, size: number) {\n const contentSize = typeof content === 'string' ? content.length : 0\n const finalSize = Math.max(contentSize, size)\n\n if (finalSize === 0) return ''\n\n return '*'.repeat(finalSize)\n}\n","// External Libraries\nimport type { JSX } from 'react'\n\n// Types\nimport type { TextAlign, TypographyVariant } from './types'\nimport { type SlotStyle, WEIGHTS } from '@hooks/useThemedStyles/types'\n\nconst primaryColor = 'var(--px-text-primary)'\nconst secondaryColor = 'var(--px-text-secondary)'\n\nexport const typographyVariants: Record<TypographyVariant, SlotStyle> = {\n h1: {\n fontSize: '3rem',\n fontWeight: '700',\n lineHeight: WEIGHTS.bold,\n color: primaryColor\n },\n h2: {\n fontSize: '2.25rem',\n fontWeight: WEIGHTS.bold,\n lineHeight: 'calc(2.5 / 2.25)',\n color: primaryColor\n },\n h3: {\n fontSize: '1.875rem',\n fontWeight: WEIGHTS.bold,\n lineHeight: 'calc(2.25 / 1.875)',\n color: primaryColor\n },\n h4: {\n fontSize: '1.5rem',\n fontWeight: WEIGHTS.bold,\n lineHeight: 'calc(2 / 1.5)',\n color: primaryColor\n },\n h5: {\n fontSize: '1.25rem',\n fontWeight: WEIGHTS.bold,\n lineHeight: 'calc(1.75 / 1.25)',\n color: primaryColor\n },\n b1: {\n fontSize: '1rem',\n fontWeight: WEIGHTS.medium,\n lineHeight: '1.5',\n color: primaryColor\n },\n b2: {\n fontSize: '0.875rem',\n fontWeight: WEIGHTS.medium,\n lineHeight: 'calc(1.25 / 0.875)',\n color: secondaryColor\n },\n b3: {\n fontSize: '0.75rem',\n fontWeight: WEIGHTS.medium,\n lineHeight: 'calc(1 / 0.75)',\n color: secondaryColor\n },\n caption: {\n fontSize: '0.65rem',\n fontWeight: WEIGHTS.regular,\n lineHeight: 'calc(1 / 0.65)',\n color: secondaryColor\n },\n legal: {\n fontSize: '0.65rem',\n lineHeight: 'calc(1 / 0.65)',\n fontWeight: WEIGHTS.light,\n textTransform: 'uppercase',\n letterSpacing: '0.025em',\n color: secondaryColor\n }\n}\n\nexport const variantToElement: Record<\n TypographyVariant,\n keyof JSX.IntrinsicElements\n> = {\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n h5: 'h5',\n b1: 'p',\n b2: 'p',\n b3: 'p',\n caption: 'span',\n legal: 'span'\n}\n\nexport const alignText: Record<TextAlign, SlotStyle> = {\n left: { textAlign: 'left' },\n center: { textAlign: 'center' },\n right: { textAlign: 'right' },\n justify: { textAlign: 'justify' }\n}\n","// Utils\nimport { alignText, typographyVariants } from './config'\n\n// Types\nimport type { TypographyProps } from './types'\nimport { type SlotStyle, styled } from '@hooks/useThemedStyles/types'\n\nexport function createTypographyStyles(props: TypographyProps) {\n const { variant, align = 'left', color, labelLineThrough = false } = props\n\n return styled({\n loading: {\n width: 'fit-content',\n display: 'inline-block',\n borderRadius: '0.25rem',\n\n background: 'var(--px-bg-skeleton)',\n backgroundSize: '400% 400%',\n animation: 'gradient 3s ease infinite',\n color: 'transparent',\n\n __keyframes: {\n gradient: {\n '0%': { backgroundPosition: '0% 50%' },\n '50%': { backgroundPosition: '100% 50%' },\n '100%': { backgroundPosition: '0% 50%' }\n }\n }\n },\n\n text: {\n ...alignText[align],\n ...typographyVariants[variant],\n color: color ?? typographyVariants[variant].color,\n ...(labelLineThrough && {\n textDecoration: 'line-through',\n opacity: 0.6\n })\n } as SlotStyle\n })\n}\n","// External Libraries\nimport type React from 'react'\n\n// Hooks\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Utils\nimport { getPlaceholder } from './utils'\nimport { variantToElement } from './config'\n\n// Types\nimport type { TypographyProps } from './types'\n\n// Styles\nimport { createTypographyStyles } from './style'\n\nexport const Typography: React.FC<TypographyProps> = props => {\n const {\n id,\n as,\n href,\n variant,\n children,\n className,\n isLoading = false,\n placeholderSize = 5,\n styles: styleTypography\n } = props\n\n const { styles } = useThemedStyles(props, createTypographyStyles, {\n pick: p => [p.isLoading, p.variant, p.align, p.color, p.labelLineThrough],\n commonSlot: 'text',\n applyCommonProps: true,\n override: styleTypography\n })\n\n const Component = as ?? variantToElement[variant]\n\n if (isLoading) {\n return (\n <span\n id={id}\n aria-hidden=\"true\"\n role=\"presentation\"\n style={{ ...styles.text, ...styles.loading }}\n >\n {getPlaceholder(children, placeholderSize)}\n </span>\n )\n }\n\n const sharedProps = { id, style: styles.text, className }\n\n if (href) {\n return (\n <a href={href} {...sharedProps}>\n {children}\n </a>\n )\n }\n\n return <Component {...sharedProps}>{children}</Component>\n}\n"],"mappings":";;;;AAAA,SAAgB,eAAe,SAA0B,MAAc;CACrE,MAAM,cAAc,OAAO,YAAY,WAAW,QAAQ,SAAS;CACnE,MAAM,YAAY,KAAK,IAAI,aAAa,KAAK;AAE7C,KAAI,cAAc,EAAG,QAAO;AAE5B,QAAO,IAAI,OAAO,UAAU;;;;;ACC9B,MAAM,eAAe;AACrB,MAAM,iBAAiB;AAEvB,MAAaA,qBAA2D;CACtE,IAAI;EACF,UAAU;EACV,YAAY;EACZ,YAAY,QAAQ;EACpB,OAAO;EACR;CACD,IAAI;EACF,UAAU;EACV,YAAY,QAAQ;EACpB,YAAY;EACZ,OAAO;EACR;CACD,IAAI;EACF,UAAU;EACV,YAAY,QAAQ;EACpB,YAAY;EACZ,OAAO;EACR;CACD,IAAI;EACF,UAAU;EACV,YAAY,QAAQ;EACpB,YAAY;EACZ,OAAO;EACR;CACD,IAAI;EACF,UAAU;EAC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CAC5D,MAAM,EACJ,IACA,IACA,MACA,SACA,UACA,WACA,YAAY,OACZ,kBAAkB,GAClB,QAAQ,oBACN;CAEJ,MAAM,EAAE,WAAW,gBAAgB,OAAO,wBAAwB;EAChE,OAAM,MAAK;GAAC,EAAE;GAAW,EAAE;GAAS,EAAE;GAAO,EAAE;GAAO,EAAE;GAAiB;EACzE,YAAY;EACZ,kBAAkB;EAClB,UAAU;EACX,CAAC;CAEF,MAAM,YAAY,MAAM,iBAAiB;AAEzC,KAAI,UACF,QACE,oBAAC;EACK;EACJ,eAAY;EACZ,MAAK;EACL,OAAO;GAAE,GAAG,OAAO;GAAM,GAAG,OAAO;GAAS;YAE3C,eAAe,UAAU,gBAAgB;GACrC;CAIX,MAAM,cAAc;EAAE;EAAI,OAAO,OAAO;EAAM;EAAW;AAEzD,KAAI,KACF,QACE,oBAAC;EAAQ;EAAM,GAAI;EAChB;GACC;AAIR,QAAO,oBAAC;EAAU,GAAI;EAAc;GAAqB"}
|
package/dist/base-popover.js
CHANGED
|
@@ -2,6 +2,6 @@ import "./useThemedStyles-Dco_54KA.js";
|
|
|
2
2
|
import "./useDismiss-Dpzg5Xpf.js";
|
|
3
3
|
import "./useFloating-D-2IDIWG.js";
|
|
4
4
|
import "./Popover-BV_1hBez.js";
|
|
5
|
-
import { t as BasePopover } from "./BasePopover-
|
|
5
|
+
import { t as BasePopover } from "./BasePopover-CY-9StFD.js";
|
|
6
6
|
|
|
7
7
|
export { BasePopover };
|
package/dist/breadcrumb.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./useThemedStyles-Dco_54KA.js";
|
|
2
|
-
import "./Typography-
|
|
2
|
+
import "./Typography-u0BPHgCr.js";
|
|
3
3
|
import "./Skeleton-pvWAx_gn.js";
|
|
4
|
-
import { t as Breadcrumb } from "./Breadcrumb
|
|
4
|
+
import { t as Breadcrumb } from "./Breadcrumb--lRHi6sr.js";
|
|
5
5
|
|
|
6
6
|
export { Breadcrumb };
|
package/dist/button.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./useThemedStyles-Dco_54KA.js";
|
|
2
|
-
import "./Typography-
|
|
3
|
-
import "./Loader-
|
|
4
|
-
import { t as Button } from "./Button-
|
|
2
|
+
import "./Typography-u0BPHgCr.js";
|
|
3
|
+
import "./Loader-BTp8PCMz.js";
|
|
4
|
+
import { t as Button } from "./Button-o_4n7GFO.js";
|
|
5
5
|
|
|
6
6
|
export { Button };
|
package/dist/check-item.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./useThemedStyles-Dco_54KA.js";
|
|
2
|
-
import "./Typography-
|
|
2
|
+
import "./Typography-u0BPHgCr.js";
|
|
3
3
|
import "./Icon-bV19y393.js";
|
|
4
|
-
import { t as CheckItem } from "./CheckItem-
|
|
4
|
+
import { t as CheckItem } from "./CheckItem-C2NriXyN.js";
|
|
5
5
|
|
|
6
6
|
export { CheckItem };
|
package/dist/checkbox.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./useThemedStyles-Dco_54KA.js";
|
|
2
|
-
import "./Typography-
|
|
2
|
+
import "./Typography-u0BPHgCr.js";
|
|
3
3
|
import "./Icon-bV19y393.js";
|
|
4
|
-
import { t as Checkbox } from "./Checkbox-
|
|
4
|
+
import { t as Checkbox } from "./Checkbox-qoUWy3Nj.js";
|
|
5
5
|
|
|
6
6
|
export { Checkbox };
|
package/dist/chip-list.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./useThemedStyles-Dco_54KA.js";
|
|
2
|
-
import "./Typography-
|
|
3
|
-
import "./Chip-
|
|
4
|
-
import "./Label-
|
|
5
|
-
import "./ErrorMessage-
|
|
6
|
-
import { t as ChipList } from "./ChipList-
|
|
2
|
+
import "./Typography-u0BPHgCr.js";
|
|
3
|
+
import "./Chip-DJVwuXlv.js";
|
|
4
|
+
import "./Label-VE3hoSbt.js";
|
|
5
|
+
import "./ErrorMessage-6pG4hFId.js";
|
|
6
|
+
import { t as ChipList } from "./ChipList-D7J-hTLW.js";
|
|
7
7
|
|
|
8
8
|
export { ChipList };
|
package/dist/chip.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./useThemedStyles-Dco_54KA.js";
|
|
2
|
-
import "./Typography-
|
|
3
|
-
import { n as types_exports, t as Chip } from "./Chip-
|
|
2
|
+
import "./Typography-u0BPHgCr.js";
|
|
3
|
+
import { n as types_exports, t as Chip } from "./Chip-DJVwuXlv.js";
|
|
4
4
|
|
|
5
5
|
export { Chip, types_exports as ChipTypes };
|
package/dist/color-picker.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./useThemedStyles-Dco_54KA.js";
|
|
2
|
-
import "./Typography-
|
|
3
|
-
import "./Label-
|
|
4
|
-
import "./ErrorMessage-
|
|
5
|
-
import { n as types_exports, t as ColorPicker } from "./ColorPicker-
|
|
2
|
+
import "./Typography-u0BPHgCr.js";
|
|
3
|
+
import "./Label-VE3hoSbt.js";
|
|
4
|
+
import "./ErrorMessage-6pG4hFId.js";
|
|
5
|
+
import { n as types_exports, t as ColorPicker } from "./ColorPicker-sqs31Md7.js";
|
|
6
6
|
import "./Skeleton-pvWAx_gn.js";
|
|
7
7
|
|
|
8
8
|
export { ColorPicker, types_exports as ColorPickerTypes };
|
package/dist/context-menu.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "./useThemedStyles-Dco_54KA.js";
|
|
2
|
-
import "./
|
|
3
|
-
import "./
|
|
2
|
+
import "./Typography-u0BPHgCr.js";
|
|
3
|
+
import "./Switch-DlZXMyGG.js";
|
|
4
4
|
import "./useDismiss-Dpzg5Xpf.js";
|
|
5
5
|
import "./useFloating-D-2IDIWG.js";
|
|
6
6
|
import "./Popover-BV_1hBez.js";
|
|
7
|
-
import "./BasePopover-
|
|
8
|
-
import { n as types_exports, t as ContextMenu } from "./ContextMenu-
|
|
7
|
+
import "./BasePopover-CY-9StFD.js";
|
|
8
|
+
import { n as types_exports, t as ContextMenu } from "./ContextMenu-CrVwvqGG.js";
|
|
9
9
|
|
|
10
10
|
export { ContextMenu, types_exports as ContextMenuTypes };
|