mithril-materialized 2.0.0-beta.11 → 2.0.0-beta.14

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/README.md CHANGED
@@ -54,7 +54,7 @@ Your CSS imports can remain the same, but you no longer need the materialize-css
54
54
  - EmailInput
55
55
  - NumberInput
56
56
  - ColorInput
57
- - RangeInput
57
+ - RangeInput (with vertical and double-thumb support)
58
58
  - Chips
59
59
  - [Pickers](https://erikvullings.github.io/mithril-materialized/#!/pickers)
60
60
  - DatePicker (with optional week numbers)
@@ -85,6 +85,7 @@ Your CSS imports can remain the same, but you no longer need the materialize-css
85
85
  - Parallax
86
86
  - Data & Tables
87
87
  - DataTable (sorting, filtering, pagination, selection)
88
+ - TreeView (hierarchical data with expand/collapse, selection, and customizable icons)
88
89
  - Additional
89
90
  - Label
90
91
  - HelperText
@@ -116,8 +117,10 @@ Your CSS imports can remain the same, but you no longer need the materialize-css
116
117
  import {
117
118
  TextInput,
118
119
  Button,
120
+ RangeInput,
119
121
  DatePicker,
120
122
  DataTable,
123
+ TreeView,
121
124
  ThemeToggle,
122
125
  FileUpload,
123
126
  Sidenav,
@@ -148,6 +151,38 @@ Your CSS imports can remain the same, but you no longer need the materialize-css
148
151
  label: 'Your name',
149
152
  onchange: (value) => console.log(value)
150
153
  }),
154
+
155
+ // Enhanced range sliders
156
+ m(RangeInput, {
157
+ label: 'Volume',
158
+ min: 0,
159
+ max: 100,
160
+ showValue: true,
161
+ onchange: (value) => console.log('Volume:', value)
162
+ }),
163
+
164
+ m(RangeInput, {
165
+ label: 'Price Range',
166
+ min: 0,
167
+ max: 1000,
168
+ minmax: true,
169
+ minValue: 100,
170
+ maxValue: 500,
171
+ showValue: true,
172
+ onchange: (min, max) => console.log('Range:', min, '-', max)
173
+ }),
174
+
175
+ m(RangeInput, {
176
+ label: 'Vertical Slider',
177
+ min: 0,
178
+ max: 100,
179
+ vertical: true,
180
+ height: '200px',
181
+ showValue: true,
182
+ tooltipPos: 'right',
183
+ onchange: (value) => console.log('Vertical:', value)
184
+ }),
185
+
151
186
  m(Button, {
152
187
  label: 'Submit',
153
188
  onclick: () => alert('Hello!')
@@ -158,6 +193,25 @@ Your CSS imports can remain the same, but you no longer need the materialize-css
158
193
  accept: 'image/*',
159
194
  multiple: true,
160
195
  onFilesSelected: (files) => console.log(files)
196
+ }),
197
+
198
+ // TreeView for hierarchical data
199
+ m(TreeView, {
200
+ data: [
201
+ {
202
+ id: 'root',
203
+ label: 'Project Root',
204
+ expanded: true,
205
+ children: [
206
+ { id: 'src', label: 'src/' },
207
+ { id: 'docs', label: 'docs/' },
208
+ ]
209
+ }
210
+ ],
211
+ selectionMode: 'multiple',
212
+ iconType: 'caret',
213
+ showConnectors: true,
214
+ onselection: (selectedIds) => console.log('Selected:', selectedIds)
161
215
  })
162
216
  ])
163
217
  });
