@ikatec/nebula-react 1.9.0-beta.5 → 1.9.0-beta.7
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/ikatec-nebula-react-1.9.0-beta.7.tgz +0 -0
- package/dist/index.d.mts +36 -7
- package/dist/index.d.ts +36 -7
- package/dist/index.js +205 -76
- package/dist/index.mjs +204 -76
- package/package.json +1 -2
- package/dist/ikatec-nebula-react-1.9.0-beta.5.tgz +0 -0
package/dist/index.js
CHANGED
|
@@ -22,9 +22,9 @@ var LabelPrimitive = require('@radix-ui/react-label');
|
|
|
22
22
|
var RPNInput = require('react-phone-number-input');
|
|
23
23
|
var flags = require('react-phone-number-input/flags');
|
|
24
24
|
var Select = require('react-select');
|
|
25
|
-
var Creatable = require('react-select/creatable');
|
|
26
25
|
var Async = require('react-select/async');
|
|
27
26
|
var AsyncCreatable = require('react-select/async-creatable');
|
|
27
|
+
var Creatable = require('react-select/creatable');
|
|
28
28
|
var core = require('@dnd-kit/core');
|
|
29
29
|
var sortable = require('@dnd-kit/sortable');
|
|
30
30
|
var utilities = require('@dnd-kit/utilities');
|
|
@@ -69,9 +69,9 @@ var LabelPrimitive__namespace = /*#__PURE__*/_interopNamespace(LabelPrimitive);
|
|
|
69
69
|
var RPNInput__namespace = /*#__PURE__*/_interopNamespace(RPNInput);
|
|
70
70
|
var flags__default = /*#__PURE__*/_interopDefault(flags);
|
|
71
71
|
var Select__default = /*#__PURE__*/_interopDefault(Select);
|
|
72
|
-
var Creatable__default = /*#__PURE__*/_interopDefault(Creatable);
|
|
73
72
|
var Async__default = /*#__PURE__*/_interopDefault(Async);
|
|
74
73
|
var AsyncCreatable__default = /*#__PURE__*/_interopDefault(AsyncCreatable);
|
|
74
|
+
var Creatable__default = /*#__PURE__*/_interopDefault(Creatable);
|
|
75
75
|
var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespace(PopoverPrimitive);
|
|
76
76
|
var RadioGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(RadioGroupPrimitive);
|
|
77
77
|
var SwitchPrimitives__namespace = /*#__PURE__*/_interopNamespace(SwitchPrimitives);
|
|
@@ -1073,7 +1073,8 @@ var Box = ({
|
|
|
1073
1073
|
{
|
|
1074
1074
|
"shadow-sm": shadow === "sm",
|
|
1075
1075
|
"shadow-md": shadow === "md",
|
|
1076
|
-
"shadow-lg": shadow === "lg"
|
|
1076
|
+
"shadow-lg": shadow === "lg",
|
|
1077
|
+
"shadow-none": shadow === "none"
|
|
1077
1078
|
},
|
|
1078
1079
|
className
|
|
1079
1080
|
),
|
|
@@ -1462,6 +1463,14 @@ var messages6 = {
|
|
|
1462
1463
|
};
|
|
1463
1464
|
var cropper_default = messages6;
|
|
1464
1465
|
|
|
1466
|
+
// src/i18n/messages/en/combobox.ts
|
|
1467
|
+
var messages7 = {
|
|
1468
|
+
removeAll: "Remove all",
|
|
1469
|
+
noItemsSelected: "No items selected",
|
|
1470
|
+
selectAnOption: "Type to begin searching and select an option."
|
|
1471
|
+
};
|
|
1472
|
+
var combobox_default = messages7;
|
|
1473
|
+
|
|
1465
1474
|
// src/i18n/messages/en/index.ts
|
|
1466
1475
|
var enMessages = {
|
|
1467
1476
|
cropper: cropper_default,
|
|
@@ -1469,11 +1478,12 @@ var enMessages = {
|
|
|
1469
1478
|
inputSelect: input_select_default,
|
|
1470
1479
|
inputPhone: input_phone_default,
|
|
1471
1480
|
timePicker: time_picker_default,
|
|
1472
|
-
fileUpload: file_upload_default
|
|
1481
|
+
fileUpload: file_upload_default,
|
|
1482
|
+
combobox: combobox_default
|
|
1473
1483
|
};
|
|
1474
1484
|
|
|
1475
1485
|
// src/i18n/messages/es/pagination.ts
|
|
1476
|
-
var
|
|
1486
|
+
var messages8 = {
|
|
1477
1487
|
totalResultsLabel(pagesSize, totalResults) {
|
|
1478
1488
|
if (totalResults < pagesSize) {
|
|
1479
1489
|
pagesSize = totalResults;
|
|
@@ -1484,16 +1494,16 @@ var messages7 = {
|
|
|
1484
1494
|
return `P\xE1gina ${currentPage} de ${totalPages}`;
|
|
1485
1495
|
}
|
|
1486
1496
|
};
|
|
1487
|
-
var pagination_default2 =
|
|
1497
|
+
var pagination_default2 = messages8;
|
|
1488
1498
|
|
|
1489
1499
|
// src/i18n/messages/es/input-select.ts
|
|
1490
|
-
var
|
|
1500
|
+
var messages9 = {
|
|
1491
1501
|
noOptions: "No hay opciones disponibles"
|
|
1492
1502
|
};
|
|
1493
|
-
var input_select_default2 =
|
|
1503
|
+
var input_select_default2 = messages9;
|
|
1494
1504
|
|
|
1495
1505
|
// src/i18n/messages/es/input-phone.ts
|
|
1496
|
-
var
|
|
1506
|
+
var messages10 = {
|
|
1497
1507
|
countries: {
|
|
1498
1508
|
empty: "Seleccionar",
|
|
1499
1509
|
AF: "Afganist\xE1n",
|
|
@@ -1743,26 +1753,34 @@ var messages9 = {
|
|
|
1743
1753
|
ZW: "Zimbabue"
|
|
1744
1754
|
}
|
|
1745
1755
|
};
|
|
1746
|
-
var input_phone_default2 =
|
|
1756
|
+
var input_phone_default2 = messages10;
|
|
1747
1757
|
|
|
1748
1758
|
// src/i18n/messages/es/time-picker.ts
|
|
1749
|
-
var
|
|
1759
|
+
var messages11 = {
|
|
1750
1760
|
label: "Tiempo"
|
|
1751
1761
|
};
|
|
1752
|
-
var time_picker_default2 =
|
|
1762
|
+
var time_picker_default2 = messages11;
|
|
1753
1763
|
|
|
1754
1764
|
// src/i18n/messages/es/file-upload.ts
|
|
1755
|
-
var
|
|
1765
|
+
var messages12 = {
|
|
1756
1766
|
deleteAll: "Remover todos"
|
|
1757
1767
|
};
|
|
1758
|
-
var file_upload_default2 =
|
|
1768
|
+
var file_upload_default2 = messages12;
|
|
1759
1769
|
|
|
1760
1770
|
// src/i18n/messages/es/cropper.ts
|
|
1761
|
-
var
|
|
1771
|
+
var messages13 = {
|
|
1762
1772
|
applyButtonLabel: "Aplicar",
|
|
1763
1773
|
dialogTitle: "Ajustar la imagen"
|
|
1764
1774
|
};
|
|
1765
|
-
var cropper_default2 =
|
|
1775
|
+
var cropper_default2 = messages13;
|
|
1776
|
+
|
|
1777
|
+
// src/i18n/messages/es/combobox.ts
|
|
1778
|
+
var messages14 = {
|
|
1779
|
+
removeAll: "Eliminar todos",
|
|
1780
|
+
noItemsSelected: "No hay elementos seleccionados",
|
|
1781
|
+
selectAnOption: "Escriba para comenzar a buscar y seleccione una opci\xF3n."
|
|
1782
|
+
};
|
|
1783
|
+
var combobox_default2 = messages14;
|
|
1766
1784
|
|
|
1767
1785
|
// src/i18n/messages/es/index.ts
|
|
1768
1786
|
var esMessages = {
|
|
@@ -1771,11 +1789,12 @@ var esMessages = {
|
|
|
1771
1789
|
inputSelect: input_select_default2,
|
|
1772
1790
|
inputPhone: input_phone_default2,
|
|
1773
1791
|
timePicker: time_picker_default2,
|
|
1774
|
-
fileUpload: file_upload_default2
|
|
1792
|
+
fileUpload: file_upload_default2,
|
|
1793
|
+
combobox: combobox_default2
|
|
1775
1794
|
};
|
|
1776
1795
|
|
|
1777
1796
|
// src/i18n/messages/pt-br/pagination.ts
|
|
1778
|
-
var
|
|
1797
|
+
var messages15 = {
|
|
1779
1798
|
totalResultsLabel(pagesSize, totalResults) {
|
|
1780
1799
|
if (totalResults < pagesSize) {
|
|
1781
1800
|
pagesSize = totalResults;
|
|
@@ -1786,16 +1805,16 @@ var messages13 = {
|
|
|
1786
1805
|
return `P\xE1gina ${currentPage} de ${totalPages}`;
|
|
1787
1806
|
}
|
|
1788
1807
|
};
|
|
1789
|
-
var pagination_default3 =
|
|
1808
|
+
var pagination_default3 = messages15;
|
|
1790
1809
|
|
|
1791
1810
|
// src/i18n/messages/pt-br/input-select.ts
|
|
1792
|
-
var
|
|
1811
|
+
var messages16 = {
|
|
1793
1812
|
noOptions: "Nenhuma op\xE7\xE3o dispon\xEDvel"
|
|
1794
1813
|
};
|
|
1795
|
-
var input_select_default3 =
|
|
1814
|
+
var input_select_default3 = messages16;
|
|
1796
1815
|
|
|
1797
1816
|
// src/i18n/messages/pt-br/input-phone.ts
|
|
1798
|
-
var
|
|
1817
|
+
var messages17 = {
|
|
1799
1818
|
countries: {
|
|
1800
1819
|
empty: "Selecione",
|
|
1801
1820
|
AF: "Afeganist\xE3o",
|
|
@@ -2045,26 +2064,34 @@ var messages15 = {
|
|
|
2045
2064
|
ZW: "Zimb\xE1bue"
|
|
2046
2065
|
}
|
|
2047
2066
|
};
|
|
2048
|
-
var input_phone_default3 =
|
|
2067
|
+
var input_phone_default3 = messages17;
|
|
2049
2068
|
|
|
2050
2069
|
// src/i18n/messages/pt-br/time-picker.ts
|
|
2051
|
-
var
|
|
2070
|
+
var messages18 = {
|
|
2052
2071
|
label: "Hor\xE1rio"
|
|
2053
2072
|
};
|
|
2054
|
-
var time_picker_default3 =
|
|
2073
|
+
var time_picker_default3 = messages18;
|
|
2055
2074
|
|
|
2056
2075
|
// src/i18n/messages/pt-br/file-upload.ts
|
|
2057
|
-
var
|
|
2076
|
+
var messages19 = {
|
|
2058
2077
|
deleteAll: "Remover todos"
|
|
2059
2078
|
};
|
|
2060
|
-
var file_upload_default3 =
|
|
2079
|
+
var file_upload_default3 = messages19;
|
|
2061
2080
|
|
|
2062
2081
|
// src/i18n/messages/pt-br/cropper.ts
|
|
2063
|
-
var
|
|
2082
|
+
var messages20 = {
|
|
2064
2083
|
applyButtonLabel: "Aplicar",
|
|
2065
2084
|
dialogTitle: "Ajustar imagem"
|
|
2066
2085
|
};
|
|
2067
|
-
var cropper_default3 =
|
|
2086
|
+
var cropper_default3 = messages20;
|
|
2087
|
+
|
|
2088
|
+
// src/i18n/messages/pt-br/combobox.ts
|
|
2089
|
+
var messages21 = {
|
|
2090
|
+
removeAll: "Remover todos",
|
|
2091
|
+
noItemsSelected: "Nenhum item selecionado",
|
|
2092
|
+
selectAnOption: "Digite para come\xE7ar a buscar e selecione uma op\xE7\xE3o."
|
|
2093
|
+
};
|
|
2094
|
+
var combobox_default3 = messages21;
|
|
2068
2095
|
|
|
2069
2096
|
// src/i18n/messages/pt-br/index.ts
|
|
2070
2097
|
var ptBrMessages = {
|
|
@@ -2073,7 +2100,8 @@ var ptBrMessages = {
|
|
|
2073
2100
|
inputPhone: input_phone_default3,
|
|
2074
2101
|
timePicker: time_picker_default3,
|
|
2075
2102
|
fileUpload: file_upload_default3,
|
|
2076
|
-
cropper: cropper_default3
|
|
2103
|
+
cropper: cropper_default3,
|
|
2104
|
+
combobox: combobox_default3
|
|
2077
2105
|
};
|
|
2078
2106
|
|
|
2079
2107
|
// src/i18n/message-storage-handler.ts
|
|
@@ -2098,7 +2126,7 @@ var setNebulaLanguage = (language) => {
|
|
|
2098
2126
|
}
|
|
2099
2127
|
localStorage.setItem(getNebulaI18nStorageKey(), language);
|
|
2100
2128
|
};
|
|
2101
|
-
var
|
|
2129
|
+
var messages22 = /* @__PURE__ */ new Map([
|
|
2102
2130
|
[null, enMessages],
|
|
2103
2131
|
[void 0, enMessages],
|
|
2104
2132
|
["en-US" /* EN_US */, enMessages],
|
|
@@ -2116,14 +2144,14 @@ var NebulaI18nProvider = ({
|
|
|
2116
2144
|
() => customI18nStorageKey ?? localStorageKey,
|
|
2117
2145
|
[customI18nStorageKey]
|
|
2118
2146
|
);
|
|
2119
|
-
const [
|
|
2120
|
-
|
|
2147
|
+
const [messages23, setMessages] = React25.useState(
|
|
2148
|
+
messages22.get(getNebulaLanguage()) ?? messages22.get("en-US" /* EN_US */)
|
|
2121
2149
|
);
|
|
2122
2150
|
const handleStorageChange = React25.useCallback(
|
|
2123
2151
|
({ detail }) => {
|
|
2124
2152
|
if (detail.key === storageKey) {
|
|
2125
2153
|
setMessages(
|
|
2126
|
-
|
|
2154
|
+
messages22.get(detail.value) ?? messages22.get("en-US" /* EN_US */)
|
|
2127
2155
|
);
|
|
2128
2156
|
}
|
|
2129
2157
|
},
|
|
@@ -2167,7 +2195,7 @@ var NebulaI18nProvider = ({
|
|
|
2167
2195
|
NebulaI18nContext.Provider,
|
|
2168
2196
|
{
|
|
2169
2197
|
value: {
|
|
2170
|
-
messages:
|
|
2198
|
+
messages: messages23,
|
|
2171
2199
|
locale: getNebulaLanguage()
|
|
2172
2200
|
},
|
|
2173
2201
|
children
|
|
@@ -5421,7 +5449,7 @@ var InputDateTimePickerSingle = ({
|
|
|
5421
5449
|
formattedDateByLanguage ? new Date(formattedDateByLanguage) : void 0
|
|
5422
5450
|
);
|
|
5423
5451
|
const [popoverIsOpen, setPopoverIsOpen] = React25.useState(false);
|
|
5424
|
-
const { locale, messages:
|
|
5452
|
+
const { locale, messages: messages23 } = useNebulaI18n();
|
|
5425
5453
|
const [month, setMonth] = React25.useState(/* @__PURE__ */ new Date());
|
|
5426
5454
|
const inputTimeRef = React25.useRef(null);
|
|
5427
5455
|
const handleClearValue = () => {
|
|
@@ -5524,15 +5552,15 @@ var InputDateTimePickerSingle = ({
|
|
|
5524
5552
|
replacement: { _: /\d/ }
|
|
5525
5553
|
};
|
|
5526
5554
|
const inputRef = mask.useMask(maskOptions);
|
|
5527
|
-
const
|
|
5555
|
+
const containerRef = React25.useRef(null);
|
|
5528
5556
|
const calendarRef = React25.useRef(null);
|
|
5529
|
-
useClickOutside([
|
|
5557
|
+
useClickOutside([containerRef, calendarRef], () => {
|
|
5530
5558
|
setPopoverIsOpen(false);
|
|
5531
5559
|
});
|
|
5532
5560
|
useKeyPress("Escape", () => {
|
|
5533
5561
|
setPopoverIsOpen(false);
|
|
5534
5562
|
});
|
|
5535
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nebula-ds w-full", ref:
|
|
5563
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nebula-ds w-full", ref: containerRef, children: [
|
|
5536
5564
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5537
5565
|
InputText,
|
|
5538
5566
|
{
|
|
@@ -5588,7 +5616,7 @@ var InputDateTimePickerSingle = ({
|
|
|
5588
5616
|
disabled: disabledDates,
|
|
5589
5617
|
footer: /* @__PURE__ */ jsxRuntime.jsxs(Space, { className: "nebula-ds items-center", children: [
|
|
5590
5618
|
/* @__PURE__ */ jsxRuntime.jsxs(Label2, { children: [
|
|
5591
|
-
|
|
5619
|
+
messages23.timePicker.label,
|
|
5592
5620
|
":"
|
|
5593
5621
|
] }),
|
|
5594
5622
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5617,8 +5645,8 @@ var CountrySelect = ({
|
|
|
5617
5645
|
const handleSelect = (event) => {
|
|
5618
5646
|
onChange(event.target.value);
|
|
5619
5647
|
};
|
|
5620
|
-
const { messages:
|
|
5621
|
-
const { countries } =
|
|
5648
|
+
const { messages: messages23 } = useNebulaI18n();
|
|
5649
|
+
const { countries } = messages23.inputPhone;
|
|
5622
5650
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nebula-ds rounded-s-[20px] relative inline-flex items-center self-stretch py-2 ps-4 pe-2 transition-[color,box-shadow] outline-none has-disabled:pointer-events-none has-disabled:opacity-50", children: [
|
|
5623
5651
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nebula-ds inline-flex items-center gap-1", "aria-hidden": "true", children: [
|
|
5624
5652
|
/* @__PURE__ */ jsxRuntime.jsx(FlagComponent, { country: value, countryName: value, "aria-hidden": "true" }),
|
|
@@ -5750,7 +5778,7 @@ var ClearIndicator = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
|
5750
5778
|
);
|
|
5751
5779
|
var MultiValueRemove = (props) => /* @__PURE__ */ jsxRuntime.jsx(Select.components.MultiValueRemove, { ...props, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleX, { size: "16px" }) });
|
|
5752
5780
|
var Option = (props) => {
|
|
5753
|
-
const { isSelected, data, innerRef, innerProps } = props;
|
|
5781
|
+
const { isSelected, isFocused, data, innerRef, innerProps } = props;
|
|
5754
5782
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5755
5783
|
"div",
|
|
5756
5784
|
{
|
|
@@ -5764,13 +5792,17 @@ var Option = (props) => {
|
|
|
5764
5792
|
gap-2
|
|
5765
5793
|
cursor-pointer
|
|
5766
5794
|
text-sm
|
|
5767
|
-
|
|
5768
|
-
hover:bg-listItem-background-hover
|
|
5769
|
-
|
|
5770
|
-
|
|
5795
|
+
text-listItem-primary-text-default
|
|
5796
|
+
hover:bg-listItem-primary-background-hover
|
|
5797
|
+
hover:text-listItem-primary-text-hover
|
|
5798
|
+
outline-none
|
|
5799
|
+
rounded-lg
|
|
5771
5800
|
`,
|
|
5772
5801
|
{
|
|
5773
|
-
"text-
|
|
5802
|
+
"text-listItem-primary-text-selected font-semibold": isSelected
|
|
5803
|
+
},
|
|
5804
|
+
{
|
|
5805
|
+
"bg-listItem-primary-background-hover text-listItem-primary-text-hover": isFocused
|
|
5774
5806
|
}
|
|
5775
5807
|
),
|
|
5776
5808
|
children: [
|
|
@@ -5780,15 +5812,18 @@ var Option = (props) => {
|
|
|
5780
5812
|
}
|
|
5781
5813
|
);
|
|
5782
5814
|
};
|
|
5783
|
-
var controlStyles = ({ isDisabled, isFocused }, isError) => {
|
|
5815
|
+
var controlStyles = ({ isDisabled, isFocused }, isError, size4) => {
|
|
5784
5816
|
return cn(
|
|
5785
|
-
"flex w-full items-center border bg-inputSelect-default-background rounded-input px-4
|
|
5817
|
+
"flex w-full items-center border bg-inputSelect-default-background rounded-input px-4 transition",
|
|
5786
5818
|
{
|
|
5787
5819
|
"ring-[3px] border-inputSelect-focus-border text-inputSelect-focus-text ring-inputSelect-focus-border": isFocused,
|
|
5788
5820
|
"border-inputSelect-danger-border text-inputSelect-danger-icon": isError,
|
|
5789
5821
|
"border-inputSelect-default-border text-inputSelect-default-text": !isFocused && !isError,
|
|
5790
5822
|
"bg-inputText-background-disabled": isDisabled,
|
|
5791
|
-
"ring-button-danger-border-focus": isError && isFocused
|
|
5823
|
+
"ring-button-danger-border-focus": isError && isFocused,
|
|
5824
|
+
[buttonSizeEnum[size4 ?? "md"]]: true,
|
|
5825
|
+
"!min-h-8": size4 === "sm",
|
|
5826
|
+
"!min-h-10": size4 === "md"
|
|
5792
5827
|
}
|
|
5793
5828
|
);
|
|
5794
5829
|
};
|
|
@@ -5800,21 +5835,42 @@ var multiValueStyles = "border rounded-full items-center gap-1.5 text-xs border-
|
|
|
5800
5835
|
var multiValueLabelStyles = "";
|
|
5801
5836
|
var indicatorsContainerStyles = "";
|
|
5802
5837
|
var clearIndicatorStyles = "text-inputSelect-default-icon mr-2";
|
|
5838
|
+
var clearIndicatorStylesHidden = "text-inputSelect-default-icon mr-0";
|
|
5803
5839
|
var dropdownIndicatorStyles = "text-inputSelect-default-icon";
|
|
5804
|
-
var menuStyles =
|
|
5840
|
+
var menuStyles = `
|
|
5841
|
+
mt-2
|
|
5842
|
+
z-[1000]
|
|
5843
|
+
rounded-2xl
|
|
5844
|
+
border
|
|
5845
|
+
border-dropdownMenu-border
|
|
5846
|
+
bg-dropdownMenu-background
|
|
5847
|
+
shadow-dropdownMenu-shadow
|
|
5848
|
+
shadow-sm
|
|
5849
|
+
outline-none
|
|
5850
|
+
overflow-hidden
|
|
5851
|
+
p-[6px]
|
|
5852
|
+
flex
|
|
5853
|
+
flex-col
|
|
5854
|
+
gap-1
|
|
5855
|
+
`;
|
|
5805
5856
|
var groupHeadingStyles = "ml-3 mt-2 mb-1 text-inputSelect-default-text text-sm";
|
|
5806
5857
|
var noOptionsMessageStyles = "p-2 text-inputSelect-default-text";
|
|
5807
5858
|
var createStyledSelect = (BaseSelect, displayName) => {
|
|
5808
5859
|
const StyledSelect2 = ({
|
|
5809
|
-
icon,
|
|
5860
|
+
icon = null,
|
|
5810
5861
|
disabled = false,
|
|
5811
5862
|
isError = false,
|
|
5863
|
+
size: size4 = "md",
|
|
5864
|
+
hideSelectArrow = false,
|
|
5812
5865
|
...props
|
|
5813
5866
|
}) => {
|
|
5814
|
-
const
|
|
5867
|
+
const CloneIcon = icon && React25.cloneElement(icon, {
|
|
5868
|
+
className: "size-4"
|
|
5869
|
+
});
|
|
5870
|
+
const { messages: messages23 } = useNebulaI18n();
|
|
5815
5871
|
const customClassNames = React25.useMemo(() => {
|
|
5816
5872
|
return {
|
|
5817
|
-
control: (props2) => controlStyles(props2, isError),
|
|
5873
|
+
control: (props2) => controlStyles(props2, isError, size4),
|
|
5818
5874
|
placeholder: () => placeholderStyles,
|
|
5819
5875
|
input: () => selectInputStyles,
|
|
5820
5876
|
valueContainer: () => valueContainerStyles,
|
|
@@ -5822,16 +5878,16 @@ var createStyledSelect = (BaseSelect, displayName) => {
|
|
|
5822
5878
|
multiValue: () => multiValueStyles,
|
|
5823
5879
|
multiValueLabel: () => multiValueLabelStyles,
|
|
5824
5880
|
indicatorsContainer: () => indicatorsContainerStyles,
|
|
5825
|
-
clearIndicator: () => clearIndicatorStyles,
|
|
5881
|
+
clearIndicator: () => hideSelectArrow ? clearIndicatorStylesHidden : clearIndicatorStyles,
|
|
5826
5882
|
dropdownIndicator: () => dropdownIndicatorStyles,
|
|
5827
5883
|
menu: () => menuStyles,
|
|
5828
5884
|
groupHeading: () => groupHeadingStyles,
|
|
5829
5885
|
noOptionsMessage: () => noOptionsMessageStyles
|
|
5830
5886
|
};
|
|
5831
|
-
}, [isError]);
|
|
5887
|
+
}, [hideSelectArrow, isError, size4]);
|
|
5832
5888
|
const customComponents = React25.useMemo(
|
|
5833
5889
|
() => ({
|
|
5834
|
-
DropdownIndicator,
|
|
5890
|
+
DropdownIndicator: hideSelectArrow ? () => null : DropdownIndicator,
|
|
5835
5891
|
ClearIndicator,
|
|
5836
5892
|
MultiValueRemove,
|
|
5837
5893
|
Option,
|
|
@@ -5843,13 +5899,13 @@ var createStyledSelect = (BaseSelect, displayName) => {
|
|
|
5843
5899
|
"text-inputSelect-default-icon": !isError,
|
|
5844
5900
|
"text-inputSelect-danger-icon": isError
|
|
5845
5901
|
}),
|
|
5846
|
-
children:
|
|
5902
|
+
children: CloneIcon
|
|
5847
5903
|
}
|
|
5848
5904
|
),
|
|
5849
5905
|
children
|
|
5850
5906
|
] }) })
|
|
5851
5907
|
}),
|
|
5852
|
-
[icon, isError]
|
|
5908
|
+
[hideSelectArrow, icon, isError, CloneIcon]
|
|
5853
5909
|
);
|
|
5854
5910
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5855
5911
|
BaseSelect,
|
|
@@ -5858,7 +5914,7 @@ var createStyledSelect = (BaseSelect, displayName) => {
|
|
|
5858
5914
|
isDisabled: disabled,
|
|
5859
5915
|
components: customComponents,
|
|
5860
5916
|
classNames: customClassNames,
|
|
5861
|
-
noOptionsMessage: () => /* @__PURE__ */ jsxRuntime.jsx("p", { children:
|
|
5917
|
+
noOptionsMessage: () => /* @__PURE__ */ jsxRuntime.jsx("p", { children: messages23.inputSelect.noOptions }),
|
|
5862
5918
|
...props
|
|
5863
5919
|
}
|
|
5864
5920
|
);
|
|
@@ -7077,7 +7133,7 @@ var Pagination = ({
|
|
|
7077
7133
|
onChangePage,
|
|
7078
7134
|
...props
|
|
7079
7135
|
}) => {
|
|
7080
|
-
const { messages:
|
|
7136
|
+
const { messages: messages23 } = useNebulaI18n();
|
|
7081
7137
|
const totalPages = React25.useMemo(() => {
|
|
7082
7138
|
return Math.ceil(total / (pageSize || 1));
|
|
7083
7139
|
}, [total, pageSize]);
|
|
@@ -7110,13 +7166,13 @@ var Pagination = ({
|
|
|
7110
7166
|
}, [totalPages, pageSize, total]);
|
|
7111
7167
|
const totalResultsLabel = React25.useMemo(() => {
|
|
7112
7168
|
if (page === totalPages) {
|
|
7113
|
-
return
|
|
7169
|
+
return messages23.pagination.totalResultsLabel(lastPageSize, total);
|
|
7114
7170
|
}
|
|
7115
|
-
return
|
|
7116
|
-
}, [
|
|
7171
|
+
return messages23.pagination.totalResultsLabel(pageSize, total);
|
|
7172
|
+
}, [messages23.pagination, pageSize, total, page, totalPages, lastPageSize]);
|
|
7117
7173
|
const currentPageLabel = React25.useMemo(
|
|
7118
|
-
() =>
|
|
7119
|
-
[
|
|
7174
|
+
() => messages23.pagination.currentPageLabel(normalizedPage, totalPages),
|
|
7175
|
+
[messages23.pagination, normalizedPage, totalPages]
|
|
7120
7176
|
);
|
|
7121
7177
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7122
7178
|
"nav",
|
|
@@ -8555,13 +8611,13 @@ function custom(message, options) {
|
|
|
8555
8611
|
}
|
|
8556
8612
|
);
|
|
8557
8613
|
}
|
|
8558
|
-
async function promise(promise2,
|
|
8614
|
+
async function promise(promise2, messages23, options) {
|
|
8559
8615
|
const loadingToast = sonner.toast.custom(
|
|
8560
8616
|
(t) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8561
8617
|
ToastComponent,
|
|
8562
8618
|
{
|
|
8563
8619
|
type: "info",
|
|
8564
|
-
message:
|
|
8620
|
+
message: messages23.loading,
|
|
8565
8621
|
options,
|
|
8566
8622
|
t
|
|
8567
8623
|
}
|
|
@@ -8575,7 +8631,7 @@ async function promise(promise2, messages20, options) {
|
|
|
8575
8631
|
ToastComponent,
|
|
8576
8632
|
{
|
|
8577
8633
|
type: "success",
|
|
8578
|
-
message:
|
|
8634
|
+
message: messages23.success,
|
|
8579
8635
|
options,
|
|
8580
8636
|
t
|
|
8581
8637
|
}
|
|
@@ -8590,7 +8646,7 @@ async function promise(promise2, messages20, options) {
|
|
|
8590
8646
|
ToastComponent,
|
|
8591
8647
|
{
|
|
8592
8648
|
type: "error",
|
|
8593
|
-
message:
|
|
8649
|
+
message: messages23.error,
|
|
8594
8650
|
options,
|
|
8595
8651
|
t
|
|
8596
8652
|
}
|
|
@@ -8864,7 +8920,9 @@ function Sidebar({
|
|
|
8864
8920
|
children,
|
|
8865
8921
|
defaultState = "expanded",
|
|
8866
8922
|
open,
|
|
8867
|
-
onOpenChange
|
|
8923
|
+
onOpenChange,
|
|
8924
|
+
width = 270,
|
|
8925
|
+
railWidth = 72
|
|
8868
8926
|
}) {
|
|
8869
8927
|
const isMobile = useIsMobile();
|
|
8870
8928
|
const isControlled = open !== void 0;
|
|
@@ -8891,7 +8949,7 @@ function Sidebar({
|
|
|
8891
8949
|
{
|
|
8892
8950
|
open: state !== "collapsed",
|
|
8893
8951
|
onOpenChange: (o) => setState(o ? "expanded" : "collapsed"),
|
|
8894
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(DrawerContent, { className: "nebula-ds
|
|
8952
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(DrawerContent, { className: "nebula-ds p-0 shadow-xl", style: { width }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nebula-ds flex h-full flex-col bg-sidebar-background", children }) })
|
|
8895
8953
|
}
|
|
8896
8954
|
) });
|
|
8897
8955
|
}
|
|
@@ -8901,10 +8959,11 @@ function Sidebar({
|
|
|
8901
8959
|
"data-state": state,
|
|
8902
8960
|
className: cn(
|
|
8903
8961
|
"relative hidden md:flex flex-col border-r border-sidebar-border bg-sidebar-background transition-all duration-300 ease-in-out",
|
|
8904
|
-
state === "expanded" && "w-[var(--sidebar-width)]",
|
|
8905
|
-
state === "rail" && "w-[var(--sidebar-rail-width)]",
|
|
8906
8962
|
state === "collapsed" && "w-0 overflow-hidden"
|
|
8907
8963
|
),
|
|
8964
|
+
style: {
|
|
8965
|
+
width: state === "expanded" ? width : state === "rail" ? railWidth : 0
|
|
8966
|
+
},
|
|
8908
8967
|
children
|
|
8909
8968
|
}
|
|
8910
8969
|
) });
|
|
@@ -9100,6 +9159,75 @@ function SidebarMenuItem({
|
|
|
9100
9159
|
collapsible && open && !isRail && /* @__PURE__ */ jsxRuntime.jsx(SidebarLevelContext.Provider, { value: level + 1, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nebula-ds mt-1 space-y-1", children }) })
|
|
9101
9160
|
] });
|
|
9102
9161
|
}
|
|
9162
|
+
function Combobox({
|
|
9163
|
+
value = [],
|
|
9164
|
+
onChange,
|
|
9165
|
+
showEmptyState = true,
|
|
9166
|
+
isClearable = true,
|
|
9167
|
+
emptyStateText,
|
|
9168
|
+
emptyStateDescription,
|
|
9169
|
+
...props
|
|
9170
|
+
}) {
|
|
9171
|
+
const { messages: messages23 } = useNebulaI18n();
|
|
9172
|
+
const selectedValues = value || [];
|
|
9173
|
+
const handleSelect = (val) => {
|
|
9174
|
+
onChange?.(val);
|
|
9175
|
+
};
|
|
9176
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Space, { direction: "column", size: "md", className: "nebula-ds w-full", children: [
|
|
9177
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9178
|
+
StyledSelect,
|
|
9179
|
+
{
|
|
9180
|
+
...props,
|
|
9181
|
+
onChange: (e) => handleSelect(e),
|
|
9182
|
+
value: selectedValues,
|
|
9183
|
+
isMulti: true,
|
|
9184
|
+
controlShouldRenderValue: false,
|
|
9185
|
+
hideSelectedOptions: false,
|
|
9186
|
+
className: "nebula-ds w-full",
|
|
9187
|
+
isClearable: false,
|
|
9188
|
+
hideSelectArrow: true
|
|
9189
|
+
}
|
|
9190
|
+
),
|
|
9191
|
+
selectedValues.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nebula-ds flex flex-wrap gap-2", children: [
|
|
9192
|
+
selectedValues.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
9193
|
+
Tag,
|
|
9194
|
+
{
|
|
9195
|
+
color: item.color,
|
|
9196
|
+
onDelete: () => {
|
|
9197
|
+
const newValue = selectedValues.filter(
|
|
9198
|
+
(i) => i.value !== item.value
|
|
9199
|
+
);
|
|
9200
|
+
onChange?.(newValue);
|
|
9201
|
+
},
|
|
9202
|
+
children: item.label
|
|
9203
|
+
},
|
|
9204
|
+
item.value
|
|
9205
|
+
)),
|
|
9206
|
+
isClearable && /* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: () => onChange?.([]), size: "xs", variant: "ghost", children: /* @__PURE__ */ jsxRuntime.jsx(Paragraph, { children: messages23.combobox.removeAll }) })
|
|
9207
|
+
] }),
|
|
9208
|
+
selectedValues.length <= 0 && showEmptyState && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9209
|
+
Box,
|
|
9210
|
+
{
|
|
9211
|
+
variant: "secondary",
|
|
9212
|
+
shadow: "none",
|
|
9213
|
+
className: "nebula-ds w-full flex justify-center items-center rounded-lg dark:bg-neutral-900",
|
|
9214
|
+
paddingSize: "none",
|
|
9215
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9216
|
+
Space,
|
|
9217
|
+
{
|
|
9218
|
+
direction: "column",
|
|
9219
|
+
className: "nebula-ds justify-center items-center p-3 w-full",
|
|
9220
|
+
size: "xs",
|
|
9221
|
+
children: [
|
|
9222
|
+
/* @__PURE__ */ jsxRuntime.jsx(Heading, { level: "6", className: "nebula-ds text-center", children: emptyStateText || messages23.combobox.noItemsSelected }),
|
|
9223
|
+
/* @__PURE__ */ jsxRuntime.jsx(Paragraph, { size: "sm", className: "nebula-ds text-center", children: emptyStateDescription || messages23.combobox.selectAnOption })
|
|
9224
|
+
]
|
|
9225
|
+
}
|
|
9226
|
+
)
|
|
9227
|
+
}
|
|
9228
|
+
)
|
|
9229
|
+
] });
|
|
9230
|
+
}
|
|
9103
9231
|
|
|
9104
9232
|
// src/tailwind.ts
|
|
9105
9233
|
function content({ base = "./" } = {}) {
|
|
@@ -9162,6 +9290,7 @@ exports.Button = Button;
|
|
|
9162
9290
|
exports.Calendar = Calendar;
|
|
9163
9291
|
exports.Caption = Caption;
|
|
9164
9292
|
exports.Checkbox = Checkbox;
|
|
9293
|
+
exports.Combobox = Combobox;
|
|
9165
9294
|
exports.Creatable = StyledCreatable;
|
|
9166
9295
|
exports.Cropper = Cropper2;
|
|
9167
9296
|
exports.CropperCropArea = CropperCropArea2;
|
|
@@ -9293,7 +9422,7 @@ exports.dateIsAvailable = dateIsAvailable;
|
|
|
9293
9422
|
exports.formatBytes = formatBytes;
|
|
9294
9423
|
exports.getNebulaLanguage = getNebulaLanguage;
|
|
9295
9424
|
exports.localeByi18nKey = localeByi18nKey;
|
|
9296
|
-
exports.messages =
|
|
9425
|
+
exports.messages = messages22;
|
|
9297
9426
|
exports.separatorVariants = separatorVariants;
|
|
9298
9427
|
exports.setNebulaLanguage = setNebulaLanguage;
|
|
9299
9428
|
exports.tagVariantsEnum = tagVariantsEnum;
|