@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
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
.mds-checkbox {
|
|
2
|
+
display: inline-grid;
|
|
3
|
+
grid-template-columns: auto auto;
|
|
4
|
+
align-items: center;
|
|
5
|
+
align-self: start;
|
|
6
|
+
min-height: var(--mds-icons-lg);
|
|
7
|
+
padding: var(--mds-spacing-none);
|
|
8
|
+
column-gap: var(--mds-spacing-xs);
|
|
9
|
+
row-gap: var(--mds-spacing-xxs);
|
|
10
|
+
|
|
11
|
+
font-family: var(--mds-font-family-base);
|
|
12
|
+
font-size: var(--mds-font-size-paragraph-default);
|
|
13
|
+
font-weight: var(--mds-font-weight-regular);
|
|
14
|
+
line-height: var(--mds-line-height-paragraph-xs);
|
|
15
|
+
letter-spacing: var(--mds-letter-spacing-default);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.mds-checkbox-input {
|
|
19
|
+
border-radius: var(--mds-border-radius-xs);
|
|
20
|
+
border: var(--mds-stroke-weight-sm) solid
|
|
21
|
+
var(--mds-border-interactive-secondary-default);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.mds-checkbox .mds-checkbox-input {
|
|
25
|
+
/* Bootstrap applies float/offset styles to .form-check-input for indented label layouts.
|
|
26
|
+
Match selector specificity and reset float/margins for the grid-based sibling layout. */
|
|
27
|
+
margin: 0;
|
|
28
|
+
float: none;
|
|
29
|
+
background-color: var(--mds-bg-surface-default);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.mds-checkbox-input:checked {
|
|
33
|
+
background-color: var(--mds-bg-interactive-primary-default);
|
|
34
|
+
border-color: transparent;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.mds-checkbox-input:indeterminate {
|
|
38
|
+
background-color: var(--mds-bg-interactive-primary-default);
|
|
39
|
+
border-color: transparent;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.mds-checkbox-input:disabled {
|
|
43
|
+
border-color: var(--mds-border-interactive-secondary-disabled);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.mds-checkbox-input:disabled:checked {
|
|
47
|
+
background-color: var(--mds-bg-interactive-primary-disabled);
|
|
48
|
+
border-color: transparent;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.mds-checkbox-input:disabled:indeterminate {
|
|
52
|
+
background-color: var(--mds-bg-interactive-primary-disabled);
|
|
53
|
+
border-color: transparent;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.mds-checkbox-input.is-invalid {
|
|
57
|
+
border-color: var(--mds-border-interactive-danger-default);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.mds-checkbox-input.is-invalid:checked {
|
|
61
|
+
background-color: var(--mds-bg-interactive-danger-default);
|
|
62
|
+
border-color: transparent;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.mds-checkbox-input.is-invalid:indeterminate {
|
|
66
|
+
background-color: var(--mds-bg-interactive-danger-default);
|
|
67
|
+
border-color: transparent;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.mds-checkbox-input.is-invalid:disabled {
|
|
71
|
+
background-color: var(--mds-bg-interactive-secondary-disabled);
|
|
72
|
+
border-color: var(--mds-border-interactive-secondary-disabled);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.mds-checkbox-input.is-invalid:disabled:checked {
|
|
76
|
+
background-color: var(--mds-bg-interactive-primary-disabled);
|
|
77
|
+
border-color: transparent;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.mds-checkbox-input.is-invalid:disabled:indeterminate {
|
|
81
|
+
background-color: var(--mds-bg-interactive-primary-disabled);
|
|
82
|
+
border-color: transparent;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.mds-checkbox-input:focus,
|
|
86
|
+
.mds-checkbox-input.is-invalid:focus {
|
|
87
|
+
/* Reset Bootstrap's :focus box-shadow; our ring is applied on :focus-visible only */
|
|
88
|
+
box-shadow: none;
|
|
89
|
+
outline: none;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* Bootstrap also sets border-color on :focus. Restore the correct border for each state,
|
|
93
|
+
excluding checked/indeterminate which keep their transparent border. */
|
|
94
|
+
.mds-checkbox-input:focus:not(:checked):not(:indeterminate) {
|
|
95
|
+
border-color: var(--mds-border-interactive-secondary-default);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.mds-checkbox-input.is-invalid:focus:not(:checked):not(:indeterminate) {
|
|
99
|
+
border-color: var(--mds-border-interactive-danger-default);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.mds-checkbox-input:focus-visible {
|
|
103
|
+
outline: var(--mds-stroke-weight-md) solid var(--mds-focus-default);
|
|
104
|
+
outline-offset: var(--mds-spacing-offset);
|
|
105
|
+
box-shadow: none;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.mds-checkbox-input.is-invalid:focus-visible {
|
|
109
|
+
outline: var(--mds-stroke-weight-md) solid var(--mds-border-feedback-danger);
|
|
110
|
+
outline-offset: var(--mds-spacing-offset);
|
|
111
|
+
box-shadow: none;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.mds-checkbox .form-check-label,
|
|
115
|
+
.mds-checkbox .mds-checkbox-label {
|
|
116
|
+
display: flex;
|
|
117
|
+
align-items: center;
|
|
118
|
+
/* In the radio-style sibling layout, the checkbox should align to the label text line,
|
|
119
|
+
not to an expanded label hit area. Keep the label box tight and let htmlFor preserve click behavior. */
|
|
120
|
+
padding: 0;
|
|
121
|
+
color: var(--mds-text-default);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.mds-checkbox .mds-checkbox-label-text {
|
|
125
|
+
min-width: 0;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.mds-checkbox .mds-checkbox-input:disabled ~ .form-check-label,
|
|
129
|
+
.mds-checkbox .mds-checkbox-input:disabled ~ .mds-checkbox-label {
|
|
130
|
+
color: var(--mds-text-muted);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.mds-checkbox .mds-checkbox-input.is-invalid ~ .form-check-label,
|
|
134
|
+
.mds-checkbox .mds-checkbox-input.is-invalid ~ .mds-checkbox-label {
|
|
135
|
+
color: var(--mds-text-danger);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/* Disabled takes precedence over invalid — restore muted colour when both are active. */
|
|
139
|
+
.mds-checkbox .mds-checkbox-input.is-invalid:disabled ~ .form-check-label,
|
|
140
|
+
.mds-checkbox .mds-checkbox-input.is-invalid:disabled ~ .mds-checkbox-label {
|
|
141
|
+
color: var(--mds-text-muted);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.mds-checkbox-required {
|
|
145
|
+
color: var(--mds-text-danger);
|
|
146
|
+
margin-inline-start: var(--mds-spacing-xxs);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.mds-checkbox .invalid-feedback,
|
|
150
|
+
.mds-checkbox .mds-checkbox-feedback {
|
|
151
|
+
grid-column: 2;
|
|
152
|
+
font-size: var(--mds-font-size-paragraph-small);
|
|
153
|
+
font-weight: var(--mds-font-weight-medium);
|
|
154
|
+
line-height: var(--mds-line-height-paragraph-xs);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.mds-checkbox .invalid-feedback,
|
|
158
|
+
.mds-checkbox .mds-checkbox-feedback.mds-checkbox-supporting-text {
|
|
159
|
+
margin: 0;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.mds-checkbox .invalid-feedback {
|
|
163
|
+
color: var(--mds-text-danger);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/* In the default state supporting text is subtle. In the invalid state use danger to match
|
|
167
|
+
the label colour \u2014 matching Figma where the label container sets the colour for both. */
|
|
168
|
+
.mds-checkbox .mds-checkbox-feedback.mds-checkbox-supporting-text {
|
|
169
|
+
color: var(--mds-text-subtle);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.mds-checkbox
|
|
173
|
+
.mds-checkbox-input.is-invalid
|
|
174
|
+
~ .mds-checkbox-feedback.mds-checkbox-supporting-text {
|
|
175
|
+
color: var(--mds-text-danger);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.mds-checkbox .mds-checkbox-input:disabled ~ .invalid-feedback,
|
|
179
|
+
.mds-checkbox .mds-checkbox-input:disabled ~ .mds-checkbox-feedback {
|
|
180
|
+
opacity: 0.5;
|
|
181
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { InputHTMLAttributes, ReactElement } from 'react';
|
|
2
|
+
type IconElement = ReactElement<'i' | 'svg'>;
|
|
3
|
+
export interface ChoiceboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
|
4
|
+
/**
|
|
5
|
+
* Required primary label text identifying the option.
|
|
6
|
+
* Keep to 1–5 words for readability.
|
|
7
|
+
*/
|
|
8
|
+
label: string;
|
|
9
|
+
/**
|
|
10
|
+
* Optional supporting/descriptive text displayed below the label.
|
|
11
|
+
* Used to add context the label alone cannot convey. Aim for 1–2 lines.
|
|
12
|
+
*/
|
|
13
|
+
supportingText?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Optional icon rendered before the label group.
|
|
16
|
+
* Must be an <i> or <svg> element. Use only when the icon adds meaning.
|
|
17
|
+
*/
|
|
18
|
+
icon?: IconElement;
|
|
19
|
+
}
|
|
20
|
+
export declare const Choicebox: import('react').ForwardRefExoticComponent<ChoiceboxProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { forwardRef, isValidElement, useId } from "react";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
//#region components/choicebox/Choicebox.tsx
|
|
4
|
+
var isIconElement = (el, propName) => {
|
|
5
|
+
return isValidElement(el) && (el.type === "i" || el.type === "svg");
|
|
6
|
+
};
|
|
7
|
+
var Choicebox = forwardRef(function Choicebox({ label, supportingText, icon, className, id: idProp, "aria-describedby": ariaDescribedByProp, ...inputProps }, ref) {
|
|
8
|
+
const generatedId = useId();
|
|
9
|
+
const id = idProp ?? generatedId;
|
|
10
|
+
const supportingTextId = supportingText ? `${id}-supporting-text` : void 0;
|
|
11
|
+
const ariaDescribedBy = [supportingTextId, ariaDescribedByProp].filter(Boolean).join(" ") || void 0;
|
|
12
|
+
const resolvedIcon = isIconElement(icon, "icon") ? icon : null;
|
|
13
|
+
const wrapperClasses = ["mds-choicebox-wrapper"];
|
|
14
|
+
if (className) wrapperClasses.push(className);
|
|
15
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
16
|
+
className: wrapperClasses.join(" "),
|
|
17
|
+
children: [/* @__PURE__ */ jsx("input", {
|
|
18
|
+
...inputProps,
|
|
19
|
+
type: "radio",
|
|
20
|
+
className: "mds-choicebox-input",
|
|
21
|
+
id,
|
|
22
|
+
ref,
|
|
23
|
+
"aria-describedby": ariaDescribedBy
|
|
24
|
+
}), /* @__PURE__ */ jsxs("label", {
|
|
25
|
+
className: "mds-choicebox",
|
|
26
|
+
htmlFor: id,
|
|
27
|
+
children: [
|
|
28
|
+
resolvedIcon && /* @__PURE__ */ jsx("span", {
|
|
29
|
+
className: "mds-choicebox-icon",
|
|
30
|
+
"aria-hidden": "true",
|
|
31
|
+
children: resolvedIcon
|
|
32
|
+
}),
|
|
33
|
+
/* @__PURE__ */ jsxs("span", {
|
|
34
|
+
className: "mds-choicebox-labels",
|
|
35
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
36
|
+
className: "mds-choicebox-label",
|
|
37
|
+
children: label
|
|
38
|
+
}), supportingText && /* @__PURE__ */ jsx("span", {
|
|
39
|
+
id: supportingTextId,
|
|
40
|
+
className: "mds-choicebox-supporting-text",
|
|
41
|
+
children: supportingText
|
|
42
|
+
})]
|
|
43
|
+
}),
|
|
44
|
+
/* @__PURE__ */ jsx("span", {
|
|
45
|
+
className: "mds-choicebox-indicator",
|
|
46
|
+
"aria-hidden": "true"
|
|
47
|
+
})
|
|
48
|
+
]
|
|
49
|
+
})]
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
//#endregion
|
|
53
|
+
export { Choicebox };
|
|
54
|
+
|
|
55
|
+
//# sourceMappingURL=Choicebox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Choicebox.js","names":[],"sources":["../../../components/choicebox/Choicebox.tsx"],"sourcesContent":["import {\n type InputHTMLAttributes,\n type ReactElement,\n forwardRef,\n isValidElement,\n useId,\n} from 'react';\n\ntype IconElement = ReactElement<'i' | 'svg'>;\n\nexport interface ChoiceboxProps extends Omit<\n InputHTMLAttributes<HTMLInputElement>,\n 'type'\n> {\n /**\n * Required primary label text identifying the option.\n * Keep to 1–5 words for readability.\n */\n label: string;\n /**\n * Optional supporting/descriptive text displayed below the label.\n * Used to add context the label alone cannot convey. Aim for 1–2 lines.\n */\n supportingText?: string;\n /**\n * Optional icon rendered before the label group.\n * Must be an <i> or <svg> element. Use only when the icon adds meaning.\n */\n icon?: IconElement;\n}\n\n// Runtime guard — icon must be an <i> or <svg> element.\nconst isIconElement = (el: unknown, propName: string): el is IconElement => {\n const valid = isValidElement(el) && (el.type === 'i' || el.type === 'svg');\n if (!valid && el != null && import.meta.env.DEV) {\n console.error(\n `Choicebox: \\`${propName}\\` must be an <i> or <svg> element.`,\n );\n }\n return valid;\n};\n\nexport const Choicebox = forwardRef<HTMLInputElement, ChoiceboxProps>(\n function Choicebox(\n {\n label,\n supportingText,\n icon,\n className,\n id: idProp,\n 'aria-describedby': ariaDescribedByProp,\n ...inputProps\n }: ChoiceboxProps,\n ref,\n ) {\n const generatedId = useId();\n const id = idProp ?? generatedId;\n\n // ID used to associate supporting text with the input via aria-describedby\n // so screen readers announce the description after the label.\n const supportingTextId = supportingText\n ? `${id}-supporting-text`\n : undefined;\n\n const ariaDescribedBy =\n [supportingTextId, ariaDescribedByProp].filter(Boolean).join(' ') ||\n undefined;\n\n const resolvedIcon = isIconElement(icon, 'icon') ? icon : null;\n\n if (import.meta.env.DEV) {\n if (!label) {\n console.warn(\n 'Choicebox: label prop is required. An empty label creates an inaccessible form control.',\n );\n }\n }\n\n const wrapperClasses = ['mds-choicebox-wrapper'];\n if (className) wrapperClasses.push(className);\n\n return (\n <div className={wrapperClasses.join(' ')}>\n {/* The input is visually hidden but participates in the DOM for form\n submission, keyboard navigation, and screen reader semantics.\n pointer-events: none prevents it from intercepting clicks — the\n <label> for= association handles click delegation instead. */}\n <input\n {...inputProps}\n type=\"radio\"\n className=\"mds-choicebox-input\"\n id={id}\n ref={ref}\n aria-describedby={ariaDescribedBy}\n />\n <label className=\"mds-choicebox\" htmlFor={id}>\n {resolvedIcon && (\n <span className=\"mds-choicebox-icon\" aria-hidden=\"true\">\n {resolvedIcon}\n </span>\n )}\n <span className=\"mds-choicebox-labels\">\n <span className=\"mds-choicebox-label\">{label}</span>\n {supportingText && (\n <span\n id={supportingTextId}\n className=\"mds-choicebox-supporting-text\"\n >\n {supportingText}\n </span>\n )}\n </span>\n {/* Decorative indicator — aria-hidden since the input provides all\n semantics. CSS drives the circle/check appearance via sibling\n state selectors on .mds-choicebox-input. */}\n <span className=\"mds-choicebox-indicator\" aria-hidden=\"true\" />\n </label>\n </div>\n );\n },\n);\n"],"mappings":";;;AAgCA,IAAM,iBAAiB,IAAa,aAAwC;CAO1E,OANc,eAAe,EAAE,MAAM,GAAG,SAAS,OAAO,GAAG,SAAS;AAOtE;AAEA,IAAa,YAAY,WACvB,SAAS,UACP,EACE,OACA,gBACA,MACA,WACA,IAAI,QACJ,oBAAoB,qBACpB,GAAG,cAEL,KACA;CACA,MAAM,cAAc,MAAM;CAC1B,MAAM,KAAK,UAAU;CAIrB,MAAM,mBAAmB,iBACrB,GAAG,GAAG,oBACN,KAAA;CAEJ,MAAM,kBACJ,CAAC,kBAAkB,mBAAmB,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,KAChE,KAAA;CAEF,MAAM,eAAe,cAAc,MAAM,MAAM,IAAI,OAAO;CAU1D,MAAM,iBAAiB,CAAC,uBAAuB;CAC/C,IAAI,WAAW,eAAe,KAAK,SAAS;CAE5C,OACE,qBAAC,OAAD;EAAK,WAAW,eAAe,KAAK,GAAG;YAAvC,CAKE,oBAAC,SAAD;GACE,GAAI;GACJ,MAAK;GACL,WAAU;GACN;GACC;GACL,oBAAkB;EACnB,CAAA,GACD,qBAAC,SAAD;GAAO,WAAU;GAAgB,SAAS;aAA1C;IACG,gBACC,oBAAC,QAAD;KAAM,WAAU;KAAqB,eAAY;eAC9C;IACG,CAAA;IAER,qBAAC,QAAD;KAAM,WAAU;eAAhB,CACE,oBAAC,QAAD;MAAM,WAAU;gBAAuB;KAAY,CAAA,GAClD,kBACC,oBAAC,QAAD;MACE,IAAI;MACJ,WAAU;gBAET;KACG,CAAA,CAEJ;;IAIN,oBAAC,QAAD;KAAM,WAAU;KAA0B,eAAY;IAAQ,CAAA;GACzD;IACJ;;AAET,CACF"}
|
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
Choicebox
|
|
3
|
+
A full-surface interactive card for single-select option picking.
|
|
4
|
+
HTML structure:
|
|
5
|
+
.mds-choicebox-wrapper
|
|
6
|
+
input.mds-choicebox-input (visually hidden radio)
|
|
7
|
+
label.mds-choicebox
|
|
8
|
+
span.mds-choicebox-icon? (optional — aria-hidden)
|
|
9
|
+
span.mds-choicebox-labels
|
|
10
|
+
span.mds-choicebox-label
|
|
11
|
+
span.mds-choicebox-supporting-text?
|
|
12
|
+
span.mds-choicebox-indicator (decorative — aria-hidden)
|
|
13
|
+
State is driven entirely by CSS sibling selectors (.mds-choicebox-input
|
|
14
|
+
precedes .mds-choicebox in the DOM), avoiding any JS state management.
|
|
15
|
+
========================================================================== */
|
|
16
|
+
|
|
17
|
+
/* --------------------------------------------------------------------------
|
|
18
|
+
Wrapper
|
|
19
|
+
-------------------------------------------------------------------------- */
|
|
20
|
+
|
|
21
|
+
.mds-choicebox-wrapper {
|
|
22
|
+
display: block;
|
|
23
|
+
/* Prevent flex containers from stretching this element */
|
|
24
|
+
align-self: start;
|
|
25
|
+
min-width: 320px; /* Ensure enough space for the indicator and some label text */
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* --------------------------------------------------------------------------
|
|
29
|
+
Hidden input
|
|
30
|
+
Visually hidden but focusable so keyboard and assistive tech can reach it.
|
|
31
|
+
pointer-events: none prevents it from receiving clicks — the <label for>
|
|
32
|
+
association handles delegation to the radio input instead.
|
|
33
|
+
-------------------------------------------------------------------------- */
|
|
34
|
+
|
|
35
|
+
.mds-choicebox-input {
|
|
36
|
+
position: absolute;
|
|
37
|
+
width: 1px;
|
|
38
|
+
height: 1px;
|
|
39
|
+
padding: 0;
|
|
40
|
+
margin: -1px;
|
|
41
|
+
overflow: hidden;
|
|
42
|
+
clip: rect(0, 0, 0, 0);
|
|
43
|
+
white-space: nowrap;
|
|
44
|
+
border: 0;
|
|
45
|
+
pointer-events: none;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* --------------------------------------------------------------------------
|
|
49
|
+
Card (label element — full-surface clickable area)
|
|
50
|
+
-------------------------------------------------------------------------- */
|
|
51
|
+
|
|
52
|
+
.mds-choicebox {
|
|
53
|
+
display: flex;
|
|
54
|
+
flex-direction: row;
|
|
55
|
+
align-items: flex-start;
|
|
56
|
+
gap: var(--mds-spacing-xs);
|
|
57
|
+
|
|
58
|
+
padding: var(--mds-spacing-xs) var(--mds-spacing-sm);
|
|
59
|
+
border-radius: var(--mds-border-radius-md);
|
|
60
|
+
border: var(--mds-stroke-weight-sm) solid var(--mds-border-default);
|
|
61
|
+
background-color: var(--mds-bg-surface-subtle);
|
|
62
|
+
|
|
63
|
+
cursor: pointer;
|
|
64
|
+
/* Ensure the label fills its container when Choicebox is used in a grid or flex layout */
|
|
65
|
+
width: 100%;
|
|
66
|
+
box-sizing: border-box;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* Hover — unselected */
|
|
70
|
+
.mds-choicebox-input:not(:disabled):not(:checked) + .mds-choicebox:hover {
|
|
71
|
+
background-color: var(--mds-bg-surface-default);
|
|
72
|
+
border-color: var(--mds-border-default);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* Active/pressed — unselected */
|
|
76
|
+
.mds-choicebox-input:not(:disabled):not(:checked) + .mds-choicebox:active {
|
|
77
|
+
background-color: var(--mds-bg-surface-strong);
|
|
78
|
+
border-color: var(--mds-border-default);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* Selected — default */
|
|
82
|
+
.mds-choicebox-input:checked + .mds-choicebox {
|
|
83
|
+
background-color: var(--mds-bg-interactive-primary-default-light);
|
|
84
|
+
border-color: var(--mds-border-feedback-primary);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* Selected — hover */
|
|
88
|
+
.mds-choicebox-input:not(:disabled):checked + .mds-choicebox:hover {
|
|
89
|
+
background-color: var(--mds-bg-surface-subtle);
|
|
90
|
+
border-color: var(--mds-border-feedback-primary);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/* Selected — pressed */
|
|
94
|
+
.mds-choicebox-input:not(:disabled):checked + .mds-choicebox:active {
|
|
95
|
+
background-color: var(--mds-bg-surface-strong);
|
|
96
|
+
border-color: var(--mds-border-feedback-primary);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/* Disabled — show 'not-allowed' cursor over the whole card area.
|
|
100
|
+
cursor: not-allowed cannot be set on the label itself because
|
|
101
|
+
pointer-events: none (below) removes it from hit-testing, making the cursor
|
|
102
|
+
rule unreachable. :has() is safe for all Moodle-target browsers. */
|
|
103
|
+
.mds-choicebox-wrapper:has(.mds-choicebox-input:disabled) {
|
|
104
|
+
cursor: not-allowed;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/* Block clicks on the label so the disabled radio cannot be activated */
|
|
108
|
+
.mds-choicebox-input:disabled + .mds-choicebox {
|
|
109
|
+
pointer-events: none;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* --------------------------------------------------------------------------
|
|
113
|
+
Focus — ring appears on the indicator per design spec
|
|
114
|
+
-------------------------------------------------------------------------- */
|
|
115
|
+
|
|
116
|
+
.mds-choicebox-input:focus-visible
|
|
117
|
+
+ .mds-choicebox
|
|
118
|
+
.mds-choicebox-indicator::after {
|
|
119
|
+
outline: var(--mds-stroke-weight-md) solid var(--mds-focus-default);
|
|
120
|
+
outline-offset: var(--mds-spacing-offset);
|
|
121
|
+
box-shadow: none;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/* --------------------------------------------------------------------------
|
|
125
|
+
Icon slot
|
|
126
|
+
-------------------------------------------------------------------------- */
|
|
127
|
+
|
|
128
|
+
.mds-choicebox-icon {
|
|
129
|
+
display: flex;
|
|
130
|
+
align-items: center;
|
|
131
|
+
justify-content: center;
|
|
132
|
+
padding: var(--mds-spacing-xxs);
|
|
133
|
+
flex-shrink: 0;
|
|
134
|
+
/* Icon size matches --mds-icons-sm (16px) */
|
|
135
|
+
font-size: var(--mds-icons-sm);
|
|
136
|
+
color: var(--mds-text-default);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/* Selected icon */
|
|
140
|
+
.mds-choicebox-input:checked + .mds-choicebox .mds-choicebox-icon {
|
|
141
|
+
color: var(--mds-text-feedback-primary);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/* Disabled unselected icon */
|
|
145
|
+
.mds-choicebox-input:disabled:not(:checked)
|
|
146
|
+
+ .mds-choicebox
|
|
147
|
+
.mds-choicebox-icon {
|
|
148
|
+
color: var(--mds-text-muted);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/* Disabled selected icon */
|
|
152
|
+
.mds-choicebox-input:disabled:checked + .mds-choicebox .mds-choicebox-icon {
|
|
153
|
+
color: var(--mds-text-link-primary-disabled);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/* --------------------------------------------------------------------------
|
|
157
|
+
Labels container
|
|
158
|
+
-------------------------------------------------------------------------- */
|
|
159
|
+
|
|
160
|
+
.mds-choicebox-labels {
|
|
161
|
+
display: flex;
|
|
162
|
+
flex-direction: column;
|
|
163
|
+
flex: 1 0 0;
|
|
164
|
+
gap: var(--mds-spacing-xxs);
|
|
165
|
+
padding: var(--mds-spacing-xxs) 0;
|
|
166
|
+
min-width: 0; /* Allow text to wrap within the flex item */
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/* --------------------------------------------------------------------------
|
|
170
|
+
Label text
|
|
171
|
+
-------------------------------------------------------------------------- */
|
|
172
|
+
|
|
173
|
+
.mds-choicebox-label {
|
|
174
|
+
display: block;
|
|
175
|
+
font-family: var(--mds-font-family-base);
|
|
176
|
+
font-size: var(--mds-font-size-headings-6);
|
|
177
|
+
font-weight: var(--mds-font-weight-medium);
|
|
178
|
+
line-height: var(--mds-line-height-headings-6);
|
|
179
|
+
letter-spacing: var(--mds-letter-spacing);
|
|
180
|
+
color: var(--mds-text-default);
|
|
181
|
+
word-break: break-word;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/* Selected label */
|
|
185
|
+
.mds-choicebox-input:checked + .mds-choicebox .mds-choicebox-label {
|
|
186
|
+
color: var(--mds-text-feedback-primary);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/* Disabled unselected label */
|
|
190
|
+
.mds-choicebox-input:disabled:not(:checked)
|
|
191
|
+
+ .mds-choicebox
|
|
192
|
+
.mds-choicebox-label {
|
|
193
|
+
color: var(--mds-text-muted);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/* Disabled selected label */
|
|
197
|
+
.mds-choicebox-input:disabled:checked + .mds-choicebox .mds-choicebox-label {
|
|
198
|
+
color: var(--mds-text-link-primary-disabled);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/* --------------------------------------------------------------------------
|
|
202
|
+
Supporting text
|
|
203
|
+
-------------------------------------------------------------------------- */
|
|
204
|
+
|
|
205
|
+
.mds-choicebox-supporting-text {
|
|
206
|
+
display: block;
|
|
207
|
+
font-family: var(--mds-font-family-base);
|
|
208
|
+
font-size: var(--mds-font-size-paragraph-small);
|
|
209
|
+
font-weight: var(--mds-font-weight-regular);
|
|
210
|
+
line-height: var(--mds-line-height-paragraph-small);
|
|
211
|
+
letter-spacing: var(--mds-letter-spacing);
|
|
212
|
+
color: var(--mds-text-subtle);
|
|
213
|
+
word-break: break-word;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/* Disabled unselected supporting text */
|
|
217
|
+
.mds-choicebox-input:disabled:not(:checked)
|
|
218
|
+
+ .mds-choicebox
|
|
219
|
+
.mds-choicebox-supporting-text {
|
|
220
|
+
color: var(--mds-text-subtle);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/* Disabled selected supporting text */
|
|
224
|
+
.mds-choicebox-input:disabled:checked
|
|
225
|
+
+ .mds-choicebox
|
|
226
|
+
.mds-choicebox-supporting-text {
|
|
227
|
+
color: var(--mds-text-link-primary-disabled);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/* --------------------------------------------------------------------------
|
|
231
|
+
Choice indicator
|
|
232
|
+
The visible circle and circle-check are rendered via ::after so no extra
|
|
233
|
+
DOM nodes are needed. The input's checked/disabled state drives the styling
|
|
234
|
+
via CSS sibling selectors.
|
|
235
|
+
-------------------------------------------------------------------------- */
|
|
236
|
+
|
|
237
|
+
.mds-choicebox-indicator {
|
|
238
|
+
display: flex;
|
|
239
|
+
align-items: center;
|
|
240
|
+
justify-content: center;
|
|
241
|
+
width: 16px;
|
|
242
|
+
height: 16px;
|
|
243
|
+
/* Vertically centre the indicator against the label line.
|
|
244
|
+
labels container has padding-block-start: spacing-xxs (0.25rem);
|
|
245
|
+
the label line-height is 1.2rem; indicator height is 1rem.
|
|
246
|
+
Offset = labels-padding-top + (label-line-height − indicator-height) / 2 */
|
|
247
|
+
margin-block-start: calc(
|
|
248
|
+
var(--mds-spacing-xxs) + (var(--mds-line-height-headings-6) - 1rem) / 2
|
|
249
|
+
);
|
|
250
|
+
flex-shrink: 0;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/* Unselected circle */
|
|
254
|
+
.mds-choicebox-indicator::after {
|
|
255
|
+
content: '';
|
|
256
|
+
display: block;
|
|
257
|
+
width: 16px;
|
|
258
|
+
height: 16px;
|
|
259
|
+
border-radius: var(--mds-border-radius-pill);
|
|
260
|
+
border: var(--mds-stroke-weight-sm) solid
|
|
261
|
+
var(--mds-border-interactive-secondary-default);
|
|
262
|
+
background-color: var(--mds-bg-surface-subtle);
|
|
263
|
+
box-sizing: border-box;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/* Unselected hover indicator background follows card background. */
|
|
267
|
+
.mds-choicebox-input:not(:disabled):not(:checked)
|
|
268
|
+
+ .mds-choicebox:hover
|
|
269
|
+
.mds-choicebox-indicator::after {
|
|
270
|
+
background-color: var(--mds-bg-surface-default);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.mds-choicebox-input:not(:disabled):not(:checked)
|
|
274
|
+
+ .mds-choicebox:active
|
|
275
|
+
.mds-choicebox-indicator::after {
|
|
276
|
+
background-color: var(--mds-bg-surface-strong);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/* Checked: filled circle with inline SVG checkmark via background-image.
|
|
280
|
+
Path matches the Figma design spec exactly (fill-based, 16×16 viewBox). */
|
|
281
|
+
.mds-choicebox-input:checked + .mds-choicebox .mds-choicebox-indicator::after {
|
|
282
|
+
border: none;
|
|
283
|
+
background-color: var(--mds-bg-interactive-primary-default);
|
|
284
|
+
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");
|
|
285
|
+
background-size: cover;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/* Disabled unselected indicator — muted border */
|
|
289
|
+
.mds-choicebox-input:disabled:not(:checked)
|
|
290
|
+
+ .mds-choicebox
|
|
291
|
+
.mds-choicebox-indicator::after {
|
|
292
|
+
border-color: var(--mds-border-interactive-secondary-disabled);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/* Disabled selected indicator — dimmed fill */
|
|
296
|
+
.mds-choicebox-input:disabled:checked
|
|
297
|
+
+ .mds-choicebox
|
|
298
|
+
.mds-choicebox-indicator::after {
|
|
299
|
+
background-color: var(--mds-bg-interactive-primary-disabled);
|
|
300
|
+
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");
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/* --------------------------------------------------------------------------
|
|
304
|
+
Forced colors (Windows High Contrast)
|
|
305
|
+
Card borders and indicator geometry use system colour keywords so they
|
|
306
|
+
remain visible when forced-colors is active. Text colours are left to adapt
|
|
307
|
+
automatically — they reference CSS custom properties that the browser will
|
|
308
|
+
remap to system colours.
|
|
309
|
+
Note: the SVG checkmark's hardcoded fill (%23ffffff) inside the checked
|
|
310
|
+
indicator will not adapt until Must Fix 2 (mask-image refactor) is done.
|
|
311
|
+
-------------------------------------------------------------------------- */
|
|
312
|
+
|
|
313
|
+
@media (forced-colors: active) {
|
|
314
|
+
.mds-choicebox {
|
|
315
|
+
border-color: ButtonText;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.mds-choicebox-input:checked + .mds-choicebox {
|
|
319
|
+
border-color: Highlight;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.mds-choicebox-input:disabled + .mds-choicebox {
|
|
323
|
+
border-color: GrayText;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/* Preserve the indicator circle using forced-color-adjust: none so the
|
|
327
|
+
border/fill remain under author control via system colour keywords. */
|
|
328
|
+
.mds-choicebox-indicator::after {
|
|
329
|
+
forced-color-adjust: none;
|
|
330
|
+
border-color: ButtonText;
|
|
331
|
+
background-color: Canvas;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.mds-choicebox-input:checked
|
|
335
|
+
+ .mds-choicebox
|
|
336
|
+
.mds-choicebox-indicator::after {
|
|
337
|
+
forced-color-adjust: none;
|
|
338
|
+
background-color: Highlight;
|
|
339
|
+
/* SVG fill %23ffffff may be invisible on some Highlight backgrounds —
|
|
340
|
+
fully addressed when Must Fix 2 (mask-image refactor) is completed. */
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
.mds-choicebox-input:disabled:not(:checked)
|
|
344
|
+
+ .mds-choicebox
|
|
345
|
+
.mds-choicebox-indicator::after {
|
|
346
|
+
forced-color-adjust: none;
|
|
347
|
+
border-color: GrayText;
|
|
348
|
+
background-color: Canvas;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.mds-choicebox-input:disabled:checked
|
|
352
|
+
+ .mds-choicebox
|
|
353
|
+
.mds-choicebox-indicator::after {
|
|
354
|
+
forced-color-adjust: none;
|
|
355
|
+
background-color: GrayText;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/* Keep the focus ring aligned with the system Highlight colour */
|
|
359
|
+
.mds-choicebox-input:focus-visible
|
|
360
|
+
+ .mds-choicebox
|
|
361
|
+
.mds-choicebox-indicator::after {
|
|
362
|
+
outline-color: Highlight;
|
|
363
|
+
}
|
|
364
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Choicebox';
|
|
@@ -11,4 +11,4 @@ export interface CloseButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonEl
|
|
|
11
11
|
*/
|
|
12
12
|
size?: string;
|
|
13
13
|
}
|
|
14
|
-
export declare const CloseButton: ({ "aria-label": ariaLabel, size, className, ...props }: CloseButtonProps) => import("react
|
|
14
|
+
export declare const CloseButton: ({ "aria-label": ariaLabel, size, className, ...props }: CloseButtonProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
.mds-close-button.btn-close {
|
|
2
|
+
inline-size: var(--mds-icons-md);
|
|
3
|
+
block-size: var(--mds-icons-md);
|
|
4
|
+
padding: 0;
|
|
5
|
+
border-radius: var(--mds-border-radius-xs);
|
|
6
|
+
background-image: url('./close-button.svg');
|
|
7
|
+
background-size: var(--mds-icons-md) var(--mds-icons-md);
|
|
8
|
+
opacity: 0.6;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.mds-close-button.btn-close:hover {
|
|
12
|
+
opacity: 0.75;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.mds-close-button.btn-close:focus {
|
|
16
|
+
box-shadow: none;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.mds-close-button.btn-close:focus-visible {
|
|
20
|
+
outline: var(--mds-stroke-weight-md) solid var(--mds-focus-default);
|
|
21
|
+
outline-offset: 0;
|
|
22
|
+
box-shadow: none;
|
|
23
|
+
opacity: 1;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.mds-close-button.btn-close:disabled,
|
|
27
|
+
.mds-close-button.btn-close.disabled {
|
|
28
|
+
opacity: 0.25;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.mds-close-button.btn-close.mds-close-button--sm {
|
|
32
|
+
inline-size: var(--mds-icons-sm);
|
|
33
|
+
block-size: var(--mds-icons-sm);
|
|
34
|
+
background-size: var(--mds-icons-sm) var(--mds-icons-sm);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.mds-close-button.btn-close.mds-close-button--md {
|
|
38
|
+
inline-size: var(--mds-icons-md);
|
|
39
|
+
block-size: var(--mds-icons-md);
|
|
40
|
+
background-size: var(--mds-icons-md) var(--mds-icons-md);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.mds-close-button.btn-close.mds-close-button--lg {
|
|
44
|
+
inline-size: var(--mds-icons-lg);
|
|
45
|
+
block-size: var(--mds-icons-lg);
|
|
46
|
+
background-size: var(--mds-icons-lg) var(--mds-icons-lg);
|
|
47
|
+
}
|