@rovula/ui 0.0.73 → 0.0.74

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.
@@ -16,3 +16,4 @@ export declare const Leaf: StoryObj<typeof Tree>;
16
16
  export declare const HideCheckboxMode: StoryObj<typeof Tree>;
17
17
  export declare const RadioMode: StoryObj<typeof Tree>;
18
18
  export declare const CheckAll: StoryObj<typeof Tree>;
19
+ export declare const LongText: StoryObj<typeof Tree>;
@@ -2770,6 +2770,10 @@ input[type=number] {
2770
2770
  min-width: fit-content;
2771
2771
  }
2772
2772
 
2773
+ .max-w-\[300px\] {
2774
+ max-width: 300px;
2775
+ }
2776
+
2773
2777
  .max-w-full {
2774
2778
  max-width: 100%;
2775
2779
  }
@@ -3064,6 +3068,10 @@ input[type=number] {
3064
3068
  white-space: nowrap;
3065
3069
  }
3066
3070
 
3071
+ .break-all {
3072
+ word-break: break-all;
3073
+ }
3074
+
3067
3075
  .rounded {
3068
3076
  border-radius: 0.25rem;
3069
3077
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rovula/ui",
3
- "version": "0.0.73",
3
+ "version": "0.0.74",
4
4
  "main": "dist/cjs/bundle.js",
5
5
  "module": "dist/esm/bundle.js",
6
6
  "types": "dist/index.d.ts",
@@ -446,3 +446,103 @@ export const CheckAll: StoryObj<typeof Tree> = {
446
446
  );
447
447
  },
448
448
  };
449
+
450
+ export const LongText: StoryObj<typeof Tree> = {
451
+ args: {
452
+ data: [
453
+ {
454
+ id: "2699d80b-6772-4878-9639-75e370786e79",
455
+ title:
456
+ "Level1 RUNLINE_LV_2_00000000000000000000000000000000000000000000000000000000",
457
+ children: [
458
+ {
459
+ id: "9b4511f4-ad9a-42e0-8376-60d5edbeffb3",
460
+ title:
461
+ "Level1 RUNLINE_LV_3_0000000000000000000000000000000000000000000000000000",
462
+ children: [
463
+ {
464
+ id: "c8d5dfb5-6c61-482b-88fe-186eb7685479",
465
+ title: "2025-07-27_05-25-53",
466
+ children: [],
467
+ },
468
+ {
469
+ id: "81ff1dd0-b283-4f60-864e-5d814e99d903",
470
+ title: "2025-07-27_06-05-53",
471
+ children: [],
472
+ },
473
+ ],
474
+ },
475
+ ],
476
+ },
477
+ {
478
+ id: "ad79c17b-2861-431a-af0e-3f1c73164508",
479
+ title: "RUNLINE_LV_2",
480
+ children: [
481
+ {
482
+ id: "46ee87c4-4ea7-48f8-9ed9-14833e4dacc2",
483
+ title: "2025-07-27_06-25-53",
484
+ children: [],
485
+ },
486
+ {
487
+ id: "1379b081-9f7f-4d82-8470-8321d9b7de0c",
488
+ title: "RUNLINE_LV_3",
489
+ children: [
490
+ {
491
+ id: "cf9145d4-ad06-4433-8384-4c10d266a6aa",
492
+ title: "2025-07-26_19-01-31",
493
+ children: [],
494
+ },
495
+ {
496
+ id: "f247313c-01cb-4363-a390-a72b889c72d3",
497
+ title: "2025-07-26_19-11-31",
498
+ children: [],
499
+ },
500
+ {
501
+ id: "0b7c650a-0d78-4e6e-8399-5dbaeb510751",
502
+ title: "Lv4",
503
+ children: [
504
+ {
505
+ id: "88d89572-462d-46c9-b4d0-4df736117799",
506
+ title: "Lv 5",
507
+ children: [],
508
+ },
509
+ ],
510
+ },
511
+ ],
512
+ },
513
+ ],
514
+ },
515
+ ],
516
+ },
517
+ render: (args) => {
518
+ const [isCheckedAll, setIsCheckedAll] = useState(false);
519
+ const [checkedId, onCheckedId] = useState<string[]>([]);
520
+
521
+ return (
522
+ <div className="flex flex-col gap-4 w-full">
523
+ <div className="flex gap-2">
524
+ <Button
525
+ variant="outline"
526
+ onClick={() => setIsCheckedAll(!isCheckedAll)}
527
+ >
528
+ {isCheckedAll ? "Unchecked" : "Checked"} All
529
+ </Button>
530
+ <Button variant="outline" onClick={() => onCheckedId([])}>
531
+ Clear
532
+ </Button>
533
+ </div>
534
+ <div className="w-full max-w-[300px]">
535
+ <Tree
536
+ {...args}
537
+ hierarchicalCheck
538
+ checkedAll={isCheckedAll}
539
+ checkedId={checkedId}
540
+ onCheckedChange={(state) => {
541
+ onCheckedId(Object.keys(state).filter((key) => state?.[key]));
542
+ }}
543
+ />
544
+ </div>
545
+ </div>
546
+ );
547
+ },
548
+ };
@@ -241,7 +241,7 @@ const TreeItem: FC<TreeItemProps> = ({
241
241
  {showIcon ? customIcon || defaultIcon : null}
242
242
  <div
243
243
  className={cn(
244
- "flex flex-1 cursor-pointer text-subtitle5 text-ellipsis",
244
+ "flex flex-1 cursor-pointer text-subtitle5 text-ellipsis overflow-hidden break-all text-left",
245
245
  classes?.title
246
246
  )}
247
247
  >