@idds/react 1.1.86 → 1.1.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +2 -2
- package/dist/index.css +1 -1
- package/dist/index.es.js +30 -32
- package/dist/index.umd.js +2 -2
- package/dist/types/components/Toast.d.ts +2 -2
- package/dist/types/components/Toast.d.ts.map +1 -1
- package/dist/types/index.d.ts +8 -8
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import React, { createContext, useRef, useState, useCallback, useMemo, useContext, useEffect, forwardRef, createElement, Fragment as Fragment$1, useId, useImperativeHandle } from "react";
|
|
3
3
|
import { createPortal } from "react-dom";
|
|
4
|
-
const
|
|
4
|
+
const iddsColorTokens = {
|
|
5
5
|
// Neutral Colors
|
|
6
6
|
"neutral-25": "var(--ina-neutral-25)",
|
|
7
7
|
"neutral-50": "var(--ina-neutral-50)",
|
|
@@ -198,7 +198,7 @@ const iddsColorToken = {
|
|
|
198
198
|
white: "var(--ina-white)",
|
|
199
199
|
black: "var(--ina-black)"
|
|
200
200
|
};
|
|
201
|
-
const
|
|
201
|
+
const inagovColorTokens = {
|
|
202
202
|
// Primary shades
|
|
203
203
|
"primary-25": "var(--ina-primary-25)",
|
|
204
204
|
"primary-50": "var(--ina-primary-50)",
|
|
@@ -223,7 +223,7 @@ const inagovTokens = {
|
|
|
223
223
|
"brand-hover": "var(--ina-brand-hover)",
|
|
224
224
|
"neutral-hover": "var(--ina-neutral-hover)"
|
|
225
225
|
};
|
|
226
|
-
const
|
|
226
|
+
const inakuColorTokens = {
|
|
227
227
|
// Primary shades
|
|
228
228
|
"primary-25": "var(--ina-primary-25)",
|
|
229
229
|
"primary-50": "var(--ina-primary-50)",
|
|
@@ -248,7 +248,7 @@ const inakuTokens = {
|
|
|
248
248
|
"inaku-brand-hover": "var(--ina-inaku-brand-hover)",
|
|
249
249
|
"inaku-neutral-hover": "var(--ina-inaku-neutral-hover)"
|
|
250
250
|
};
|
|
251
|
-
const
|
|
251
|
+
const inapasColorTokens = {
|
|
252
252
|
// Primary shades
|
|
253
253
|
"primary-25": "var(--ina-primary-25)",
|
|
254
254
|
"primary-50": "var(--ina-primary-50)",
|
|
@@ -273,7 +273,7 @@ const inapasTokens = {
|
|
|
273
273
|
"inapas-brand-hover": "var(--ina-inapas-brand-hover)",
|
|
274
274
|
"inapas-neutral-hover": "var(--ina-inapas-neutral-hover)"
|
|
275
275
|
};
|
|
276
|
-
const
|
|
276
|
+
const bgnColorTokens = {
|
|
277
277
|
// Primary shades
|
|
278
278
|
"primary-50": "var(--ina-primary-50)",
|
|
279
279
|
"primary-100": "var(--ina-primary-100)",
|
|
@@ -286,7 +286,7 @@ const bgnTokens = {
|
|
|
286
286
|
"primary-800": "var(--ina-primary-800)",
|
|
287
287
|
"primary-900": "var(--ina-primary-900)"
|
|
288
288
|
};
|
|
289
|
-
const
|
|
289
|
+
const bknColorTokens = {
|
|
290
290
|
// Primary shades
|
|
291
291
|
"primary-25": "var(--ina-primary-25)",
|
|
292
292
|
"primary-50": "var(--ina-primary-50)",
|
|
@@ -315,7 +315,7 @@ const bknTokens = {
|
|
|
315
315
|
"bkn-brand-hover": "var(--ina-bkn-brand-hover)",
|
|
316
316
|
"bkn-neutral-hover": "var(--ina-bkn-neutral-hover)"
|
|
317
317
|
};
|
|
318
|
-
const
|
|
318
|
+
const lanColorTokens = {
|
|
319
319
|
// Primary shades
|
|
320
320
|
"primary-25": "var(--ina-primary-25)",
|
|
321
321
|
"primary-50": "var(--ina-primary-50)",
|
|
@@ -349,7 +349,7 @@ const lanTokens = {
|
|
|
349
349
|
"lan-brand-hover": "var(--ina-lan-brand-hover)",
|
|
350
350
|
"lan-neutral-hover": "var(--ina-lan-neutral-hover)"
|
|
351
351
|
};
|
|
352
|
-
const
|
|
352
|
+
const panrbColorTokens = {
|
|
353
353
|
// Primary shades
|
|
354
354
|
"primary-25": "var(--ina-primary-25)",
|
|
355
355
|
"primary-50": "var(--ina-primary-50)",
|
|
@@ -880,16 +880,16 @@ const IconChevronsRight = createReactComponent("outline", "chevrons-right", "Che
|
|
|
880
880
|
* This source code is licensed under the MIT license.
|
|
881
881
|
* See the LICENSE file in the root directory of this source tree.
|
|
882
882
|
*/
|
|
883
|
-
const __iconNode$f = [["path", { "d": "
|
|
884
|
-
const
|
|
883
|
+
const __iconNode$f = [["path", { "d": "M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0", "key": "svg-0" }], ["path", { "d": "M9 12l2 2l4 -4", "key": "svg-1" }]];
|
|
884
|
+
const IconCircleCheck = createReactComponent("outline", "circle-check", "CircleCheck", __iconNode$f);
|
|
885
885
|
/**
|
|
886
886
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
887
887
|
*
|
|
888
888
|
* This source code is licensed under the MIT license.
|
|
889
889
|
* See the LICENSE file in the root directory of this source tree.
|
|
890
890
|
*/
|
|
891
|
-
const __iconNode$e = [["path", { "d": "
|
|
892
|
-
const
|
|
891
|
+
const __iconNode$e = [["path", { "d": "M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0", "key": "svg-0" }], ["path", { "d": "M12 7v5l3 3", "key": "svg-1" }]];
|
|
892
|
+
const IconClock = createReactComponent("outline", "clock", "Clock", __iconNode$e);
|
|
893
893
|
/**
|
|
894
894
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
895
895
|
*
|
|
@@ -5286,12 +5286,10 @@ const TimePicker = forwardRef(
|
|
|
5286
5286
|
}
|
|
5287
5287
|
);
|
|
5288
5288
|
TimePicker.displayName = "TimePicker";
|
|
5289
|
-
const
|
|
5290
|
-
|
|
5291
|
-
|
|
5292
|
-
|
|
5293
|
-
info: /* @__PURE__ */ jsx(IconInfoCircle, { size: 20 }),
|
|
5294
|
-
negative: /* @__PURE__ */ jsx(IconAlertCircle, { size: 20 })
|
|
5289
|
+
const stateIconMap = {
|
|
5290
|
+
default: /* @__PURE__ */ jsx(IconInfoCircle, { size: 20 }),
|
|
5291
|
+
destructive: /* @__PURE__ */ jsx(IconAlertCircle, { size: 20 }),
|
|
5292
|
+
positive: /* @__PURE__ */ jsx(IconCircleCheck, { size: 20 })
|
|
5295
5293
|
};
|
|
5296
5294
|
function getOrCreateContainer(position) {
|
|
5297
5295
|
const id = `ina-toast-container-${position}`;
|
|
@@ -5325,8 +5323,8 @@ function Toast({
|
|
|
5325
5323
|
title,
|
|
5326
5324
|
description = "",
|
|
5327
5325
|
actionNode,
|
|
5328
|
-
|
|
5329
|
-
style = "
|
|
5326
|
+
state = "default",
|
|
5327
|
+
style = "solid",
|
|
5330
5328
|
duration = 5e3,
|
|
5331
5329
|
position = "top-right",
|
|
5332
5330
|
className = ""
|
|
@@ -5336,7 +5334,7 @@ function Toast({
|
|
|
5336
5334
|
const [isVisible, setIsVisible] = useState(false);
|
|
5337
5335
|
const timerRef = useRef();
|
|
5338
5336
|
const containerRef = useRef(null);
|
|
5339
|
-
const icon =
|
|
5337
|
+
const icon = stateIconMap[state];
|
|
5340
5338
|
useEffect(() => {
|
|
5341
5339
|
setMounted(true);
|
|
5342
5340
|
}, []);
|
|
@@ -5367,7 +5365,7 @@ function Toast({
|
|
|
5367
5365
|
if (!mounted || !isDisplayed || !containerRef.current) return null;
|
|
5368
5366
|
const toastClasses = clsx(
|
|
5369
5367
|
"ina-toast",
|
|
5370
|
-
`ina-toast--
|
|
5368
|
+
`ina-toast--state-${state}`,
|
|
5371
5369
|
`ina-toast--style-${style}`,
|
|
5372
5370
|
`ina-toast--${isVisible ? "visible" : "hidden"}`,
|
|
5373
5371
|
className
|
|
@@ -5653,7 +5651,7 @@ const ToastProvider = ({ children }) => {
|
|
|
5653
5651
|
title: t.title,
|
|
5654
5652
|
description: t.description,
|
|
5655
5653
|
actionNode: t.actionNode,
|
|
5656
|
-
|
|
5654
|
+
state: t.state,
|
|
5657
5655
|
duration: t.duration,
|
|
5658
5656
|
position: t.position,
|
|
5659
5657
|
className: t.className
|
|
@@ -9648,8 +9646,8 @@ export {
|
|
|
9648
9646
|
Toggle,
|
|
9649
9647
|
Tooltip,
|
|
9650
9648
|
YearPicker,
|
|
9651
|
-
|
|
9652
|
-
|
|
9649
|
+
bgnColorTokens,
|
|
9650
|
+
bknColorTokens,
|
|
9653
9651
|
containsDangerousPatterns,
|
|
9654
9652
|
decodeHtmlEntities,
|
|
9655
9653
|
encodeHtmlEntities,
|
|
@@ -9658,18 +9656,18 @@ export {
|
|
|
9658
9656
|
getCookie,
|
|
9659
9657
|
getCurrentLocation,
|
|
9660
9658
|
getCurrentTheme,
|
|
9661
|
-
|
|
9662
|
-
|
|
9663
|
-
|
|
9664
|
-
|
|
9665
|
-
|
|
9659
|
+
iddsColorTokens,
|
|
9660
|
+
iddsColorTokens as inaColorTokens,
|
|
9661
|
+
inagovColorTokens,
|
|
9662
|
+
inakuColorTokens,
|
|
9663
|
+
inapasColorTokens,
|
|
9666
9664
|
initializeTheme,
|
|
9667
9665
|
isValidBrand,
|
|
9668
|
-
|
|
9666
|
+
lanColorTokens,
|
|
9669
9667
|
onlyAlphanumeric,
|
|
9670
9668
|
onlyDecimalNumber,
|
|
9671
9669
|
onlyNumericValue,
|
|
9672
|
-
|
|
9670
|
+
panrbColorTokens,
|
|
9673
9671
|
resetTheme,
|
|
9674
9672
|
sanitizeInput,
|
|
9675
9673
|
setBrandTheme,
|