@liner-fe/prism 1.13.9 → 1.13.11

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/lib/index.mjs CHANGED
@@ -6981,7 +6981,17 @@ var useToast = /* @__PURE__ */ __name(() => {
6981
6981
  setToasts({
6982
6982
  list: [...toasts.list, list]
6983
6983
  });
6984
- }, "open")
6984
+ return { toastId };
6985
+ }, "open"),
6986
+ endLoading: /* @__PURE__ */ __name((toastId) => {
6987
+ setToasts((prev) => {
6988
+ return {
6989
+ list: prev.list.map((list) => {
6990
+ return { ...list, isLoading: list.toastId === toastId ? false : list.isLoading };
6991
+ })
6992
+ };
6993
+ });
6994
+ }, "endLoading")
6985
6995
  };
6986
6996
  }, "useToast");
6987
6997
 
@@ -6990,14 +7000,14 @@ import { Provider, Root, Title, Viewport } from "@radix-ui/react-toast";
6990
7000
 
6991
7001
  // src/components/Toast/style.module.scss
6992
7002
  var style_module_default3 = {
6993
- "Icon": "_Icon_g82xk_25",
6994
- "TitleText": "_TitleText_g82xk_31",
6995
- "ToastViewport": "_ToastViewport_g82xk_36",
6996
- "ToastRoot": "_ToastRoot_g82xk_60",
6997
- "ToastTitle": "_ToastTitle_g82xk_76",
6998
- "slideIn": "_slideIn_g82xk_1",
6999
- "hide": "_hide_g82xk_1",
7000
- "swipeOut": "_swipeOut_g82xk_1"
7003
+ "Icon": "_Icon_192n7_25",
7004
+ "TitleText": "_TitleText_192n7_31",
7005
+ "ToastViewport": "_ToastViewport_192n7_36",
7006
+ "ToastRoot": "_ToastRoot_192n7_60",
7007
+ "ToastTitle": "_ToastTitle_192n7_76",
7008
+ "slideIn": "_slideIn_192n7_1",
7009
+ "hide": "_hide_192n7_1",
7010
+ "swipeOut": "_swipeOut_192n7_1"
7001
7011
  };
7002
7012
 
7003
7013
  // src/components/Toast/index.tsx
