@functionalcms/svelte-components 4.36.10 → 5.0.0-beta1
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/css/functional.css +48 -1
- package/dist/auth/getMachineAccessToken.d.ts +1 -1
- package/dist/auth/getMachineAccessToken.js +1 -2
- package/dist/auth/machineAuthenticationProvider.d.ts +1 -1
- package/dist/auth/machineAuthenticationProvider.js +1 -2
- package/dist/auth/tokenRefresh.d.ts +1 -1
- package/dist/auth/tokenRefresh.js +4 -5
- package/dist/auth/types.js +4 -8
- package/dist/auth/userAuthenticationProvider.d.ts +1 -1
- package/dist/auth/userAuthenticationProvider.js +1 -2
- package/dist/components/Icon.svelte +16 -0
- package/dist/components/Icon.svelte.d.ts +9 -0
- package/dist/components/content/Markdown.svelte +2 -2
- package/dist/components/content/Markdown.svelte.d.ts +17 -4
- package/dist/components/form/Dropzone.svelte +2 -5
- package/dist/components/form/SmartForm.svelte +206 -60
- package/dist/components/form/SmartForm.svelte.d.ts +2 -2
- package/dist/components/form/form.d.ts +87 -17
- package/dist/components/form/form.js +86 -6
- package/dist/components/icons.d.ts +763 -0
- package/dist/components/icons.js +765 -0
- package/dist/components/integrations/EasyTools.svelte +1 -1
- package/dist/components/layouts/DefaultLayout.svelte +92 -41
- package/dist/components/layouts/DefaultLayout.svelte.d.ts +17 -8
- package/dist/components/layouts/FlexBox.svelte +73 -0
- package/dist/components/layouts/FlexBox.svelte.d.ts +17 -0
- package/dist/components/layouts/MenuLayout.svelte +39 -201
- package/dist/components/layouts/MenuLayout.svelte.d.ts +2 -10
- package/dist/components/layouts/StyleBox.svelte +17 -0
- package/dist/components/layouts/StyleBox.svelte.d.ts +7 -0
- package/dist/components/layouts/Well.svelte +8 -34
- package/dist/components/layouts/Well.svelte.d.ts +4 -8
- package/dist/components/layouts/menuItems.d.ts +29 -0
- package/dist/components/layouts/menuItems.js +28 -0
- package/dist/index-server.d.ts +2 -1
- package/dist/index-server.js +2 -1
- package/dist/index.d.ts +9 -47
- package/dist/index.js +8 -59
- package/dist/server-side/getServices.d.ts +8 -8
- package/dist/server-side/getServices.js +16 -27
- package/dist/server-side/handlers/paraglideHandler.d.ts +2 -0
- package/dist/server-side/handlers/paraglideHandler.js +13 -0
- package/dist/server-side/handlers/redirectPipelineHandler.d.ts +5 -0
- package/dist/server-side/{getRedirectPipeline.js → handlers/redirectPipelineHandler.js} +1 -2
- package/dist/utils/stringHash.d.ts +1 -0
- package/dist/utils/stringHash.js +7 -0
- package/package.json +28 -39
- package/css/functional.css.map +0 -1
- package/dist/components/MaterialIconSet.d.ts +0 -3819
- package/dist/components/MaterialIconSet.js +0 -3823
- package/dist/components/Styling.d.ts +0 -59
- package/dist/components/Styling.js +0 -66
- package/dist/components/blog/blog.d.ts +0 -20
- package/dist/components/blog/blog.js +0 -29
- package/dist/components/dynamic/CopyToClipboard.svelte +0 -16
- package/dist/components/dynamic/CopyToClipboard.svelte.d.ts +0 -36
- package/dist/components/dynamic/DynamicButton.d.ts +0 -1
- package/dist/components/dynamic/DynamicButton.js +0 -10
- package/dist/components/dynamic/DynamicButton.svelte +0 -33
- package/dist/components/dynamic/DynamicButton.svelte.d.ts +0 -9
- package/dist/components/form/Button.svelte +0 -389
- package/dist/components/form/Button.svelte.d.ts +0 -30
- package/dist/components/form/ChoiceInput.svelte +0 -375
- package/dist/components/form/ChoiceInput.svelte.d.ts +0 -3
- package/dist/components/form/Input.svelte +0 -461
- package/dist/components/form/Input.svelte.d.ts +0 -30
- package/dist/components/form/Select.svelte +0 -163
- package/dist/components/form/Select.svelte.d.ts +0 -21
- package/dist/components/form/Switch.svelte +0 -293
- package/dist/components/form/Switch.svelte.d.ts +0 -14
- package/dist/components/indicators/Loader.svelte +0 -114
- package/dist/components/indicators/Loader.svelte.d.ts +0 -30
- package/dist/components/indicators/Spinner.svelte +0 -109
- package/dist/components/indicators/Spinner.svelte.d.ts +0 -28
- package/dist/components/layouts/Banner.svelte +0 -26
- package/dist/components/layouts/Banner.svelte.d.ts +0 -8
- package/dist/components/layouts/FoldablePanel.svelte +0 -16
- package/dist/components/layouts/FoldablePanel.svelte.d.ts +0 -7
- package/dist/components/layouts/SimpleFooter.svelte +0 -23
- package/dist/components/layouts/SimpleFooter.svelte.d.ts +0 -8
- package/dist/components/layouts/Tabs.svelte +0 -362
- package/dist/components/layouts/Tabs.svelte.d.ts +0 -11
- package/dist/components/layouts/TwoColumnsLayout.svelte +0 -44
- package/dist/components/layouts/TwoColumnsLayout.svelte.d.ts +0 -13
- package/dist/components/layouts/menuLayout.d.ts +0 -12
- package/dist/components/layouts/menuLayout.js +0 -1
- package/dist/components/layouts/tabs.d.ts +0 -21
- package/dist/components/layouts/tabs.js +0 -13
- package/dist/components/menu/CollapsibleMenu.svelte +0 -66
- package/dist/components/menu/CollapsibleMenu.svelte.d.ts +0 -18
- package/dist/components/menu/DynamicMenu.svelte +0 -55
- package/dist/components/menu/DynamicMenu.svelte.d.ts +0 -13
- package/dist/components/menu/HamburgerMenu.svelte +0 -62
- package/dist/components/menu/HamburgerMenu.svelte.d.ts +0 -14
- package/dist/components/menu/ListMenu.svelte +0 -61
- package/dist/components/menu/ListMenu.svelte.d.ts +0 -17
- package/dist/components/menu/NavigationDrawer.svelte +0 -53
- package/dist/components/menu/NavigationDrawer.svelte.d.ts +0 -18
- package/dist/components/menu/types.d.ts +0 -23
- package/dist/components/menu/types.js +0 -35
- package/dist/components/presentation/Accordion.svelte +0 -82
- package/dist/components/presentation/Accordion.svelte.d.ts +0 -11
- package/dist/components/presentation/Card.svelte +0 -147
- package/dist/components/presentation/Card.svelte.d.ts +0 -15
- package/dist/components/presentation/Carousel.d.ts +0 -5
- package/dist/components/presentation/Carousel.js +0 -1
- package/dist/components/presentation/Carousel.svelte +0 -119
- package/dist/components/presentation/Carousel.svelte.d.ts +0 -17
- package/dist/components/presentation/Dialog.svelte +0 -75
- package/dist/components/presentation/Dialog.svelte.d.ts +0 -22
- package/dist/components/presentation/Disclose.svelte +0 -116
- package/dist/components/presentation/Disclose.svelte.d.ts +0 -11
- package/dist/components/presentation/Drawer.svelte +0 -118
- package/dist/components/presentation/Drawer.svelte.d.ts +0 -13
- package/dist/components/presentation/EmptyState.svelte +0 -67
- package/dist/components/presentation/EmptyState.svelte.d.ts +0 -10
- package/dist/components/presentation/Gallery.svelte +0 -35
- package/dist/components/presentation/Gallery.svelte.d.ts +0 -14
- package/dist/components/presentation/Link.svelte +0 -362
- package/dist/components/presentation/Link.svelte.d.ts +0 -27
- package/dist/components/utils.d.ts +0 -3
- package/dist/components/utils.js +0 -1
- package/dist/index.server.d.ts +0 -11
- package/dist/index.server.js +0 -10
- package/dist/server-side/getRedirectPipeline.d.ts +0 -6
- package/dist/utils.d.ts +0 -1
- package/dist/utils.js +0 -3
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { Snippet } from 'svelte';
|
|
2
|
-
declare const Button: import("svelte").Component<Partial<{
|
|
3
|
-
children: Snippet;
|
|
4
|
-
css: string;
|
|
5
|
-
style: string;
|
|
6
|
-
type?: "submit" | "reset" | "button" | "link";
|
|
7
|
-
href: string;
|
|
8
|
-
mode?: string;
|
|
9
|
-
size?: string;
|
|
10
|
-
isPrimary: boolean;
|
|
11
|
-
isBordered?: boolean;
|
|
12
|
-
isCapsule?: boolean;
|
|
13
|
-
isGrouped?: boolean;
|
|
14
|
-
isBlock?: boolean;
|
|
15
|
-
isLink?: boolean;
|
|
16
|
-
isBlank?: boolean;
|
|
17
|
-
isDisabled?: boolean;
|
|
18
|
-
role?: string;
|
|
19
|
-
isCircle?: boolean;
|
|
20
|
-
isRounded?: boolean;
|
|
21
|
-
isSkinned?: boolean;
|
|
22
|
-
ariaSelected?: boolean;
|
|
23
|
-
ariaControls?: string;
|
|
24
|
-
tabIndex?: number;
|
|
25
|
-
ariaLabel: string;
|
|
26
|
-
click?: (event: MouseEvent) => void;
|
|
27
|
-
keydown?: (event: KeyboardEvent) => void;
|
|
28
|
-
}>, {}, "">;
|
|
29
|
-
type Button = ReturnType<typeof Button>;
|
|
30
|
-
export default Button;
|
|
@@ -1,375 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { cn } from '../../utils.js';
|
|
3
|
-
import type { ChoiceInputOption, ChoiceInputSize, ChoiceInputType, HtmlParts } from './utils.js';
|
|
4
|
-
|
|
5
|
-
interface Props {
|
|
6
|
-
isSkinned: boolean;
|
|
7
|
-
isFieldset: boolean;
|
|
8
|
-
isInline: boolean;
|
|
9
|
-
isDisabled: boolean;
|
|
10
|
-
isInvalid: boolean;
|
|
11
|
-
options: ChoiceInputOption[];
|
|
12
|
-
disabledOptions: string[];
|
|
13
|
-
checkedOptions: string[];
|
|
14
|
-
type: ChoiceInputType;
|
|
15
|
-
label: string;
|
|
16
|
-
size: ChoiceInputSize;
|
|
17
|
-
checked: string[];
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
let {
|
|
21
|
-
id = '',
|
|
22
|
-
name = '',
|
|
23
|
-
isSkinned = true,
|
|
24
|
-
isFieldset = true,
|
|
25
|
-
isInline = false,
|
|
26
|
-
isDisabled = undefined,
|
|
27
|
-
isInvalid = false,
|
|
28
|
-
options = [],
|
|
29
|
-
disabledOptions = [],
|
|
30
|
-
checkedOptions = [],
|
|
31
|
-
// If isFieldset falsy this will be screenreader only. If legendLabel is not passed
|
|
32
|
-
// in, it will fallback to the type prop or string choice input. Some content must be
|
|
33
|
-
// within the <legenc>CONTENT</legend> element to meet accessibility requirements
|
|
34
|
-
type = 'checkbox',
|
|
35
|
-
label = type || 'choice input',
|
|
36
|
-
size = '',
|
|
37
|
-
// Provides bind:checked capabilities that consumer can use
|
|
38
|
-
checked = $bindable([]),
|
|
39
|
-
...restProps
|
|
40
|
-
}: Partial<Props & HtmlParts> = $props();
|
|
41
|
-
|
|
42
|
-
let labelClasses = $derived(
|
|
43
|
-
cn(
|
|
44
|
-
type ? `${type}-label-wrap` : '',
|
|
45
|
-
isInline ? `${type}-label-wrap-inline` : '',
|
|
46
|
-
isDisabled ? 'disabled' : ''
|
|
47
|
-
)
|
|
48
|
-
);
|
|
49
|
-
|
|
50
|
-
let labelSpanClasses = $derived(
|
|
51
|
-
cn(
|
|
52
|
-
type ? `${type}-label` : '',
|
|
53
|
-
isInvalid ? 'choice-input-error' : '',
|
|
54
|
-
size ? `${type}-label-${size}` : ''
|
|
55
|
-
)
|
|
56
|
-
);
|
|
57
|
-
|
|
58
|
-
// If consumer sets is skinned to false we don't style the legend
|
|
59
|
-
let skin = $derived(isSkinned ? `${type}-legend` : '');
|
|
60
|
-
|
|
61
|
-
let labelCopyClasses = $derived(
|
|
62
|
-
cn(
|
|
63
|
-
// Will also need to work in the small
|
|
64
|
-
// and large sizes here for the text copy
|
|
65
|
-
type ? `${type}-label-copy` : '',
|
|
66
|
-
size ? `${type}-label-copy-${size}` : '',
|
|
67
|
-
isInvalid ? 'choice-input-error' : ''
|
|
68
|
-
)
|
|
69
|
-
);
|
|
70
|
-
|
|
71
|
-
let legendClasses = $derived(
|
|
72
|
-
cn(
|
|
73
|
-
skin,
|
|
74
|
-
// .screenreader-only is expected to be globally available via common.min.css
|
|
75
|
-
isFieldset === false ? 'screenreader-only' : ''
|
|
76
|
-
)
|
|
77
|
-
);
|
|
78
|
-
|
|
79
|
-
let fieldsetClasses = $derived(
|
|
80
|
-
cn(
|
|
81
|
-
isSkinned ? `${type}-group` : '',
|
|
82
|
-
isSkinned && size === 'large' ? `${type}-group-${size}` : '',
|
|
83
|
-
isFieldset === false ? `${type}-group-hidden` : ''
|
|
84
|
-
)
|
|
85
|
-
);
|
|
86
|
-
|
|
87
|
-
let inputClasses = $derived(cn(type ? `${type}` : '', size ? `${type}-${size}` : ''));
|
|
88
|
-
|
|
89
|
-
let onChange = (e: any) => {
|
|
90
|
-
// This allows the consumer to use bind:checked={checkedValues} idiom.
|
|
91
|
-
// We cannot use the bind:group idiom as we're using dynamic type above,
|
|
92
|
-
// So, essentially, we're manually implementing two-way binding here ;-)
|
|
93
|
-
checked = Array.from(document.getElementsByName(e.target.name))
|
|
94
|
-
.filter((el) => (el as HTMLInputElement).checked)
|
|
95
|
-
.map((el) => (el as HTMLInputElement).value);
|
|
96
|
-
};
|
|
97
|
-
</script>
|
|
98
|
-
|
|
99
|
-
<fieldset class={fieldsetClasses}>
|
|
100
|
-
<legend class={legendClasses}>{label}</legend>
|
|
101
|
-
{#each options as { value, label }, index}
|
|
102
|
-
<label
|
|
103
|
-
class={labelClasses}
|
|
104
|
-
class:disabled={isDisabled || disabledOptions.includes(value) || undefined}
|
|
105
|
-
>
|
|
106
|
-
<input
|
|
107
|
-
class={inputClasses}
|
|
108
|
-
id="{id}-{name}-{index}"
|
|
109
|
-
{type}
|
|
110
|
-
{name}
|
|
111
|
-
{value}
|
|
112
|
-
disabled={isDisabled || disabledOptions.includes(value)}
|
|
113
|
-
checked={checkedOptions.includes(value)}
|
|
114
|
-
onchange={onChange}
|
|
115
|
-
{...restProps}
|
|
116
|
-
/>
|
|
117
|
-
<span class={labelSpanClasses} aria-hidden="true"></span>
|
|
118
|
-
<span class={labelCopyClasses}>{label}</span>
|
|
119
|
-
</label>
|
|
120
|
-
{/each}
|
|
121
|
-
</fieldset>
|
|
122
|
-
|
|
123
|
-
<style>
|
|
124
|
-
/**
|
|
125
|
-
* These radio and checkbox customizations are an amalgamation of various resources I've
|
|
126
|
-
* found on the internets; from Heydon Pickering's radio article (and his Inclusive Components
|
|
127
|
-
* book), to Sara Soueidan, Scott O'Hara, MDO, and Adrian Roselli's research on the matter
|
|
128
|
-
* of inclusive hiding and custom radio/checkbox inputs.
|
|
129
|
-
*/
|
|
130
|
-
.checkbox-group,
|
|
131
|
-
.radio-group {
|
|
132
|
-
--width-28: calc(7 * var(--fluid-4)); /* 1.75rem/28px */
|
|
133
|
-
|
|
134
|
-
border: 1px solid var(--agnostic-checkbox-border-color, var(--agnostic-gray-light));
|
|
135
|
-
padding: var(--fluid-24);
|
|
136
|
-
padding-top: var(--fluid-14);
|
|
137
|
-
border-radius: var(--fluid-8);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.checkbox-group-large,
|
|
141
|
-
.radio-group-large {
|
|
142
|
-
padding: var(--width-28);
|
|
143
|
-
padding-top: var(--fluid-16);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.checkbox-legend,
|
|
147
|
-
.radio-legend {
|
|
148
|
-
padding: var(--fluid-2) var(--fluid-14);
|
|
149
|
-
border-radius: var(--fluid-2);
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
/* Hiding technique from https://www.sarasoueidan.com/blog/inclusively-hiding-and-styling-checkboxes-and-radio-buttons/
|
|
153
|
-
*/
|
|
154
|
-
.checkbox,
|
|
155
|
-
.radio {
|
|
156
|
-
position: absolute;
|
|
157
|
-
width: var(--fluid-14);
|
|
158
|
-
height: var(--fluid-14);
|
|
159
|
-
opacity: 0%;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
.checkbox-small,
|
|
163
|
-
.radio-small {
|
|
164
|
-
width: var(--fluid-12);
|
|
165
|
-
height: var(--fluid-12);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
.checkbox-large,
|
|
169
|
-
.radio-large {
|
|
170
|
-
width: var(--fluid-16);
|
|
171
|
-
height: var(--fluid-16);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
.checkbox-label-wrap,
|
|
175
|
-
.radio-label-wrap {
|
|
176
|
-
display: flex;
|
|
177
|
-
align-items: center;
|
|
178
|
-
cursor: pointer;
|
|
179
|
-
user-select: none;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
.checkbox-label-wrap-inline,
|
|
183
|
-
.radio-label-wrap-inline {
|
|
184
|
-
display: inline-flex;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.checkbox-label-wrap-inline:not(:last-child),
|
|
188
|
-
.radio-label-wrap-inline:not(:last-child) {
|
|
189
|
-
margin-inline-end: var(--fluid-8);
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
/* These are not actual <label> elements but the <span> label copy elements */
|
|
193
|
-
.checkbox-label-copy,
|
|
194
|
-
.radio-label-copy,
|
|
195
|
-
.checkbox-label,
|
|
196
|
-
.radio-label {
|
|
197
|
-
display: inline-flex;
|
|
198
|
-
position: relative;
|
|
199
|
-
align-items: center;
|
|
200
|
-
flex-wrap: wrap;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
.checkbox-label-copy-small,
|
|
204
|
-
.radio-label-copy-small {
|
|
205
|
-
font-size: var(--agnostic-small); /* 0.875rem */
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
.checkbox-label-copy-large,
|
|
209
|
-
.radio-label-copy-large {
|
|
210
|
-
font-size: calc(var(--agnostic-body) + 2px); /* 1rem + 2px (~18px) */
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
/* The checkmark itself */
|
|
214
|
-
.checkbox-label::after {
|
|
215
|
-
content: '';
|
|
216
|
-
position: absolute;
|
|
217
|
-
left: var(--fluid-6);
|
|
218
|
-
top: 1px;
|
|
219
|
-
width: var(--fluid-6);
|
|
220
|
-
height: var(--fluid-12);
|
|
221
|
-
border: solid var(--agnostic-light);
|
|
222
|
-
border-width: 0 var(--fluid-2) var(--fluid-2) 0;
|
|
223
|
-
transform-origin: center center;
|
|
224
|
-
transform: rotate(40deg) scale(0);
|
|
225
|
-
transition-property: border, background-color, transform;
|
|
226
|
-
transition-duration: var(--agnostic-timing-fast);
|
|
227
|
-
transition-timing-function: ease-in-out;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
.checkbox-label::before,
|
|
231
|
-
.radio-label::before {
|
|
232
|
-
content: '';
|
|
233
|
-
display: inline-block;
|
|
234
|
-
margin-inline-end: var(--agnostic-checkbox-spacing-end, 0.75rem);
|
|
235
|
-
transition: var(--agnostic-timing-fast) ease-out all;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
/* Since we build up the radio size outwardly, it's naturally larger then the checkboxes
|
|
239
|
-
so we add a multiplyer to even those out initially */
|
|
240
|
-
.checkbox-label::before {
|
|
241
|
-
border: 2px solid var(--agnostic-checkbox-border-color, var(--agnostic-gray-light));
|
|
242
|
-
width: var(--fluid-16);
|
|
243
|
-
height: var(--fluid-16);
|
|
244
|
-
transition: box-shadow var(--agnostic-timing-fast) ease-out;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
.radio-label::before {
|
|
248
|
-
width: var(--fluid-14);
|
|
249
|
-
height: var(--fluid-14);
|
|
250
|
-
vertical-align: calc(-1 * var(--fluid-2));
|
|
251
|
-
border-radius: 50%;
|
|
252
|
-
border: var(--fluid-2) solid var(--agnostic-checkbox-light, var(--agnostic-light));
|
|
253
|
-
box-shadow: 0 0 0 var(--fluid-2)
|
|
254
|
-
var(--agnostic-checkbox-border-color, var(--agnostic-gray-light));
|
|
255
|
-
transition: box-shadow var(--agnostic-timing-fast) ease-out;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
@media (prefers-reduced-motion), (update: slow) {
|
|
259
|
-
.checkbox-label::after,
|
|
260
|
-
.checkbox-label::before,
|
|
261
|
-
.radio-label::before {
|
|
262
|
-
transition-duration: 0.001ms !important;
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
.checkbox-label-small::after {
|
|
267
|
-
left: calc(1.25 * var(--fluid-4));
|
|
268
|
-
top: 0;
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
.checkbox-label-small::before {
|
|
272
|
-
width: var(--fluid-14);
|
|
273
|
-
height: var(--fluid-14);
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
.radio-label-small::before {
|
|
277
|
-
width: var(--fluid-12);
|
|
278
|
-
height: var(--fluid-12);
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
.checkbox-label-large::after {
|
|
282
|
-
left: calc(1.75 * var(--fluid-4));
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
.checkbox-label-large::before {
|
|
286
|
-
width: var(--fluid-18);
|
|
287
|
-
height: var(--fluid-18);
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
.radio-label-large::before {
|
|
291
|
-
width: var(--fluid-16);
|
|
292
|
-
height: var(--fluid-16);
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
/* the checked style using the :checked pseudo class */
|
|
296
|
-
.radio:checked + .radio-label::before {
|
|
297
|
-
background: var(--agnostic-checkbox-fill-color, #08a880);
|
|
298
|
-
box-shadow: 0 0 0 var(--fluid-2)
|
|
299
|
-
var(--agnostic-checkbox-border-color, var(--agnostic-gray-light));
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
.radio:focus + .radio-label::before {
|
|
303
|
-
/* stylelint-disable-next-line max-line-length */
|
|
304
|
-
box-shadow:
|
|
305
|
-
0 0 0 var(--fluid-2) var(--agnostic-checkbox-border-color, var(--agnostic-gray-light)),
|
|
306
|
-
0 0 0 calc(1.5 * var(--fluid-2)) var(--agnostic-light),
|
|
307
|
-
0 0 0 calc(2.25 * var(--fluid-2)) var(--agnostic-focus-ring-color);
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
.checkbox:focus + .checkbox-label::before {
|
|
311
|
-
box-shadow: 0 0 0 var(--agnostic-focus-ring-outline-width) var(--agnostic-focus-ring-color);
|
|
312
|
-
|
|
313
|
-
/* Needed for High Contrast mode */
|
|
314
|
-
/* stylelint-disable-next-line max-line-length */
|
|
315
|
-
outline: var(--agnostic-focus-ring-outline-width) var(--agnostic-focus-ring-outline-style)
|
|
316
|
-
var(--agnostic-focus-ring-outline-color);
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
.checkbox:checked + .checkbox-label::after {
|
|
320
|
-
transform: rotate(40deg) scale(1);
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
.checkbox:checked + .checkbox-label::before {
|
|
324
|
-
background: var(--agnostic-checkbox-fill-color, #08a880);
|
|
325
|
-
border: 2px solid var(--agnostic-checkbox-fill-color, #08a880);
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
/**
|
|
329
|
-
* Consumer styles <legend> themselves, and can opt to use the .screenreader-only from
|
|
330
|
-
* utilities.css if they're design requires it.
|
|
331
|
-
*/
|
|
332
|
-
.checkbox-group-hidden,
|
|
333
|
-
.radio-group-hidden {
|
|
334
|
-
border: 0;
|
|
335
|
-
margin-block-start: 0;
|
|
336
|
-
margin-inline-start: 0;
|
|
337
|
-
margin-inline-end: 0;
|
|
338
|
-
margin-block-end: 0;
|
|
339
|
-
padding-block-start: 0;
|
|
340
|
-
padding-inline-start: 0;
|
|
341
|
-
padding-inline-end: 0;
|
|
342
|
-
padding-block-end: 0;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
/* Targets both the label container and the span label that is used
|
|
346
|
-
to style the custom radio / checkbox. Note it does NOT target the input
|
|
347
|
-
itself. */
|
|
348
|
-
.checkbox[disabled] ~ .checkbox-label-copy,
|
|
349
|
-
.radio[disabled] ~ .radio-label-copy,
|
|
350
|
-
.checkbox-label-wrap[class='disabled'],
|
|
351
|
-
.radio-label-wrap[class='disabled'],
|
|
352
|
-
.checkbox-label-wrap-inline[class='disabled'],
|
|
353
|
-
.radio-label-wrap-inline[class='disabled'] {
|
|
354
|
-
color: var(--agnostic-input-disabled-color, var(--agnostic-disabled-color)) !important;
|
|
355
|
-
appearance: none !important;
|
|
356
|
-
box-shadow: none !important;
|
|
357
|
-
cursor: not-allowed !important;
|
|
358
|
-
opacity: 80% !important;
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
.choice-input-error {
|
|
362
|
-
color: var(--agnostic-input-error-color, var(--agnostic-error));
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
@media screen and (-ms-high-contrast: active) {
|
|
366
|
-
/* High contrast mode outline hacks */
|
|
367
|
-
.checkbox-label-wrap[class='disabled'],
|
|
368
|
-
.radio-label-wrap[class='disabled'],
|
|
369
|
-
.checkbox-label-wrap-inline[class='disabled'],
|
|
370
|
-
.radio-label-wrap-inline[class='disabled'] {
|
|
371
|
-
outline: 2px solid transparent;
|
|
372
|
-
outline-offset: -2px;
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
</style>
|