@moodlehq/design-system 4.1.0 → 5.0.0
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 +9 -0
- package/dist/components/_index.legacy.scss +1893 -0
- package/dist/components/activity-icon/ActivityIcon.d.ts +3 -3
- package/dist/components/activity-icon/ActivityIcon.js +5 -5
- package/dist/components/activity-icon/ActivityIcon.js.map +1 -1
- package/dist/components/activity-icon/index.css +99 -0
- package/dist/components/badge/Badge.d.ts +1 -1
- package/dist/components/badge/index.css +115 -0
- package/dist/components/button/index.css +295 -0
- package/dist/components/checkbox/index.css +181 -0
- package/dist/components/choicebox/Choicebox.d.ts +21 -0
- package/dist/components/choicebox/Choicebox.js +55 -0
- package/dist/components/choicebox/Choicebox.js.map +1 -0
- package/dist/components/choicebox/index.css +364 -0
- package/dist/components/choicebox/index.d.ts +1 -0
- package/dist/components/choicebox/index.js +2 -0
- package/dist/components/close-button/CloseButton.d.ts +1 -1
- package/dist/components/close-button/index.css +47 -0
- package/dist/components/favourite-button/FavouriteButton.d.ts +15 -0
- package/dist/components/favourite-button/FavouriteButton.js +25 -0
- package/dist/components/favourite-button/FavouriteButton.js.map +1 -0
- package/dist/components/favourite-button/index.css +86 -0
- package/dist/components/favourite-button/index.d.ts +2 -0
- package/dist/components/favourite-button/index.js +2 -0
- package/dist/components/index.css +12 -0
- package/dist/components/index.d.ts +12 -0
- package/dist/components/link/Link.d.ts +11 -0
- package/dist/components/link/Link.js +65 -0
- package/dist/components/link/Link.js.map +1 -0
- package/dist/components/link/index.css +122 -0
- package/dist/components/link/index.d.ts +1 -0
- package/dist/components/link/index.js +2 -0
- package/dist/components/nav-pill/NavPill.d.ts +21 -0
- package/dist/components/nav-pill/NavPill.js +54 -0
- package/dist/components/nav-pill/NavPill.js.map +1 -0
- package/dist/components/nav-pill/index.css +96 -0
- package/dist/components/nav-pill/index.d.ts +1 -0
- package/dist/components/nav-pill/index.js +2 -0
- package/dist/components/pagination/Pagination.d.ts +32 -0
- package/dist/components/pagination/Pagination.js +100 -0
- package/dist/components/pagination/Pagination.js.map +1 -0
- package/dist/components/pagination/index.css +139 -0
- package/dist/components/pagination/index.d.ts +1 -0
- package/dist/components/pagination/index.js +2 -0
- package/dist/components/pagination/pagination.helpers.d.ts +26 -0
- package/dist/components/pagination/pagination.helpers.js +136 -0
- package/dist/components/pagination/pagination.helpers.js.map +1 -0
- package/dist/components/progress-bar/ProgressBar.d.ts +35 -0
- package/dist/components/progress-bar/ProgressBar.js +86 -0
- package/dist/components/progress-bar/ProgressBar.js.map +1 -0
- package/dist/components/progress-bar/index.css +193 -0
- package/dist/components/progress-bar/index.d.ts +1 -0
- package/dist/components/progress-bar/index.js +2 -0
- package/dist/components/radio/index.css +133 -0
- package/dist/index.css +1066 -0
- package/dist/index.js +7 -1
- package/{tokens → dist/tokens}/css/colors.css +3 -0
- package/{tokens → dist/tokens}/scss/_colors.scss +3 -0
- package/{tokens → dist/tokens}/scss/_index_css_vars.scss +3 -0
- package/package.json +15 -7
- /package/{tokens → dist/tokens}/css/borders.css +0 -0
- /package/{tokens → dist/tokens}/css/breakpoints.css +0 -0
- /package/{tokens → dist/tokens}/css/index.css +0 -0
- /package/{tokens → dist/tokens}/css/primitives.css +0 -0
- /package/{tokens → dist/tokens}/css/shadows.css +0 -0
- /package/{tokens → dist/tokens}/css/sizes.css +0 -0
- /package/{tokens → dist/tokens}/css/spacing.css +0 -0
- /package/{tokens → dist/tokens}/css/typography.css +0 -0
- /package/{tokens → dist/tokens}/scss/_borders.scss +0 -0
- /package/{tokens → dist/tokens}/scss/_breakpoints.scss +0 -0
- /package/{tokens → dist/tokens}/scss/_index.legacy.scss +0 -0
- /package/{tokens → dist/tokens}/scss/_index.scss +0 -0
- /package/{tokens → dist/tokens}/scss/_primitives.scss +0 -0
- /package/{tokens → dist/tokens}/scss/_shadows.scss +0 -0
- /package/{tokens → dist/tokens}/scss/_sizes.scss +0 -0
- /package/{tokens → dist/tokens}/scss/_spacing.scss +0 -0
- /package/{tokens → dist/tokens}/scss/_typography.scss +0 -0
package/dist/index.css
CHANGED
|
@@ -743,6 +743,391 @@
|
|
|
743
743
|
opacity: 0.5;
|
|
744
744
|
}
|
|
745
745
|
|
|
746
|
+
/* ==========================================================================
|
|
747
|
+
Choicebox
|
|
748
|
+
A full-surface interactive card for single-select option picking.
|
|
749
|
+
HTML structure:
|
|
750
|
+
.mds-choicebox-wrapper
|
|
751
|
+
input.mds-choicebox-input (visually hidden radio)
|
|
752
|
+
label.mds-choicebox
|
|
753
|
+
span.mds-choicebox-icon? (optional — aria-hidden)
|
|
754
|
+
span.mds-choicebox-labels
|
|
755
|
+
span.mds-choicebox-label
|
|
756
|
+
span.mds-choicebox-supporting-text?
|
|
757
|
+
span.mds-choicebox-indicator (decorative — aria-hidden)
|
|
758
|
+
State is driven entirely by CSS sibling selectors (.mds-choicebox-input
|
|
759
|
+
precedes .mds-choicebox in the DOM), avoiding any JS state management.
|
|
760
|
+
========================================================================== */
|
|
761
|
+
|
|
762
|
+
/* --------------------------------------------------------------------------
|
|
763
|
+
Wrapper
|
|
764
|
+
-------------------------------------------------------------------------- */
|
|
765
|
+
|
|
766
|
+
.mds-choicebox-wrapper {
|
|
767
|
+
display: block;
|
|
768
|
+
/* Prevent flex containers from stretching this element */
|
|
769
|
+
align-self: start;
|
|
770
|
+
min-width: 320px; /* Ensure enough space for the indicator and some label text */
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
/* --------------------------------------------------------------------------
|
|
774
|
+
Hidden input
|
|
775
|
+
Visually hidden but focusable so keyboard and assistive tech can reach it.
|
|
776
|
+
pointer-events: none prevents it from receiving clicks — the <label for>
|
|
777
|
+
association handles delegation to the radio input instead.
|
|
778
|
+
-------------------------------------------------------------------------- */
|
|
779
|
+
|
|
780
|
+
.mds-choicebox-input {
|
|
781
|
+
position: absolute;
|
|
782
|
+
width: 1px;
|
|
783
|
+
height: 1px;
|
|
784
|
+
padding: 0;
|
|
785
|
+
margin: -1px;
|
|
786
|
+
overflow: hidden;
|
|
787
|
+
clip: rect(0, 0, 0, 0);
|
|
788
|
+
white-space: nowrap;
|
|
789
|
+
border: 0;
|
|
790
|
+
pointer-events: none;
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
/* --------------------------------------------------------------------------
|
|
794
|
+
Card (label element — full-surface clickable area)
|
|
795
|
+
-------------------------------------------------------------------------- */
|
|
796
|
+
|
|
797
|
+
.mds-choicebox {
|
|
798
|
+
display: flex;
|
|
799
|
+
flex-direction: row;
|
|
800
|
+
align-items: flex-start;
|
|
801
|
+
gap: var(--mds-spacing-xs);
|
|
802
|
+
|
|
803
|
+
padding: var(--mds-spacing-xs) var(--mds-spacing-sm);
|
|
804
|
+
border-radius: var(--mds-border-radius-md);
|
|
805
|
+
border: var(--mds-stroke-weight-sm) solid var(--mds-border-default);
|
|
806
|
+
background-color: var(--mds-bg-surface-subtle);
|
|
807
|
+
|
|
808
|
+
cursor: pointer;
|
|
809
|
+
/* Ensure the label fills its container when Choicebox is used in a grid or flex layout */
|
|
810
|
+
width: 100%;
|
|
811
|
+
box-sizing: border-box;
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
/* Hover — unselected */
|
|
815
|
+
|
|
816
|
+
.mds-choicebox-input:not(:disabled):not(:checked) + .mds-choicebox:hover {
|
|
817
|
+
background-color: var(--mds-bg-surface-default);
|
|
818
|
+
border-color: var(--mds-border-default);
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
/* Active/pressed — unselected */
|
|
822
|
+
|
|
823
|
+
.mds-choicebox-input:not(:disabled):not(:checked) + .mds-choicebox:active {
|
|
824
|
+
background-color: var(--mds-bg-surface-strong);
|
|
825
|
+
border-color: var(--mds-border-default);
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
/* Selected — default */
|
|
829
|
+
|
|
830
|
+
.mds-choicebox-input:checked + .mds-choicebox {
|
|
831
|
+
background-color: var(--mds-bg-interactive-primary-default-light);
|
|
832
|
+
border-color: var(--mds-border-feedback-primary);
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
/* Selected — hover */
|
|
836
|
+
|
|
837
|
+
.mds-choicebox-input:not(:disabled):checked + .mds-choicebox:hover {
|
|
838
|
+
background-color: var(--mds-bg-surface-subtle);
|
|
839
|
+
border-color: var(--mds-border-feedback-primary);
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
/* Selected — pressed */
|
|
843
|
+
|
|
844
|
+
.mds-choicebox-input:not(:disabled):checked + .mds-choicebox:active {
|
|
845
|
+
background-color: var(--mds-bg-surface-strong);
|
|
846
|
+
border-color: var(--mds-border-feedback-primary);
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
/* Disabled — show 'not-allowed' cursor over the whole card area.
|
|
850
|
+
cursor: not-allowed cannot be set on the label itself because
|
|
851
|
+
pointer-events: none (below) removes it from hit-testing, making the cursor
|
|
852
|
+
rule unreachable. :has() is safe for all Moodle-target browsers. */
|
|
853
|
+
|
|
854
|
+
.mds-choicebox-wrapper:has(.mds-choicebox-input:disabled) {
|
|
855
|
+
cursor: not-allowed;
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
/* Block clicks on the label so the disabled radio cannot be activated */
|
|
859
|
+
|
|
860
|
+
.mds-choicebox-input:disabled + .mds-choicebox {
|
|
861
|
+
pointer-events: none;
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
/* --------------------------------------------------------------------------
|
|
865
|
+
Focus — ring appears on the indicator per design spec
|
|
866
|
+
-------------------------------------------------------------------------- */
|
|
867
|
+
|
|
868
|
+
.mds-choicebox-input:focus-visible
|
|
869
|
+
+ .mds-choicebox
|
|
870
|
+
.mds-choicebox-indicator::after {
|
|
871
|
+
outline: var(--mds-stroke-weight-md) solid var(--mds-focus-default);
|
|
872
|
+
outline-offset: var(--mds-spacing-offset);
|
|
873
|
+
box-shadow: none;
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
/* --------------------------------------------------------------------------
|
|
877
|
+
Icon slot
|
|
878
|
+
-------------------------------------------------------------------------- */
|
|
879
|
+
|
|
880
|
+
.mds-choicebox-icon {
|
|
881
|
+
display: flex;
|
|
882
|
+
align-items: center;
|
|
883
|
+
justify-content: center;
|
|
884
|
+
padding: var(--mds-spacing-xxs);
|
|
885
|
+
flex-shrink: 0;
|
|
886
|
+
/* Icon size matches --mds-icons-sm (16px) */
|
|
887
|
+
font-size: var(--mds-icons-sm);
|
|
888
|
+
color: var(--mds-text-default);
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
/* Selected icon */
|
|
892
|
+
|
|
893
|
+
.mds-choicebox-input:checked + .mds-choicebox .mds-choicebox-icon {
|
|
894
|
+
color: var(--mds-text-feedback-primary);
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
/* Disabled unselected icon */
|
|
898
|
+
|
|
899
|
+
.mds-choicebox-input:disabled:not(:checked)
|
|
900
|
+
+ .mds-choicebox
|
|
901
|
+
.mds-choicebox-icon {
|
|
902
|
+
color: var(--mds-text-muted);
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
/* Disabled selected icon */
|
|
906
|
+
|
|
907
|
+
.mds-choicebox-input:disabled:checked + .mds-choicebox .mds-choicebox-icon {
|
|
908
|
+
color: var(--mds-text-link-primary-disabled);
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
/* --------------------------------------------------------------------------
|
|
912
|
+
Labels container
|
|
913
|
+
-------------------------------------------------------------------------- */
|
|
914
|
+
|
|
915
|
+
.mds-choicebox-labels {
|
|
916
|
+
display: flex;
|
|
917
|
+
flex-direction: column;
|
|
918
|
+
flex: 1 0 0;
|
|
919
|
+
gap: var(--mds-spacing-xxs);
|
|
920
|
+
padding: var(--mds-spacing-xxs) 0;
|
|
921
|
+
min-width: 0; /* Allow text to wrap within the flex item */
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
/* --------------------------------------------------------------------------
|
|
925
|
+
Label text
|
|
926
|
+
-------------------------------------------------------------------------- */
|
|
927
|
+
|
|
928
|
+
.mds-choicebox-label {
|
|
929
|
+
display: block;
|
|
930
|
+
font-family: var(--mds-font-family-base);
|
|
931
|
+
font-size: var(--mds-font-size-headings-6);
|
|
932
|
+
font-weight: var(--mds-font-weight-medium);
|
|
933
|
+
line-height: var(--mds-line-height-headings-6);
|
|
934
|
+
letter-spacing: var(--mds-letter-spacing);
|
|
935
|
+
color: var(--mds-text-default);
|
|
936
|
+
word-break: break-word;
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
/* Selected label */
|
|
940
|
+
|
|
941
|
+
.mds-choicebox-input:checked + .mds-choicebox .mds-choicebox-label {
|
|
942
|
+
color: var(--mds-text-feedback-primary);
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
/* Disabled unselected label */
|
|
946
|
+
|
|
947
|
+
.mds-choicebox-input:disabled:not(:checked)
|
|
948
|
+
+ .mds-choicebox
|
|
949
|
+
.mds-choicebox-label {
|
|
950
|
+
color: var(--mds-text-muted);
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
/* Disabled selected label */
|
|
954
|
+
|
|
955
|
+
.mds-choicebox-input:disabled:checked + .mds-choicebox .mds-choicebox-label {
|
|
956
|
+
color: var(--mds-text-link-primary-disabled);
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
/* --------------------------------------------------------------------------
|
|
960
|
+
Supporting text
|
|
961
|
+
-------------------------------------------------------------------------- */
|
|
962
|
+
|
|
963
|
+
.mds-choicebox-supporting-text {
|
|
964
|
+
display: block;
|
|
965
|
+
font-family: var(--mds-font-family-base);
|
|
966
|
+
font-size: var(--mds-font-size-paragraph-small);
|
|
967
|
+
font-weight: var(--mds-font-weight-regular);
|
|
968
|
+
line-height: var(--mds-line-height-paragraph-small);
|
|
969
|
+
letter-spacing: var(--mds-letter-spacing);
|
|
970
|
+
color: var(--mds-text-subtle);
|
|
971
|
+
word-break: break-word;
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
/* Disabled unselected supporting text */
|
|
975
|
+
|
|
976
|
+
.mds-choicebox-input:disabled:not(:checked)
|
|
977
|
+
+ .mds-choicebox
|
|
978
|
+
.mds-choicebox-supporting-text {
|
|
979
|
+
color: var(--mds-text-subtle);
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
/* Disabled selected supporting text */
|
|
983
|
+
|
|
984
|
+
.mds-choicebox-input:disabled:checked
|
|
985
|
+
+ .mds-choicebox
|
|
986
|
+
.mds-choicebox-supporting-text {
|
|
987
|
+
color: var(--mds-text-link-primary-disabled);
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
/* --------------------------------------------------------------------------
|
|
991
|
+
Choice indicator
|
|
992
|
+
The visible circle and circle-check are rendered via ::after so no extra
|
|
993
|
+
DOM nodes are needed. The input's checked/disabled state drives the styling
|
|
994
|
+
via CSS sibling selectors.
|
|
995
|
+
-------------------------------------------------------------------------- */
|
|
996
|
+
|
|
997
|
+
.mds-choicebox-indicator {
|
|
998
|
+
display: flex;
|
|
999
|
+
align-items: center;
|
|
1000
|
+
justify-content: center;
|
|
1001
|
+
width: 16px;
|
|
1002
|
+
height: 16px;
|
|
1003
|
+
/* Vertically centre the indicator against the label line.
|
|
1004
|
+
labels container has padding-block-start: spacing-xxs (0.25rem);
|
|
1005
|
+
the label line-height is 1.2rem; indicator height is 1rem.
|
|
1006
|
+
Offset = labels-padding-top + (label-line-height − indicator-height) / 2 */
|
|
1007
|
+
margin-block-start: calc(
|
|
1008
|
+
var(--mds-spacing-xxs) + (var(--mds-line-height-headings-6) - 1rem) / 2
|
|
1009
|
+
);
|
|
1010
|
+
flex-shrink: 0;
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
/* Unselected circle */
|
|
1014
|
+
|
|
1015
|
+
.mds-choicebox-indicator::after {
|
|
1016
|
+
content: '';
|
|
1017
|
+
display: block;
|
|
1018
|
+
width: 16px;
|
|
1019
|
+
height: 16px;
|
|
1020
|
+
border-radius: var(--mds-border-radius-pill);
|
|
1021
|
+
border: var(--mds-stroke-weight-sm) solid
|
|
1022
|
+
var(--mds-border-interactive-secondary-default);
|
|
1023
|
+
background-color: var(--mds-bg-surface-subtle);
|
|
1024
|
+
box-sizing: border-box;
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
/* Unselected hover indicator background follows card background. */
|
|
1028
|
+
|
|
1029
|
+
.mds-choicebox-input:not(:disabled):not(:checked)
|
|
1030
|
+
+ .mds-choicebox:hover
|
|
1031
|
+
.mds-choicebox-indicator::after {
|
|
1032
|
+
background-color: var(--mds-bg-surface-default);
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
.mds-choicebox-input:not(:disabled):not(:checked)
|
|
1036
|
+
+ .mds-choicebox:active
|
|
1037
|
+
.mds-choicebox-indicator::after {
|
|
1038
|
+
background-color: var(--mds-bg-surface-strong);
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
/* Checked: filled circle with inline SVG checkmark via background-image.
|
|
1042
|
+
Path matches the Figma design spec exactly (fill-based, 16×16 viewBox). */
|
|
1043
|
+
|
|
1044
|
+
.mds-choicebox-input:checked + .mds-choicebox .mds-choicebox-indicator::after {
|
|
1045
|
+
border: none;
|
|
1046
|
+
background-color: var(--mds-bg-interactive-primary-default);
|
|
1047
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M6.05791 11.1853C6.47273 11.6049 7.1138 11.6049 7.52862 11.1853L12.3556 6.30245C12.7704 5.88283 12.7704 5.23433 12.3556 4.81471C11.9407 4.3951 11.2997 4.3951 10.8848 4.81471L6.81212 8.93461L5.11515 7.25613C4.70034 6.83651 4.05926 6.83651 3.64444 7.25613C3.22963 7.67575 3.22963 8.32425 3.64444 8.74387L6.05791 11.1853Z' fill='%23ffffff'/%3E%3C/svg%3E");
|
|
1048
|
+
background-size: cover;
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
/* Disabled unselected indicator — muted border */
|
|
1052
|
+
|
|
1053
|
+
.mds-choicebox-input:disabled:not(:checked)
|
|
1054
|
+
+ .mds-choicebox
|
|
1055
|
+
.mds-choicebox-indicator::after {
|
|
1056
|
+
border-color: var(--mds-border-interactive-secondary-disabled);
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
/* Disabled selected indicator — dimmed fill */
|
|
1060
|
+
|
|
1061
|
+
.mds-choicebox-input:disabled:checked
|
|
1062
|
+
+ .mds-choicebox
|
|
1063
|
+
.mds-choicebox-indicator::after {
|
|
1064
|
+
background-color: var(--mds-bg-interactive-primary-disabled);
|
|
1065
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M6.05791 11.1853C6.47273 11.6049 7.1138 11.6049 7.52862 11.1853L12.3556 6.30245C12.7704 5.88283 12.7704 5.23433 12.3556 4.81471C11.9407 4.3951 11.2997 4.3951 10.8848 4.81471L6.81212 8.93461L5.11515 7.25613C4.70034 6.83651 4.05926 6.83651 3.64444 7.25613C3.22963 7.67575 3.22963 8.32425 3.64444 8.74387L6.05791 11.1853Z' fill='%23ffffff'/%3E%3C/svg%3E");
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
/* --------------------------------------------------------------------------
|
|
1069
|
+
Forced colors (Windows High Contrast)
|
|
1070
|
+
Card borders and indicator geometry use system colour keywords so they
|
|
1071
|
+
remain visible when forced-colors is active. Text colours are left to adapt
|
|
1072
|
+
automatically — they reference CSS custom properties that the browser will
|
|
1073
|
+
remap to system colours.
|
|
1074
|
+
Note: the SVG checkmark's hardcoded fill (%23ffffff) inside the checked
|
|
1075
|
+
indicator will not adapt until Must Fix 2 (mask-image refactor) is done.
|
|
1076
|
+
-------------------------------------------------------------------------- */
|
|
1077
|
+
|
|
1078
|
+
@media (forced-colors: active) {
|
|
1079
|
+
.mds-choicebox {
|
|
1080
|
+
border-color: ButtonText;
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
.mds-choicebox-input:checked + .mds-choicebox {
|
|
1084
|
+
border-color: Highlight;
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
.mds-choicebox-input:disabled + .mds-choicebox {
|
|
1088
|
+
border-color: GrayText;
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
/* Preserve the indicator circle using forced-color-adjust: none so the
|
|
1092
|
+
border/fill remain under author control via system colour keywords. */
|
|
1093
|
+
.mds-choicebox-indicator::after {
|
|
1094
|
+
forced-color-adjust: none;
|
|
1095
|
+
border-color: ButtonText;
|
|
1096
|
+
background-color: Canvas;
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
.mds-choicebox-input:checked
|
|
1100
|
+
+ .mds-choicebox
|
|
1101
|
+
.mds-choicebox-indicator::after {
|
|
1102
|
+
forced-color-adjust: none;
|
|
1103
|
+
background-color: Highlight;
|
|
1104
|
+
/* SVG fill %23ffffff may be invisible on some Highlight backgrounds —
|
|
1105
|
+
fully addressed when Must Fix 2 (mask-image refactor) is completed. */
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
.mds-choicebox-input:disabled:not(:checked)
|
|
1109
|
+
+ .mds-choicebox
|
|
1110
|
+
.mds-choicebox-indicator::after {
|
|
1111
|
+
forced-color-adjust: none;
|
|
1112
|
+
border-color: GrayText;
|
|
1113
|
+
background-color: Canvas;
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
.mds-choicebox-input:disabled:checked
|
|
1117
|
+
+ .mds-choicebox
|
|
1118
|
+
.mds-choicebox-indicator::after {
|
|
1119
|
+
forced-color-adjust: none;
|
|
1120
|
+
background-color: GrayText;
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
/* Keep the focus ring aligned with the system Highlight colour */
|
|
1124
|
+
.mds-choicebox-input:focus-visible
|
|
1125
|
+
+ .mds-choicebox
|
|
1126
|
+
.mds-choicebox-indicator::after {
|
|
1127
|
+
outline-color: Highlight;
|
|
1128
|
+
}
|
|
1129
|
+
}
|
|
1130
|
+
|
|
746
1131
|
.mds-close-button.btn-close {
|
|
747
1132
|
inline-size: var(--mds-icons-md);
|
|
748
1133
|
block-size: var(--mds-icons-md);
|
|
@@ -791,6 +1176,684 @@
|
|
|
791
1176
|
background-size: var(--mds-icons-lg) var(--mds-icons-lg);
|
|
792
1177
|
}
|
|
793
1178
|
|
|
1179
|
+
/* Favourite button (icon-only toggle) */
|
|
1180
|
+
|
|
1181
|
+
.mds-favourite-button {
|
|
1182
|
+
display: inline-flex;
|
|
1183
|
+
align-items: center;
|
|
1184
|
+
justify-content: center;
|
|
1185
|
+
padding: var(--mds-spacing-xs);
|
|
1186
|
+
border: none;
|
|
1187
|
+
border-radius: var(--mds-border-radius-pill);
|
|
1188
|
+
background-color: var(--mds-bg-surface-default);
|
|
1189
|
+
color: var(--mds-text-default);
|
|
1190
|
+
cursor: pointer;
|
|
1191
|
+
transition:
|
|
1192
|
+
background-color 0.15s ease-in-out,
|
|
1193
|
+
color 0.15s ease-in-out;
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1196
|
+
.mds-favourite-button__icon {
|
|
1197
|
+
display: block;
|
|
1198
|
+
inline-size: var(--mds-icons-xs);
|
|
1199
|
+
block-size: var(--mds-icons-xs);
|
|
1200
|
+
background-color: currentColor;
|
|
1201
|
+
mask-image: url("data:image/svg+xml,%3csvg%20width='13'%20height='13'%20viewBox='0%200%2013%2013'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.17227%200C6.40664%200%206.59414%200.140625%206.68789%200.328125L8.30508%203.63281L11.891%204.17188C12.102%204.19531%2012.266%204.33594%2012.3363%204.54688C12.4066%204.75781%2012.3598%204.96875%2012.1957%205.13281L9.59414%207.71094L10.2035%2011.3438C10.2504%2011.5547%2010.1566%2011.7891%209.99258%2011.9062C9.80508%2012.0234%209.5707%2012.0469%209.3832%2011.9531L6.17227%2010.2188L2.98477%2011.9531C2.77383%2012.0469%202.56289%2012.0234%202.37539%2011.9062C2.21133%2011.7656%202.11758%2011.5547%202.16445%2011.3438L2.77383%207.71094L0.172266%205.13281C0.00820312%204.96875%20-0.0386719%204.75781%200.0316406%204.54688C0.101953%204.35938%200.266016%204.19531%200.476953%204.17188L4.06289%203.63281L5.68008%200.328125C5.77383%200.140625%205.96133%200%206.17227%200ZM6.17227%201.85156L4.95352%204.40625C4.85977%204.57031%204.71914%204.6875%204.53164%204.71094L1.76602%205.10938L3.7582%207.10156C3.89883%207.24219%203.96914%207.42969%203.92227%207.59375L3.45352%2010.4062L5.91445%209.09375C6.07852%209%206.28945%209%206.45352%209.09375L8.91445%2010.4062L8.4457%207.61719C8.39883%207.42969%208.46914%207.24219%208.60977%207.125L10.602%205.10938L7.83633%204.71094C7.64883%204.6875%207.5082%204.57031%207.41445%204.40625L6.17227%201.85156Z'%20fill='%231D2125'/%3e%3c/svg%3e");
|
|
1202
|
+
mask-repeat: no-repeat;
|
|
1203
|
+
mask-position: center;
|
|
1204
|
+
mask-size: contain;
|
|
1205
|
+
-webkit-mask-image: url("data:image/svg+xml,%3csvg%20width='13'%20height='13'%20viewBox='0%200%2013%2013'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.17227%200C6.40664%200%206.59414%200.140625%206.68789%200.328125L8.30508%203.63281L11.891%204.17188C12.102%204.19531%2012.266%204.33594%2012.3363%204.54688C12.4066%204.75781%2012.3598%204.96875%2012.1957%205.13281L9.59414%207.71094L10.2035%2011.3438C10.2504%2011.5547%2010.1566%2011.7891%209.99258%2011.9062C9.80508%2012.0234%209.5707%2012.0469%209.3832%2011.9531L6.17227%2010.2188L2.98477%2011.9531C2.77383%2012.0469%202.56289%2012.0234%202.37539%2011.9062C2.21133%2011.7656%202.11758%2011.5547%202.16445%2011.3438L2.77383%207.71094L0.172266%205.13281C0.00820312%204.96875%20-0.0386719%204.75781%200.0316406%204.54688C0.101953%204.35938%200.266016%204.19531%200.476953%204.17188L4.06289%203.63281L5.68008%200.328125C5.77383%200.140625%205.96133%200%206.17227%200ZM6.17227%201.85156L4.95352%204.40625C4.85977%204.57031%204.71914%204.6875%204.53164%204.71094L1.76602%205.10938L3.7582%207.10156C3.89883%207.24219%203.96914%207.42969%203.92227%207.59375L3.45352%2010.4062L5.91445%209.09375C6.07852%209%206.28945%209%206.45352%209.09375L8.91445%2010.4062L8.4457%207.61719C8.39883%207.42969%208.46914%207.24219%208.60977%207.125L10.602%205.10938L7.83633%204.71094C7.64883%204.6875%207.5082%204.57031%207.41445%204.40625L6.17227%201.85156Z'%20fill='%231D2125'/%3e%3c/svg%3e");
|
|
1206
|
+
-webkit-mask-repeat: no-repeat;
|
|
1207
|
+
-webkit-mask-position: center;
|
|
1208
|
+
-webkit-mask-size: contain;
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1211
|
+
.mds-favourite-button--selected .mds-favourite-button__icon {
|
|
1212
|
+
mask-image: url("data:image/svg+xml,%3csvg%20width='13'%20height='13'%20viewBox='0%200%2013%2013'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.84706%200.421875L8.3705%203.53906L11.7221%204.03125C12.0033%204.07812%2012.2377%204.26562%2012.3314%204.54688C12.4252%204.80469%2012.3549%205.10938%2012.1439%205.29688L9.70643%207.71094L10.2924%2011.1328C10.3392%2011.4141%2010.2221%2011.6953%209.98768%2011.8594C9.75331%2012.0469%209.44862%2012.0469%209.19081%2011.9297L6.19081%2010.3125L3.16737%2011.9297C2.933%2012.0469%202.62831%2012.0469%202.39393%2011.8594C2.15956%2011.6953%202.04237%2011.4141%202.08925%2011.1328L2.65175%207.71094L0.214245%205.29688C0.0267453%205.10938%20-0.0435672%204.80469%200.0267453%204.54688C0.120495%204.26562%200.35487%204.07812%200.63612%204.03125L4.01112%203.53906L5.51112%200.421875C5.62831%200.164062%205.88612%200%206.19081%200C6.47206%200%206.72987%200.164062%206.84706%200.421875Z'%20fill='%230F6CBF'/%3e%3c/svg%3e");
|
|
1213
|
+
-webkit-mask-image: url("data:image/svg+xml,%3csvg%20width='13'%20height='13'%20viewBox='0%200%2013%2013'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.84706%200.421875L8.3705%203.53906L11.7221%204.03125C12.0033%204.07812%2012.2377%204.26562%2012.3314%204.54688C12.4252%204.80469%2012.3549%205.10938%2012.1439%205.29688L9.70643%207.71094L10.2924%2011.1328C10.3392%2011.4141%2010.2221%2011.6953%209.98768%2011.8594C9.75331%2012.0469%209.44862%2012.0469%209.19081%2011.9297L6.19081%2010.3125L3.16737%2011.9297C2.933%2012.0469%202.62831%2012.0469%202.39393%2011.8594C2.15956%2011.6953%202.04237%2011.4141%202.08925%2011.1328L2.65175%207.71094L0.214245%205.29688C0.0267453%205.10938%20-0.0435672%204.80469%200.0267453%204.54688C0.120495%204.26562%200.35487%204.07812%200.63612%204.03125L4.01112%203.53906L5.51112%200.421875C5.62831%200.164062%205.88612%200%206.19081%200C6.47206%200%206.72987%200.164062%206.84706%200.421875Z'%20fill='%230F6CBF'/%3e%3c/svg%3e");
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
/* Unselected states */
|
|
1217
|
+
|
|
1218
|
+
.mds-favourite-button:hover:not(:disabled) {
|
|
1219
|
+
background-color: var(--mds-bg-surface-subtle);
|
|
1220
|
+
color: var(--mds-text-subtle);
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
.mds-favourite-button:active:not(:disabled) {
|
|
1224
|
+
background-color: var(--mds-bg-surface-strong);
|
|
1225
|
+
color: var(--mds-text-default);
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
/* Selected states */
|
|
1229
|
+
|
|
1230
|
+
.mds-favourite-button--selected {
|
|
1231
|
+
background-color: var(--mds-bg-surface-default);
|
|
1232
|
+
color: var(--mds-text-link-primary-default);
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
.mds-favourite-button--selected:hover:not(:disabled) {
|
|
1236
|
+
background-color: var(--mds-bg-surface-subtle);
|
|
1237
|
+
color: var(--mds-text-link-primary-hover);
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
.mds-favourite-button--selected:active:not(:disabled) {
|
|
1241
|
+
background-color: var(--mds-bg-surface-strong);
|
|
1242
|
+
color: var(--mds-text-link-primary-default);
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
/* Disabled states */
|
|
1246
|
+
|
|
1247
|
+
.mds-favourite-button:disabled {
|
|
1248
|
+
background-color: var(--mds-bg-surface-default);
|
|
1249
|
+
color: var(--mds-text-muted);
|
|
1250
|
+
cursor: not-allowed;
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
.mds-favourite-button--selected:disabled {
|
|
1254
|
+
color: var(--mds-text-link-primary-disabled);
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
/* Focus ring */
|
|
1258
|
+
|
|
1259
|
+
.mds-favourite-button:focus {
|
|
1260
|
+
box-shadow: none;
|
|
1261
|
+
outline: none;
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
.mds-favourite-button:focus-visible {
|
|
1265
|
+
box-shadow: none;
|
|
1266
|
+
outline: var(--mds-stroke-weight-md) solid var(--mds-focus-default);
|
|
1267
|
+
outline-offset: 0;
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
.mds-link {
|
|
1271
|
+
display: inline-flex;
|
|
1272
|
+
align-items: center;
|
|
1273
|
+
gap: var(--mds-spacing-xs);
|
|
1274
|
+
|
|
1275
|
+
color: var(--mds-text-link-primary-default);
|
|
1276
|
+
font-family: var(--mds-font-family-base);
|
|
1277
|
+
font-weight: var(--mds-font-weight-regular);
|
|
1278
|
+
font-size: var(--mds-font-size-paragraph-default);
|
|
1279
|
+
line-height: var(--mds-line-height-paragraph-xs);
|
|
1280
|
+
letter-spacing: var(--mds-letter-spacing-default);
|
|
1281
|
+
text-decoration: none;
|
|
1282
|
+
|
|
1283
|
+
cursor: pointer;
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1286
|
+
.mds-link:hover:not(:focus-visible) {
|
|
1287
|
+
color: var(--mds-text-link-primary-hover);
|
|
1288
|
+
}
|
|
1289
|
+
|
|
1290
|
+
.mds-link:active {
|
|
1291
|
+
color: var(--mds-text-link-primary-hover);
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
/* Underline on hover applies only to the label text, not the icon.
|
|
1295
|
+
Pressed state has no underline (Figma). Thickness and position use
|
|
1296
|
+
from-font so the underline follows the font's own metrics. */
|
|
1297
|
+
|
|
1298
|
+
.mds-link:hover:not(:focus-visible) .mds-link__label {
|
|
1299
|
+
text-decoration: underline;
|
|
1300
|
+
text-decoration-thickness: from-font;
|
|
1301
|
+
text-underline-position: from-font;
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
/* Slide icon toward the label on hover using transform so the link node width
|
|
1305
|
+
stays constant (gap remains --mds-spacing-xs; only the icon moves visually). */
|
|
1306
|
+
|
|
1307
|
+
.mds-link:hover:not(:focus-visible) .mds-link__icon:first-child {
|
|
1308
|
+
transform: translateX(var(--mds-spacing-xxs));
|
|
1309
|
+
}
|
|
1310
|
+
|
|
1311
|
+
.mds-link:hover:not(:focus-visible) .mds-link__icon:last-child {
|
|
1312
|
+
transform: translateX(calc(-1 * var(--mds-spacing-xxs)));
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
[dir='rtl'] .mds-link:hover:not(:focus-visible) .mds-link__icon:first-child {
|
|
1316
|
+
transform: translateX(calc(-1 * var(--mds-spacing-xxs)));
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1319
|
+
[dir='rtl'] .mds-link:hover:not(:focus-visible) .mds-link__icon:last-child {
|
|
1320
|
+
transform: translateX(var(--mds-spacing-xxs));
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1323
|
+
/* Reset icon position on press */
|
|
1324
|
+
|
|
1325
|
+
.mds-link:active .mds-link__icon {
|
|
1326
|
+
transform: none;
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1329
|
+
.mds-link:focus {
|
|
1330
|
+
outline: none;
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
.mds-link:focus-visible {
|
|
1334
|
+
/* Bottom-only focus underline matching Figma: 2px border-bottom, 1px gap below content */
|
|
1335
|
+
outline: none;
|
|
1336
|
+
border-radius: 0;
|
|
1337
|
+
padding-bottom: var(--mds-spacing-offset);
|
|
1338
|
+
border-bottom: var(--mds-stroke-weight-md) solid var(--mds-focus-default);
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1341
|
+
.mds-link.mds-link--secondary {
|
|
1342
|
+
color: var(--mds-text-subtle);
|
|
1343
|
+
}
|
|
1344
|
+
|
|
1345
|
+
.mds-link.mds-link--secondary:hover:not(:focus-visible),
|
|
1346
|
+
.mds-link.mds-link--secondary:active {
|
|
1347
|
+
color: var(--mds-text-default);
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1350
|
+
.mds-link.mds-link--disabled,
|
|
1351
|
+
.mds-link.mds-link--disabled:hover,
|
|
1352
|
+
.mds-link.mds-link--disabled:active {
|
|
1353
|
+
color: var(--mds-text-link-primary-disabled);
|
|
1354
|
+
pointer-events: none;
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1357
|
+
.mds-link.mds-link--disabled .mds-link__icon,
|
|
1358
|
+
.mds-link.mds-link--disabled:hover .mds-link__icon,
|
|
1359
|
+
.mds-link.mds-link--disabled:active .mds-link__icon {
|
|
1360
|
+
transform: none;
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1363
|
+
.mds-link.mds-link--disabled .mds-link__label,
|
|
1364
|
+
.mds-link.mds-link--disabled:hover .mds-link__label,
|
|
1365
|
+
.mds-link.mds-link--disabled:active .mds-link__label {
|
|
1366
|
+
text-decoration: none;
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1369
|
+
.mds-link.mds-link--secondary.mds-link--disabled,
|
|
1370
|
+
.mds-link.mds-link--secondary.mds-link--disabled:hover,
|
|
1371
|
+
.mds-link.mds-link--secondary.mds-link--disabled:active {
|
|
1372
|
+
color: var(--mds-text-muted);
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
.mds-link__icon,
|
|
1376
|
+
.mds-link__icon i,
|
|
1377
|
+
.mds-link__icon svg {
|
|
1378
|
+
inline-size: var(--mds-icons-xs);
|
|
1379
|
+
block-size: var(--mds-icons-xs);
|
|
1380
|
+
font-size: var(--mds-icons-xs);
|
|
1381
|
+
line-height: 1;
|
|
1382
|
+
flex-shrink: 0;
|
|
1383
|
+
}
|
|
1384
|
+
|
|
1385
|
+
.mds-link__icon {
|
|
1386
|
+
display: inline-flex;
|
|
1387
|
+
align-items: center;
|
|
1388
|
+
justify-content: center;
|
|
1389
|
+
transition: transform 150ms ease;
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1392
|
+
.mds-link__label {
|
|
1393
|
+
text-align: start;
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1396
|
+
/* Nav pill — compact navigation destination indicator */
|
|
1397
|
+
|
|
1398
|
+
.mds-nav-pill,
|
|
1399
|
+
.mds-nav-pill:visited {
|
|
1400
|
+
/* Reset anchor/link defaults */
|
|
1401
|
+
display: inline-flex;
|
|
1402
|
+
align-items: center;
|
|
1403
|
+
gap: var(--mds-spacing-xxs);
|
|
1404
|
+
padding: var(--mds-spacing-xs) var(--mds-spacing-sm);
|
|
1405
|
+
border: none;
|
|
1406
|
+
background-color: transparent;
|
|
1407
|
+
cursor: pointer;
|
|
1408
|
+
|
|
1409
|
+
border-radius: var(--mds-border-radius-md);
|
|
1410
|
+
|
|
1411
|
+
/* Label colour: unselected default */
|
|
1412
|
+
color: var(--mds-text-subtle);
|
|
1413
|
+
text-decoration: none;
|
|
1414
|
+
}
|
|
1415
|
+
|
|
1416
|
+
.mds-nav-pill:hover,
|
|
1417
|
+
.mds-nav-pill:focus,
|
|
1418
|
+
.mds-nav-pill:active,
|
|
1419
|
+
.mds-nav-pill:visited {
|
|
1420
|
+
text-decoration: none;
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
/* ---- Label ---- */
|
|
1424
|
+
|
|
1425
|
+
.mds-nav-pill__label {
|
|
1426
|
+
/* UI small — matches Figma: $font-size-sm / font-weight/medium / line-height/paragraph/xs */
|
|
1427
|
+
font-family: var(--mds-font-family-base);
|
|
1428
|
+
font-size: var(--mds-font-size-paragraph-small);
|
|
1429
|
+
font-weight: var(--mds-font-weight-medium);
|
|
1430
|
+
line-height: var(--mds-line-height-paragraph-xs);
|
|
1431
|
+
white-space: nowrap;
|
|
1432
|
+
}
|
|
1433
|
+
|
|
1434
|
+
/* ---- Active-indicator dot (selected state only) ---- */
|
|
1435
|
+
|
|
1436
|
+
.mds-nav-pill__indicator {
|
|
1437
|
+
display: block;
|
|
1438
|
+
width: 4px;
|
|
1439
|
+
height: 4px;
|
|
1440
|
+
border-radius: var(--mds-border-radius-pill);
|
|
1441
|
+
background-color: var(--mds-bg-interactive-primary-default);
|
|
1442
|
+
flex-shrink: 0;
|
|
1443
|
+
}
|
|
1444
|
+
|
|
1445
|
+
/* ---- Hover (unselected) ---- */
|
|
1446
|
+
|
|
1447
|
+
.mds-nav-pill:hover:not([aria-disabled='true']):not(.mds-nav-pill--selected) {
|
|
1448
|
+
background-color: var(--mds-bg-nav-pill-hover);
|
|
1449
|
+
}
|
|
1450
|
+
|
|
1451
|
+
/* ---- Pressed / active (unselected) ---- */
|
|
1452
|
+
|
|
1453
|
+
.mds-nav-pill:active:not([aria-disabled='true']):not(.mds-nav-pill--selected) {
|
|
1454
|
+
background-color: var(--mds-bg-nav-pill-pressed);
|
|
1455
|
+
}
|
|
1456
|
+
|
|
1457
|
+
/* ---- Focus-visible ring — keyboard navigation ---- */
|
|
1458
|
+
|
|
1459
|
+
.mds-nav-pill:focus {
|
|
1460
|
+
outline: none;
|
|
1461
|
+
box-shadow: none;
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1464
|
+
.mds-nav-pill:focus-visible {
|
|
1465
|
+
outline: var(--mds-stroke-weight-md) solid var(--mds-focus-default);
|
|
1466
|
+
outline-offset: var(--mds-spacing-offset);
|
|
1467
|
+
box-shadow: none;
|
|
1468
|
+
}
|
|
1469
|
+
|
|
1470
|
+
/* ---- Disabled ---- */
|
|
1471
|
+
|
|
1472
|
+
.mds-nav-pill[aria-disabled='true'] {
|
|
1473
|
+
color: var(--mds-text-muted);
|
|
1474
|
+
cursor: not-allowed;
|
|
1475
|
+
background-color: transparent;
|
|
1476
|
+
}
|
|
1477
|
+
|
|
1478
|
+
/* ---- Selected state ---- */
|
|
1479
|
+
|
|
1480
|
+
.mds-nav-pill--selected {
|
|
1481
|
+
color: var(--mds-text-default);
|
|
1482
|
+
background-color: var(--mds-bg-nav-pill-selected);
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1485
|
+
.mds-nav-pill--selected:visited {
|
|
1486
|
+
color: var(--mds-text-default);
|
|
1487
|
+
}
|
|
1488
|
+
|
|
1489
|
+
.mds-nav-pill--selected:hover:not([aria-disabled='true']) {
|
|
1490
|
+
background-color: var(--mds-bg-nav-pill-selected);
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1493
|
+
.mds-pagination {
|
|
1494
|
+
display: flex;
|
|
1495
|
+
gap: var(--mds-spacing-xxs);
|
|
1496
|
+
align-items: center;
|
|
1497
|
+
flex-wrap: wrap;
|
|
1498
|
+
font-family: inherit;
|
|
1499
|
+
direction: inherit;
|
|
1500
|
+
}
|
|
1501
|
+
|
|
1502
|
+
/* Shared base styles for buttons and page items */
|
|
1503
|
+
|
|
1504
|
+
.mds-pagination__button,
|
|
1505
|
+
.mds-pagination__page {
|
|
1506
|
+
display: flex;
|
|
1507
|
+
align-items: center;
|
|
1508
|
+
justify-content: center;
|
|
1509
|
+
min-width: 34px;
|
|
1510
|
+
min-height: 34px;
|
|
1511
|
+
padding: var(--mds-spacing-xs);
|
|
1512
|
+
border: var(--mds-stroke-weight-sm) solid transparent;
|
|
1513
|
+
border-radius: var(--mds-border-radius-xs);
|
|
1514
|
+
background-color: transparent;
|
|
1515
|
+
color: var(--mds-text-default);
|
|
1516
|
+
font-size: inherit;
|
|
1517
|
+
font-family: inherit;
|
|
1518
|
+
cursor: pointer;
|
|
1519
|
+
-webkit-user-select: none;
|
|
1520
|
+
user-select: none;
|
|
1521
|
+
}
|
|
1522
|
+
|
|
1523
|
+
/* Keep hover affordance on prev/next controls only. Page-number buttons must
|
|
1524
|
+
switch state atomically to avoid visible handoff when ellipsis positions move. */
|
|
1525
|
+
|
|
1526
|
+
.mds-pagination__button {
|
|
1527
|
+
transition: background-color 150ms ease;
|
|
1528
|
+
}
|
|
1529
|
+
|
|
1530
|
+
.mds-pagination__page {
|
|
1531
|
+
transition: none;
|
|
1532
|
+
}
|
|
1533
|
+
|
|
1534
|
+
.mds-pagination__button:hover:not(:disabled),
|
|
1535
|
+
.mds-pagination__page:hover:not(:disabled) {
|
|
1536
|
+
background-color: var(--mds-bg-interactive-secondary-hover);
|
|
1537
|
+
}
|
|
1538
|
+
|
|
1539
|
+
.mds-pagination__button:active:not(:disabled),
|
|
1540
|
+
.mds-pagination__page:active:not(:disabled) {
|
|
1541
|
+
background-color: var(--mds-bg-interactive-secondary-active);
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1544
|
+
.mds-pagination__button:focus,
|
|
1545
|
+
.mds-pagination__page:focus {
|
|
1546
|
+
box-shadow: none;
|
|
1547
|
+
outline: none;
|
|
1548
|
+
}
|
|
1549
|
+
|
|
1550
|
+
.mds-pagination__button:focus-visible:not(:disabled),
|
|
1551
|
+
.mds-pagination__page:focus-visible:not(:disabled) {
|
|
1552
|
+
outline: var(--mds-stroke-weight-md) solid var(--mds-focus-default);
|
|
1553
|
+
outline-offset: var(--mds-spacing-offset);
|
|
1554
|
+
box-shadow: none;
|
|
1555
|
+
}
|
|
1556
|
+
|
|
1557
|
+
.mds-pagination__button:disabled,
|
|
1558
|
+
.mds-pagination__page:disabled {
|
|
1559
|
+
color: var(--mds-text-muted);
|
|
1560
|
+
cursor: not-allowed;
|
|
1561
|
+
}
|
|
1562
|
+
|
|
1563
|
+
/* Icon sizing */
|
|
1564
|
+
|
|
1565
|
+
.mds-pagination__button i {
|
|
1566
|
+
/* width/font-size use --mds-icons-sm (= scale-600 = 1rem = 16px, the icon md size). */
|
|
1567
|
+
width: var(--mds-icons-sm);
|
|
1568
|
+
font-size: var(--mds-icons-sm);
|
|
1569
|
+
line-height: var(--mds-line-height-paragraph-xs);
|
|
1570
|
+
}
|
|
1571
|
+
|
|
1572
|
+
/* Full variant */
|
|
1573
|
+
|
|
1574
|
+
.mds-pagination--full .mds-pagination__pages {
|
|
1575
|
+
display: flex;
|
|
1576
|
+
gap: var(--mds-spacing-xxs);
|
|
1577
|
+
align-items: center;
|
|
1578
|
+
}
|
|
1579
|
+
|
|
1580
|
+
/* Page items */
|
|
1581
|
+
|
|
1582
|
+
.mds-pagination__page {
|
|
1583
|
+
line-height: var(--mds-line-height-paragraph-xs);
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1586
|
+
/* Current page state */
|
|
1587
|
+
|
|
1588
|
+
.mds-pagination__page[data-current='true'] {
|
|
1589
|
+
background-color: var(--mds-bg-interactive-primary-default);
|
|
1590
|
+
color: var(--mds-text-inverse);
|
|
1591
|
+
}
|
|
1592
|
+
|
|
1593
|
+
.mds-pagination__page[data-current='true']:disabled {
|
|
1594
|
+
background-color: transparent;
|
|
1595
|
+
color: var(--mds-text-muted);
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
.mds-pagination__page[data-current='true']:hover:not(:disabled) {
|
|
1599
|
+
background-color: var(--mds-bg-interactive-primary-hover);
|
|
1600
|
+
}
|
|
1601
|
+
|
|
1602
|
+
.mds-pagination__page[data-current='true']:active:not(:disabled) {
|
|
1603
|
+
background-color: var(--mds-bg-interactive-primary-active);
|
|
1604
|
+
}
|
|
1605
|
+
|
|
1606
|
+
.mds-pagination__page[data-current='true']:focus-visible {
|
|
1607
|
+
outline: var(--mds-stroke-weight-md) solid var(--mds-focus-default);
|
|
1608
|
+
outline-offset: var(--mds-spacing-offset);
|
|
1609
|
+
box-shadow: none;
|
|
1610
|
+
}
|
|
1611
|
+
|
|
1612
|
+
/* Ellipsis */
|
|
1613
|
+
|
|
1614
|
+
.mds-pagination__ellipsis {
|
|
1615
|
+
display: flex;
|
|
1616
|
+
align-items: center;
|
|
1617
|
+
justify-content: center;
|
|
1618
|
+
min-width: 34px;
|
|
1619
|
+
min-height: 34px;
|
|
1620
|
+
color: var(--mds-text-muted);
|
|
1621
|
+
user-select: none;
|
|
1622
|
+
pointer-events: none;
|
|
1623
|
+
}
|
|
1624
|
+
|
|
1625
|
+
/* Grouped variant - only shows prev/next buttons */
|
|
1626
|
+
|
|
1627
|
+
.mds-pagination--grouped .mds-pagination__pages {
|
|
1628
|
+
display: none;
|
|
1629
|
+
}
|
|
1630
|
+
|
|
1631
|
+
/* Grouped button styling */
|
|
1632
|
+
|
|
1633
|
+
.mds-pagination--grouped .mds-pagination__button {
|
|
1634
|
+
border-color: var(--mds-border-interactive-secondary-default);
|
|
1635
|
+
}
|
|
1636
|
+
|
|
1637
|
+
/* Flip prev/next chevrons in RTL so they point in the correct travel direction */
|
|
1638
|
+
|
|
1639
|
+
[dir='rtl'] .mds-pagination__button i {
|
|
1640
|
+
transform: scaleX(-1);
|
|
1641
|
+
}
|
|
1642
|
+
|
|
1643
|
+
/* Wrapper layout */
|
|
1644
|
+
|
|
1645
|
+
.mds-progress-bar {
|
|
1646
|
+
display: flex;
|
|
1647
|
+
flex-direction: column;
|
|
1648
|
+
gap: var(--mds-spacing-xs);
|
|
1649
|
+
/* 120px is intentionally has no token by design just as in Figma. */
|
|
1650
|
+
min-width: 120px;
|
|
1651
|
+
width: 100%;
|
|
1652
|
+
}
|
|
1653
|
+
|
|
1654
|
+
/* Inline variant: bar on the left, count on the right in one row. */
|
|
1655
|
+
|
|
1656
|
+
.mds-progress-bar.mds-progress-bar--label-inline {
|
|
1657
|
+
flex-direction: row;
|
|
1658
|
+
align-items: center;
|
|
1659
|
+
}
|
|
1660
|
+
|
|
1661
|
+
/* Track (outer container) */
|
|
1662
|
+
|
|
1663
|
+
.mds-progress-bar-track.progress {
|
|
1664
|
+
/* Re-state Bootstrap progress primitives here so host .progress overrides cannot drift MDS visuals. */
|
|
1665
|
+
/* 0.375rem = 6px from Figma; intentionally has no token by design for consumer flexibility. */
|
|
1666
|
+
display: flex;
|
|
1667
|
+
height: 0.375rem;
|
|
1668
|
+
overflow: hidden;
|
|
1669
|
+
border-radius: var(--mds-border-radius-pill);
|
|
1670
|
+
background-color: var(--mds-bg-feedback-secondary-default);
|
|
1671
|
+
box-shadow: none;
|
|
1672
|
+
}
|
|
1673
|
+
|
|
1674
|
+
/* In-progress and loading use the primary-subtle track. */
|
|
1675
|
+
|
|
1676
|
+
.mds-progress-bar--in-progress .mds-progress-bar-track,
|
|
1677
|
+
.mds-progress-bar--loading .mds-progress-bar-track {
|
|
1678
|
+
background-color: var(--mds-bg-feedback-primary-subtle);
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1681
|
+
/* Error track. */
|
|
1682
|
+
|
|
1683
|
+
.mds-progress-bar--error .mds-progress-bar-track {
|
|
1684
|
+
background-color: var(--mds-bg-feedback-danger-subtle);
|
|
1685
|
+
}
|
|
1686
|
+
|
|
1687
|
+
/* Warning track. */
|
|
1688
|
+
|
|
1689
|
+
.mds-progress-bar--warning .mds-progress-bar-track {
|
|
1690
|
+
background-color: var(--mds-bg-feedback-warning-subtle);
|
|
1691
|
+
}
|
|
1692
|
+
|
|
1693
|
+
/* Completed and empty keep the default secondary track. */
|
|
1694
|
+
|
|
1695
|
+
.mds-progress-bar--completed .mds-progress-bar-track,
|
|
1696
|
+
.mds-progress-bar--empty .mds-progress-bar-track {
|
|
1697
|
+
background-color: var(--mds-bg-feedback-secondary-default);
|
|
1698
|
+
}
|
|
1699
|
+
|
|
1700
|
+
/* Inline variant: track should fill available row space. */
|
|
1701
|
+
|
|
1702
|
+
.mds-progress-bar--label-inline .mds-progress-bar-track {
|
|
1703
|
+
flex: 1 1 0;
|
|
1704
|
+
min-inline-size: var(--mds-spacing-xxl);
|
|
1705
|
+
}
|
|
1706
|
+
|
|
1707
|
+
/* Fill (inner progress indicator) */
|
|
1708
|
+
|
|
1709
|
+
.mds-progress-bar-fill.progress-bar {
|
|
1710
|
+
/* Keep core progress-bar behavior local so host --bs-progress-* token changes do not leak in. */
|
|
1711
|
+
display: flex;
|
|
1712
|
+
overflow: hidden;
|
|
1713
|
+
background-color: var(--mds-bg-interactive-primary-default);
|
|
1714
|
+
transition: width 0.3s ease;
|
|
1715
|
+
}
|
|
1716
|
+
|
|
1717
|
+
/* Explicit striped styles avoid dependence on host Bootstrap variables. */
|
|
1718
|
+
|
|
1719
|
+
.mds-progress-bar-fill.progress-bar-striped {
|
|
1720
|
+
background-image: linear-gradient(
|
|
1721
|
+
45deg,
|
|
1722
|
+
rgba(255, 255, 255, 0.15) 25%,
|
|
1723
|
+
transparent 25%,
|
|
1724
|
+
transparent 50%,
|
|
1725
|
+
rgba(255, 255, 255, 0.15) 50%,
|
|
1726
|
+
rgba(255, 255, 255, 0.15) 75%,
|
|
1727
|
+
transparent 75%,
|
|
1728
|
+
transparent
|
|
1729
|
+
);
|
|
1730
|
+
/* Figma loading pattern uses a larger tile than the 6px bar height. */
|
|
1731
|
+
background-size: var(--mds-spacing-md) var(--mds-spacing-md);
|
|
1732
|
+
background-repeat: repeat;
|
|
1733
|
+
background-position-x: 0;
|
|
1734
|
+
}
|
|
1735
|
+
|
|
1736
|
+
[dir='rtl'] .mds-progress-bar-fill.progress-bar-striped {
|
|
1737
|
+
background-image: linear-gradient(
|
|
1738
|
+
-45deg,
|
|
1739
|
+
rgba(255, 255, 255, 0.15) 25%,
|
|
1740
|
+
transparent 25%,
|
|
1741
|
+
transparent 50%,
|
|
1742
|
+
rgba(255, 255, 255, 0.15) 50%,
|
|
1743
|
+
rgba(255, 255, 255, 0.15) 75%,
|
|
1744
|
+
transparent 75%,
|
|
1745
|
+
transparent
|
|
1746
|
+
);
|
|
1747
|
+
}
|
|
1748
|
+
|
|
1749
|
+
.mds-progress-bar-fill.progress-bar-animated {
|
|
1750
|
+
animation: mds-progress-bar-stripes 0.8s linear infinite;
|
|
1751
|
+
}
|
|
1752
|
+
|
|
1753
|
+
[dir='rtl'] .mds-progress-bar-fill.progress-bar-animated {
|
|
1754
|
+
animation-name: mds-progress-bar-stripes-rtl;
|
|
1755
|
+
}
|
|
1756
|
+
|
|
1757
|
+
@keyframes mds-progress-bar-stripes {
|
|
1758
|
+
0% {
|
|
1759
|
+
background-position-x: var(--mds-spacing-md);
|
|
1760
|
+
}
|
|
1761
|
+
}
|
|
1762
|
+
|
|
1763
|
+
@keyframes mds-progress-bar-stripes-rtl {
|
|
1764
|
+
0% {
|
|
1765
|
+
background-position-x: calc(var(--mds-spacing-md) * -1);
|
|
1766
|
+
}
|
|
1767
|
+
}
|
|
1768
|
+
|
|
1769
|
+
/* Error fill. */
|
|
1770
|
+
|
|
1771
|
+
.mds-progress-bar--error .mds-progress-bar-fill {
|
|
1772
|
+
background-color: var(--mds-bg-feedback-danger-default);
|
|
1773
|
+
}
|
|
1774
|
+
|
|
1775
|
+
/* Warning fill. */
|
|
1776
|
+
|
|
1777
|
+
.mds-progress-bar--warning .mds-progress-bar-fill {
|
|
1778
|
+
background-color: var(--mds-bg-feedback-warning-default);
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
/* Completed fill. */
|
|
1782
|
+
|
|
1783
|
+
.mds-progress-bar--completed .mds-progress-bar-fill {
|
|
1784
|
+
background-color: var(--mds-bg-feedback-success-default);
|
|
1785
|
+
}
|
|
1786
|
+
|
|
1787
|
+
/* Empty fill blends with the track. */
|
|
1788
|
+
|
|
1789
|
+
.mds-progress-bar--empty .mds-progress-bar-fill {
|
|
1790
|
+
background-color: var(--mds-bg-feedback-secondary-default);
|
|
1791
|
+
}
|
|
1792
|
+
|
|
1793
|
+
/* Label container */
|
|
1794
|
+
|
|
1795
|
+
.mds-progress-bar-label {
|
|
1796
|
+
display: flex;
|
|
1797
|
+
justify-content: space-between;
|
|
1798
|
+
align-items: center;
|
|
1799
|
+
gap: var(--mds-spacing-xs);
|
|
1800
|
+
width: 100%;
|
|
1801
|
+
|
|
1802
|
+
/* UI text/small */
|
|
1803
|
+
font-family: var(--mds-font-family-base);
|
|
1804
|
+
font-size: var(--mds-font-size-paragraph-small);
|
|
1805
|
+
line-height: var(--mds-line-height-paragraph-small);
|
|
1806
|
+
letter-spacing: var(--mds-letter-spacing-default);
|
|
1807
|
+
color: var(--mds-text-subtle);
|
|
1808
|
+
}
|
|
1809
|
+
|
|
1810
|
+
/* Title text */
|
|
1811
|
+
|
|
1812
|
+
.mds-progress-bar-title {
|
|
1813
|
+
font-weight: var(--mds-font-weight-medium);
|
|
1814
|
+
line-height: var(--mds-line-height-paragraph-small);
|
|
1815
|
+
word-break: break-word;
|
|
1816
|
+
}
|
|
1817
|
+
|
|
1818
|
+
/* In title-and-count layout, title and count share one row and must both be able to shrink. */
|
|
1819
|
+
|
|
1820
|
+
.mds-progress-bar--label-title-and-count .mds-progress-bar-title {
|
|
1821
|
+
flex: 1 1 auto;
|
|
1822
|
+
min-inline-size: 0;
|
|
1823
|
+
}
|
|
1824
|
+
|
|
1825
|
+
/* Count / percentage text */
|
|
1826
|
+
|
|
1827
|
+
.mds-progress-bar-count {
|
|
1828
|
+
font-weight: var(--mds-font-weight-regular);
|
|
1829
|
+
|
|
1830
|
+
/* Inline count sits outside .mds-progress-bar-label, so it needs explicit text styles. */
|
|
1831
|
+
font-family: var(--mds-font-family-base);
|
|
1832
|
+
font-size: var(--mds-font-size-paragraph-small);
|
|
1833
|
+
line-height: var(--mds-line-height-paragraph-small);
|
|
1834
|
+
letter-spacing: var(--mds-letter-spacing-default);
|
|
1835
|
+
color: var(--mds-text-subtle);
|
|
1836
|
+
white-space: normal;
|
|
1837
|
+
overflow-wrap: anywhere;
|
|
1838
|
+
min-inline-size: 0;
|
|
1839
|
+
}
|
|
1840
|
+
|
|
1841
|
+
/* In title-and-count layout, count is bounded to prevent hogging the row. */
|
|
1842
|
+
|
|
1843
|
+
.mds-progress-bar--label-title-and-count .mds-progress-bar-count {
|
|
1844
|
+
flex: 0 1 50%;
|
|
1845
|
+
max-inline-size: 50%;
|
|
1846
|
+
text-align: end;
|
|
1847
|
+
}
|
|
1848
|
+
|
|
1849
|
+
/* In inline layout, count takes only what it needs, leaving space for the track. */
|
|
1850
|
+
|
|
1851
|
+
.mds-progress-bar--label-inline .mds-progress-bar-count {
|
|
1852
|
+
flex: 0 1 auto;
|
|
1853
|
+
max-inline-size: 40%;
|
|
1854
|
+
text-align: start;
|
|
1855
|
+
}
|
|
1856
|
+
|
|
794
1857
|
/* Parent element */
|
|
795
1858
|
|
|
796
1859
|
.mds-form-check {
|
|
@@ -1038,6 +2101,9 @@
|
|
|
1038
2101
|
--mds-bg-interactive-secondary-default: var(--mds-color-gray-300);
|
|
1039
2102
|
--mds-bg-interactive-secondary-disabled: var(--mds-color-gray-200);
|
|
1040
2103
|
--mds-bg-interactive-secondary-hover: var(--mds-color-gray-400);
|
|
2104
|
+
--mds-bg-nav-pill-hover: var(--mds-color-gray-200);
|
|
2105
|
+
--mds-bg-nav-pill-pressed: var(--mds-color-gray-300);
|
|
2106
|
+
--mds-bg-nav-pill-selected: var(--mds-color-gray-200);
|
|
1041
2107
|
--mds-bg-surface-default: var(--mds-color-gray-white);
|
|
1042
2108
|
--mds-bg-surface-strong: var(--mds-color-gray-200);
|
|
1043
2109
|
--mds-bg-surface-subtle: var(--mds-color-gray-100);
|