@@ -7063,6 +7073,482 @@ var Paragraph = forwardRef2(
7063
7073
 
7064
7074
  // src/components/Toast/index.tsx
7065
7075
  import { useRecoilValue, useSetRecoilState as useSetRecoilState2 } from "recoil";
7076
+ import Lottie from "lottie-web";
7077
+
7078
+ // src/lottie/loading.json
7079
+ var loading_default = {
7080
+ v: "5.9.0",
7081
+ fr: 60,
7082
+ ip: 0,
7083
+ op: 60,
7084
+ w: 48,
7085
+ h: 48,
7086
+ nm: "Loading Lottie Outline #FFFFFF",
7087
+ ddd: 0,
7088
+ assets: [],
7089
+ layers: [
7090
+ {
7091
+ ddd: 0,
7092
+ ind: 1,
7093
+ ty: 4,
7094
+ nm: "Point 3",
7095
+ sr: 1,
7096
+ ks: {
7097
+ o: {
7098
+ a: 1,
7099
+ k: [
7100
+ { i: { x: [0.25], y: [1] }, o: { x: [0.5], y: [0] }, t: 0, s: [50] },
7101
+ { i: { x: [0.5], y: [1] }, o: { x: [0.5], y: [0] }, t: 40, s: [100] },
7102
+ { t: 60, s: [50] }
7103
+ ],
7104
+ ix: 11
7105
+ },
7106
+ r: { a: 0, k: 0, ix: 10 },
7107
+ p: { a: 0, k: [40, 24, 0], ix: 2, l: 2 },
7108
+ a: { a: 0, k: [40.25, 40.25, 0], ix: 1, l: 2 },
7109
+ s: {
7110
+ a: 1,
7111
+ k: [
7112
+ {
7113
+ i: { x: [0.25, 0.25, 0.667], y: [1, 1, 1] },
7114
+ o: { x: [0.5, 0.5, 0.333], y: [0, 0, 0] },
7115
+ t: 0,
7116
+ s: [12.5, 12.5, 100]
7117
+ },
7118
+ {
7119
+ i: { x: [0.5, 0.5, 0.667], y: [1, 1, 1] },
7120
+ o: { x: [0.5, 0.5, 0.333], y: [0, 0, 0] },
7121
+ t: 40,
7122
+ s: [10, 10, 100]
7123
+ },
7124
+ { t: 60, s: [12.5, 12.5, 100] }
7125
+ ],
7126
+ ix: 6,
7127
+ l: 2
7128
+ }
7129
+ },
7130
+ ao: 0,
7131
+ shapes: [
7132
+ {
7133
+ ty: "gr",
7134
+ it: [
7135
+ {
7136
+ ind: 0,
7137
+ ty: "sh",
7138
+ ix: 1,
7139
+ ks: {
7140
+ a: 0,
7141
+ k: {
7142
+ i: [
7143
+ [-11.046, 0],
7144
+ [0, 0],
7145
+ [0, -11.046],
7146
+ [0, 0],
7147
+ [11.046, 0],
7148
+ [0, 0],
7149
+ [0, 11.046],
7150
+ [0, 0]
7151
+ ],
7152
+ o: [
7153
+ [0, 0],
7154
+ [11.046, 0],
7155
+ [0, 0],
7156
+ [0, 11.046],
7157
+ [0, 0],
7158
+ [-11.046, 0],
7159
+ [0, 0],
7160
+ [0, -11.046]
7161
+ ],
7162
+ v: [
7163
+ [-20, -40],
7164
+ [20, -40],
7165
+ [40, -20],
7166
+ [40, 20],
7167
+ [20, 40],
7168
+ [-20, 40],
7169
+ [-40, 20],
7170
+ [-40, -20]
7171
+ ],
7172
+ c: true
7173
+ },
7174
+ ix: 2
7175
+ },
7176
+ nm: "Path 1",
7177
+ mn: "ADBE Vector Shape - Group",
7178
+ hd: false
7179
+ },
7180
+ {
7181
+ ty: "gr",
7182
+ it: [
7183
+ {
7184
+ ty: "tr",
7185
+ p: { a: 0, k: [0, 0], ix: 2 },
7186
+ a: { a: 0, k: [0, 0], ix: 1 },
7187
+ s: { a: 0, k: [100, 100], ix: 3 },
7188
+ r: { a: 0, k: 0, ix: 6 },
7189
+ o: { a: 0, k: 100, ix: 7 },
7190
+ sk: { a: 0, k: 0, ix: 4 },
7191
+ sa: { a: 0, k: 0, ix: 5 },
7192
+ nm: "Transform"
7193
+ }
7194
+ ],
7195
+ nm: "Group 1",
7196
+ np: 0,
7197
+ cix: 2,
7198
+ bm: 0,
7199
+ ix: 2,
7200
+ mn: "ADBE Vector Group",
7201
+ hd: false
7202
+ },
7203
+ { ty: "mm", mm: 4, nm: "Merge Paths 1", mn: "ADBE Vector Filter - Merge", hd: false },
7204
+ {
7205
+ ty: "fl",
7206
+ c: { a: 0, k: [1, 1, 1, 1], ix: 4 },
7207
+ o: { a: 0, k: 100, ix: 5 },
7208
+ r: 1,
7209
+ bm: 0,
7210
+ nm: "Fill 1",
7211
+ mn: "ADBE Vector Graphic - Fill",
7212
+ hd: false
7213
+ },
7214
+ {
7215
+ ty: "tr",
7216
+ p: { a: 0, k: [40.25, 40.25], ix: 2 },
7217
+ a: { a: 0, k: [0, 0], ix: 1 },
7218
+ s: { a: 0, k: [100, 100], ix: 3 },
7219
+ r: { a: 0, k: 0, ix: 6 },
7220
+ o: { a: 0, k: 100, ix: 7 },
7221
+ sk: { a: 0, k: 0, ix: 4 },
7222
+ sa: { a: 0, k: 0, ix: 5 },
7223
+ nm: "Transform"
7224
+ }
7225
+ ],
7226
+ nm: "Group 1",
7227
+ np: 4,
7228
+ cix: 2,
7229
+ bm: 0,
7230
+ ix: 1,
7231
+ mn: "ADBE Vector Group",
7232
+ hd: false
7233
+ }
7234
+ ],
7235
+ ip: 0,
7236
+ op: 60,
7237
+ st: 0,
7238
+ bm: 0
7239
+ },
7240
+ {
7241
+ ddd: 0,
7242
+ ind: 2,
7243
+ ty: 4,
7244
+ nm: "Point 2",
7245
+ sr: 1,
7246
+ ks: {
7247
+ o: {
7248
+ a: 1,
7249
+ k: [
7250
+ { i: { x: [0.466], y: [1] }, o: { x: [0.185], y: [0.563] }, t: 0, s: [85.479] },
7251
+ { i: { x: [0.5], y: [1] }, o: { x: [0.5], y: [0] }, t: 20, s: [100] },
7252
+ { i: { x: [0.666], y: [0.584] }, o: { x: [0.5], y: [0] }, t: 40, s: [50] },
7253
+ { t: 60, s: [85.479] }
7254
+ ],
7255
+ ix: 11
7256
+ },
7257
+ r: { a: 0, k: 0, ix: 10 },
7258
+ p: { a: 0, k: [24, 24, 0], ix: 2, l: 2 },
7259
+ a: { a: 0, k: [40.25, 40.25, 0], ix: 1, l: 2 },
7260
+ s: {
7261
+ a: 1,
7262
+ k: [
7263
+ {
7264
+ i: { x: [0.569, 0.569, 0.674], y: [1, 1, 1] },
7265
+ o: { x: [0.248, 0.248, 0.337], y: [1.236, 1.236, 0] },
7266
+ t: 0,
7267
+ s: [10.24, 10.24, 100]
7268
+ },
7269
+ {
7270
+ i: { x: [0.5, 0.5, 0.667], y: [1, 1, 1] },
7271
+ o: { x: [0.5, 0.5, 0.333], y: [0, 0, 0] },
7272
+ t: 20,
7273
+ s: [10, 10, 100]
7274
+ },
7275
+ {
7276
+ i: { x: [0.477, 0.477, 0.651], y: [0.723, 0.723, -3.226] },
7277
+ o: { x: [0.606, 0.606, 0.301], y: [0, 0, 0] },
7278
+ t: 40,
7279
+ s: [12.5, 12.5, 100]
7280
+ },
7281
+ { t: 60, s: [10.24, 10.24, 100] }
7282
+ ],
7283
+ ix: 6,
7284
+ l: 2
7285
+ }
7286
+ },
7287
+ ao: 0,
7288
+ shapes: [
7289
+ {
7290
+ ty: "gr",
7291
+ it: [
7292
+ {
7293
+ ind: 0,
7294
+ ty: "sh",
7295
+ ix: 1,
7296
+ ks: {
7297
+ a: 0,
7298
+ k: {
7299
+ i: [
7300
+ [-11.046, 0],
7301
+ [0, 0],
7302
+ [0, -11.046],
7303
+ [0, 0],
7304
+ [11.046, 0],
7305
+ [0, 0],
7306
+ [0, 11.046],
7307
+ [0, 0]
7308
+ ],
7309
+ o: [
7310
+ [0, 0],
7311
+ [11.046, 0],
7312
+ [0, 0],
7313
+ [0, 11.046],
7314
+ [0, 0],
7315
+ [-11.046, 0],
7316
+ [0, 0],
7317
+ [0, -11.046]
7318
+ ],
7319
+ v: [
7320
+ [-20, -40],
7321
+ [20, -40],
7322
+ [40, -20],
7323
+ [40, 20],
7324
+ [20, 40],
7325
+ [-20, 40],
7326
+ [-40, 20],
7327
+ [-40, -20]
7328
+ ],
7329
+ c: true
7330
+ },
7331
+ ix: 2
7332
+ },
7333
+ nm: "Path 1",
7334
+ mn: "ADBE Vector Shape - Group",
7335
+ hd: false
7336
+ },
7337
+ {
7338
+ ty: "gr",
7339
+ it: [
7340
+ {
7341
+ ty: "tr",
7342
+ p: { a: 0, k: [0, 0], ix: 2 },
7343
+ a: { a: 0, k: [0, 0], ix: 1 },
7344
+ s: { a: 0, k: [100, 100], ix: 3 },
7345
+ r: { a: 0, k: 0, ix: 6 },
7346
+ o: { a: 0, k: 100, ix: 7 },
7347
+ sk: { a: 0, k: 0, ix: 4 },
7348
+ sa: { a: 0, k: 0, ix: 5 },
7349
+ nm: "Transform"
7350
+ }
7351
+ ],
7352
+ nm: "Group 1",
7353
+ np: 0,
7354
+ cix: 2,
7355
+ bm: 0,
7356
+ ix: 2,
7357
+ mn: "ADBE Vector Group",
7358
+ hd: false
7359
+ },
7360
+ { ty: "mm", mm: 4, nm: "Merge Paths 1", mn: "ADBE Vector Filter - Merge", hd: false },
7361
+ {
7362
+ ty: "fl",
7363
+ c: { a: 0, k: [1, 1, 1, 1], ix: 4 },
7364
+ o: { a: 0, k: 100, ix: 5 },
7365
+ r: 1,
7366
+ bm: 0,
7367
+ nm: "Fill 1",
7368
+ mn: "ADBE Vector Graphic - Fill",
7369
+ hd: false
7370
+ },
7371
+ {
7372
+ ty: "tr",
7373
+ p: { a: 0, k: [40.25, 40.25], ix: 2 },
7374
+ a: { a: 0, k: [0, 0], ix: 1 },
7375
+ s: { a: 0, k: [100, 100], ix: 3 },
7376
+ r: { a: 0, k: 0, ix: 6 },
7377
+ o: { a: 0, k: 100, ix: 7 },
7378
+ sk: { a: 0, k: 0, ix: 4 },
7379
+ sa: { a: 0, k: 0, ix: 5 },
7380
+ nm: "Transform"
7381
+ }
7382
+ ],
7383
+ nm: "Group 1",
7384
+ np: 4,
7385
+ cix: 2,
7386
+ bm: 0,
7387
+ ix: 1,
7388
+ mn: "ADBE Vector Group",
7389
+ hd: false
7390
+ }
7391
+ ],
7392
+ ip: 0,
7393
+ op: 60,
7394
+ st: -1,
7395
+ bm: 0
7396
+ },
7397
+ {
7398
+ ddd: 0,
7399
+ ind: 3,
7400
+ ty: 4,
7401
+ nm: "Point 1",
7402
+ sr: 1,
7403
+ ks: {
7404
+ o: {
7405
+ a: 1,
7406
+ k: [
7407
+ { i: { x: [0.5], y: [1] }, o: { x: [0.5], y: [0] }, t: 0, s: [100] },
7408
+ { i: { x: [0.25], y: [1] }, o: { x: [0.5], y: [0] }, t: 20, s: [50] },
7409
+ { t: 60, s: [100] }
7410
+ ],
7411
+ ix: 11
7412
+ },
7413
+ r: { a: 0, k: 0, ix: 10 },
7414
+ p: { a: 0, k: [7.969, 24.031, 0], ix: 2, l: 2 },
7415
+ a: { a: 0, k: [40.5, 40.375, 0], ix: 1, l: 2 },
7416
+ s: {
7417
+ a: 1,
7418
+ k: [
7419
+ {
7420
+ i: { x: [0.5, 0.5, 0.667], y: [1, 1, 1] },
7421
+ o: { x: [0.5, 0.5, 0.333], y: [0, 0, 0] },
7422
+ t: 0,
7423
+ s: [10, 10, 100]
7424
+ },
7425
+ {
7426
+ i: { x: [0.25, 0.25, 0.667], y: [1, 1, 1] },
7427
+ o: { x: [0.5, 0.5, 0.333], y: [0, 0, 0] },
7428
+ t: 20,
7429
+ s: [12.5, 12.5, 100]
7430
+ },
7431
+ { t: 60, s: [10, 10, 100] }
7432
+ ],
7433
+ ix: 6,
7434
+ l: 2
7435
+ }
7436
+ },
7437
+ ao: 0,
7438
+ shapes: [
7439
+ {
7440
+ ty: "gr",
7441
+ it: [
7442
+ {
7443
+ ind: 0,
7444
+ ty: "sh",
7445
+ ix: 1,
7446
+ ks: {
7447
+ a: 0,
7448
+ k: {
7449
+ i: [
7450
+ [-11.046, 0],
7451
+ [0, 0],
7452
+ [0, -11.046],
7453
+ [0, 0],
7454
+ [11.046, 0],
7455
+ [0, 0],
7456
+ [0, 11.046],
7457
+ [0, 0]
7458
+ ],
7459
+ o: [
7460
+ [0, 0],
7461
+ [11.046, 0],
7462
+ [0, 0],
7463
+ [0, 11.046],
7464
+ [0, 0],
7465
+ [-11.046, 0],
7466
+ [0, 0],
7467
+ [0, -11.046]
7468
+ ],
7469
+ v: [
7470
+ [-20, -40],
7471
+ [20, -40],
7472
+ [40, -20],
7473
+ [40, 20],
7474
+ [20, 40],
7475
+ [-20, 40],
7476
+ [-40, 20],
7477
+ [-40, -20]
7478
+ ],
7479
+ c: true
7480
+ },
7481
+ ix: 2
7482
+ },
7483
+ nm: "Path 1",
7484
+ mn: "ADBE Vector Shape - Group",
7485
+ hd: false
7486
+ },
7487
+ {
7488
+ ty: "gr",
7489
+ it: [
7490
+ {
7491
+ ty: "tr",
7492
+ p: { a: 0, k: [0, 0], ix: 2 },
7493
+ a: { a: 0, k: [0, 0], ix: 1 },
7494
+ s: { a: 0, k: [100, 100], ix: 3 },
7495
+ r: { a: 0, k: 0, ix: 6 },
7496
+ o: { a: 0, k: 100, ix: 7 },
7497
+ sk: { a: 0, k: 0, ix: 4 },
7498
+ sa: { a: 0, k: 0, ix: 5 },
7499
+ nm: "Transform"
7500
+ }
7501
+ ],
7502
+ nm: "Group 1",
7503
+ np: 0,
7504
+ cix: 2,
7505
+ bm: 0,
7506
+ ix: 2,
7507
+ mn: "ADBE Vector Group",
7508
+ hd: false
7509
+ },
7510
+ { ty: "mm", mm: 4, nm: "Merge Paths 1", mn: "ADBE Vector Filter - Merge", hd: false },
7511
+ {
7512
+ ty: "fl",
7513
+ c: { a: 0, k: [1, 1, 1, 1], ix: 4 },
7514
+ o: { a: 0, k: 100, ix: 5 },
7515
+ r: 1,
7516
+ bm: 0,
7517
+ nm: "Fill 1",
7518
+ mn: "ADBE Vector Graphic - Fill",
7519
+ hd: false
7520
+ },
7521
+ {
7522
+ ty: "tr",
7523
+ p: { a: 0, k: [40.25, 40.25], ix: 2 },
7524
+ a: { a: 0, k: [0, 0], ix: 1 },
7525
+ s: { a: 0, k: [100, 100], ix: 3 },
7526
+ r: { a: 0, k: 0, ix: 6 },
7527
+ o: { a: 0, k: 100, ix: 7 },
7528
+ sk: { a: 0, k: 0, ix: 4 },
7529
+ sa: { a: 0, k: 0, ix: 5 },
7530
+ nm: "Transform"
7531
+ }
7532
+ ],
7533
+ nm: "Group 1",
7534
+ np: 4,
7535
+ cix: 2,
7536
+ bm: 0,
7537
+ ix: 1,
7538
+ mn: "ADBE Vector Group",
7539
+ hd: false
7540
+ }
7541
+ ],
7542
+ ip: 0,
7543
+ op: 60,
7544
+ st: 0,
7545
+ bm: 0
7546
+ }
7547
+ ],
7548
+ markers: []
7549
+ };
7550
+
7551
+ // src/components/Toast/index.tsx
7066
7552
  import { jsx as jsx143, jsxs as jsxs102 } from "react/jsx-runtime";
7067
7553
  import { createElement } from "react";
7068
7554
  var Toaster = /* @__PURE__ */ __name(() => {
@@ -7075,8 +7561,10 @@ var Toaster = /* @__PURE__ */ __name(() => {
7075
7561
  var SingleToast = /* @__PURE__ */ __name((props) => {
7076
7562
  const setToast = useSetRecoilState2(toastAtom);
7077
7563
  const timerRef = useRef();
7078
- const { message, icon, button, timer, toastId } = props;
7564
+ const { message, icon, button, timer, toastId, isLoading } = props;
7079
7565
  const [isOpen, setIsOpen] = useState(true);
7566
+ const lottieRef = useRef(null);
7567
+ const toastSuccess = useRef(false);
7080
7568
  const removeToast = /* @__PURE__ */ __name(() => {
7081
7569
  setToast((prev) => {
7082
7570
  return {
@@ -7086,20 +7574,37 @@ var SingleToast = /* @__PURE__ */ __name((props) => {
7086
7574
  timerRef.current && clearTimeout(timerRef.current);
7087
7575
  }, "removeToast");
7088
7576
  useEffect(() => {
7089
- timerRef.current = setTimeout(() => {
7090
- removeToast();
7091
- clearTimeout(timerRef.current);
7092
- }, timer + ONE_SECOND);
7093
- const preCloseTimeout = setTimeout(() => {
7094
- setIsOpen(false);
7095
- }, timer);
7096
- return () => {
7097
- clearTimeout(preCloseTimeout);
7098
- clearTimeout(timerRef.current);
7099
- };
7100
- }, []);
7577
+ if (isLoading && !toastSuccess.current) {
7578
+ if (lottieRef.current) {
7579
+ Lottie.loadAnimation({
7580
+ container: lottieRef.current,
7581
+ renderer: "svg",
7582
+ loop: true,
7583
+ autoplay: true,
7584
+ animationData: loading_default
7585
+ });
7586
+ }
7587
+ } else {
7588
+ toastSuccess.current = true;
7589
+ timerRef.current = setTimeout(() => {
7590
+ removeToast();
7591
+ clearTimeout(timerRef.current);
7592
+ }, timer + ONE_SECOND);
7593
+ const preCloseTimeout = setTimeout(() => {
7594
+ setIsOpen(false);
7595
+ }, timer);
7596
+ return () => {
7597
+ clearTimeout(preCloseTimeout);
7598
+ clearTimeout(timerRef.current);
7599
+ };
7600
+ }
7601
+ }, [isLoading]);
7602
+ const renderIcon = /* @__PURE__ */ __name(() => {
7603
+ if (!icon) return null;
7604
+ return /* @__PURE__ */ jsx143("i", { className: style_module_default3.Icon, children: /* @__PURE__ */ jsx143(Icon, { ...icon, size: "m" }) });
7605
+ }, "renderIcon");
7101
7606
  return /* @__PURE__ */ jsxs102(Root, { className: style_module_default3.ToastRoot, open: isOpen, ...props, children: [
7102
- icon && /* @__PURE__ */ jsx143("i", { className: style_module_default3.Icon, children: /* @__PURE__ */ jsx143(Icon, { ...icon, size: "s" }) }),
7607
+ isLoading && !toastSuccess.current ? /* @__PURE__ */ jsx143("div", { ref: lottieRef, style: { width: "24px", height: "24px" } }) : renderIcon(),
7103
7608
  /* @__PURE__ */ jsxs102(Title, { className: style_module_default3.ToastTitle, children: [
7104
7609
  /* @__PURE__ */ jsx143(
7105
7610
  Paragraph,
@@ -7750,7 +8255,7 @@ var Textfield = forwardRef13((props, ref) => {
7750
8255
  const isPassword = type === "password";
7751
8256
  const isDeidentified = isPassword && deidentifiy;
7752
8257
  const labelText = label?.text;
7753
- const labelType = label?.type;
8258
+ const labelType = label?.type ?? "in";
7754
8259
  const textfieldValue = isControlled ? controlledValue : value;
7755
8260
  const displayFooter = maxCharacter || error;
7756
8261
  const handleTextfieldClick = /* @__PURE__ */ __name(() => {