fluent-svelte-extra 1.9.3 → 1.9.5
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/Acrylic/AcrylicSurface.scss +6 -6
- package/Acrylic/AcrylicSurface.svelte +26 -26
- package/AutoSuggestBox/AutoSuggestBox.scss +44 -44
- package/AutoSuggestBox/AutoSuggestBox.svelte +85 -85
- package/Button/Button.scss +94 -94
- package/Button/Button.svelte +25 -25
- package/CalendarDatePicker/CalendarDatePicker.scss +15 -15
- package/CalendarDatePicker/CalendarDatePicker.svelte +45 -45
- package/CalendarView/CalendarView.scss +156 -156
- package/CalendarView/CalendarView.svelte +269 -269
- package/CalendarView/CalendarViewItem.scss +130 -130
- package/CalendarView/CalendarViewItem.svelte +23 -23
- package/Checkbox/Checkbox.scss +117 -117
- package/Checkbox/Checkbox.svelte +52 -52
- package/ComboBox/ComboBox.scss +152 -152
- package/ComboBox/ComboBox.svelte +155 -155
- package/ComboBox/ComboBoxItem.scss +80 -80
- package/ComboBox/ComboBoxItem.svelte +17 -17
- package/ContentDialog/ContentDialog.scss +98 -98
- package/ContentDialog/ContentDialog.svelte +76 -75
- package/ContextMenu/ContextMenu.scss +11 -11
- package/ContextMenu/ContextMenu.svelte +37 -37
- package/ExpandMenu/ExpandMenu.svelte +9 -9
- package/Expander/Expander.scss +136 -136
- package/Expander/Expander.svelte +95 -95
- package/Flipper/Flipper.svelte +37 -37
- package/Flyout/FlyoutSurface.scss +14 -14
- package/Flyout/FlyoutSurface.svelte +7 -7
- package/Flyout/FlyoutWrapper.scss +86 -86
- package/Flyout/FlyoutWrapper.svelte +60 -60
- package/GridView/GridViewItem.scss +20 -20
- package/GridView/GridViewItem.svelte +25 -25
- package/IconButton/IconButton.scss +32 -32
- package/IconButton/IconButton.svelte +28 -28
- package/InfoBadge/InfoBadge.scss +39 -39
- package/InfoBadge/InfoBadge.svelte +59 -59
- package/InfoBar/InfoBar.scss +122 -122
- package/InfoBar/InfoBar.svelte +76 -76
- package/ListItem/ListItem.scss +76 -76
- package/ListItem/ListItem.svelte +49 -49
- package/MenuBar/MenuBar.scss +10 -10
- package/MenuBar/MenuBar.svelte +7 -7
- package/MenuBar/MenuBarItem.scss +38 -38
- package/MenuBar/MenuBarItem.svelte +38 -38
- package/MenuFlyout/MenuFlyoutDivider.scss +7 -7
- package/MenuFlyout/MenuFlyoutDivider.svelte +5 -5
- package/MenuFlyout/MenuFlyoutItem.scss +146 -146
- package/MenuFlyout/MenuFlyoutItem.svelte +136 -136
- package/MenuFlyout/MenuFlyoutSurface.scss +79 -79
- package/MenuFlyout/MenuFlyoutSurface.svelte +22 -22
- package/MenuFlyout/MenuFlyoutWrapper.scss +64 -64
- package/MenuFlyout/MenuFlyoutWrapper.svelte +37 -37
- package/NavigationView/NavigationView.svelte +29 -29
- package/NumberBox/NumberBox.scss +31 -31
- package/NumberBox/NumberBox.svelte +166 -166
- package/PersonPicture/PersonPicture.scss +35 -35
- package/PersonPicture/PersonPicture.svelte +37 -37
- package/ProgressBar/ProgressBar.scss +83 -83
- package/ProgressBar/ProgressBar.svelte +36 -36
- package/ProgressRing/ProgressRing.scss +37 -37
- package/ProgressRing/ProgressRing.svelte +37 -37
- package/README.md +19 -19
- package/RadioButton/RadioButton.scss +114 -114
- package/RadioButton/RadioButton.svelte +38 -38
- package/RangeSlider/RangeSlider.svelte +26 -26
- package/ScrollView/ScrollView.svelte +3 -3
- package/Slider/Slider.scss +281 -281
- package/Slider/Slider.svelte +121 -121
- package/TeachingTip/TeachingTipSurface.scss +14 -0
- package/TeachingTip/TeachingTipSurface.svelte +15 -0
- package/TeachingTip/TeachingTipSurface.svelte.d.ts +20 -0
- package/TeachingTip/TeachingTipWrapper.scss +79 -0
- package/TeachingTip/TeachingTipWrapper.svelte +121 -0
- package/TeachingTip/TeachingTipWrapper.svelte.d.ts +48 -0
- package/TextArea/TextArea.scss +115 -115
- package/TextArea/TextArea.svelte +65 -65
- package/TextBlock/TextBlock.scss +66 -66
- package/TextBlock/TextBlock.svelte +12 -12
- package/TextBox/TextBox.scss +108 -108
- package/TextBox/TextBox.svelte +121 -121
- package/TextBox/TextBox.svelte.d.ts +0 -7
- package/TextBox/TextBoxButton.scss +34 -34
- package/TextBox/TextBoxButton.svelte +13 -13
- package/ToggleSwitch/ToggleSwitch.scss +118 -118
- package/ToggleSwitch/ToggleSwitch.svelte +29 -29
- package/Tooltip/TooltipSurface.scss +16 -16
- package/Tooltip/TooltipSurface.svelte +13 -13
- package/Tooltip/TooltipWrapper.scss +66 -66
- package/Tooltip/TooltipWrapper.svelte +37 -37
- package/_mixins.scss +130 -130
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/internal.js +1 -1
- package/package.json +5 -3
- package/svelte-jsx.d.ts +14 -14
- package/switchable.css +401 -401
- package/theme.css +744 -744
- package/PillButton/PillButton.scss +0 -67
- package/PillButton/PillButton.svelte +0 -38
- package/PillButton/PillButton.svelte.d.ts +0 -30
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
.acrylic-surface {
|
|
2
|
-
background: var(--acrylic-background-default) var(--acrylic-noise-asset-alpha);
|
|
3
|
-
backdrop-filter: var(--acrylic-blur-factor);
|
|
4
|
-
-webkit-backdrop-filter: var(--acrylic-blur-factor);
|
|
5
|
-
mix-blend-mode: luminosity;
|
|
6
|
-
}
|
|
1
|
+
.acrylic-surface {
|
|
2
|
+
background: var(--acrylic-background-default) var(--acrylic-noise-asset-alpha);
|
|
3
|
+
backdrop-filter: var(--acrylic-blur-factor);
|
|
4
|
+
-webkit-backdrop-filter: var(--acrylic-blur-factor);
|
|
5
|
+
mix-blend-mode: luminosity;
|
|
6
|
+
}
|
|
@@ -7,29 +7,29 @@ export { className as class };
|
|
|
7
7
|
/** Obtains a bound DOM reference to the surface or anchor element. */
|
|
8
8
|
export let element = null;
|
|
9
9
|
const forwardEvents = createEventForwarder(get_current_component());
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
<!--
|
|
13
|
-
@component
|
|
14
|
-
A component that provides an acrylic surface for content.
|
|
15
|
-
- Usage:
|
|
16
|
-
```tsx
|
|
17
|
-
<div>
|
|
18
|
-
<AcrylicSurface></AcrylicSurface>
|
|
19
|
-
<div id="content">
|
|
20
|
-
<h1>Acrylic Surface</h1>
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
```
|
|
24
|
-
-->
|
|
25
|
-
<svelte:element
|
|
26
|
-
this="div"
|
|
27
|
-
use:forwardEvents
|
|
28
|
-
bind:this={element}
|
|
29
|
-
class="acrylic-surface {className}"
|
|
30
|
-
{...$$restProps}
|
|
31
|
-
>
|
|
32
|
-
<slot />
|
|
33
|
-
</svelte:element>
|
|
34
|
-
|
|
35
|
-
<style >.acrylic-surface{backdrop-filter:var(--fds-acrylic-blur-factor);-webkit-backdrop-filter:var(--fds-acrylic-blur-factor);background:var(--fds-acrylic-background-default) var(--fds-acrylic-noise-asset-alpha);mix-blend-mode:luminosity}</style>
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<!--
|
|
13
|
+
@component
|
|
14
|
+
A component that provides an acrylic surface for content.
|
|
15
|
+
- Usage:
|
|
16
|
+
```tsx
|
|
17
|
+
<div>
|
|
18
|
+
<AcrylicSurface></AcrylicSurface>
|
|
19
|
+
<div id="content">
|
|
20
|
+
<h1>Acrylic Surface</h1>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
```
|
|
24
|
+
-->
|
|
25
|
+
<svelte:element
|
|
26
|
+
this="div"
|
|
27
|
+
use:forwardEvents
|
|
28
|
+
bind:this={element}
|
|
29
|
+
class="acrylic-surface {className}"
|
|
30
|
+
{...$$restProps}
|
|
31
|
+
>
|
|
32
|
+
<slot />
|
|
33
|
+
</svelte:element>
|
|
34
|
+
|
|
35
|
+
<style >.acrylic-surface{backdrop-filter:var(--fds-acrylic-blur-factor);-webkit-backdrop-filter:var(--fds-acrylic-blur-factor);background:var(--fds-acrylic-background-default) var(--fds-acrylic-noise-asset-alpha);mix-blend-mode:luminosity}</style>
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
@use "../mixins" as *;
|
|
2
|
-
|
|
3
|
-
.auto-suggest-box-flyout {
|
|
4
|
-
z-index: 100;
|
|
5
|
-
overflow: auto;
|
|
6
|
-
position: absolute;
|
|
7
|
-
inset-inline-start: -1px;
|
|
8
|
-
inset-block-start: calc(100% + 1px);
|
|
9
|
-
inline-size: calc(100% + 2px);
|
|
10
|
-
margin: 0;
|
|
11
|
-
padding: 0;
|
|
12
|
-
padding-block: 2px;
|
|
13
|
-
box-sizing: border-box;
|
|
14
|
-
color: var(--text-primary);
|
|
15
|
-
border-radius: var(--overlay-corner-radius);
|
|
16
|
-
border-end-start-radius: 0;
|
|
17
|
-
border-end-end-radius: 0;
|
|
18
|
-
border: 1px solid var(--surface-stroke-flyout);
|
|
19
|
-
background-color: var(--solid-background-quarternary);
|
|
20
|
-
background-clip: padding-box;
|
|
21
|
-
box-shadow: var(--flyout-shadow);
|
|
22
|
-
max-block-size: 472px;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.auto-suggest-item-wrapper {
|
|
26
|
-
display: block;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
:global {
|
|
30
|
-
.auto-suggest-box.open {
|
|
31
|
-
background-color: var(--control-fill-input-active) !important;
|
|
32
|
-
.text-box-underline::after {
|
|
33
|
-
content: "";
|
|
34
|
-
border-bottom: 2px solid var(--fds-accent-default);
|
|
35
|
-
}
|
|
36
|
-
input::placeholder {
|
|
37
|
-
color: var(--text-tertiary);
|
|
38
|
-
}
|
|
39
|
-
.text-box-underline {
|
|
40
|
-
border-bottom-left-radius: 0;
|
|
41
|
-
border-bottom-right-radius: 0;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
1
|
+
@use "../mixins" as *;
|
|
2
|
+
|
|
3
|
+
.auto-suggest-box-flyout {
|
|
4
|
+
z-index: 100;
|
|
5
|
+
overflow: auto;
|
|
6
|
+
position: absolute;
|
|
7
|
+
inset-inline-start: -1px;
|
|
8
|
+
inset-block-start: calc(100% + 1px);
|
|
9
|
+
inline-size: calc(100% + 2px);
|
|
10
|
+
margin: 0;
|
|
11
|
+
padding: 0;
|
|
12
|
+
padding-block: 2px;
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
color: var(--text-primary);
|
|
15
|
+
border-radius: var(--overlay-corner-radius);
|
|
16
|
+
border-end-start-radius: 0;
|
|
17
|
+
border-end-end-radius: 0;
|
|
18
|
+
border: 1px solid var(--surface-stroke-flyout);
|
|
19
|
+
background-color: var(--solid-background-quarternary);
|
|
20
|
+
background-clip: padding-box;
|
|
21
|
+
box-shadow: var(--flyout-shadow);
|
|
22
|
+
max-block-size: 472px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.auto-suggest-item-wrapper {
|
|
26
|
+
display: block;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
:global {
|
|
30
|
+
.auto-suggest-box.open {
|
|
31
|
+
background-color: var(--control-fill-input-active) !important;
|
|
32
|
+
.text-box-underline::after {
|
|
33
|
+
content: "";
|
|
34
|
+
border-bottom: 2px solid var(--fds-accent-default);
|
|
35
|
+
}
|
|
36
|
+
input::placeholder {
|
|
37
|
+
color: var(--text-tertiary);
|
|
38
|
+
}
|
|
39
|
+
.text-box-underline {
|
|
40
|
+
border-bottom-left-radius: 0;
|
|
41
|
+
border-bottom-right-radius: 0;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<svelte:options accessors />
|
|
2
|
-
|
|
1
|
+
<svelte:options accessors />
|
|
2
|
+
|
|
3
3
|
<script >import { createEventDispatcher } from "svelte";
|
|
4
4
|
import { uid } from "../internal";
|
|
5
5
|
import TextBox from "../TextBox/TextBox.svelte";
|
|
@@ -123,86 +123,86 @@ function handleKeyDown(event) {
|
|
|
123
123
|
open = true;
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
|
-
</script>
|
|
127
|
-
|
|
128
|
-
<TextBox
|
|
129
|
-
type="search"
|
|
130
|
-
class="auto-suggest-box {open && matches.length > 0 ? 'open' : ''} {className}"
|
|
131
|
-
on:search={() => {
|
|
132
|
-
if (open && matches.length > 0) value = matches[selection];
|
|
133
|
-
}}
|
|
134
|
-
on:search
|
|
135
|
-
on:input
|
|
136
|
-
on:input={handleInput}
|
|
137
|
-
on:outermousedown={() => (open = false)}
|
|
138
|
-
on:focus={() => (focused = true)}
|
|
139
|
-
on:focus
|
|
140
|
-
on:blur={() => (focused = false)}
|
|
141
|
-
on:blur
|
|
142
|
-
on:keydown={handleKeyDown}
|
|
143
|
-
on:keydown
|
|
144
|
-
on:change
|
|
145
|
-
on:beforeinput
|
|
146
|
-
on:click
|
|
147
|
-
on:dblclick
|
|
148
|
-
on:contextmenu
|
|
149
|
-
on:mousedown
|
|
150
|
-
on:mouseup
|
|
151
|
-
on:mouseover
|
|
152
|
-
on:mouseout
|
|
153
|
-
on:mouseenter
|
|
154
|
-
on:mouseleave
|
|
155
|
-
on:keypress
|
|
156
|
-
on:keyup
|
|
157
|
-
on:clear={() => {
|
|
158
|
-
typedValue = "";
|
|
159
|
-
if (items.length > 0) open = true;
|
|
160
|
-
}}
|
|
161
|
-
on:clear
|
|
162
|
-
bind:inputElement
|
|
163
|
-
bind:containerElement
|
|
164
|
-
bind:clearButtonElement
|
|
165
|
-
bind:searchButtonElement
|
|
166
|
-
bind:buttonsContainerElement
|
|
167
|
-
bind:value
|
|
168
|
-
{...$$restProps}
|
|
169
|
-
>
|
|
170
|
-
{#if open && matches.length > 0}
|
|
171
|
-
<ul id={flyoutId} role="listbox" class="auto-suggest-box-flyout" bind:this={flyoutElement}>
|
|
172
|
-
{#each matches as item, index (item)}
|
|
173
|
-
<div class="auto-suggest-item-wrapper">
|
|
174
|
-
<slot
|
|
175
|
-
name="item-template"
|
|
176
|
-
id="{flyoutId}-item-{index}"
|
|
177
|
-
{value}
|
|
178
|
-
{matches}
|
|
179
|
-
{selection}
|
|
180
|
-
{item}
|
|
181
|
-
{index}
|
|
182
|
-
>
|
|
183
|
-
<ListItem
|
|
184
|
-
tabindex={-1}
|
|
185
|
-
id="{flyoutId}-item-{index}"
|
|
186
|
-
role="option"
|
|
187
|
-
on:click={() => {
|
|
188
|
-
value = matches[selection];
|
|
189
|
-
selection = index;
|
|
190
|
-
dispatch("itemSelectedOnPurpose", {
|
|
191
|
-
item: matches[selection],
|
|
192
|
-
index: selection
|
|
193
|
-
});
|
|
194
|
-
open = false;
|
|
195
|
-
}}
|
|
196
|
-
selected={selection === index}>{item}</ListItem
|
|
197
|
-
>
|
|
198
|
-
</slot>
|
|
199
|
-
</div>
|
|
200
|
-
{/each}
|
|
201
|
-
</ul>
|
|
202
|
-
{/if}
|
|
203
|
-
|
|
204
|
-
<slot />
|
|
205
|
-
<slot name="buttons" slot="buttons" />
|
|
206
|
-
</TextBox>
|
|
207
|
-
|
|
208
|
-
<style >.auto-suggest-box-flyout{background-clip:padding-box;background-color:var(--fds-solid-background-quarternary);border:1px solid var(--fds-surface-stroke-flyout);border-end-end-radius:0;border-end-start-radius:0;border-radius:var(--fds-overlay-corner-radius);box-shadow:var(--fds-flyout-shadow);box-sizing:border-box;color:var(--fds-text-primary);inline-size:calc(100% + 2px);inset-block-start:calc(100% + 1px);inset-inline-start:-1px;margin:0;max-block-size:472px;overflow:auto;padding:0;padding-block:2px;position:absolute;z-index:100}.auto-suggest-item-wrapper{display:block}:global(.auto-suggest-box.open){background-color:var(--fds-control-fill-input-active)!important}:global(.auto-suggest-box.open) :global(.text-box-underline:after){border-bottom:2px solid var(--fds-accent-default);content:""}:global(.auto-suggest-box.open) :global(input::-moz-placeholder){color:var(--fds-text-tertiary)}:global(.auto-suggest-box.open) :global(input:-ms-input-placeholder){color:var(--fds-text-tertiary)}:global(.auto-suggest-box.open) :global(input::placeholder){color:var(--fds-text-tertiary)}:global(.auto-suggest-box.open) :global(.text-box-underline){border-bottom-left-radius:0;border-bottom-right-radius:0}</style>
|
|
126
|
+
</script>
|
|
127
|
+
|
|
128
|
+
<TextBox
|
|
129
|
+
type="search"
|
|
130
|
+
class="auto-suggest-box {open && matches.length > 0 ? 'open' : ''} {className}"
|
|
131
|
+
on:search={() => {
|
|
132
|
+
if (open && matches.length > 0) value = matches[selection];
|
|
133
|
+
}}
|
|
134
|
+
on:search
|
|
135
|
+
on:input
|
|
136
|
+
on:input={handleInput}
|
|
137
|
+
on:outermousedown={() => (open = false)}
|
|
138
|
+
on:focus={() => (focused = true)}
|
|
139
|
+
on:focus
|
|
140
|
+
on:blur={() => (focused = false)}
|
|
141
|
+
on:blur
|
|
142
|
+
on:keydown={handleKeyDown}
|
|
143
|
+
on:keydown
|
|
144
|
+
on:change
|
|
145
|
+
on:beforeinput
|
|
146
|
+
on:click
|
|
147
|
+
on:dblclick
|
|
148
|
+
on:contextmenu
|
|
149
|
+
on:mousedown
|
|
150
|
+
on:mouseup
|
|
151
|
+
on:mouseover
|
|
152
|
+
on:mouseout
|
|
153
|
+
on:mouseenter
|
|
154
|
+
on:mouseleave
|
|
155
|
+
on:keypress
|
|
156
|
+
on:keyup
|
|
157
|
+
on:clear={() => {
|
|
158
|
+
typedValue = "";
|
|
159
|
+
if (items.length > 0) open = true;
|
|
160
|
+
}}
|
|
161
|
+
on:clear
|
|
162
|
+
bind:inputElement
|
|
163
|
+
bind:containerElement
|
|
164
|
+
bind:clearButtonElement
|
|
165
|
+
bind:searchButtonElement
|
|
166
|
+
bind:buttonsContainerElement
|
|
167
|
+
bind:value
|
|
168
|
+
{...$$restProps}
|
|
169
|
+
>
|
|
170
|
+
{#if open && matches.length > 0}
|
|
171
|
+
<ul id={flyoutId} role="listbox" class="auto-suggest-box-flyout" bind:this={flyoutElement}>
|
|
172
|
+
{#each matches as item, index (item)}
|
|
173
|
+
<div class="auto-suggest-item-wrapper">
|
|
174
|
+
<slot
|
|
175
|
+
name="item-template"
|
|
176
|
+
id="{flyoutId}-item-{index}"
|
|
177
|
+
{value}
|
|
178
|
+
{matches}
|
|
179
|
+
{selection}
|
|
180
|
+
{item}
|
|
181
|
+
{index}
|
|
182
|
+
>
|
|
183
|
+
<ListItem
|
|
184
|
+
tabindex={-1}
|
|
185
|
+
id="{flyoutId}-item-{index}"
|
|
186
|
+
role="option"
|
|
187
|
+
on:click={() => {
|
|
188
|
+
value = matches[selection];
|
|
189
|
+
selection = index;
|
|
190
|
+
dispatch("itemSelectedOnPurpose", {
|
|
191
|
+
item: matches[selection],
|
|
192
|
+
index: selection
|
|
193
|
+
});
|
|
194
|
+
open = false;
|
|
195
|
+
}}
|
|
196
|
+
selected={selection === index}>{item}</ListItem
|
|
197
|
+
>
|
|
198
|
+
</slot>
|
|
199
|
+
</div>
|
|
200
|
+
{/each}
|
|
201
|
+
</ul>
|
|
202
|
+
{/if}
|
|
203
|
+
|
|
204
|
+
<slot />
|
|
205
|
+
<slot name="buttons" slot="buttons" />
|
|
206
|
+
</TextBox>
|
|
207
|
+
|
|
208
|
+
<style >.auto-suggest-box-flyout{background-clip:padding-box;background-color:var(--fds-solid-background-quarternary);border:1px solid var(--fds-surface-stroke-flyout);border-end-end-radius:0;border-end-start-radius:0;border-radius:var(--fds-overlay-corner-radius);box-shadow:var(--fds-flyout-shadow);box-sizing:border-box;color:var(--fds-text-primary);inline-size:calc(100% + 2px);inset-block-start:calc(100% + 1px);inset-inline-start:-1px;margin:0;max-block-size:472px;overflow:auto;padding:0;padding-block:2px;position:absolute;z-index:100}.auto-suggest-item-wrapper{display:block}:global(.auto-suggest-box.open){background-color:var(--fds-control-fill-input-active)!important}:global(.auto-suggest-box.open) :global(.text-box-underline:after){border-bottom:2px solid var(--fds-accent-default);content:""}:global(.auto-suggest-box.open) :global(input::-moz-placeholder){color:var(--fds-text-tertiary)}:global(.auto-suggest-box.open) :global(input:-ms-input-placeholder){color:var(--fds-text-tertiary)}:global(.auto-suggest-box.open) :global(input::placeholder){color:var(--fds-text-tertiary)}:global(.auto-suggest-box.open) :global(.text-box-underline){border-bottom-left-radius:0;border-bottom-right-radius:0}</style>
|
package/Button/Button.scss
CHANGED
|
@@ -1,94 +1,94 @@
|
|
|
1
|
-
@use "../mixins" as *;
|
|
2
|
-
|
|
3
|
-
.button {
|
|
4
|
-
@include flex($inline: true, $align: center, $justify: center);
|
|
5
|
-
@include typography-body;
|
|
6
|
-
|
|
7
|
-
position: relative;
|
|
8
|
-
box-sizing: border-box;
|
|
9
|
-
padding-block: 4px 6px;
|
|
10
|
-
padding-inline: 11px;
|
|
11
|
-
text-decoration: none;
|
|
12
|
-
border: none;
|
|
13
|
-
outline: none;
|
|
14
|
-
cursor: default;
|
|
15
|
-
border-radius: var(--control-corner-radius);
|
|
16
|
-
transition: var(--control-faster-duration) ease background;
|
|
17
|
-
|
|
18
|
-
&:focus-visible {
|
|
19
|
-
box-shadow: var(--focus-stroke);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
&.style- {
|
|
23
|
-
&standard {
|
|
24
|
-
border: 1px solid;
|
|
25
|
-
border-color: var(--control-border-default);
|
|
26
|
-
background-color: var(--control-fill-default);
|
|
27
|
-
color: var(--text-primary);
|
|
28
|
-
background-clip: padding-box;
|
|
29
|
-
|
|
30
|
-
&:hover {
|
|
31
|
-
background-color: var(--control-fill-secondary);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
&:active {
|
|
35
|
-
border-color: var(--control-stroke-default);
|
|
36
|
-
background-color: var(--control-fill-tertiary);
|
|
37
|
-
color: var(--text-secondary);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
&.disabled {
|
|
41
|
-
border-color: var(--control-stroke-default);
|
|
42
|
-
background-color: var(--control-fill-disabled);
|
|
43
|
-
color: var(--text-disabled);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
&accent {
|
|
48
|
-
border: 1px solid var(--control-stroke-on-accent-default);
|
|
49
|
-
border-bottom-color: var(--control-stroke-on-accent-secondary);
|
|
50
|
-
background-color: var(--accent-default);
|
|
51
|
-
color: var(--text-on-accent-primary);
|
|
52
|
-
transition: var(--control-faster-duration) ease border-color;
|
|
53
|
-
|
|
54
|
-
&:hover {
|
|
55
|
-
background-color: var(--accent-secondary);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
&:active {
|
|
59
|
-
border-color: transparent;
|
|
60
|
-
background-color: var(--accent-tertiary);
|
|
61
|
-
color: var(--text-on-accent-secondary);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
&.disabled {
|
|
65
|
-
border-color: transparent;
|
|
66
|
-
background-color: var(--accent-disabled);
|
|
67
|
-
color: var(--text-on-accent-disabled);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
&hyperlink {
|
|
72
|
-
background-color: var(--subtle-fill-transparent);
|
|
73
|
-
color: var(--accent-text-primary);
|
|
74
|
-
cursor: pointer;
|
|
75
|
-
|
|
76
|
-
&:hover {
|
|
77
|
-
background-color: var(--subtle-fill-secondary);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
&:active {
|
|
81
|
-
background-color: var(--subtle-fill-tertiary);
|
|
82
|
-
color: var(--accent-text-tertiary);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
&.disabled {
|
|
86
|
-
color: var(--accent-text-disabled);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
&.disabled {
|
|
92
|
-
pointer-events: none;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
1
|
+
@use "../mixins" as *;
|
|
2
|
+
|
|
3
|
+
.button {
|
|
4
|
+
@include flex($inline: true, $align: center, $justify: center);
|
|
5
|
+
@include typography-body;
|
|
6
|
+
|
|
7
|
+
position: relative;
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
padding-block: 4px 6px;
|
|
10
|
+
padding-inline: 11px;
|
|
11
|
+
text-decoration: none;
|
|
12
|
+
border: none;
|
|
13
|
+
outline: none;
|
|
14
|
+
cursor: default;
|
|
15
|
+
border-radius: var(--control-corner-radius);
|
|
16
|
+
transition: var(--control-faster-duration) ease background;
|
|
17
|
+
|
|
18
|
+
&:focus-visible {
|
|
19
|
+
box-shadow: var(--focus-stroke);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&.style- {
|
|
23
|
+
&standard {
|
|
24
|
+
border: 1px solid;
|
|
25
|
+
border-color: var(--control-border-default);
|
|
26
|
+
background-color: var(--control-fill-default);
|
|
27
|
+
color: var(--text-primary);
|
|
28
|
+
background-clip: padding-box;
|
|
29
|
+
|
|
30
|
+
&:hover {
|
|
31
|
+
background-color: var(--control-fill-secondary);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&:active {
|
|
35
|
+
border-color: var(--control-stroke-default);
|
|
36
|
+
background-color: var(--control-fill-tertiary);
|
|
37
|
+
color: var(--text-secondary);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&.disabled {
|
|
41
|
+
border-color: var(--control-stroke-default);
|
|
42
|
+
background-color: var(--control-fill-disabled);
|
|
43
|
+
color: var(--text-disabled);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&accent {
|
|
48
|
+
border: 1px solid var(--control-stroke-on-accent-default);
|
|
49
|
+
border-bottom-color: var(--control-stroke-on-accent-secondary);
|
|
50
|
+
background-color: var(--accent-default);
|
|
51
|
+
color: var(--text-on-accent-primary);
|
|
52
|
+
transition: var(--control-faster-duration) ease border-color;
|
|
53
|
+
|
|
54
|
+
&:hover {
|
|
55
|
+
background-color: var(--accent-secondary);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&:active {
|
|
59
|
+
border-color: transparent;
|
|
60
|
+
background-color: var(--accent-tertiary);
|
|
61
|
+
color: var(--text-on-accent-secondary);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&.disabled {
|
|
65
|
+
border-color: transparent;
|
|
66
|
+
background-color: var(--accent-disabled);
|
|
67
|
+
color: var(--text-on-accent-disabled);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&hyperlink {
|
|
72
|
+
background-color: var(--subtle-fill-transparent);
|
|
73
|
+
color: var(--accent-text-primary);
|
|
74
|
+
cursor: pointer;
|
|
75
|
+
|
|
76
|
+
&:hover {
|
|
77
|
+
background-color: var(--subtle-fill-secondary);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&:active {
|
|
81
|
+
background-color: var(--subtle-fill-tertiary);
|
|
82
|
+
color: var(--accent-text-tertiary);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&.disabled {
|
|
86
|
+
color: var(--accent-text-disabled);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&.disabled {
|
|
92
|
+
pointer-events: none;
|
|
93
|
+
}
|
|
94
|
+
}
|
package/Button/Button.svelte
CHANGED
|
@@ -13,28 +13,28 @@ export { className as class };
|
|
|
13
13
|
/** Obtains a bound DOM reference to the button or anchor element. */
|
|
14
14
|
export let element = null;
|
|
15
15
|
const forwardEvents = createEventForwarder(get_current_component());
|
|
16
|
-
</script>
|
|
17
|
-
|
|
18
|
-
<!--
|
|
19
|
-
@component
|
|
20
|
-
A button gives the user a way to trigger an immediate action. Some buttons are specialized for particular tasks, such as navigation, repeated actions, or presenting menus. [Docs](https://fluent-svelte.vercel.app/docs/components/button)
|
|
21
|
-
- Usage:
|
|
22
|
-
```tsx
|
|
23
|
-
<Button>Click me!</Button>
|
|
24
|
-
```
|
|
25
|
-
-->
|
|
26
|
-
<svelte:element
|
|
27
|
-
this={href && !disabled ? "a" : "button"}
|
|
28
|
-
use:forwardEvents
|
|
29
|
-
bind:this={element}
|
|
30
|
-
role={href && !disabled ? "button" : undefined}
|
|
31
|
-
href={href && !disabled ? href : undefined}
|
|
32
|
-
class="button style-{variant} {className}"
|
|
33
|
-
tabindex={!disabled ? 0 : -1}
|
|
34
|
-
class:disabled
|
|
35
|
-
{...$$restProps}
|
|
36
|
-
>
|
|
37
|
-
<slot />
|
|
38
|
-
</svelte:element>
|
|
39
|
-
|
|
40
|
-
<style >.button{align-items:center;border:none;border-radius:var(--fds-control-corner-radius);box-sizing:border-box;cursor:default;display:inline-flex;font-family:var(--fds-font-family-text);font-size:var(--fds-body-font-size);font-weight:400;justify-content:center;line-height:20px;outline:none;padding-block:4px 6px;padding-inline:11px;position:relative;text-decoration:none;transition:var(--fds-control-faster-duration) ease background;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.button:focus-visible{box-shadow:var(--fds-focus-stroke)}.button.style-standard{background-clip:padding-box;background-color:var(--fds-control-fill-default);border:1px solid;border-color:var(--fds-control-border-default);color:var(--fds-text-primary)}.button.style-standard:hover{background-color:var(--fds-control-fill-secondary)}.button.style-standard:active{background-color:var(--fds-control-fill-tertiary);border-color:var(--fds-control-stroke-default);color:var(--fds-text-secondary)}.button.style-standard.disabled{background-color:var(--fds-control-fill-disabled);border-color:var(--fds-control-stroke-default);color:var(--fds-text-disabled)}.button.style-accent{background-color:var(--fds-accent-default);border:1px solid var(--fds-control-stroke-on-accent-default);border-bottom-color:var(--fds-control-stroke-on-accent-secondary);color:var(--fds-text-on-accent-primary);transition:var(--fds-control-faster-duration) ease border-color}.button.style-accent:hover{background-color:var(--fds-accent-secondary)}.button.style-accent:active{background-color:var(--fds-accent-tertiary);border-color:transparent;color:var(--fds-text-on-accent-secondary)}.button.style-accent.disabled{background-color:var(--fds-accent-disabled);border-color:transparent;color:var(--fds-text-on-accent-disabled)}.button.style-hyperlink{background-color:var(--fds-subtle-fill-transparent);color:var(--fds-accent-text-primary);cursor:pointer}.button.style-hyperlink:hover{background-color:var(--fds-subtle-fill-secondary)}.button.style-hyperlink:active{background-color:var(--fds-subtle-fill-tertiary);color:var(--fds-accent-text-tertiary)}.button.style-hyperlink.disabled{color:var(--fds-accent-text-disabled)}.button.disabled{pointer-events:none}</style>
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<!--
|
|
19
|
+
@component
|
|
20
|
+
A button gives the user a way to trigger an immediate action. Some buttons are specialized for particular tasks, such as navigation, repeated actions, or presenting menus. [Docs](https://fluent-svelte.vercel.app/docs/components/button)
|
|
21
|
+
- Usage:
|
|
22
|
+
```tsx
|
|
23
|
+
<Button>Click me!</Button>
|
|
24
|
+
```
|
|
25
|
+
-->
|
|
26
|
+
<svelte:element
|
|
27
|
+
this={href && !disabled ? "a" : "button"}
|
|
28
|
+
use:forwardEvents
|
|
29
|
+
bind:this={element}
|
|
30
|
+
role={href && !disabled ? "button" : undefined}
|
|
31
|
+
href={href && !disabled ? href : undefined}
|
|
32
|
+
class="button style-{variant} {className}"
|
|
33
|
+
tabindex={!disabled ? 0 : -1}
|
|
34
|
+
class:disabled
|
|
35
|
+
{...$$restProps}
|
|
36
|
+
>
|
|
37
|
+
<slot />
|
|
38
|
+
</svelte:element>
|
|
39
|
+
|
|
40
|
+
<style >.button{align-items:center;border:none;border-radius:var(--fds-control-corner-radius);box-sizing:border-box;cursor:default;display:inline-flex;font-family:var(--fds-font-family-text);font-size:var(--fds-body-font-size);font-weight:400;justify-content:center;line-height:20px;outline:none;padding-block:4px 6px;padding-inline:11px;position:relative;text-decoration:none;transition:var(--fds-control-faster-duration) ease background;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.button:focus-visible{box-shadow:var(--fds-focus-stroke)}.button.style-standard{background-clip:padding-box;background-color:var(--fds-control-fill-default);border:1px solid;border-color:var(--fds-control-border-default);color:var(--fds-text-primary)}.button.style-standard:hover{background-color:var(--fds-control-fill-secondary)}.button.style-standard:active{background-color:var(--fds-control-fill-tertiary);border-color:var(--fds-control-stroke-default);color:var(--fds-text-secondary)}.button.style-standard.disabled{background-color:var(--fds-control-fill-disabled);border-color:var(--fds-control-stroke-default);color:var(--fds-text-disabled)}.button.style-accent{background-color:var(--fds-accent-default);border:1px solid var(--fds-control-stroke-on-accent-default);border-bottom-color:var(--fds-control-stroke-on-accent-secondary);color:var(--fds-text-on-accent-primary);transition:var(--fds-control-faster-duration) ease border-color}.button.style-accent:hover{background-color:var(--fds-accent-secondary)}.button.style-accent:active{background-color:var(--fds-accent-tertiary);border-color:transparent;color:var(--fds-text-on-accent-secondary)}.button.style-accent.disabled{background-color:var(--fds-accent-disabled);border-color:transparent;color:var(--fds-text-on-accent-disabled)}.button.style-hyperlink{background-color:var(--fds-subtle-fill-transparent);color:var(--fds-accent-text-primary);cursor:pointer}.button.style-hyperlink:hover{background-color:var(--fds-subtle-fill-secondary)}.button.style-hyperlink:active{background-color:var(--fds-subtle-fill-tertiary);color:var(--fds-accent-text-tertiary)}.button.style-hyperlink.disabled{color:var(--fds-accent-text-disabled)}.button.disabled{pointer-events:none}</style>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
@use "../mixins" as *;
|
|
2
|
-
|
|
3
|
-
.calendar-date-picker- {
|
|
4
|
-
&label {
|
|
5
|
-
padding-inline-end: 2px;
|
|
6
|
-
&.placeholder:not(.disabled) {
|
|
7
|
-
color: var(--text-secondary);
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
&icon {
|
|
11
|
-
@include icon($size: 12px);
|
|
12
|
-
margin-inline-start: 8px;
|
|
13
|
-
color: currentColor;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
1
|
+
@use "../mixins" as *;
|
|
2
|
+
|
|
3
|
+
.calendar-date-picker- {
|
|
4
|
+
&label {
|
|
5
|
+
padding-inline-end: 2px;
|
|
6
|
+
&.placeholder:not(.disabled) {
|
|
7
|
+
color: var(--text-secondary);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
&icon {
|
|
11
|
+
@include icon($size: 12px);
|
|
12
|
+
margin-inline-start: 8px;
|
|
13
|
+
color: currentColor;
|
|
14
|
+
}
|
|
15
|
+
}
|