@@ -190,15 +244,17 @@ See the [live documentation](https://erikvullings.github.io/mithril-materialized
190
244
  **✅ Recently Completed:**
191
245
 
192
246
  - ✅ DataTable component with sorting, filtering, and pagination
247
+ - ✅ TreeView component for hierarchical data with expand/collapse, selection, and VSCode-style connectors
193
248
  - ✅ Enhanced TypeScript definitions with better JSDoc comments
194
249
  - ✅ Performance optimizations and bundle size improvements
250
+ - ✅ Enhanced RangeInput with vertical orientation and double-thumb range selection
195
251
 
196
252
  ### 🎯 Phase 2: Advanced Components & Features
197
253
 
198
254
  **Data Display:**
199
255
 
200
- - TreeView component for hierarchical data
201
256
  - Card layouts with enhanced Material Design 3.0 styling
257
+ - Advanced tree operations (drag & drop, context menus)
202
258
 
203
259
  **Input & Forms:**
204
260
 
@@ -2308,3 +2308,598 @@ body.keyboard-focused .dropdown-content li:focus {
2308
2308
  .wizard-step-indicator[aria-current=step] {
2309
2309
  box-shadow: 0 0 0 4px var(--mm-primary-color-light, rgba(38, 166, 154, 0.2));
2310
2310
  }
2311
+
2312
+ .datatable-container {
2313
+ background: var(--mm-card-background);
2314
+ color: var(--mm-text-primary);
2315
+ border-radius: 4px;
2316
+ }
2317
+ .datatable-container .datatable-title {
2318
+ color: var(--mm-text-primary);
2319
+ font-weight: 400;
2320
+ margin-bottom: 1rem;
2321
+ }
2322
+ .datatable-container .datatable-global-search {
2323
+ padding-top: 0.5rem;
2324
+ }
2325
+ .datatable-container .datatable-wrapper {
2326
+ position: relative;
2327
+ background: var(--mm-card-background);
2328
+ border-radius: 4px;
2329
+ overflow: hidden;
2330
+ }
2331
+ .datatable-container .table-wrapper {
2332
+ overflow-x: auto;
2333
+ width: 100%;
2334
+ -webkit-overflow-scrolling: touch;
2335
+ background: var(--mm-card-background);
2336
+ }
2337
+ .datatable-container .datatable-loading {
2338
+ padding: 2rem;
2339
+ text-align: center;
2340
+ color: var(--mm-text-secondary);
2341
+ background: var(--mm-card-background);
2342
+ }
2343
+ .datatable-container .datatable-loading .preloader-wrapper {
2344
+ margin-bottom: 1rem;
2345
+ }
2346
+ .datatable-container .datatable-empty {
2347
+ padding: 3rem 2rem;
2348
+ text-align: center;
2349
+ color: var(--mm-text-secondary);
2350
+ font-style: italic;
2351
+ background: var(--mm-card-background);
2352
+ }
2353
+
2354
+ .datatable {
2355
+ background: var(--mm-card-background);
2356
+ color: var(--mm-text-primary);
2357
+ border-collapse: collapse;
2358
+ width: 100%;
2359
+ }
2360
+ .datatable thead {
2361
+ background: var(--mm-card-background);
2362
+ }
2363
+ .datatable thead th {
2364
+ background: var(--mm-card-background);
2365
+ color: var(--mm-text-primary);
2366
+ border-bottom: 1px solid var(--mm-border-color);
2367
+ font-weight: 500;
2368
+ padding: 12px 16px;
2369
+ text-align: left;
2370
+ }
2371
+ .datatable tbody {
2372
+ background: var(--mm-card-background);
2373
+ }
2374
+ .datatable tbody td {
2375
+ background: var(--mm-card-background);
2376
+ color: var(--mm-text-primary);
2377
+ border-bottom: 1px solid var(--mm-border-color);
2378
+ padding: 12px 16px;
2379
+ }
2380
+ .datatable thead th.sortable {
2381
+ cursor: pointer;
2382
+ user-select: none;
2383
+ position: relative;
2384
+ transition: background-color 0.2s ease;
2385
+ padding-right: 32px;
2386
+ }
2387
+ .datatable thead th.sortable:hover {
2388
+ background-color: var(--mm-dropdown-hover);
2389
+ }
2390
+ .datatable thead th.sortable .sort-indicators {
2391
+ position: absolute;
2392
+ right: 8px;
2393
+ top: 50%;
2394
+ transform: translateY(-50%);
2395
+ display: flex;
2396
+ flex-direction: column;
2397
+ line-height: 1;
2398
+ }
2399
+ .datatable thead th.sortable .sort-indicators .sort-icon {
2400
+ font-size: 16px;
2401
+ color: var(--mm-text-disabled);
2402
+ transition: color 0.2s ease;
2403
+ }
2404
+ .datatable thead th.sortable .sort-indicators .sort-icon.active {
2405
+ color: var(--mm-primary-color);
2406
+ }
2407
+ .datatable thead th.sortable .sort-indicators .sort-asc {
2408
+ margin-bottom: 0px;
2409
+ }
2410
+ .datatable thead th.sortable .sort-indicators .sort-desc {
2411
+ margin-top: 0px;
2412
+ }
2413
+ .datatable .align-left {
2414
+ text-align: left;
2415
+ }
2416
+ .datatable .align-center {
2417
+ text-align: center;
2418
+ }
2419
+ .datatable .align-right {
2420
+ text-align: right;
2421
+ }
2422
+ .datatable tbody tr {
2423
+ transition: background-color 0.2s ease;
2424
+ cursor: pointer;
2425
+ }
2426
+ .datatable tbody tr:hover {
2427
+ background-color: var(--mm-dropdown-hover);
2428
+ }
2429
+ .datatable tbody tr:hover td {
2430
+ background-color: var(--mm-dropdown-hover);
2431
+ }
2432
+ .datatable.striped tbody tr:nth-child(odd) {
2433
+ background-color: var(--mm-dropdown-focus);
2434
+ }
2435
+ .datatable.striped tbody tr:nth-child(odd) td {
2436
+ background-color: var(--mm-dropdown-focus);
2437
+ }
2438
+ .datatable.striped tbody tr:nth-child(odd):hover {
2439
+ background-color: var(--mm-dropdown-hover);
2440
+ }
2441
+ .datatable.striped tbody tr:nth-child(odd):hover td {
2442
+ background-color: var(--mm-dropdown-hover);
2443
+ }
2444
+ .datatable .selection-checkbox {
2445
+ width: 40px;
2446
+ text-align: center;
2447
+ padding: 0 8px !important;
2448
+ }
2449
+ .datatable .selection-checkbox label {
2450
+ margin: 0;
2451
+ height: 100%;
2452
+ display: flex;
2453
+ align-items: center;
2454
+ justify-content: center;
2455
+ }
2456
+ .datatable .selection-checkbox input[type=checkbox] {
2457
+ opacity: 1;
2458
+ position: relative;
2459
+ left: auto;
2460
+ top: auto;
2461
+ transform: none;
2462
+ margin-right: 0;
2463
+ }
2464
+ .datatable tbody tr.selected {
2465
+ background-color: var(--mm-dropdown-selected) !important;
2466
+ }
2467
+ .datatable tbody tr.selected td {
2468
+ background-color: var(--mm-dropdown-selected) !important;
2469
+ }
2470
+ .datatable tbody tr.selected:hover {
2471
+ background-color: var(--mm-dropdown-selected) !important;
2472
+ opacity: 0.9;
2473
+ }
2474
+ .datatable tbody tr.selected:hover td {
2475
+ background-color: var(--mm-dropdown-selected) !important;
2476
+ opacity: 0.9;
2477
+ }
2478
+ .datatable.fixed-header thead th {
2479
+ position: sticky;
2480
+ top: 0;
2481
+ background: var(--mm-card-background);
2482
+ z-index: 10;
2483
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
2484
+ }
2485
+
2486
+ .datatable-pagination {
2487
+ margin-top: 1rem;
2488
+ display: flex;
2489
+ justify-content: space-between;
2490
+ align-items: center;
2491
+ flex-wrap: wrap;
2492
+ gap: 1rem;
2493
+ background: var(--mm-card-background);
2494
+ color: var(--mm-text-primary);
2495
+ padding: 1rem;
2496
+ border-top: 1px solid var(--mm-border-color);
2497
+ }
2498
+ .datatable-pagination .pagination-info {
2499
+ color: var(--mm-text-secondary);
2500
+ font-size: 0.9rem;
2501
+ flex: 1;
2502
+ min-width: 200px;
2503
+ }
2504
+ .datatable-pagination .pagination-controls {
2505
+ display: flex;
2506
+ align-items: center;
2507
+ gap: 0.5rem;
2508
+ }
2509
+ .datatable-pagination .pagination-controls button.btn-flat {
2510
+ min-width: 40px;
2511
+ height: 40px;
2512
+ padding: 0;
2513
+ display: flex;
2514
+ align-items: center;
2515
+ justify-content: center;
2516
+ border-radius: 50%;
2517
+ transition: background-color 0.2s ease;
2518
+ background: transparent;
2519
+ color: var(--mm-text-primary);
2520
+ border: 1px solid var(--mm-border-color);
2521
+ }
2522
+ .datatable-pagination .pagination-controls button.btn-flat:hover:not(:disabled) {
2523
+ background-color: var(--mm-dropdown-hover);
2524
+ }
2525
+ .datatable-pagination .pagination-controls button.btn-flat:disabled {
2526
+ color: var(--mm-text-disabled);
2527
+ cursor: not-allowed;
2528
+ border-color: var(--mm-text-disabled);
2529
+ opacity: 0.6;
2530
+ }
2531
+ .datatable-pagination .pagination-controls button.btn-flat i {
2532
+ font-size: 20px;
2533
+ }
2534
+ .datatable-pagination .pagination-controls .page-info {
2535
+ margin: 0 0.5rem;
2536
+ color: var(--mm-text-secondary);
2537
+ font-weight: 500;
2538
+ white-space: nowrap;
2539
+ }
2540
+
2541
+ @media only screen and (max-width : 992px) {
2542
+ .datatable-container .datatable-search {
2543
+ max-width: 100%;
2544
+ }
2545
+ .datatable-container .datatable-pagination {
2546
+ flex-direction: column;
2547
+ align-items: stretch;
2548
+ text-align: center;
2549
+ }
2550
+ .datatable-container .datatable-pagination .pagination-info {
2551
+ order: 2;
2552
+ margin-top: 0.5rem;
2553
+ text-align: center;
2554
+ }
2555
+ .datatable-container .datatable-pagination .pagination-controls {
2556
+ order: 1;
2557
+ justify-content: center;
2558
+ }
2559
+ .datatable.responsive-table.mobile-hide-secondary th:nth-child(n+4),
2560
+ .datatable.responsive-table.mobile-hide-secondary td:nth-child(n+4) {
2561
+ display: none;
2562
+ }
2563
+ }
2564
+ @media only screen and (max-width : 992px) and (max-width : 600px) {
2565
+ .datatable.responsive-table.mobile-stack thead {
2566
+ display: none;
2567
+ }
2568
+ .datatable.responsive-table.mobile-stack tbody tr {
2569
+ display: block;
2570
+ border: 1px solid var(--mm-border-color);
2571
+ margin-bottom: 1rem;
2572
+ padding: 1rem;
2573
+ border-radius: 4px;
2574
+ background: var(--mm-card-background);
2575
+ }
2576
+ .datatable.responsive-table.mobile-stack tbody td {
2577
+ display: block;
2578
+ text-align: left !important;
2579
+ padding: 0.5rem 0;
2580
+ border: none;
2581
+ }
2582
+ .datatable.responsive-table.mobile-stack tbody td::before {
2583
+ content: attr(data-label) ": ";
2584
+ font-weight: bold;
2585
+ color: var(--mm-text-secondary);
2586
+ display: inline-block;
2587
+ min-width: 100px;
2588
+ }
2589
+ }
2590
+ @media (prefers-color-scheme: dark) {
2591
+ :root:not([data-theme]) .datatable-container .datatable thead th.sortable:hover,
2592
+ [data-theme=dark] .datatable-container .datatable thead th.sortable:hover {
2593
+ background-color: var(--mm-dropdown-hover);
2594
+ }
2595
+ :root:not([data-theme]) .datatable-container .datatable tbody tr:hover,
2596
+ [data-theme=dark] .datatable-container .datatable tbody tr:hover {
2597
+ background-color: var(--mm-dropdown-hover);
2598
+ }
2599
+ :root:not([data-theme]) .datatable-container .datatable.striped tbody tr:nth-child(odd),
2600
+ [data-theme=dark] .datatable-container .datatable.striped tbody tr:nth-child(odd) {
2601
+ background-color: rgba(255, 255, 255, 0.05);
2602
+ }
2603
+ :root:not([data-theme]) .datatable-container .datatable.fixed-header thead th,
2604
+ [data-theme=dark] .datatable-container .datatable.fixed-header thead th {
2605
+ border-bottom: 1px solid var(--mm-border-color);
2606
+ }
2607
+ }
2608
+ .datatable {
2609
+ contain: layout style paint;
2610
+ }
2611
+ .datatable.virtual-table {
2612
+ transform: translateZ(0);
2613
+ backface-visibility: hidden;
2614
+ }
2615
+ .datatable tbody tr {
2616
+ transform: translateZ(0);
2617
+ will-change: transform;
2618
+ }
2619
+ .datatable.fixed-layout {
2620
+ table-layout: fixed;
2621
+ }
2622
+ .datatable.fixed-layout th, .datatable.fixed-layout td {
2623
+ overflow: hidden;
2624
+ text-overflow: ellipsis;
2625
+ white-space: nowrap;
2626
+ }
2627
+
2628
+ /* TreeView Component Styles */
2629
+ :root {
2630
+ --tree-node-height: 36px;
2631
+ --tree-indent-size: 24px;
2632
+ --tree-connector-width: 1px;
2633
+ --tree-expand-icon-size: 20px;
2634
+ --tree-bg-color: #ffffff;
2635
+ --tree-text-color: #212121;
2636
+ --tree-text-color-secondary: #757575;
2637
+ --tree-border-color: #e0e0e0;
2638
+ --tree-connector-color: #bdbdbd;
2639
+ --tree-hover-bg: #f5f5f5;
2640
+ --tree-selected-bg: #e3f2fd;
2641
+ --tree-selected-color: #1976d2;
2642
+ --tree-focused-outline: #2196f3;
2643
+ --tree-disabled-color: #9e9e9e;
2644
+ --tree-disabled-bg: #fafafa;
2645
+ }
2646
+
2647
+ [data-theme=dark],
2648
+ .dark-theme,
2649
+ body.dark {
2650
+ --tree-bg-color: #1e1e1e;
2651
+ --tree-text-color: #e0e0e0;
2652
+ --tree-text-color-secondary: #a0a0a0;
2653
+ --tree-border-color: #333333;
2654
+ --tree-connector-color: #555555;
2655
+ --tree-hover-bg: #2d2d2d;
2656
+ --tree-selected-bg: #282a45;
2657
+ --tree-selected-color: #90caf9;
2658
+ --tree-focused-outline: #64b5f6;
2659
+ --tree-disabled-color: #616161;
2660
+ --tree-disabled-bg: #2d2d2d;
2661
+ }
2662
+
2663
+ .tree-view {
2664
+ background-color: var(--tree-bg-color);
2665
+ color: var(--tree-text-color);
2666
+ border: 1px solid var(--tree-border-color);
2667
+ border-radius: 4px;
2668
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
2669
+ font-size: 14px;
2670
+ line-height: 1.5;
2671
+ }
2672
+ .tree-view .tree-root {
2673
+ list-style: none;
2674
+ margin: 0;
2675
+ padding: 0;
2676
+ }
2677
+ .tree-view .tree-node {
2678
+ list-style: none;
2679
+ position: relative;
2680
+ margin: 0;
2681
+ padding: 0;
2682
+ }
2683
+ .tree-view .tree-node.disabled {
2684
+ opacity: 0.6;
2685
+ cursor: not-allowed;
2686
+ }
2687
+ .tree-view .tree-node.disabled .tree-node-content {
2688
+ pointer-events: none;
2689
+ color: var(--tree-disabled-color);
2690
+ background-color: var(--tree-disabled-bg);
2691
+ }
2692
+ .tree-view .tree-node-content {
2693
+ display: flex;
2694
+ align-items: center;
2695
+ min-height: var(--tree-node-height);
2696
+ padding: 4px 8px;
2697
+ cursor: pointer;
2698
+ position: relative;
2699
+ transition: all 0.2s ease;
2700
+ user-select: none;
2701
+ }
2702
+ .tree-view .tree-node-content:hover:not(:disabled) {
2703
+ background-color: var(--tree-hover-bg);
2704
+ }
2705
+ .tree-view .tree-node.selected .tree-node-content {
2706
+ background-color: var(--tree-selected-bg);
2707
+ color: var(--tree-selected-color);
2708
+ font-weight: 500;
2709
+ }
2710
+ .tree-view .tree-node.focused .tree-node-content {
2711
+ background-color: var(--tree-hover-bg);
2712
+ border-right: 1px solid var(--tree-focused-outline);
2713
+ }
2714
+ .tree-view .tree-node.selected.focused .tree-node-content {
2715
+ background-color: var(--tree-selected-bg);
2716
+ }
2717
+ .tree-view.show-connectors .tree-connectors {
2718
+ position: absolute;
2719
+ top: 0;
2720
+ left: 0;
2721
+ width: 100%;
2722
+ height: 100%;
2723
+ pointer-events: none;
2724
+ z-index: 0;
2725
+ }
2726
+ .tree-view.show-connectors .tree-connector {
2727
+ position: absolute;
2728
+ top: 0;
2729
+ height: 100%;
2730
+ width: var(--tree-connector-width);
2731
+ background-color: var(--tree-connector-color);
2732
+ }
2733
+ .tree-view.show-connectors .tree-connector::after {
2734
+ content: "";
2735
+ position: absolute;
2736
+ top: calc(var(--tree-node-height) / 2);
2737
+ left: 0;
2738
+ width: 12px;
2739
+ height: var(--tree-connector-width);
2740
+ background-color: var(--tree-connector-color);
2741
+ }
2742
+ .tree-view.show-connectors .tree-node:last-child .tree-node-content .tree-connector:last-child {
2743
+ height: calc(var(--tree-node-height) / 2 + 2px);
2744
+ }
2745
+ .tree-view.show-connectors .tree-node:not(.tree-last-in-branch) .tree-node-content .tree-connector {
2746
+ height: 100% !important;
2747
+ }
2748
+ .tree-view .tree-expand-icon {
2749
+ display: flex;
2750
+ align-items: center;
2751
+ justify-content: center;
2752
+ width: var(--tree-expand-icon-size);
2753
+ height: var(--tree-expand-icon-size);
2754
+ margin-right: 8px;
2755
+ margin-left: 2px;
2756
+ cursor: pointer;
2757
+ border-radius: 3px;
2758
+ transition: all 0.2s ease;
2759
+ flex-shrink: 0;
2760
+ }
2761
+ .tree-view .tree-expand-icon:hover {
2762
+ background-color: var(--tree-hover-bg);
2763
+ }
2764
+ .tree-view .tree-expand-icon.plus-minus .tree-plus-minus {
2765
+ display: flex;
2766
+ align-items: center;
2767
+ justify-content: center;
2768
+ width: 16px;
2769
+ height: 16px;
2770
+ border: 1px solid var(--tree-connector-color);
2771
+ border-radius: 2px;
2772
+ background-color: var(--tree-bg-color);
2773
+ font-size: 12px;
2774
+ font-weight: bold;
2775
+ line-height: 1;
2776
+ transition: all 0.2s ease;
2777
+ }
2778
+ .tree-view .tree-expand-icon.triangle .tree-triangle {
2779
+ font-size: 10px;
2780
+ transition: transform 0.2s ease;
2781
+ color: var(--tree-text-color-secondary);
2782
+ }
2783
+ .tree-view .tree-expand-icon.triangle .tree-triangle.expanded {
2784
+ transform: rotate(90deg);
2785
+ }
2786
+ .tree-view .tree-expand-icon .tree-caret-icon,
2787
+ .tree-view .tree-expand-icon .tree-chevron-icon {
2788
+ transition: transform 0.2s ease;
2789
+ }
2790
+ .tree-view .tree-expand-spacer {
2791
+ width: var(--tree-expand-icon-size);
2792
+ height: var(--tree-expand-icon-size);
2793
+ margin-right: 8px;
2794
+ margin-left: 2px;
2795
+ flex-shrink: 0;
2796
+ }
2797
+ .tree-view .tree-selection-indicator {
2798
+ margin-right: 8px;
2799
+ flex-shrink: 0;
2800
+ }
2801
+ .tree-view .tree-selection-indicator input[type=checkbox] {
2802
+ width: 16px;
2803
+ height: 16px;
2804
+ margin: 0;
2805
+ cursor: pointer;
2806
+ accent-color: var(--tree-selected-color);
2807
+ }
2808
+ .tree-view .tree-node-icon {
2809
+ margin-right: 8px;
2810
+ font-size: 18px;
2811
+ color: var(--tree-text-color-secondary);
2812
+ flex-shrink: 0;
2813
+ }
2814
+ .tree-view .tree-node-label {
2815
+ flex: 1;
2816
+ overflow: hidden;
2817
+ text-overflow: ellipsis;
2818
+ white-space: nowrap;
2819
+ }
2820
+ .tree-view .tree-children {
2821
+ list-style: none;
2822
+ margin: 0;
2823
+ padding: 0;
2824
+ overflow: hidden;
2825
+ transition: all 0.3s ease;
2826
+ }
2827
+ .tree-view .tree-children.tree-collapsing {
2828
+ max-height: 0;
2829
+ opacity: 0;
2830
+ }
2831
+ .tree-view .tree-children.tree-expanding {
2832
+ max-height: 1000px;
2833
+ opacity: 1;
2834
+ }
2835
+
2836
+ .tree-node .tree-children {
2837
+ animation-duration: 0.3s;
2838
+ animation-fill-mode: both;
2839
+ animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
2840
+ }
2841
+
2842
+ @keyframes tree-expand {
2843
+ from {
2844
+ max-height: 0;
2845
+ opacity: 0;
2846
+ }
2847
+ to {
2848
+ max-height: 1000px;
2849
+ opacity: 1;
2850
+ }
2851
+ }
2852
+ @keyframes tree-collapse {
2853
+ from {
2854
+ max-height: 1000px;
2855
+ opacity: 1;
2856
+ }
2857
+ to {
2858
+ max-height: 0;
2859
+ opacity: 0;
2860
+ }
2861
+ }
2862
+ @media (max-width: 768px) {
2863
+ .tree-view {
2864
+ --tree-node-height: 40px;
2865
+ --tree-indent-size: 20px;
2866
+ }
2867
+ .tree-view .tree-node-content {
2868
+ padding: 0 12px;
2869
+ }
2870
+ }
2871
+ @media (prefers-contrast: high) {
2872
+ .tree-view {
2873
+ --tree-border-color: #000000;
2874
+ --tree-connector-color: #000000;
2875
+ --tree-focused-outline: #0066cc;
2876
+ }
2877
+ .tree-view .tree-node-content:focus {
2878
+ outline-width: 3px;
2879
+ }
2880
+ }
2881
+ @media (prefers-reduced-motion: reduce) {
2882
+ .tree-view .tree-children,
2883
+ .tree-view .tree-expand-icon .tree-triangle,
2884
+ .tree-view .tree-expand-icon .tree-caret-icon,
2885
+ .tree-view .tree-expand-icon .tree-plus-minus,
2886
+ .tree-view .tree-node-content {
2887
+ transition: none;
2888
+ animation: none;
2889
+ }
2890
+ }
2891
+ @media print {
2892
+ .tree-view {
2893
+ --tree-bg-color: white;
2894
+ --tree-text-color: black;
2895
+ --tree-border-color: black;
2896
+ }
2897
+ .tree-view .tree-expand-icon {
2898
+ display: none;
2899
+ }
2900
+ .tree-view .tree-children {
2901
+ display: block !important;
2902
+ opacity: 1 !important;
2903
+ max-height: none !important;
2904
+ }
2905
+ }