@allxsmith/bestax-bulma 2.6.1 → 3.0.1
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 +2 -2
- package/dist/bestax.css +3 -0
- package/dist/bestax.css.map +1 -0
- package/dist/bestax.js +1 -0
- package/dist/extras.css +3 -0
- package/dist/extras.css.map +1 -0
- package/dist/extras.js +1 -0
- package/dist/index.cjs.js +6214 -647
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +6154 -649
- package/dist/index.esm.js.map +1 -1
- package/dist/types/components/Carousel.d.ts +34 -0
- package/dist/types/components/Collapse.d.ts +17 -0
- package/dist/types/components/Dialog.d.ts +47 -0
- package/dist/types/components/Loading.d.ts +18 -0
- package/dist/types/components/Navbar.d.ts +10 -0
- package/dist/types/components/Panel.d.ts +2 -4
- package/dist/types/components/Sidebar.d.ts +37 -0
- package/dist/types/components/Steps.d.ts +45 -0
- package/dist/types/components/Tabs.d.ts +42 -6
- package/dist/types/components/Toast.d.ts +46 -0
- package/dist/types/components/Tooltip.d.ts +22 -0
- package/dist/types/elements/Button.d.ts +1 -1
- package/dist/types/elements/Code.d.ts +9 -0
- package/dist/types/elements/Divider.d.ts +7 -0
- package/dist/types/elements/Emphasis.d.ts +9 -0
- package/dist/types/elements/Figure.d.ts +17 -0
- package/dist/types/elements/Icon.d.ts +1 -0
- package/dist/types/elements/Link.d.ts +10 -0
- package/dist/types/elements/LinkButton.d.ts +8 -0
- package/dist/types/elements/ListItem.d.ts +9 -0
- package/dist/types/elements/Notification.d.ts +31 -0
- package/dist/types/elements/OrderedList.d.ts +9 -0
- package/dist/types/elements/Paragraph.d.ts +9 -0
- package/dist/types/elements/Pre.d.ts +9 -0
- package/dist/types/elements/Span.d.ts +9 -0
- package/dist/types/elements/Strong.d.ts +9 -0
- package/dist/types/elements/UnorderedList.d.ts +9 -0
- package/dist/types/form/Autocomplete.d.ts +42 -0
- package/dist/types/form/Checkbox.d.ts +7 -2
- package/dist/types/form/Checkboxes.d.ts +6 -1
- package/dist/types/form/DateInput.d.ts +26 -0
- package/dist/types/form/DateInputBase.d.ts +42 -0
- package/dist/types/form/DateTimeInput.d.ts +26 -0
- package/dist/types/form/DateTimeInputBase.d.ts +50 -0
- package/dist/types/form/Field.d.ts +2 -1
- package/dist/types/form/File.d.ts +3 -2
- package/dist/types/form/FormContext.d.ts +22 -0
- package/dist/types/form/Input.d.ts +22 -11
- package/dist/types/form/InputBase.d.ts +16 -0
- package/dist/types/form/Numberinput.d.ts +30 -0
- package/dist/types/form/Radio.d.ts +7 -2
- package/dist/types/form/Radios.d.ts +6 -1
- package/dist/types/form/Rate.d.ts +38 -0
- package/dist/types/form/Select.d.ts +18 -11
- package/dist/types/form/SelectBase.d.ts +19 -0
- package/dist/types/form/Slider.d.ts +49 -0
- package/dist/types/form/Switch.d.ts +17 -0
- package/dist/types/form/Taginput.d.ts +54 -0
- package/dist/types/form/TextArea.d.ts +13 -14
- package/dist/types/form/TextAreaBase.d.ts +19 -0
- package/dist/types/form/TimeInput.d.ts +26 -0
- package/dist/types/form/TimeInputBase.d.ts +44 -0
- package/dist/types/form/_pickerInternals/Calendar.d.ts +26 -0
- package/dist/types/form/_pickerInternals/PickerPopover.d.ts +20 -0
- package/dist/types/form/_pickerInternals/TimeWheels.d.ts +29 -0
- package/dist/types/form/_pickerInternals/audioTick.d.ts +3 -0
- package/dist/types/form/_pickerInternals/dateUtils.d.ts +39 -0
- package/dist/types/form/_pickerInternals/formatters.d.ts +13 -0
- package/dist/types/form/_pickerInternals/haptics.d.ts +1 -0
- package/dist/types/form/_pickerInternals/pickerTypes.d.ts +31 -0
- package/dist/types/form/_pickerInternals/segmentMap.d.ts +20 -0
- package/dist/types/form/_pickerInternals/useFocusTrap.d.ts +7 -0
- package/dist/types/form/_pickerInternals/useNativeMobilePicker.d.ts +10 -0
- package/dist/types/form/_pickerInternals/useSegmentedEntry.d.ts +45 -0
- package/dist/types/form/fieldProps.d.ts +12 -0
- package/dist/types/helpers/bulmaClassHelpers.d.ts +35 -0
- package/dist/types/helpers/useBulmaClasses.d.ts +16 -83
- package/dist/types/helpers/useColorClasses.d.ts +8 -0
- package/dist/types/helpers/useFlexboxClasses.d.ts +12 -0
- package/dist/types/helpers/useOtherClasses.d.ts +15 -0
- package/dist/types/helpers/useSpacingClasses.d.ts +18 -0
- package/dist/types/helpers/useTypographyClasses.d.ts +19 -0
- package/dist/types/helpers/useVisibilityClasses.d.ts +10 -0
- package/dist/types/index.d.ts +53 -3
- package/dist/versions/bestax-bulma-prefixed.css +3 -0
- package/dist/versions/bestax-bulma-prefixed.css.map +1 -0
- package/dist/versions/bestax-bulma-prefixed.js +1 -0
- package/dist/versions/bestax-no-dark-mode.css +3 -0
- package/dist/versions/bestax-no-dark-mode.css.map +1 -0
- package/dist/versions/bestax-no-dark-mode.js +1 -0
- package/dist/versions/bestax-no-helpers-prefixed.css +3 -0
- package/dist/versions/bestax-no-helpers-prefixed.css.map +1 -0
- package/dist/versions/bestax-no-helpers-prefixed.js +1 -0
- package/dist/versions/bestax-no-helpers.css +3 -0
- package/dist/versions/bestax-no-helpers.css.map +1 -0
- package/dist/versions/bestax-no-helpers.js +1 -0
- package/dist/versions/bestax-prefixed.css +3 -0
- package/dist/versions/bestax-prefixed.css.map +1 -0
- package/dist/versions/bestax-prefixed.js +1 -0
- package/package.json +100 -21
- package/src/scss/_mixins.scss +215 -0
- package/src/scss/_variables.scss +94 -0
- package/src/scss/bestax.scss +18 -0
- package/src/scss/components/_carousel.scss +580 -0
- package/src/scss/components/_collapse.scss +126 -0
- package/src/scss/components/_dialog.scss +134 -0
- package/src/scss/components/_index.scss +13 -0
- package/src/scss/components/_loading.scss +231 -0
- package/src/scss/components/_sidebar.scss +347 -0
- package/src/scss/components/_steps.scss +459 -0
- package/src/scss/components/_tabs.scss +147 -0
- package/src/scss/components/_toast.scss +244 -0
- package/src/scss/components/_tooltip.scss +250 -0
- package/src/scss/elements/_index.scss +5 -0
- package/src/scss/elements/_linkbutton.scss +77 -0
- package/src/scss/extras.scss +24 -0
- package/src/scss/form/_autocomplete.scss +261 -0
- package/src/scss/form/_checkbox.scss +217 -0
- package/src/scss/form/_dateinput.scss +292 -0
- package/src/scss/form/_datetimeinput.scss +191 -0
- package/src/scss/form/_index.scss +16 -0
- package/src/scss/form/_numberinput.scss +176 -0
- package/src/scss/form/_picker-popover.scss +185 -0
- package/src/scss/form/_radio.scss +196 -0
- package/src/scss/form/_rate.scss +307 -0
- package/src/scss/form/_slider.scss +630 -0
- package/src/scss/form/_switch.scss +314 -0
- package/src/scss/form/_taginput.scss +356 -0
- package/src/scss/form/_timeinput.scss +374 -0
- package/src/scss/helpers/_cursor.scss +5 -0
- package/src/scss/helpers/_index.scss +2 -0
- package/src/scss/helpers/_sizing.scss +5 -0
- package/src/scss/versions/bestax-bulma-prefixed.scss +15 -0
- package/src/scss/versions/bestax-no-dark-mode.scss +32 -0
- package/src/scss/versions/bestax-no-helpers-prefixed.scss +22 -0
- package/src/scss/versions/bestax-no-helpers.scss +23 -0
- package/src/scss/versions/bestax-prefixed.scss +15 -0
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
// Collapse Component Styles
|
|
2
|
+
// An expandable/collapsible content panel
|
|
3
|
+
|
|
4
|
+
@use "bulma/sass/utilities/initial-variables" as iv;
|
|
5
|
+
@use "bulma/sass/utilities/css-variables" as cv;
|
|
6
|
+
@use '../mixins' as *;
|
|
7
|
+
|
|
8
|
+
// Collapse-specific SCSS variables
|
|
9
|
+
$collapse-margin-bottom: 0.5rem !default;
|
|
10
|
+
$collapse-border-color: cv.getVar("border") !default;
|
|
11
|
+
$collapse-radius: cv.getVar("radius") !default;
|
|
12
|
+
$collapse-trigger-icon-size: 1.5em !default;
|
|
13
|
+
$collapse-trigger-icon-margin: 0.5em !default;
|
|
14
|
+
$collapse-header-weight: cv.getVar("weight-semibold") !default;
|
|
15
|
+
$collapse-group-gap: 0.5rem !default;
|
|
16
|
+
|
|
17
|
+
.#{iv.$class-prefix}collapse {
|
|
18
|
+
@include cv.register-vars(
|
|
19
|
+
(
|
|
20
|
+
"collapse-margin-bottom": #{$collapse-margin-bottom},
|
|
21
|
+
"collapse-border-color": #{$collapse-border-color},
|
|
22
|
+
"collapse-radius": #{$collapse-radius},
|
|
23
|
+
"collapse-trigger-icon-size": #{$collapse-trigger-icon-size},
|
|
24
|
+
"collapse-trigger-icon-margin": #{$collapse-trigger-icon-margin},
|
|
25
|
+
"collapse-header-weight": #{$collapse-header-weight},
|
|
26
|
+
"collapse-group-gap": #{$collapse-group-gap},
|
|
27
|
+
)
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.#{iv.$class-prefix}collapse {
|
|
32
|
+
margin-bottom: cv.getVar("collapse-margin-bottom");
|
|
33
|
+
|
|
34
|
+
&:last-child {
|
|
35
|
+
margin-bottom: 0;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.#{iv.$class-prefix}collapse-trigger {
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
user-select: none;
|
|
42
|
+
|
|
43
|
+
&:focus {
|
|
44
|
+
outline: none;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&:focus-visible {
|
|
48
|
+
@include extras-focus-outline;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Bordered collapse
|
|
53
|
+
.#{iv.$class-prefix}collapse.#{iv.$class-prefix}is-bordered {
|
|
54
|
+
border: 1px solid cv.getVar("collapse-border-color");
|
|
55
|
+
border-radius: cv.getVar("collapse-radius");
|
|
56
|
+
|
|
57
|
+
.#{iv.$class-prefix}collapse-trigger {
|
|
58
|
+
border-bottom: 1px solid transparent;
|
|
59
|
+
@include extras-transition(border-color);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&.#{iv.$class-prefix}is-active .#{iv.$class-prefix}collapse-trigger {
|
|
63
|
+
border-bottom-color: cv.getVar("collapse-border-color");
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Collapse with icon indicator
|
|
68
|
+
.#{iv.$class-prefix}collapse-trigger-icon {
|
|
69
|
+
display: inline-flex;
|
|
70
|
+
align-items: center;
|
|
71
|
+
justify-content: center;
|
|
72
|
+
width: cv.getVar("collapse-trigger-icon-size");
|
|
73
|
+
height: cv.getVar("collapse-trigger-icon-size");
|
|
74
|
+
margin-right: cv.getVar("collapse-trigger-icon-margin");
|
|
75
|
+
@include extras-transition(transform);
|
|
76
|
+
|
|
77
|
+
.#{iv.$class-prefix}collapse.#{iv.$class-prefix}is-active & {
|
|
78
|
+
transform: rotate(90deg);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// Alternative rotation for caret-down style icons
|
|
83
|
+
.#{iv.$class-prefix}collapse-trigger-icon.#{iv.$class-prefix}is-rotated-down {
|
|
84
|
+
.#{iv.$class-prefix}collapse.#{iv.$class-prefix}is-active & {
|
|
85
|
+
transform: rotate(180deg);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Full width header trigger
|
|
90
|
+
.#{iv.$class-prefix}collapse-trigger-header {
|
|
91
|
+
display: flex;
|
|
92
|
+
align-items: center;
|
|
93
|
+
justify-content: space-between;
|
|
94
|
+
width: 100%;
|
|
95
|
+
font-weight: cv.getVar("collapse-header-weight");
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// Accordion group (multiple collapses)
|
|
99
|
+
.#{iv.$class-prefix}collapses {
|
|
100
|
+
display: flex;
|
|
101
|
+
flex-direction: column;
|
|
102
|
+
gap: cv.getVar("collapse-group-gap");
|
|
103
|
+
|
|
104
|
+
&.#{iv.$class-prefix}is-seamless {
|
|
105
|
+
gap: 0;
|
|
106
|
+
|
|
107
|
+
.#{iv.$class-prefix}collapse {
|
|
108
|
+
margin-bottom: 0;
|
|
109
|
+
border-radius: 0;
|
|
110
|
+
|
|
111
|
+
&:first-child {
|
|
112
|
+
border-top-left-radius: cv.getVar("collapse-radius");
|
|
113
|
+
border-top-right-radius: cv.getVar("collapse-radius");
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
&:last-child {
|
|
117
|
+
border-bottom-left-radius: cv.getVar("collapse-radius");
|
|
118
|
+
border-bottom-right-radius: cv.getVar("collapse-radius");
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&:not(:last-child) {
|
|
122
|
+
border-bottom: none;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
// Dialog component styles
|
|
2
|
+
@use "bulma/sass/utilities/initial-variables" as iv;
|
|
3
|
+
@use "bulma/sass/utilities/css-variables" as cv;
|
|
4
|
+
|
|
5
|
+
// Dialog-specific SCSS variables
|
|
6
|
+
$dialog-width: 420px !default;
|
|
7
|
+
$dialog-max-width: 90% !default;
|
|
8
|
+
$dialog-radius: cv.getVar("radius") !default;
|
|
9
|
+
$dialog-background: cv.getVar("scheme-main") !default;
|
|
10
|
+
$dialog-shadow: 0 8px 24px hsla(0, 0%, 0%, 0.2) !default;
|
|
11
|
+
$dialog-header-padding: 1rem 1.25rem !default;
|
|
12
|
+
$dialog-body-padding: 1.25rem !default;
|
|
13
|
+
$dialog-body-color: cv.getVar("text") !default;
|
|
14
|
+
$dialog-body-line-height: 1.5 !default;
|
|
15
|
+
$dialog-footer-padding: 1rem 1.25rem !default;
|
|
16
|
+
$dialog-footer-gap: 0.75rem !default;
|
|
17
|
+
$dialog-border-color: cv.getVar("border") !default;
|
|
18
|
+
$dialog-title-size: cv.getVar("size-5") !default;
|
|
19
|
+
$dialog-title-weight: cv.getVar("weight-semibold") !default;
|
|
20
|
+
$dialog-title-color: cv.getVar("text-strong") !default;
|
|
21
|
+
$dialog-icon-size: 1.5rem !default;
|
|
22
|
+
$dialog-icon-margin: 0.75rem !default;
|
|
23
|
+
$dialog-animation-duration: 0.2s !default;
|
|
24
|
+
|
|
25
|
+
.#{iv.$class-prefix}dialog {
|
|
26
|
+
@include cv.register-vars(
|
|
27
|
+
(
|
|
28
|
+
"dialog-width": #{$dialog-width},
|
|
29
|
+
"dialog-max-width": #{$dialog-max-width},
|
|
30
|
+
"dialog-radius": #{$dialog-radius},
|
|
31
|
+
"dialog-background": #{$dialog-background},
|
|
32
|
+
"dialog-shadow": #{$dialog-shadow},
|
|
33
|
+
"dialog-header-padding": #{$dialog-header-padding},
|
|
34
|
+
"dialog-body-padding": #{$dialog-body-padding},
|
|
35
|
+
"dialog-body-color": #{$dialog-body-color},
|
|
36
|
+
"dialog-body-line-height": #{$dialog-body-line-height},
|
|
37
|
+
"dialog-footer-padding": #{$dialog-footer-padding},
|
|
38
|
+
"dialog-footer-gap": #{$dialog-footer-gap},
|
|
39
|
+
"dialog-border-color": #{$dialog-border-color},
|
|
40
|
+
"dialog-title-size": #{$dialog-title-size},
|
|
41
|
+
"dialog-title-weight": #{$dialog-title-weight},
|
|
42
|
+
"dialog-title-color": #{$dialog-title-color},
|
|
43
|
+
"dialog-icon-size": #{$dialog-icon-size},
|
|
44
|
+
"dialog-icon-margin": #{$dialog-icon-margin},
|
|
45
|
+
"dialog-animation-duration": #{$dialog-animation-duration},
|
|
46
|
+
)
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.#{iv.$class-prefix}dialog {
|
|
51
|
+
position: relative;
|
|
52
|
+
background-color: cv.getVar("dialog-background");
|
|
53
|
+
border-radius: cv.getVar("dialog-radius");
|
|
54
|
+
box-shadow: cv.getVar("dialog-shadow");
|
|
55
|
+
max-width: cv.getVar("dialog-max-width");
|
|
56
|
+
width: cv.getVar("dialog-width");
|
|
57
|
+
animation: dialog-scale-in cv.getVar("dialog-animation-duration") ease;
|
|
58
|
+
outline: none;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.#{iv.$class-prefix}dialog-header {
|
|
62
|
+
display: flex;
|
|
63
|
+
align-items: center;
|
|
64
|
+
padding: cv.getVar("dialog-header-padding");
|
|
65
|
+
border-bottom: 1px solid cv.getVar("dialog-border-color");
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.#{iv.$class-prefix}dialog-title {
|
|
69
|
+
font-size: cv.getVar("dialog-title-size");
|
|
70
|
+
font-weight: cv.getVar("dialog-title-weight");
|
|
71
|
+
color: cv.getVar("dialog-title-color");
|
|
72
|
+
margin: 0;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.#{iv.$class-prefix}dialog-body {
|
|
76
|
+
padding: cv.getVar("dialog-body-padding");
|
|
77
|
+
color: cv.getVar("dialog-body-color");
|
|
78
|
+
line-height: cv.getVar("dialog-body-line-height");
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.#{iv.$class-prefix}dialog-footer {
|
|
82
|
+
display: flex;
|
|
83
|
+
gap: cv.getVar("dialog-footer-gap");
|
|
84
|
+
justify-content: flex-end;
|
|
85
|
+
padding: cv.getVar("dialog-footer-padding");
|
|
86
|
+
border-top: 1px solid cv.getVar("dialog-border-color");
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Dialog type variants with icons
|
|
90
|
+
.#{iv.$class-prefix}dialog.#{iv.$class-prefix}is-success .#{iv.$class-prefix}dialog-header {
|
|
91
|
+
color: cv.getVar("success");
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.#{iv.$class-prefix}dialog.#{iv.$class-prefix}is-danger .#{iv.$class-prefix}dialog-header {
|
|
95
|
+
color: cv.getVar("danger");
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.#{iv.$class-prefix}dialog.#{iv.$class-prefix}is-warning .#{iv.$class-prefix}dialog-header {
|
|
99
|
+
color: cv.getVar("warning");
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.#{iv.$class-prefix}dialog.#{iv.$class-prefix}is-info .#{iv.$class-prefix}dialog-header {
|
|
103
|
+
color: cv.getVar("info");
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// Dialog icon
|
|
107
|
+
.#{iv.$class-prefix}dialog-icon {
|
|
108
|
+
display: flex;
|
|
109
|
+
align-items: center;
|
|
110
|
+
margin-right: cv.getVar("dialog-icon-margin");
|
|
111
|
+
|
|
112
|
+
svg {
|
|
113
|
+
width: cv.getVar("dialog-icon-size");
|
|
114
|
+
height: cv.getVar("dialog-icon-size");
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@keyframes dialog-scale-in {
|
|
119
|
+
from {
|
|
120
|
+
opacity: 0;
|
|
121
|
+
transform: scale(0.95);
|
|
122
|
+
}
|
|
123
|
+
to {
|
|
124
|
+
opacity: 1;
|
|
125
|
+
transform: scale(1);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// Reduced motion
|
|
130
|
+
@media (prefers-reduced-motion: reduce) {
|
|
131
|
+
.#{iv.$class-prefix}dialog {
|
|
132
|
+
animation: none;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Bestax Extras - Component Styles Index
|
|
2
|
+
// Import all component partials here
|
|
3
|
+
|
|
4
|
+
// UI Components
|
|
5
|
+
@use 'loading';
|
|
6
|
+
@use 'collapse';
|
|
7
|
+
@use 'tooltip';
|
|
8
|
+
@use 'steps';
|
|
9
|
+
@use 'sidebar';
|
|
10
|
+
@use 'toast';
|
|
11
|
+
@use 'dialog';
|
|
12
|
+
@use 'carousel';
|
|
13
|
+
@use 'tabs';
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
// Loading Component Styles
|
|
2
|
+
// A loading overlay with spinner animation
|
|
3
|
+
|
|
4
|
+
@use "bulma/sass/utilities/initial-variables" as iv;
|
|
5
|
+
@use "bulma/sass/utilities/css-variables" as cv;
|
|
6
|
+
@use '../variables' as *;
|
|
7
|
+
@use '../mixins' as *;
|
|
8
|
+
|
|
9
|
+
// Loading-specific SCSS variables
|
|
10
|
+
$loading-overlay-background: cv.getVar("scheme-main") !default;
|
|
11
|
+
$loading-overlay-opacity: 0.7 !default;
|
|
12
|
+
$loading-overlay-fullpage-opacity: 0.8 !default;
|
|
13
|
+
$loading-overlay-opacity-light: 0.4 !default;
|
|
14
|
+
$loading-overlay-opacity-dark: 0.85 !default;
|
|
15
|
+
$loading-overlay-opacity-opaque: 1 !default;
|
|
16
|
+
$loading-icon-size: 4.5em !default;
|
|
17
|
+
$loading-icon-size-small: 3em !default;
|
|
18
|
+
$loading-icon-size-medium: 6em !default;
|
|
19
|
+
$loading-icon-size-large: 7.5em !default;
|
|
20
|
+
$loading-icon-border-width: 0.25em !default;
|
|
21
|
+
$loading-icon-border-width-small: 0.2em !default;
|
|
22
|
+
$loading-icon-border-width-medium: 0.3em !default;
|
|
23
|
+
$loading-icon-border-width-large: 0.375em !default;
|
|
24
|
+
$loading-icon-spin-color: cv.getVar("grey-light") !default;
|
|
25
|
+
$loading-text-color: cv.getVar("text") !default;
|
|
26
|
+
$loading-text-size: cv.getVar("size-normal") !default;
|
|
27
|
+
$loading-content-gap: 1rem !default;
|
|
28
|
+
$loading-cancel-color: cv.getVar("text-light") !default;
|
|
29
|
+
$loading-cancel-border-color: cv.getVar("border") !default;
|
|
30
|
+
$loading-cancel-background: cv.getVar("scheme-main") !default;
|
|
31
|
+
$loading-cancel-hover-color: cv.getVar("text") !default;
|
|
32
|
+
$loading-cancel-hover-border-color: cv.getVar("text-light") !default;
|
|
33
|
+
$loading-cancel-radius: cv.getVar("radius") !default;
|
|
34
|
+
$loading-cancel-size: cv.getVar("size-small") !default;
|
|
35
|
+
$loading-animation-duration: 0.75s !default;
|
|
36
|
+
|
|
37
|
+
// Register CSS variables
|
|
38
|
+
.#{iv.$class-prefix}loading {
|
|
39
|
+
@include cv.register-vars(
|
|
40
|
+
(
|
|
41
|
+
"loading-overlay-background": #{$loading-overlay-background},
|
|
42
|
+
"loading-overlay-opacity": #{$loading-overlay-opacity},
|
|
43
|
+
"loading-overlay-fullpage-opacity": #{$loading-overlay-fullpage-opacity},
|
|
44
|
+
"loading-overlay-opacity-light": #{$loading-overlay-opacity-light},
|
|
45
|
+
"loading-overlay-opacity-dark": #{$loading-overlay-opacity-dark},
|
|
46
|
+
"loading-overlay-opacity-opaque": #{$loading-overlay-opacity-opaque},
|
|
47
|
+
"loading-icon-size": #{$loading-icon-size},
|
|
48
|
+
"loading-icon-size-small": #{$loading-icon-size-small},
|
|
49
|
+
"loading-icon-size-medium": #{$loading-icon-size-medium},
|
|
50
|
+
"loading-icon-size-large": #{$loading-icon-size-large},
|
|
51
|
+
"loading-icon-border-width": #{$loading-icon-border-width},
|
|
52
|
+
"loading-icon-border-width-small": #{$loading-icon-border-width-small},
|
|
53
|
+
"loading-icon-border-width-medium": #{$loading-icon-border-width-medium},
|
|
54
|
+
"loading-icon-border-width-large": #{$loading-icon-border-width-large},
|
|
55
|
+
"loading-icon-spin-color": #{$loading-icon-spin-color},
|
|
56
|
+
"loading-text-color": #{$loading-text-color},
|
|
57
|
+
"loading-text-size": #{$loading-text-size},
|
|
58
|
+
"loading-content-gap": #{$loading-content-gap},
|
|
59
|
+
"loading-cancel-color": #{$loading-cancel-color},
|
|
60
|
+
"loading-cancel-border-color": #{$loading-cancel-border-color},
|
|
61
|
+
"loading-cancel-background": #{$loading-cancel-background},
|
|
62
|
+
"loading-cancel-hover-color": #{$loading-cancel-hover-color},
|
|
63
|
+
"loading-cancel-hover-border-color": #{$loading-cancel-hover-border-color},
|
|
64
|
+
"loading-cancel-radius": #{$loading-cancel-radius},
|
|
65
|
+
"loading-cancel-size": #{$loading-cancel-size},
|
|
66
|
+
"loading-animation-duration": #{$loading-animation-duration},
|
|
67
|
+
)
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Main loading container
|
|
72
|
+
.#{iv.$class-prefix}loading {
|
|
73
|
+
position: absolute;
|
|
74
|
+
top: 0;
|
|
75
|
+
left: 0;
|
|
76
|
+
right: 0;
|
|
77
|
+
bottom: 0;
|
|
78
|
+
display: none;
|
|
79
|
+
align-items: center;
|
|
80
|
+
justify-content: center;
|
|
81
|
+
z-index: $extras-z-index-modal;
|
|
82
|
+
|
|
83
|
+
&.#{iv.$class-prefix}is-active {
|
|
84
|
+
display: flex;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&.#{iv.$class-prefix}is-full-page {
|
|
88
|
+
position: fixed;
|
|
89
|
+
z-index: $extras-z-index-modal + 10;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&.#{iv.$class-prefix}is-cancelable {
|
|
93
|
+
.#{iv.$class-prefix}loading-overlay {
|
|
94
|
+
cursor: pointer;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// Overlay backdrop
|
|
100
|
+
.#{iv.$class-prefix}loading-overlay {
|
|
101
|
+
position: absolute;
|
|
102
|
+
top: 0;
|
|
103
|
+
left: 0;
|
|
104
|
+
right: 0;
|
|
105
|
+
bottom: 0;
|
|
106
|
+
background-color: cv.getVar("loading-overlay-background");
|
|
107
|
+
opacity: cv.getVar("loading-overlay-opacity");
|
|
108
|
+
|
|
109
|
+
.#{iv.$class-prefix}loading.#{iv.$class-prefix}is-full-page & {
|
|
110
|
+
opacity: cv.getVar("loading-overlay-fullpage-opacity");
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// Content wrapper
|
|
115
|
+
.#{iv.$class-prefix}loading-content {
|
|
116
|
+
position: relative;
|
|
117
|
+
display: flex;
|
|
118
|
+
flex-direction: column;
|
|
119
|
+
align-items: center;
|
|
120
|
+
gap: cv.getVar("loading-content-gap");
|
|
121
|
+
z-index: 1;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// Spinner icon — 82.5% arc via conic-gradient, ring via radial mask
|
|
125
|
+
.#{iv.$class-prefix}loading-icon {
|
|
126
|
+
display: inline-block;
|
|
127
|
+
width: cv.getVar("loading-icon-size");
|
|
128
|
+
height: cv.getVar("loading-icon-size");
|
|
129
|
+
border-radius: 50%;
|
|
130
|
+
background: conic-gradient(
|
|
131
|
+
#{cv.getVar("loading-icon-spin-color")} 0deg,
|
|
132
|
+
#{cv.getVar("loading-icon-spin-color")} 297deg,
|
|
133
|
+
transparent 297deg
|
|
134
|
+
);
|
|
135
|
+
-webkit-mask: radial-gradient(
|
|
136
|
+
circle farthest-side,
|
|
137
|
+
transparent calc(100% - #{cv.getVar("loading-icon-border-width")}),
|
|
138
|
+
black calc(100% - #{cv.getVar("loading-icon-border-width")})
|
|
139
|
+
);
|
|
140
|
+
mask: radial-gradient(
|
|
141
|
+
circle farthest-side,
|
|
142
|
+
transparent calc(100% - #{cv.getVar("loading-icon-border-width")}),
|
|
143
|
+
black calc(100% - #{cv.getVar("loading-icon-border-width")})
|
|
144
|
+
);
|
|
145
|
+
animation: extras-spin cv.getVar("loading-animation-duration") infinite linear;
|
|
146
|
+
|
|
147
|
+
&.#{iv.$class-prefix}is-small {
|
|
148
|
+
width: cv.getVar("loading-icon-size-small");
|
|
149
|
+
height: cv.getVar("loading-icon-size-small");
|
|
150
|
+
@include cv.register-vars(("loading-icon-border-width": #{$loading-icon-border-width-small}));
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
&.#{iv.$class-prefix}is-medium {
|
|
154
|
+
width: cv.getVar("loading-icon-size-medium");
|
|
155
|
+
height: cv.getVar("loading-icon-size-medium");
|
|
156
|
+
@include cv.register-vars(("loading-icon-border-width": #{$loading-icon-border-width-medium}));
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
&.#{iv.$class-prefix}is-large {
|
|
160
|
+
width: cv.getVar("loading-icon-size-large");
|
|
161
|
+
height: cv.getVar("loading-icon-size-large");
|
|
162
|
+
@include cv.register-vars(("loading-icon-border-width": #{$loading-icon-border-width-large}));
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// Custom icon container — spins user-provided static content
|
|
167
|
+
.#{iv.$class-prefix}loading-icon-custom {
|
|
168
|
+
display: flex;
|
|
169
|
+
align-items: center;
|
|
170
|
+
justify-content: center;
|
|
171
|
+
animation: extras-spin cv.getVar("loading-animation-duration") infinite linear;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// Loading text
|
|
175
|
+
.#{iv.$class-prefix}loading-text {
|
|
176
|
+
font-size: cv.getVar("loading-text-size");
|
|
177
|
+
color: cv.getVar("loading-text-color");
|
|
178
|
+
text-align: center;
|
|
179
|
+
white-space: nowrap;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// Cancel button
|
|
183
|
+
.#{iv.$class-prefix}loading-cancel {
|
|
184
|
+
@include extras-button-reset;
|
|
185
|
+
padding: 0.5em 1em;
|
|
186
|
+
font-size: cv.getVar("loading-cancel-size");
|
|
187
|
+
color: cv.getVar("loading-cancel-color");
|
|
188
|
+
border: 1px solid cv.getVar("loading-cancel-border-color");
|
|
189
|
+
border-radius: cv.getVar("loading-cancel-radius");
|
|
190
|
+
background-color: cv.getVar("loading-cancel-background");
|
|
191
|
+
@include extras-transition(border-color, color);
|
|
192
|
+
|
|
193
|
+
&:hover {
|
|
194
|
+
border-color: cv.getVar("loading-cancel-hover-border-color");
|
|
195
|
+
color: cv.getVar("loading-cancel-hover-color");
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
&:focus {
|
|
199
|
+
@include extras-focus-outline;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// Overlay opacity variants
|
|
204
|
+
@each $name in light, dark, opaque {
|
|
205
|
+
.#{iv.$class-prefix}loading.#{iv.$class-prefix}is-#{$name} {
|
|
206
|
+
@include cv.register-vars(
|
|
207
|
+
(
|
|
208
|
+
"loading-overlay-opacity": #{cv.getVar("loading-overlay-opacity-#{$name}")},
|
|
209
|
+
)
|
|
210
|
+
);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// Color variants — override spinner color
|
|
215
|
+
@each $name in primary, link, info, success, warning, danger {
|
|
216
|
+
.#{iv.$class-prefix}loading.#{iv.$class-prefix}is-#{$name} {
|
|
217
|
+
@include cv.register-vars(
|
|
218
|
+
(
|
|
219
|
+
"loading-icon-spin-color": #{cv.getVar($name)},
|
|
220
|
+
)
|
|
221
|
+
);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
// Reduced motion
|
|
226
|
+
@media (prefers-reduced-motion: reduce) {
|
|
227
|
+
.#{iv.$class-prefix}loading-icon,
|
|
228
|
+
.#{iv.$class-prefix}loading-icon-custom {
|
|
229
|
+
animation: none;
|
|
230
|
+
}
|
|
231
|
+
}
|