mithril-materialized 2.0.0-beta.11 → 2.0.0-beta.12
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 +23 -1
- package/dist/components.css +595 -0
- package/dist/icon.d.ts +2 -2
- package/dist/index.css +281 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +440 -155
- package/dist/index.js +441 -154
- package/dist/index.min.css +1 -1
- package/dist/index.umd.js +441 -154
- package/dist/material-icon.d.ts +3 -0
- package/dist/treeview.d.ts +39 -0
- package/package.json +2 -2
- package/sass/components/_treeview.scss +353 -0
- package/sass/materialize.scss +1 -0
package/dist/index.css
CHANGED
|
@@ -9606,4 +9606,285 @@ nav .theme-toggle:focus {
|
|
|
9606
9606
|
overflow: hidden;
|
|
9607
9607
|
text-overflow: ellipsis;
|
|
9608
9608
|
white-space: nowrap;
|
|
9609
|
+
}
|
|
9610
|
+
|
|
9611
|
+
/* TreeView Component Styles */
|
|
9612
|
+
:root {
|
|
9613
|
+
--tree-node-height: 36px;
|
|
9614
|
+
--tree-indent-size: 24px;
|
|
9615
|
+
--tree-connector-width: 1px;
|
|
9616
|
+
--tree-expand-icon-size: 20px;
|
|
9617
|
+
--tree-bg-color: #ffffff;
|
|
9618
|
+
--tree-text-color: #212121;
|
|
9619
|
+
--tree-text-color-secondary: #757575;
|
|
9620
|
+
--tree-border-color: #e0e0e0;
|
|
9621
|
+
--tree-connector-color: #bdbdbd;
|
|
9622
|
+
--tree-hover-bg: #f5f5f5;
|
|
9623
|
+
--tree-selected-bg: #e3f2fd;
|
|
9624
|
+
--tree-selected-color: #1976d2;
|
|
9625
|
+
--tree-focused-outline: #2196f3;
|
|
9626
|
+
--tree-disabled-color: #9e9e9e;
|
|
9627
|
+
--tree-disabled-bg: #fafafa;
|
|
9628
|
+
}
|
|
9629
|
+
|
|
9630
|
+
[data-theme=dark],
|
|
9631
|
+
.dark-theme,
|
|
9632
|
+
body.dark {
|
|
9633
|
+
--tree-bg-color: #1e1e1e;
|
|
9634
|
+
--tree-text-color: #e0e0e0;
|
|
9635
|
+
--tree-text-color-secondary: #a0a0a0;
|
|
9636
|
+
--tree-border-color: #333333;
|
|
9637
|
+
--tree-connector-color: #555555;
|
|
9638
|
+
--tree-hover-bg: #2d2d2d;
|
|
9639
|
+
--tree-selected-bg: #282a45;
|
|
9640
|
+
--tree-selected-color: #90caf9;
|
|
9641
|
+
--tree-focused-outline: #64b5f6;
|
|
9642
|
+
--tree-disabled-color: #616161;
|
|
9643
|
+
--tree-disabled-bg: #2d2d2d;
|
|
9644
|
+
}
|
|
9645
|
+
|
|
9646
|
+
.tree-view {
|
|
9647
|
+
background-color: var(--tree-bg-color);
|
|
9648
|
+
color: var(--tree-text-color);
|
|
9649
|
+
border: 1px solid var(--tree-border-color);
|
|
9650
|
+
border-radius: 4px;
|
|
9651
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
9652
|
+
font-size: 14px;
|
|
9653
|
+
line-height: 1.5;
|
|
9654
|
+
}
|
|
9655
|
+
.tree-view .tree-root {
|
|
9656
|
+
list-style: none;
|
|
9657
|
+
margin: 0;
|
|
9658
|
+
padding: 0;
|
|
9659
|
+
}
|
|
9660
|
+
.tree-view .tree-node {
|
|
9661
|
+
list-style: none;
|
|
9662
|
+
position: relative;
|
|
9663
|
+
margin: 0;
|
|
9664
|
+
padding: 0;
|
|
9665
|
+
}
|
|
9666
|
+
.tree-view .tree-node.disabled {
|
|
9667
|
+
opacity: 0.6;
|
|
9668
|
+
cursor: not-allowed;
|
|
9669
|
+
}
|
|
9670
|
+
.tree-view .tree-node.disabled .tree-node-content {
|
|
9671
|
+
pointer-events: none;
|
|
9672
|
+
color: var(--tree-disabled-color);
|
|
9673
|
+
background-color: var(--tree-disabled-bg);
|
|
9674
|
+
}
|
|
9675
|
+
.tree-view .tree-node-content {
|
|
9676
|
+
display: flex;
|
|
9677
|
+
align-items: center;
|
|
9678
|
+
min-height: var(--tree-node-height);
|
|
9679
|
+
padding: 4px 8px;
|
|
9680
|
+
cursor: pointer;
|
|
9681
|
+
position: relative;
|
|
9682
|
+
transition: all 0.2s ease;
|
|
9683
|
+
-webkit-user-select: none;
|
|
9684
|
+
-moz-user-select: none;
|
|
9685
|
+
user-select: none;
|
|
9686
|
+
}
|
|
9687
|
+
.tree-view .tree-node-content:hover:not(:disabled) {
|
|
9688
|
+
background-color: var(--tree-hover-bg);
|
|
9689
|
+
}
|
|
9690
|
+
.tree-view .tree-node.selected .tree-node-content {
|
|
9691
|
+
background-color: var(--tree-selected-bg);
|
|
9692
|
+
color: var(--tree-selected-color);
|
|
9693
|
+
font-weight: 500;
|
|
9694
|
+
}
|
|
9695
|
+
.tree-view .tree-node.focused .tree-node-content {
|
|
9696
|
+
background-color: var(--tree-hover-bg);
|
|
9697
|
+
border-right: 1px solid var(--tree-focused-outline);
|
|
9698
|
+
}
|
|
9699
|
+
.tree-view .tree-node.selected.focused .tree-node-content {
|
|
9700
|
+
background-color: var(--tree-selected-bg);
|
|
9701
|
+
}
|
|
9702
|
+
.tree-view.show-connectors .tree-connectors {
|
|
9703
|
+
position: absolute;
|
|
9704
|
+
top: 0;
|
|
9705
|
+
left: 0;
|
|
9706
|
+
width: 100%;
|
|
9707
|
+
height: 100%;
|
|
9708
|
+
pointer-events: none;
|
|
9709
|
+
z-index: 0;
|
|
9710
|
+
}
|
|
9711
|
+
.tree-view.show-connectors .tree-connector {
|
|
9712
|
+
position: absolute;
|
|
9713
|
+
top: 0;
|
|
9714
|
+
height: 100%;
|
|
9715
|
+
width: var(--tree-connector-width);
|
|
9716
|
+
background-color: var(--tree-connector-color);
|
|
9717
|
+
}
|
|
9718
|
+
.tree-view.show-connectors .tree-connector::after {
|
|
9719
|
+
content: "";
|
|
9720
|
+
position: absolute;
|
|
9721
|
+
top: calc(var(--tree-node-height) / 2);
|
|
9722
|
+
left: 0;
|
|
9723
|
+
width: 12px;
|
|
9724
|
+
height: var(--tree-connector-width);
|
|
9725
|
+
background-color: var(--tree-connector-color);
|
|
9726
|
+
}
|
|
9727
|
+
.tree-view.show-connectors .tree-node:last-child .tree-node-content .tree-connector:last-child {
|
|
9728
|
+
height: calc(var(--tree-node-height) / 2 + 2px);
|
|
9729
|
+
}
|
|
9730
|
+
.tree-view.show-connectors .tree-node:not(.tree-last-in-branch) .tree-node-content .tree-connector {
|
|
9731
|
+
height: 100% !important;
|
|
9732
|
+
}
|
|
9733
|
+
.tree-view .tree-expand-icon {
|
|
9734
|
+
display: flex;
|
|
9735
|
+
align-items: center;
|
|
9736
|
+
justify-content: center;
|
|
9737
|
+
width: var(--tree-expand-icon-size);
|
|
9738
|
+
height: var(--tree-expand-icon-size);
|
|
9739
|
+
margin-right: 8px;
|
|
9740
|
+
margin-left: 2px;
|
|
9741
|
+
cursor: pointer;
|
|
9742
|
+
border-radius: 3px;
|
|
9743
|
+
transition: all 0.2s ease;
|
|
9744
|
+
flex-shrink: 0;
|
|
9745
|
+
}
|
|
9746
|
+
.tree-view .tree-expand-icon:hover {
|
|
9747
|
+
background-color: var(--tree-hover-bg);
|
|
9748
|
+
}
|
|
9749
|
+
.tree-view .tree-expand-icon.plus-minus .tree-plus-minus {
|
|
9750
|
+
display: flex;
|
|
9751
|
+
align-items: center;
|
|
9752
|
+
justify-content: center;
|
|
9753
|
+
width: 16px;
|
|
9754
|
+
height: 16px;
|
|
9755
|
+
border: 1px solid var(--tree-connector-color);
|
|
9756
|
+
border-radius: 2px;
|
|
9757
|
+
background-color: var(--tree-bg-color);
|
|
9758
|
+
font-size: 12px;
|
|
9759
|
+
font-weight: bold;
|
|
9760
|
+
line-height: 1;
|
|
9761
|
+
transition: all 0.2s ease;
|
|
9762
|
+
}
|
|
9763
|
+
.tree-view .tree-expand-icon.triangle .tree-triangle {
|
|
9764
|
+
font-size: 10px;
|
|
9765
|
+
transition: transform 0.2s ease;
|
|
9766
|
+
color: var(--tree-text-color-secondary);
|
|
9767
|
+
}
|
|
9768
|
+
.tree-view .tree-expand-icon.triangle .tree-triangle.expanded {
|
|
9769
|
+
transform: rotate(90deg);
|
|
9770
|
+
}
|
|
9771
|
+
.tree-view .tree-expand-icon .tree-caret-icon,
|
|
9772
|
+
.tree-view .tree-expand-icon .tree-chevron-icon {
|
|
9773
|
+
transition: transform 0.2s ease;
|
|
9774
|
+
}
|
|
9775
|
+
.tree-view .tree-expand-spacer {
|
|
9776
|
+
width: var(--tree-expand-icon-size);
|
|
9777
|
+
height: var(--tree-expand-icon-size);
|
|
9778
|
+
margin-right: 8px;
|
|
9779
|
+
margin-left: 2px;
|
|
9780
|
+
flex-shrink: 0;
|
|
9781
|
+
}
|
|
9782
|
+
.tree-view .tree-selection-indicator {
|
|
9783
|
+
margin-right: 8px;
|
|
9784
|
+
flex-shrink: 0;
|
|
9785
|
+
}
|
|
9786
|
+
.tree-view .tree-selection-indicator input[type=checkbox] {
|
|
9787
|
+
width: 16px;
|
|
9788
|
+
height: 16px;
|
|
9789
|
+
margin: 0;
|
|
9790
|
+
cursor: pointer;
|
|
9791
|
+
accent-color: var(--tree-selected-color);
|
|
9792
|
+
}
|
|
9793
|
+
.tree-view .tree-node-icon {
|
|
9794
|
+
margin-right: 8px;
|
|
9795
|
+
font-size: 18px;
|
|
9796
|
+
color: var(--tree-text-color-secondary);
|
|
9797
|
+
flex-shrink: 0;
|
|
9798
|
+
}
|
|
9799
|
+
.tree-view .tree-node-label {
|
|
9800
|
+
flex: 1;
|
|
9801
|
+
overflow: hidden;
|
|
9802
|
+
text-overflow: ellipsis;
|
|
9803
|
+
white-space: nowrap;
|
|
9804
|
+
}
|
|
9805
|
+
.tree-view .tree-children {
|
|
9806
|
+
list-style: none;
|
|
9807
|
+
margin: 0;
|
|
9808
|
+
padding: 0;
|
|
9809
|
+
overflow: hidden;
|
|
9810
|
+
transition: all 0.3s ease;
|
|
9811
|
+
}
|
|
9812
|
+
.tree-view .tree-children.tree-collapsing {
|
|
9813
|
+
max-height: 0;
|
|
9814
|
+
opacity: 0;
|
|
9815
|
+
}
|
|
9816
|
+
.tree-view .tree-children.tree-expanding {
|
|
9817
|
+
max-height: 1000px;
|
|
9818
|
+
opacity: 1;
|
|
9819
|
+
}
|
|
9820
|
+
|
|
9821
|
+
.tree-node .tree-children {
|
|
9822
|
+
animation-duration: 0.3s;
|
|
9823
|
+
animation-fill-mode: both;
|
|
9824
|
+
animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
9825
|
+
}
|
|
9826
|
+
|
|
9827
|
+
@keyframes tree-expand {
|
|
9828
|
+
from {
|
|
9829
|
+
max-height: 0;
|
|
9830
|
+
opacity: 0;
|
|
9831
|
+
}
|
|
9832
|
+
to {
|
|
9833
|
+
max-height: 1000px;
|
|
9834
|
+
opacity: 1;
|
|
9835
|
+
}
|
|
9836
|
+
}
|
|
9837
|
+
@keyframes tree-collapse {
|
|
9838
|
+
from {
|
|
9839
|
+
max-height: 1000px;
|
|
9840
|
+
opacity: 1;
|
|
9841
|
+
}
|
|
9842
|
+
to {
|
|
9843
|
+
max-height: 0;
|
|
9844
|
+
opacity: 0;
|
|
9845
|
+
}
|
|
9846
|
+
}
|
|
9847
|
+
@media (max-width: 768px) {
|
|
9848
|
+
.tree-view {
|
|
9849
|
+
--tree-node-height: 40px;
|
|
9850
|
+
--tree-indent-size: 20px;
|
|
9851
|
+
}
|
|
9852
|
+
.tree-view .tree-node-content {
|
|
9853
|
+
padding: 0 12px;
|
|
9854
|
+
}
|
|
9855
|
+
}
|
|
9856
|
+
@media (prefers-contrast: high) {
|
|
9857
|
+
.tree-view {
|
|
9858
|
+
--tree-border-color: #000000;
|
|
9859
|
+
--tree-connector-color: #000000;
|
|
9860
|
+
--tree-focused-outline: #0066cc;
|
|
9861
|
+
}
|
|
9862
|
+
.tree-view .tree-node-content:focus {
|
|
9863
|
+
outline-width: 3px;
|
|
9864
|
+
}
|
|
9865
|
+
}
|
|
9866
|
+
@media (prefers-reduced-motion: reduce) {
|
|
9867
|
+
.tree-view .tree-children,
|
|
9868
|
+
.tree-view .tree-expand-icon .tree-triangle,
|
|
9869
|
+
.tree-view .tree-expand-icon .tree-caret-icon,
|
|
9870
|
+
.tree-view .tree-expand-icon .tree-plus-minus,
|
|
9871
|
+
.tree-view .tree-node-content {
|
|
9872
|
+
transition: none;
|
|
9873
|
+
animation: none;
|
|
9874
|
+
}
|
|
9875
|
+
}
|
|
9876
|
+
@media print {
|
|
9877
|
+
.tree-view {
|
|
9878
|
+
--tree-bg-color: white;
|
|
9879
|
+
--tree-text-color: black;
|
|
9880
|
+
--tree-border-color: black;
|
|
9881
|
+
}
|
|
9882
|
+
.tree-view .tree-expand-icon {
|
|
9883
|
+
display: none;
|
|
9884
|
+
}
|
|
9885
|
+
.tree-view .tree-children {
|
|
9886
|
+
display: block !important;
|
|
9887
|
+
opacity: 1 !important;
|
|
9888
|
+
max-height: none !important;
|
|
9889
|
+
}
|
|
9609
9890
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export * from './input-options';
|
|
|
15
15
|
export * from './input';
|
|
16
16
|
export * from './label';
|
|
17
17
|
export * from './material-box';
|
|
18
|
+
export * from './material-icon';
|
|
18
19
|
export * from './modal';
|
|
19
20
|
export * from './option';
|
|
20
21
|
export * from './pagination';
|
|
@@ -36,4 +37,5 @@ export * from './file-upload';
|
|
|
36
37
|
export * from './sidenav';
|
|
37
38
|
export * from './breadcrumb';
|
|
38
39
|
export * from './wizard';
|
|
40
|
+
export * from './treeview';
|
|
39
41
|
export * from './types';
|