@idds/react 1.1.86 → 1.1.88

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.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 iddsColorToken = {
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 inagovTokens = {
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 inakuTokens = {
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 inapasTokens = {
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 bgnTokens = {
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 bknTokens = {
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 lanTokens = {
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 panrbTokens = {
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": "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" }]];
884
- const IconClock = createReactComponent("outline", "clock", "Clock", __iconNode$f);
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": "M6 17.6l-2 -1.1v-2.5", "key": "svg-0" }], ["path", { "d": "M4 10v-2.5l2 -1.1", "key": "svg-1" }], ["path", { "d": "M10 4.1l2 -1.1l2 1.1", "key": "svg-2" }], ["path", { "d": "M18 6.4l2 1.1v2.5", "key": "svg-3" }], ["path", { "d": "M20 14v2.5l-2 1.12", "key": "svg-4" }], ["path", { "d": "M14 19.9l-2 1.1l-2 -1.1", "key": "svg-5" }], ["path", { "d": "M12 12l2 -1.1", "key": "svg-6" }], ["path", { "d": "M18 8.6l2 -1.1", "key": "svg-7" }], ["path", { "d": "M12 12l0 2.5", "key": "svg-8" }], ["path", { "d": "M12 18.5l0 2.5", "key": "svg-9" }], ["path", { "d": "M12 12l-2 -1.12", "key": "svg-10" }], ["path", { "d": "M6 8.6l-2 -1.1", "key": "svg-11" }]];
892
- const IconCube3dSphere = createReactComponent("outline", "cube-3d-sphere", "Cube3dSphere", __iconNode$e);
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 variantIconMap = {
5290
- neutral: /* @__PURE__ */ jsx(IconCube3dSphere, { size: 20 }),
5291
- positive: /* @__PURE__ */ jsx(IconCheck, { size: 20 }),
5292
- warning: /* @__PURE__ */ jsx(IconAlertTriangle, { size: 20 }),
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
- variant = "info",
5329
- style = "outline",
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 = variantIconMap[variant];
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--variant-${variant}`,
5368
+ `ina-toast--state-${state}`,
5371
5369
  `ina-toast--style-${style}`,
5372
5370
  `ina-toast--${isVisible ? "visible" : "hidden"}`,
5373
5371
  className
@@ -5652,8 +5650,9 @@ const ToastProvider = ({ children }) => {
5652
5650
  onClose: () => handleClose(t.id),
5653
5651
  title: t.title,
5654
5652
  description: t.description,
5653
+ style: t.style,
5655
5654
  actionNode: t.actionNode,
5656
- variant: t.variant,
5655
+ state: t.state,
5657
5656
  duration: t.duration,
5658
5657
  position: t.position,
5659
5658
  className: t.className
@@ -9648,8 +9647,8 @@ export {
9648
9647
  Toggle,
9649
9648
  Tooltip,
9650
9649
  YearPicker,
9651
- bgnTokens,
9652
- bknTokens,
9650
+ bgnColorTokens,
9651
+ bknColorTokens,
9653
9652
  containsDangerousPatterns,
9654
9653
  decodeHtmlEntities,
9655
9654
  encodeHtmlEntities,
@@ -9658,18 +9657,18 @@ export {
9658
9657
  getCookie,
9659
9658
  getCurrentLocation,
9660
9659
  getCurrentTheme,
9661
- iddsColorToken,
9662
- iddsColorToken as inaColorTokens,
9663
- inagovTokens,
9664
- inakuTokens,
9665
- inapasTokens,
9660
+ iddsColorTokens,
9661
+ iddsColorTokens as inaColorTokens,
9662
+ inagovColorTokens,
9663
+ inakuColorTokens,
9664
+ inapasColorTokens,
9666
9665
  initializeTheme,
9667
9666
  isValidBrand,
9668
- lanTokens,
9667
+ lanColorTokens,
9669
9668
  onlyAlphanumeric,
9670
9669
  onlyDecimalNumber,
9671
9670
  onlyNumericValue,
9672
- panrbTokens,
9671
+ panrbColorTokens,
9673
9672
  resetTheme,
9674
9673
  sanitizeInput,
9675
9674
  setBrandTheme,