@medyll/idae-slotui-svelte 0.122.1 → 0.123.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 +47 -47
- package/dist/base/alert/Alert.demo.svelte +62 -62
- package/dist/base/alert/Alert.svelte +121 -121
- package/dist/base/alert/alert.scss +93 -93
- package/dist/base/avatar/Avatar.demo.svelte +41 -41
- package/dist/base/avatar/Avatar.preview.svelte +6 -6
- package/dist/base/avatar/Avatar.svelte +65 -65
- package/dist/base/avatar/avatar.scss +17 -17
- package/dist/base/backdrop/Backdrop.demo.svelte +49 -49
- package/dist/base/backdrop/Backdrop.svelte +78 -78
- package/dist/base/backdrop/backdrop.scss +34 -34
- package/dist/base/badge/Badge.svelte +31 -31
- package/dist/base/badge/badge.scss +19 -19
- package/dist/base/box/Box.demo.svelte +54 -54
- package/dist/base/box/Box.svelte +72 -72
- package/dist/base/box/box.scss +33 -33
- package/dist/base/breadCrumb/BreadCrumb.svelte +23 -23
- package/dist/base/breadCrumb/breadcrumb.scss +11 -11
- package/dist/base/cartouche/Cartouche.demo.svelte +108 -108
- package/dist/base/cartouche/Cartouche.svelte +114 -114
- package/dist/base/cartouche/cartouche.scss +114 -114
- package/dist/base/chipper/Chipper.demo.svelte +45 -45
- package/dist/base/chipper/Chipper.svelte +36 -36
- package/dist/base/chipper/chipper.scss +65 -65
- package/dist/base/columner/Column.svelte +62 -62
- package/dist/base/columner/Columner.demo.svelte +15 -15
- package/dist/base/columner/Columner.svelte +21 -21
- package/dist/base/contentSwitcher/ContentSwitcher.demo.svelte +45 -45
- package/dist/base/contentSwitcher/ContentSwitcher.svelte +63 -63
- package/dist/base/contentSwitcher/content-switcher.scss +22 -22
- package/dist/base/debug/Debug.svelte +21 -21
- package/dist/base/demoer/DemoPage.svelte +40 -40
- package/dist/base/demoer/Demoer.svelte +170 -170
- package/dist/base/demoer/DemoerCode.svelte +45 -45
- package/dist/base/demoer/DemoerComponent.svelte +50 -50
- package/dist/base/divider/Divider.demo.svelte +34 -34
- package/dist/base/divider/Divider.svelte +68 -68
- package/dist/base/divider/divider.scss +19 -19
- package/dist/base/icon/Icon.demo.svelte +24 -24
- package/dist/base/icon/Icon.svelte +117 -117
- package/dist/base/icon/icon.scss +17 -17
- package/dist/base/paper/Paper.demo.svelte +31 -31
- package/dist/base/paper/Paper.svelte +20 -20
- package/dist/base/paper/paper.scss +15 -15
- package/dist/base/titleBar/TitleBar.demo.svelte +30 -30
- package/dist/base/titleBar/TitleBar.svelte +40 -40
- package/dist/base/titleBar/title-bar.scss +29 -29
- package/dist/controls/autocomplete/AutoComplete.demo.svelte +88 -88
- package/dist/controls/autocomplete/AutoComplete.svelte +152 -152
- package/dist/controls/autocomplete/auto-complete.scss +15 -15
- package/dist/controls/button/Button.demo.svelte +165 -165
- package/dist/controls/button/Button.svelte +95 -95
- package/dist/controls/button/ButtonAction.svelte +55 -55
- package/dist/controls/button/ButtonMenu.svelte +55 -55
- package/dist/controls/button/IconButton.svelte +45 -45
- package/dist/controls/button/button-action.scss +8 -8
- package/dist/controls/button/button-menu.scss +36 -36
- package/dist/controls/button/button.scss +293 -293
- package/dist/controls/checkbox/Checkbox.demo.svelte +29 -29
- package/dist/controls/checkbox/Checkbox.svelte +59 -59
- package/dist/controls/checkbox/checkbox.scss +115 -115
- package/dist/controls/confirm/Confirm.demo.svelte +60 -60
- package/dist/controls/confirm/Confirm.preview.svelte +14 -14
- package/dist/controls/confirm/Confirm.svelte +156 -156
- package/dist/controls/confirm/confirm.scss +12 -12
- package/dist/controls/inplaceedit/InPlaceEdit.demo.svelte +41 -41
- package/dist/controls/inplaceedit/InPlaceEdit.svelte +109 -109
- package/dist/controls/progress/Progress.demo.svelte +30 -30
- package/dist/controls/progress/Progress.svelte +26 -26
- package/dist/controls/progress/progress.scss +23 -23
- package/dist/controls/rating/Rating.demo.svelte +45 -45
- package/dist/controls/rating/Rating.svelte +44 -44
- package/dist/controls/rating/rating.scss +9 -9
- package/dist/controls/select/Select.demo.svelte +101 -101
- package/dist/controls/select/Select.svelte +125 -125
- package/dist/controls/select/select.scss +13 -13
- package/dist/controls/slider/Slider.demo.svelte +34 -34
- package/dist/controls/slider/Slider.svelte +153 -153
- package/dist/controls/slider/slider.scss +51 -51
- package/dist/controls/stepper/Stepper.demo.svelte +32 -32
- package/dist/controls/stepper/Stepper.svelte +30 -30
- package/dist/controls/stepper/stepper.scss +23 -23
- package/dist/controls/switch/Switch.demo.svelte +61 -61
- package/dist/controls/switch/Switch.svelte +45 -45
- package/dist/controls/switch/switch.scss +73 -73
- package/dist/controls/textfield/TextField.demo.svelte +79 -79
- package/dist/controls/textfield/TextField.svelte +86 -86
- package/dist/controls/textfield/textfield.scss +68 -68
- package/dist/csss/csss.scss +10 -10
- package/dist/data/dataList/DataList.demo.svelte +151 -151
- package/dist/data/dataList/DataList.preview.svelte +23 -23
- package/dist/data/dataList/DataList.svelte +233 -233
- package/dist/data/dataList/DataListCell.svelte +212 -212
- package/dist/data/dataList/DataListHead.svelte +75 -75
- package/dist/data/dataList/DataListRow.svelte +93 -93
- package/dist/data/dataList/datalist.scss +157 -157
- package/dist/data/finder/Finder.demo.svelte +55 -55
- package/dist/data/finder/Finder.svelte +166 -166
- package/dist/data/finder/finder.scss +14 -14
- package/dist/data/grouper/Grouper.demo.svelte +36 -36
- package/dist/data/grouper/Grouper.svelte +85 -85
- package/dist/data/jsoner/Jsoner.svelte +40 -40
- package/dist/data/list/List.svelte +16 -16
- package/dist/data/list/ListItem.svelte +10 -10
- package/dist/data/list/ListTitle.svelte +8 -8
- package/dist/data/loader/Loader.demo.svelte +95 -95
- package/dist/data/loader/Loader.preview.svelte +7 -7
- package/dist/data/loader/Loader.svelte +99 -99
- package/dist/data/loader/loader.scss +50 -50
- package/dist/data/sorter/Sorter.demo.svelte +62 -62
- package/dist/data/sorter/Sorter.svelte +80 -80
- package/dist/data/sorter/Sorterer.svelte +27 -27
- package/dist/data/sorter/sorterer.scss +11 -11
- package/dist/index.d.ts +39 -38
- package/dist/index.js +39 -38
- package/dist/navigation/drawer/Drawer.demo.svelte +52 -52
- package/dist/navigation/drawer/Drawer.svelte +163 -163
- package/dist/navigation/drawer/drawer.scss +69 -69
- package/dist/navigation/tabs/Tabs.demo.svelte +83 -83
- package/dist/navigation/tabs/Tabs.preview.svelte +22 -22
- package/dist/navigation/tabs/Tabs.svelte +158 -158
- package/dist/navigation/tabs/tabs.scss +92 -92
- package/dist/slotui-css/slotui-css.css +141 -141
- package/dist/slotui-css/slotui-min-css.css +141 -141
- package/dist/styles/slotui-mixins.scss +168 -168
- package/dist/styles/slotui-presets.scss +56 -56
- package/dist/styles/slotuisheet/SlotuiSheet.svelte +36 -36
- package/dist/styles/slotuisheet/SlotyuiSheet.demo.svelte +28 -28
- package/dist/styles/slotuisheet/sheetConfig.scss +7 -7
- package/dist/styles/slotuisheet/slotui-sheet.scss +192 -192
- package/dist/styles/slotuisheet/stylesheet-container.scss +147 -147
- package/dist/styles/slotuisheet/stylesheet.scss +156 -156
- package/dist/types/slotui-ambient.d.ts +27 -27
- package/dist/ui/bootstrapp/BootStrApp.svelte +92 -92
- package/dist/ui/chromeFrame/ChromeFrame.svelte +43 -43
- package/dist/ui/chromeFrame/ChromeFrameButtonList.svelte +33 -33
- package/dist/ui/chromeFrame/ChromeFrameList.svelte +106 -106
- package/dist/ui/chromeFrame/chrome-frame.scss +34 -34
- package/dist/ui/frame/Frame.demo.svelte +48 -48
- package/dist/ui/frame/Frame.svelte +90 -90
- package/dist/ui/frame/frame.scss +46 -46
- package/dist/ui/login/Login.demo.svelte +62 -62
- package/dist/ui/login/Login.svelte +102 -102
- package/dist/ui/marquee/Marquee.demo.svelte +33 -33
- package/dist/ui/marquee/Marquee.svelte +97 -97
- package/dist/ui/marquee/marquee.scss +34 -34
- package/dist/ui/menu/Menu.svelte +9 -9
- package/dist/ui/menu/MenuItem.svelte +9 -9
- package/dist/ui/menu/MenuTitle.svelte +10 -10
- package/dist/ui/menu/menu.scss +61 -61
- package/dist/ui/menuList/MenuList.demo.svelte +73 -73
- package/dist/ui/menuList/MenuList.svelte +143 -143
- package/dist/ui/menuList/MenuListItem.svelte +134 -134
- package/dist/ui/menuList/MenuListTitle.svelte +10 -10
- package/dist/ui/menuList/menu-list.scss +120 -120
- package/dist/ui/panel/Panel.demo.svelte +169 -169
- package/dist/ui/panel/Panel.svelte +96 -96
- package/dist/ui/panel/PanelGrid.svelte +62 -62
- package/dist/ui/panel/PanelSlide.svelte +156 -156
- package/dist/ui/panel/Paneler.svelte +63 -63
- package/dist/ui/panel/panel.scss +32 -32
- package/dist/ui/popper/Popper.demo.svelte +92 -92
- package/dist/ui/popper/Popper.svelte +160 -160
- package/dist/ui/popper/popper.scss +108 -108
- package/dist/ui/preview/Preview.svelte +41 -41
- package/dist/ui/serviceBox/ServiceBox.svelte +24 -24
- package/dist/ui/startMenu/BootMenu.svelte +102 -102
- package/dist/ui/startMenu/boot-menu.scss +86 -86
- package/dist/ui/taskbar/TaskBarContent.svelte +20 -20
- package/dist/ui/taskbar/Taskbar.svelte +26 -26
- package/dist/ui/taskbar/taskbar.scss +28 -28
- package/dist/ui/themeswitcher/ThemeSwitcher.svelte +18 -18
- package/dist/ui/toast/Toast.demo.svelte +19 -19
- package/dist/ui/toast/Toast.svelte +60 -60
- package/dist/ui/toast/Toaster.svelte +18 -18
- package/dist/ui/toggleBar/ToggleBar.demo.svelte +114 -114
- package/dist/ui/toggleBar/ToggleBar.svelte +58 -58
- package/dist/ui/toggleBar/toggle-bar.scss +45 -45
- package/dist/ui/toolBar/ToolBar.demo.svelte +98 -98
- package/dist/ui/toolBar/ToolBar.svelte +30 -30
- package/dist/ui/toolBar/toolbar.scss +32 -32
- package/dist/ui/tree/Tree.demo.svelte +84 -84
- package/dist/ui/tree/Tree.preview.svelte +19 -19
- package/dist/ui/tree/Tree.svelte +182 -182
- package/dist/ui/tree/tree.scss +38 -38
- package/dist/ui/window/Window.demo.svelte +111 -111
- package/dist/ui/window/Window.svelte +177 -177
- package/dist/ui/window/window.scss +66 -66
- package/dist/utils/content/Content.svelte +78 -78
- package/dist/utils/contextRooter/ContextRooter.demo.svelte +33 -33
- package/dist/utils/contextRooter/ContextRooter.svelte +6 -6
- package/dist/utils/css/Css.demo.svelte +5 -5
- package/dist/utils/css/Css.svelte +64 -64
- package/dist/utils/effects/transitions.js +6 -6
- package/dist/utils/looper/Looper.demo.svelte +36 -36
- package/dist/utils/looper/Looper.svelte +47 -47
- package/dist/utils/slotted/Slotted.svelte +21 -21
- package/dist/utils/stylesheet/StyleSheet.demo.svelte +28 -28
- package/dist/utils/stylesheet/StyleSheet.svelte +30 -30
- package/dist/utils/stylesheet/containerConfig.scss +7 -7
- package/dist/utils/stylesheet/stylesheet.scss +147 -147
- package/dist/utils/uses/sx4u/sx4uPreprocess.js +34 -34
- package/package.json +3 -3
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { CommonProps, ElementProps, ExpandProps } from '../../types/index.js';
|
|
3
|
-
import Slotted from '../../utils/slotted/Slotted.svelte';
|
|
4
|
-
import type { CheckboxProps } from './types.js';
|
|
5
|
-
|
|
6
|
-
let {
|
|
7
|
-
title,
|
|
8
|
-
indeterminate = $bindable(false),
|
|
9
|
-
class: className = '',
|
|
10
|
-
inputElement = $bindable(),
|
|
11
|
-
labelElement,
|
|
12
|
-
checked = $bindable(false),
|
|
13
|
-
value = $bindable(undefined),
|
|
14
|
-
disabled = $bindable(false),
|
|
15
|
-
dense,
|
|
16
|
-
children,
|
|
17
|
-
...rest
|
|
18
|
-
}: ExpandProps<CheckboxProps> = $props();
|
|
19
|
-
</script>
|
|
20
|
-
|
|
21
|
-
<label class="checkbox-root" class:disabled class:indeterminate bind:this={labelElement}>
|
|
22
|
-
<div class="checkbox-container dense-{dense}">
|
|
23
|
-
<!-- @ts-ignore -->
|
|
24
|
-
<input
|
|
25
|
-
bind:this={inputElement}
|
|
26
|
-
bind:checked
|
|
27
|
-
bind:indeterminate
|
|
28
|
-
{value}
|
|
29
|
-
{disabled}
|
|
30
|
-
{...rest}
|
|
31
|
-
type="checkbox"
|
|
32
|
-
class="checkbox {className}"
|
|
33
|
-
/>
|
|
34
|
-
<svg aria-hidden="true" class="svg" viewBox={'0 0 16 16'}>
|
|
35
|
-
{#if indeterminate}
|
|
36
|
-
<path
|
|
37
|
-
class="path-indeterminate"
|
|
38
|
-
fill="currentColor"
|
|
39
|
-
d="M213.5,554.5C207.5,554.5 201.917,553.417 196.75,551.25C191.583,549.083 187.083,546.083 183.25,542.25C179.417,538.417 176.333,533.917 174,528.75C171.667,523.583 170.5,518 170.5,512C170.5,506 171.667,500.417 174,495.25C176.333,490.083 179.417,485.583 183.25,481.75C187.083,477.917 191.583,474.917 196.75,472.75C201.917,470.583 207.5,469.5 213.5,469.5L810.5,469.5C816.5,469.5 822.083,470.583 827.25,472.75C832.417,474.917 836.917,477.917 840.75,481.75C844.583,485.583 847.667,490.083 850,495.25C852.333,500.417 853.5,506 853.5,512C853.5,518 852.333,523.583 850,528.75C847.667,533.917 844.583,538.417 840.75,542.25C836.917,546.083 832.417,549.083 827.25,551.25C822.083,553.417 816.5,554.5 810.5,554.5Z"
|
|
40
|
-
/>
|
|
41
|
-
{:else if checked}
|
|
42
|
-
<path
|
|
43
|
-
class="path-check"
|
|
44
|
-
d="m14.431 3.323l-8.47 10l-.79-.036l-3.35-4.77l.818-.574l2.978 4.24l8.051-9.506z"
|
|
45
|
-
clip-rule="evenodd"
|
|
46
|
-
stroke-width="4"
|
|
47
|
-
fill="white"
|
|
48
|
-
/>
|
|
49
|
-
{/if}
|
|
50
|
-
</svg>
|
|
51
|
-
</div>
|
|
52
|
-
{#if children || title}
|
|
53
|
-
<div>
|
|
54
|
-
<Slotted child={children}>{title}</Slotted>
|
|
55
|
-
</div>
|
|
56
|
-
{/if}
|
|
57
|
-
</label>
|
|
58
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { CommonProps, ElementProps, ExpandProps } from '../../types/index.js';
|
|
3
|
+
import Slotted from '../../utils/slotted/Slotted.svelte';
|
|
4
|
+
import type { CheckboxProps } from './types.js';
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
title,
|
|
8
|
+
indeterminate = $bindable(false),
|
|
9
|
+
class: className = '',
|
|
10
|
+
inputElement = $bindable(),
|
|
11
|
+
labelElement,
|
|
12
|
+
checked = $bindable(false),
|
|
13
|
+
value = $bindable(undefined),
|
|
14
|
+
disabled = $bindable(false),
|
|
15
|
+
dense,
|
|
16
|
+
children,
|
|
17
|
+
...rest
|
|
18
|
+
}: ExpandProps<CheckboxProps> = $props();
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<label class="checkbox-root" class:disabled class:indeterminate bind:this={labelElement}>
|
|
22
|
+
<div class="checkbox-container dense-{dense}">
|
|
23
|
+
<!-- @ts-ignore -->
|
|
24
|
+
<input
|
|
25
|
+
bind:this={inputElement}
|
|
26
|
+
bind:checked
|
|
27
|
+
bind:indeterminate
|
|
28
|
+
{value}
|
|
29
|
+
{disabled}
|
|
30
|
+
{...rest}
|
|
31
|
+
type="checkbox"
|
|
32
|
+
class="checkbox {className}"
|
|
33
|
+
/>
|
|
34
|
+
<svg aria-hidden="true" class="svg" viewBox={'0 0 16 16'}>
|
|
35
|
+
{#if indeterminate}
|
|
36
|
+
<path
|
|
37
|
+
class="path-indeterminate"
|
|
38
|
+
fill="currentColor"
|
|
39
|
+
d="M213.5,554.5C207.5,554.5 201.917,553.417 196.75,551.25C191.583,549.083 187.083,546.083 183.25,542.25C179.417,538.417 176.333,533.917 174,528.75C171.667,523.583 170.5,518 170.5,512C170.5,506 171.667,500.417 174,495.25C176.333,490.083 179.417,485.583 183.25,481.75C187.083,477.917 191.583,474.917 196.75,472.75C201.917,470.583 207.5,469.5 213.5,469.5L810.5,469.5C816.5,469.5 822.083,470.583 827.25,472.75C832.417,474.917 836.917,477.917 840.75,481.75C844.583,485.583 847.667,490.083 850,495.25C852.333,500.417 853.5,506 853.5,512C853.5,518 852.333,523.583 850,528.75C847.667,533.917 844.583,538.417 840.75,542.25C836.917,546.083 832.417,549.083 827.25,551.25C822.083,553.417 816.5,554.5 810.5,554.5Z"
|
|
40
|
+
/>
|
|
41
|
+
{:else if checked}
|
|
42
|
+
<path
|
|
43
|
+
class="path-check"
|
|
44
|
+
d="m14.431 3.323l-8.47 10l-.79-.036l-3.35-4.77l.818-.574l2.978 4.24l8.051-9.506z"
|
|
45
|
+
clip-rule="evenodd"
|
|
46
|
+
stroke-width="4"
|
|
47
|
+
fill="white"
|
|
48
|
+
/>
|
|
49
|
+
{/if}
|
|
50
|
+
</svg>
|
|
51
|
+
</div>
|
|
52
|
+
{#if children || title}
|
|
53
|
+
<div>
|
|
54
|
+
<Slotted child={children}>{title}</Slotted>
|
|
55
|
+
</div>
|
|
56
|
+
{/if}
|
|
57
|
+
</label>
|
|
58
|
+
|
|
59
59
|
<style>:root {
|
|
60
60
|
--sld-checkbox-background: var(--sld-color-background-alpha-high);
|
|
61
61
|
--sld-checkbox-background-hover: var(--sld-color-primary);
|
|
@@ -182,4 +182,4 @@
|
|
|
182
182
|
}
|
|
183
183
|
.checkbox-root .checkbox-container .svg path-indeterminate {
|
|
184
184
|
transform: scale(1.1);
|
|
185
|
-
}</style>
|
|
185
|
+
}</style>
|
|
@@ -1,115 +1,115 @@
|
|
|
1
|
-
@use "../../styles/slotui-mixins.scss";
|
|
2
|
-
|
|
3
|
-
:root {
|
|
4
|
-
--sld-checkbox-background: var(--sld-color-background-alpha-high);
|
|
5
|
-
--sld-checkbox-background-hover: var(--sld-color-primary);
|
|
6
|
-
--sld-checkbox-background-checked: var(--sld-color-primary);
|
|
7
|
-
--sld-checkbox-background-indeterminate: var(--sld-color-primary-alpha-mid);
|
|
8
|
-
--sld-checkbox-border-width: 2px;
|
|
9
|
-
--sld-checkbox-border-color: var(--sld-color-foreground-alpha-mid);
|
|
10
|
-
--sld-checkbox-border-bottom-width: 2px;
|
|
11
|
-
--sld-checkbox-border-bottom-color: var(--sld-color-primary-darker, rgb(208, 191, 151));
|
|
12
|
-
--sld-checkbox-radius: var(--sld-radius-small);
|
|
13
|
-
--sld-checkbox-padding: 0 0.5rem;
|
|
14
|
-
--sld-checkbox-shadow: 0px 0px 3px 1px rgba(51, 51, 51, 0.1);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.checkbox {
|
|
18
|
-
@include slotui-mixins.data-hover;
|
|
19
|
-
@include slotui-mixins.ui-tall-presets;
|
|
20
|
-
@include slotui-mixins.ui-transition;
|
|
21
|
-
|
|
22
|
-
& {
|
|
23
|
-
appearance: none;
|
|
24
|
-
outline: none;
|
|
25
|
-
border: var(--sld-checkbox-border-width) solid var(--sld-checkbox-border-color);
|
|
26
|
-
border-radius: var(--sld-checkbox-radius);
|
|
27
|
-
background-clip: padding-box;
|
|
28
|
-
background-color: var(--sld-checkbox-background);
|
|
29
|
-
width: 1.7rem;
|
|
30
|
-
height: 1.7rem;
|
|
31
|
-
aspect-ratio: 1/1;
|
|
32
|
-
padding: 0;
|
|
33
|
-
margin: 0;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
&:focus-visible {
|
|
37
|
-
box-shadow: var(--sld-checkbox-shadow);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
&:hover {
|
|
41
|
-
background-color: var(--sld-color-primary-darken-mid);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
&:active {
|
|
45
|
-
+ .svg {
|
|
46
|
-
color: var(--sld-color-secondary);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
&:disabled {
|
|
51
|
-
border-color: #ccc;
|
|
52
|
-
background-color: #ededed;
|
|
53
|
-
pointer-events: none;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
&:checked,
|
|
57
|
-
&:indeterminate {
|
|
58
|
-
background-color: var(--sld-checkbox-background-indeterminate);
|
|
59
|
-
|
|
60
|
-
&:hover {
|
|
61
|
-
background-color: var(--sld-checkbox-background-hover);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
&:active,
|
|
65
|
-
&:focus {
|
|
66
|
-
background-color: var(--sld-checkbox-background-checked);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
&:disabled,
|
|
70
|
-
&[disabled] {
|
|
71
|
-
border-color: #ccc;
|
|
72
|
-
background-color: #ededed;
|
|
73
|
-
pointer-events: none;
|
|
74
|
-
+ .svg {
|
|
75
|
-
color: #ededed;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.checkbox-root {
|
|
82
|
-
display: flex;
|
|
83
|
-
align-items: center;
|
|
84
|
-
-webkit-user-select: none;
|
|
85
|
-
user-select: none;
|
|
86
|
-
min-block-size: 32px;
|
|
87
|
-
gap: 0.5rem;
|
|
88
|
-
|
|
89
|
-
&.disabled > span {
|
|
90
|
-
color: #ededed;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.checkbox-container {
|
|
94
|
-
display: inline-flex;
|
|
95
|
-
justify-content: center;
|
|
96
|
-
position: relative;
|
|
97
|
-
.svg {
|
|
98
|
-
position: absolute;
|
|
99
|
-
color: white;
|
|
100
|
-
height: 100%;
|
|
101
|
-
width: 100%;
|
|
102
|
-
padding: 3px;
|
|
103
|
-
path {
|
|
104
|
-
transform-origin: center;
|
|
105
|
-
&-check {
|
|
106
|
-
transform: scale(1.1);
|
|
107
|
-
fill: white;
|
|
108
|
-
}
|
|
109
|
-
&-indeterminate {
|
|
110
|
-
transform: scale(1.1);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
1
|
+
@use "../../styles/slotui-mixins.scss";
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--sld-checkbox-background: var(--sld-color-background-alpha-high);
|
|
5
|
+
--sld-checkbox-background-hover: var(--sld-color-primary);
|
|
6
|
+
--sld-checkbox-background-checked: var(--sld-color-primary);
|
|
7
|
+
--sld-checkbox-background-indeterminate: var(--sld-color-primary-alpha-mid);
|
|
8
|
+
--sld-checkbox-border-width: 2px;
|
|
9
|
+
--sld-checkbox-border-color: var(--sld-color-foreground-alpha-mid);
|
|
10
|
+
--sld-checkbox-border-bottom-width: 2px;
|
|
11
|
+
--sld-checkbox-border-bottom-color: var(--sld-color-primary-darker, rgb(208, 191, 151));
|
|
12
|
+
--sld-checkbox-radius: var(--sld-radius-small);
|
|
13
|
+
--sld-checkbox-padding: 0 0.5rem;
|
|
14
|
+
--sld-checkbox-shadow: 0px 0px 3px 1px rgba(51, 51, 51, 0.1);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.checkbox {
|
|
18
|
+
@include slotui-mixins.data-hover;
|
|
19
|
+
@include slotui-mixins.ui-tall-presets;
|
|
20
|
+
@include slotui-mixins.ui-transition;
|
|
21
|
+
|
|
22
|
+
& {
|
|
23
|
+
appearance: none;
|
|
24
|
+
outline: none;
|
|
25
|
+
border: var(--sld-checkbox-border-width) solid var(--sld-checkbox-border-color);
|
|
26
|
+
border-radius: var(--sld-checkbox-radius);
|
|
27
|
+
background-clip: padding-box;
|
|
28
|
+
background-color: var(--sld-checkbox-background);
|
|
29
|
+
width: 1.7rem;
|
|
30
|
+
height: 1.7rem;
|
|
31
|
+
aspect-ratio: 1/1;
|
|
32
|
+
padding: 0;
|
|
33
|
+
margin: 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&:focus-visible {
|
|
37
|
+
box-shadow: var(--sld-checkbox-shadow);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&:hover {
|
|
41
|
+
background-color: var(--sld-color-primary-darken-mid);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&:active {
|
|
45
|
+
+ .svg {
|
|
46
|
+
color: var(--sld-color-secondary);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&:disabled {
|
|
51
|
+
border-color: #ccc;
|
|
52
|
+
background-color: #ededed;
|
|
53
|
+
pointer-events: none;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&:checked,
|
|
57
|
+
&:indeterminate {
|
|
58
|
+
background-color: var(--sld-checkbox-background-indeterminate);
|
|
59
|
+
|
|
60
|
+
&:hover {
|
|
61
|
+
background-color: var(--sld-checkbox-background-hover);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&:active,
|
|
65
|
+
&:focus {
|
|
66
|
+
background-color: var(--sld-checkbox-background-checked);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&:disabled,
|
|
70
|
+
&[disabled] {
|
|
71
|
+
border-color: #ccc;
|
|
72
|
+
background-color: #ededed;
|
|
73
|
+
pointer-events: none;
|
|
74
|
+
+ .svg {
|
|
75
|
+
color: #ededed;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.checkbox-root {
|
|
82
|
+
display: flex;
|
|
83
|
+
align-items: center;
|
|
84
|
+
-webkit-user-select: none;
|
|
85
|
+
user-select: none;
|
|
86
|
+
min-block-size: 32px;
|
|
87
|
+
gap: 0.5rem;
|
|
88
|
+
|
|
89
|
+
&.disabled > span {
|
|
90
|
+
color: #ededed;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.checkbox-container {
|
|
94
|
+
display: inline-flex;
|
|
95
|
+
justify-content: center;
|
|
96
|
+
position: relative;
|
|
97
|
+
.svg {
|
|
98
|
+
position: absolute;
|
|
99
|
+
color: white;
|
|
100
|
+
height: 100%;
|
|
101
|
+
width: 100%;
|
|
102
|
+
padding: 3px;
|
|
103
|
+
path {
|
|
104
|
+
transform-origin: center;
|
|
105
|
+
&-check {
|
|
106
|
+
transform: scale(1.1);
|
|
107
|
+
fill: white;
|
|
108
|
+
}
|
|
109
|
+
&-indeterminate {
|
|
110
|
+
transform: scale(1.1);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import Button from '../button/Button.svelte';
|
|
3
|
-
import Confirm from './Confirm.svelte';
|
|
4
|
-
|
|
5
|
-
import ComponentDemo from '../../base/demoer/DemoerComponent.svelte';
|
|
6
|
-
import Demoer from '../../base/demoer/Demoer.svelte';
|
|
7
|
-
import DemoPage from '../../base/demoer/DemoPage.svelte';
|
|
8
|
-
import { parameters, componentArgs } from './types.js';
|
|
9
|
-
|
|
10
|
-
let codeSlot = `
|
|
11
|
-
<Confirm {...activeParams}>
|
|
12
|
-
{#snippet confirmInitial()}
|
|
13
|
-
<Button icon="fa-solid:question" size="large">Would you please click once ?</Button>
|
|
14
|
-
{/snippet}
|
|
15
|
-
<Button type="submit" size="medium">confirm</Button>
|
|
16
|
-
</Confirm>`;
|
|
17
|
-
|
|
18
|
-
let codeProps = `
|
|
19
|
-
<Confirm
|
|
20
|
-
buttonInitial={{
|
|
21
|
-
icon: {icon:'fa-solid:question', size:'auto',color:'green'},
|
|
22
|
-
value: 'Would you please click me once ?',
|
|
23
|
-
ellipsis: true
|
|
24
|
-
}}
|
|
25
|
-
>
|
|
26
|
-
<Button type="submit" icon="fa-solid:check" >confirm</Button>
|
|
27
|
-
</Confirm>`;
|
|
28
|
-
</script>
|
|
29
|
-
|
|
30
|
-
<ComponentDemo
|
|
31
|
-
component="Confirm"
|
|
32
|
-
cite="Leaded by a proud walk, nothing can stop nobody to win the step ahead, should we confirm ?
|
|
33
|
-
<br />
|
|
34
|
-
V.Hugo 1850"
|
|
35
|
-
>
|
|
36
|
-
<div class="flex-v gap-large">
|
|
37
|
-
<DemoPage component="Chipper" code={codeSlot}>
|
|
38
|
-
<Demoer {parameters} {componentArgs}>
|
|
39
|
-
{#snippet children({ activeParams })}
|
|
40
|
-
<Confirm {...activeParams}
|
|
41
|
-
buttonInitial={{
|
|
42
|
-
icon: {icon:'fa-solid:question', size:'auto',color:'green'},
|
|
43
|
-
value: 'Would you please click me once ?',
|
|
44
|
-
ellipsis: true
|
|
45
|
-
}}
|
|
46
|
-
>
|
|
47
|
-
<Button type="submit" icon="fa-solid:check" >confirm</Button>
|
|
48
|
-
</Confirm>
|
|
49
|
-
{/snippet}
|
|
50
|
-
</Demoer>
|
|
51
|
-
</DemoPage>
|
|
52
|
-
<DemoPage title="Using props" component="Chipper" code={codeProps}>
|
|
53
|
-
<Demoer {parameters} {componentArgs}>
|
|
54
|
-
{#snippet children({ activeParams })}
|
|
55
|
-
<Confirm {...activeParams} primary="confirm deletion" />
|
|
56
|
-
{/snippet}
|
|
57
|
-
</Demoer>
|
|
58
|
-
</DemoPage>
|
|
59
|
-
</div>
|
|
60
|
-
</ComponentDemo>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import Button from '../button/Button.svelte';
|
|
3
|
+
import Confirm from './Confirm.svelte';
|
|
4
|
+
|
|
5
|
+
import ComponentDemo from '../../base/demoer/DemoerComponent.svelte';
|
|
6
|
+
import Demoer from '../../base/demoer/Demoer.svelte';
|
|
7
|
+
import DemoPage from '../../base/demoer/DemoPage.svelte';
|
|
8
|
+
import { parameters, componentArgs } from './types.js';
|
|
9
|
+
|
|
10
|
+
let codeSlot = `
|
|
11
|
+
<Confirm {...activeParams}>
|
|
12
|
+
{#snippet confirmInitial()}
|
|
13
|
+
<Button icon="fa-solid:question" size="large">Would you please click once ?</Button>
|
|
14
|
+
{/snippet}
|
|
15
|
+
<Button type="submit" size="medium">confirm</Button>
|
|
16
|
+
</Confirm>`;
|
|
17
|
+
|
|
18
|
+
let codeProps = `
|
|
19
|
+
<Confirm
|
|
20
|
+
buttonInitial={{
|
|
21
|
+
icon: {icon:'fa-solid:question', size:'auto',color:'green'},
|
|
22
|
+
value: 'Would you please click me once ?',
|
|
23
|
+
ellipsis: true
|
|
24
|
+
}}
|
|
25
|
+
>
|
|
26
|
+
<Button type="submit" icon="fa-solid:check" >confirm</Button>
|
|
27
|
+
</Confirm>`;
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<ComponentDemo
|
|
31
|
+
component="Confirm"
|
|
32
|
+
cite="Leaded by a proud walk, nothing can stop nobody to win the step ahead, should we confirm ?
|
|
33
|
+
<br />
|
|
34
|
+
V.Hugo 1850"
|
|
35
|
+
>
|
|
36
|
+
<div class="flex-v gap-large">
|
|
37
|
+
<DemoPage component="Chipper" code={codeSlot}>
|
|
38
|
+
<Demoer {parameters} {componentArgs}>
|
|
39
|
+
{#snippet children({ activeParams })}
|
|
40
|
+
<Confirm {...activeParams}
|
|
41
|
+
buttonInitial={{
|
|
42
|
+
icon: {icon:'fa-solid:question', size:'auto',color:'green'},
|
|
43
|
+
value: 'Would you please click me once ?',
|
|
44
|
+
ellipsis: true
|
|
45
|
+
}}
|
|
46
|
+
>
|
|
47
|
+
<Button type="submit" icon="fa-solid:check" >confirm</Button>
|
|
48
|
+
</Confirm>
|
|
49
|
+
{/snippet}
|
|
50
|
+
</Demoer>
|
|
51
|
+
</DemoPage>
|
|
52
|
+
<DemoPage title="Using props" component="Chipper" code={codeProps}>
|
|
53
|
+
<Demoer {parameters} {componentArgs}>
|
|
54
|
+
{#snippet children({ activeParams })}
|
|
55
|
+
<Confirm {...activeParams} primary="confirm deletion" />
|
|
56
|
+
{/snippet}
|
|
57
|
+
</Demoer>
|
|
58
|
+
</DemoPage>
|
|
59
|
+
</div>
|
|
60
|
+
</ComponentDemo>
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import Button from '../button/Button.svelte';
|
|
3
|
-
import Confirm from './Confirm.svelte';
|
|
4
|
-
</script>
|
|
5
|
-
|
|
6
|
-
<div>
|
|
7
|
-
<Confirm primary="confirm deletion">
|
|
8
|
-
{#snippet confirmInitial()}
|
|
9
|
-
<Button>delete</Button>
|
|
10
|
-
{/snippet}
|
|
11
|
-
|
|
12
|
-
<Button type="submit" width="auto">confirm</Button>
|
|
13
|
-
</Confirm>
|
|
14
|
-
</div>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import Button from '../button/Button.svelte';
|
|
3
|
+
import Confirm from './Confirm.svelte';
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<div>
|
|
7
|
+
<Confirm primary="confirm deletion">
|
|
8
|
+
{#snippet confirmInitial()}
|
|
9
|
+
<Button>delete</Button>
|
|
10
|
+
{/snippet}
|
|
11
|
+
|
|
12
|
+
<Button type="submit" width="auto">confirm</Button>
|
|
13
|
+
</Confirm>
|
|
14
|
+
</div>
|