@adnap/krysalicss 0.0.1 → 0.1.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 +23 -5
- package/dist/element/badge.css +30 -0
- package/dist/element/badge.min.css +1 -1
- package/dist/element/box.css +193 -0
- package/dist/element/box.min.css +1 -0
- package/dist/element/button.css +4 -0
- package/dist/element/button.min.css +1 -1
- package/dist/element/divider.css +155 -0
- package/dist/element/divider.min.css +1 -0
- package/dist/element/image.css +434 -0
- package/dist/element/image.min.css +1 -0
- package/dist/element/range.css +2 -2
- package/dist/element/spinner.css +190 -0
- package/dist/element/spinner.min.css +1 -0
- package/dist/helper/border.css +141 -0
- package/dist/helper/border.min.css +1 -0
- package/dist/helper/color.css +203 -0
- package/dist/helper/color.min.css +1 -0
- package/dist/helper/flex.css +277 -0
- package/dist/helper/flex.min.css +1 -0
- package/dist/helper/font-size.css +137 -0
- package/dist/helper/font-size.min.css +1 -0
- package/dist/helper/interactions.css +142 -0
- package/dist/helper/interactions.min.css +1 -0
- package/dist/helper/line-height.css +129 -0
- package/dist/helper/line-height.min.css +1 -0
- package/dist/helper/object-fit.css +133 -0
- package/dist/helper/object-fit.min.css +1 -0
- package/dist/helper/overflow.css +165 -0
- package/dist/helper/overflow.min.css +1 -0
- package/dist/helper/position.css +157 -0
- package/dist/helper/position.min.css +1 -0
- package/dist/helper/ratio.css +142 -0
- package/dist/helper/ratio.min.css +1 -0
- package/dist/helper/shadow.css +129 -0
- package/dist/helper/shadow.min.css +1 -0
- package/dist/helper/sizing.css +177 -0
- package/dist/helper/sizing.min.css +1 -0
- package/dist/helper/spacing.css +563 -0
- package/dist/helper/spacing.min.css +1 -0
- package/dist/helper/stack.css +127 -0
- package/dist/helper/stack.min.css +1 -0
- package/dist/helper/text.css +243 -0
- package/dist/helper/text.min.css +1 -0
- package/dist/helper/tooltip.css +174 -0
- package/dist/helper/tooltip.min.css +1 -0
- package/dist/helper/visibility.css +334 -0
- package/dist/helper/visibility.min.css +1 -0
- package/dist/krysalicss.css +3491 -414
- package/dist/krysalicss.css.map +1 -1
- package/dist/krysalicss.min.css +1 -1
- package/dist/layout/footer.css +155 -0
- package/dist/layout/footer.min.css +1 -0
- package/dist/layout/hero.css +177 -0
- package/dist/layout/hero.min.css +1 -0
- package/dist/module/alert.css +30 -0
- package/dist/module/alert.min.css +1 -1
- package/dist/module/breadcrumb.css +163 -0
- package/dist/module/breadcrumb.min.css +1 -0
- package/dist/module/buttons.css +158 -0
- package/dist/module/buttons.min.css +1 -0
- package/dist/module/card.css +89 -0
- package/dist/module/card.min.css +1 -1
- package/dist/module/dropdown.css +253 -0
- package/dist/module/dropdown.min.css +1 -0
- package/dist/module/navbar.css +1 -1
- package/dist/module/navbar.min.css +1 -1
- package/dist/module/pagination.css +301 -0
- package/dist/module/pagination.min.css +1 -0
- package/dist/module/popover.css +272 -0
- package/dist/module/popover.min.css +1 -0
- package/dist/module/section.css +138 -0
- package/dist/module/section.min.css +1 -0
- package/dist/module/toast.css +307 -0
- package/dist/module/toast.min.css +1 -0
- package/dist/scss-api.json +4672 -0
- package/dist/typography/blockquote.css +128 -0
- package/dist/typography/blockquote.min.css +1 -0
- package/dist/typography/figure.css +132 -0
- package/dist/typography/figure.min.css +1 -0
- package/dist/typography/lead.css +119 -0
- package/dist/typography/lead.min.css +1 -0
- package/dist/typography/list.css +125 -0
- package/dist/typography/list.min.css +1 -0
- package/package.json +8 -2
- package/src/base/global/_plugin.scss +2 -0
- package/src/base/reset/_plugin.scss +2 -0
- package/src/base/reset/_variables.scss +2 -0
- package/src/element/_index.scss +4 -0
- package/src/element/badge/_plugin.scss +6 -8
- package/src/element/badge/_variables.scss +4 -6
- package/src/element/box/_index.scss +2 -0
- package/src/element/box/_plugin.scss +31 -0
- package/src/element/box/_variables.scss +18 -0
- package/src/element/button/_plugin.scss +20 -1
- package/src/element/checkbox/_plugin.scss +3 -4
- package/src/element/checkbox/_variables.scss +2 -5
- package/src/element/divider/_index.scss +2 -0
- package/src/element/divider/_plugin.scss +69 -0
- package/src/element/divider/_variables.scss +16 -0
- package/src/element/file/_plugin.scss +2 -0
- package/src/element/file/_variables.scss +2 -6
- package/src/element/image/_index.scss +2 -0
- package/src/element/image/_plugin.scss +106 -0
- package/src/element/image/_variables.scss +53 -0
- package/src/element/progress/_plugin.scss +9 -28
- package/src/element/progress/_variables.scss +2 -8
- package/src/element/radio/_plugin.scss +4 -4
- package/src/element/radio/_variables.scss +2 -2
- package/src/element/range/_plugin.scss +9 -20
- package/src/element/range/_variables.scss +7 -1
- package/src/element/select/_plugin.scss +3 -4
- package/src/element/select/_variables.scss +2 -6
- package/src/element/spinner/_index.scss +2 -0
- package/src/element/spinner/_plugin.scss +78 -0
- package/src/element/spinner/_variables.scss +22 -0
- package/src/element/switch/_plugin.scss +6 -10
- package/src/element/switch/_variables.scss +2 -10
- package/src/element/text-input/_plugin.scss +3 -1
- package/src/element/text-input/_variables.scss +5 -5
- package/src/element/textarea/_plugin.scss +3 -1
- package/src/element/textarea/_variables.scss +2 -2
- package/src/helper/_border.scss +43 -0
- package/src/helper/_color.scss +29 -0
- package/src/helper/{_controls.scss → _controls-internal.scss} +21 -0
- package/src/helper/_flex.scss +89 -0
- package/src/helper/_font-size.scss +22 -0
- package/src/helper/_index.scss +18 -1
- package/src/helper/_interactions.scss +41 -0
- package/src/helper/_line-height.scss +22 -0
- package/src/helper/_object-fit.scss +15 -0
- package/src/helper/_overflow.scss +28 -0
- package/src/helper/_position.scss +47 -0
- package/src/helper/_ratio.scss +35 -0
- package/src/helper/_shadow.scss +31 -0
- package/src/helper/_sizing.scss +65 -0
- package/src/helper/_spacing.scss +95 -0
- package/src/helper/_stack.scss +24 -0
- package/src/helper/_state.scss +2 -17
- package/src/helper/_text.scss +92 -0
- package/src/helper/_tooltip.scss +100 -0
- package/src/helper/_visibility.scss +80 -0
- package/src/layout/_index.scss +2 -0
- package/src/layout/container/_plugin.scss +2 -0
- package/src/layout/container/_variables.scss +2 -0
- package/src/layout/flex/_plugin.scss +2 -1
- package/src/layout/flex/_variables.scss +2 -2
- package/src/layout/footer/_index.scss +2 -0
- package/src/layout/footer/_plugin.scss +24 -0
- package/src/layout/footer/_variables.scss +11 -0
- package/src/layout/grid/_plugin.scss +2 -0
- package/src/layout/grid/_variables.scss +20 -16
- package/src/layout/hero/_index.scss +2 -0
- package/src/layout/hero/_plugin.scss +54 -0
- package/src/layout/hero/_variables.scss +23 -0
- package/src/module/_index.scss +7 -0
- package/src/module/alert/_plugin.scss +6 -1
- package/src/module/alert/_variables.scss +7 -0
- package/src/module/breadcrumb/_index.scss +2 -0
- package/src/module/breadcrumb/_plugin.scss +73 -0
- package/src/module/breadcrumb/_variables.scss +27 -0
- package/src/module/buttons/_index.scss +2 -0
- package/src/module/buttons/_plugin.scss +67 -0
- package/src/module/buttons/_variables.scss +10 -0
- package/src/module/card/_plugin.scss +96 -2
- package/src/module/card/_variables.scss +39 -0
- package/src/module/dropdown/_index.scss +2 -0
- package/src/module/dropdown/_plugin.scss +155 -0
- package/src/module/dropdown/_variables.scss +50 -0
- package/src/module/field/_plugin.scss +2 -0
- package/src/module/modal/_plugin.scss +2 -0
- package/src/module/navbar/_plugin.scss +4 -1
- package/src/module/navbar/_variables.scss +6 -2
- package/src/module/pagination/_index.scss +2 -0
- package/src/module/pagination/_plugin.scss +276 -0
- package/src/module/pagination/_variables.scss +64 -0
- package/src/module/popover/_index.scss +2 -0
- package/src/module/popover/_plugin.scss +183 -0
- package/src/module/popover/_variables.scss +44 -0
- package/src/module/section/_index.scss +2 -0
- package/src/module/section/_plugin.scss +47 -0
- package/src/module/section/_variables.scss +24 -0
- package/src/module/tabs/_plugin.scss +3 -1
- package/src/module/toast/_index.scss +2 -0
- package/src/module/toast/_plugin.scss +184 -0
- package/src/module/toast/_variables.scss +56 -0
- package/src/typography/_index.scss +4 -0
- package/src/typography/base/_plugin.scss +2 -0
- package/src/typography/base/_variables.scss +4 -3
- package/src/typography/blockquote/_index.scss +2 -0
- package/src/typography/blockquote/_plugin.scss +22 -0
- package/src/typography/blockquote/_variables.scss +13 -0
- package/src/typography/content/_plugin.scss +2 -0
- package/src/typography/content/_variables.scss +2 -0
- package/src/typography/figure/_index.scss +2 -0
- package/src/typography/figure/_plugin.scss +29 -0
- package/src/typography/figure/_variables.scss +13 -0
- package/src/typography/lead/_index.scss +2 -0
- package/src/typography/lead/_plugin.scss +12 -0
- package/src/typography/lead/_variables.scss +6 -0
- package/src/typography/link/_mixins.scss +2 -0
- package/src/typography/link/_plugin.scss +2 -0
- package/src/typography/link/_variables.scss +2 -0
- package/src/typography/list/_index.scss +2 -0
- package/src/typography/list/_plugin.scss +18 -0
- package/src/typography/list/_variables.scss +6 -0
- package/src/typography/table/_plugin.scss +2 -0
- package/src/typography/table/_variables.scss +2 -0
- package/src/typography/title/_plugin.scss +2 -0
- package/src/typography/title/_variables.scss +2 -0
- package/src/variables/_color.scss +20 -12
- package/src/variables/_feature.scss +36 -0
- package/src/variables/_global.scss +8 -0
- package/src/variables/_selector.scss +1 -0
- package/dist/tokens/dark.json +0 -85
- package/dist/tokens/default.json +0 -85
- package/dist/tokens/high-contrast.json +0 -85
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
@use "variables" as *;
|
|
2
|
+
@use "../../variables";
|
|
3
|
+
|
|
4
|
+
// Documentation: ../../../docs/src/pages/reference/components/module/section.mdx
|
|
5
|
+
|
|
6
|
+
@if variables.$feature-module-section {
|
|
7
|
+
// Density tokens emitted here (not in `theme/_create.scss`) because
|
|
8
|
+
// density is orthogonal to theme and `.section` is the only consumer.
|
|
9
|
+
// Default tokens land on `:root`; overrides are scoped to any
|
|
10
|
+
// `[data-density]` carrier so consumers can switch density at three
|
|
11
|
+
// granularities — page (`:root[data-density]`), page-region
|
|
12
|
+
// (`<main data-density>`), or per-section (`<section class="section"
|
|
13
|
+
// data-density>`). Variables cascade so the nearest carrier wins.
|
|
14
|
+
//
|
|
15
|
+
// `--kc-section-*` namespacing: gutter and max-width are plugin-private
|
|
16
|
+
// so they don't pollute the global token namespace. `.container` is the
|
|
17
|
+
// only other reader and is shipped alongside.
|
|
18
|
+
:root {
|
|
19
|
+
--kc-section-py: #{$padding-y};
|
|
20
|
+
--kc-section-gutter-x: #{$gutter-x};
|
|
21
|
+
--kc-section-max-w: #{$max-width};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
[data-density="compact"] {
|
|
25
|
+
--kc-section-py: #{$padding-y-compact};
|
|
26
|
+
--kc-section-gutter-x: #{$gutter-x-compact};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
[data-density="aere"] {
|
|
30
|
+
--kc-section-py: #{$padding-y-aere};
|
|
31
|
+
--kc-section-gutter-x: #{$gutter-x-aere};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
#{$selector} {
|
|
35
|
+
position: relative;
|
|
36
|
+
padding: var(--kc-section-py, #{$padding-y})
|
|
37
|
+
var(--kc-section-gutter-x, #{$gutter-x});
|
|
38
|
+
border-bottom: 1px solid var(--kc-border-1, #{$border-fallback});
|
|
39
|
+
|
|
40
|
+
// `:last-of-type` rather than `:last-child` so adjacent non-`.section`
|
|
41
|
+
// siblings (e.g. footer) don't re-enable the border on the preceding
|
|
42
|
+
// section.
|
|
43
|
+
&:last-of-type {
|
|
44
|
+
border-bottom: 0;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
@use "../../variables";
|
|
2
|
+
|
|
3
|
+
// Documentation: ../../../docs/src/pages/reference/components/module/section.mdx
|
|
4
|
+
|
|
5
|
+
$selector: ".section" !default;
|
|
6
|
+
|
|
7
|
+
// Page-level vertical rhythm. Derived from `$global-gap` so a consumer
|
|
8
|
+
// retuning the framework's spacing scale at the root carries through to
|
|
9
|
+
// section padding. Defaults: 7rem / 3rem (was 112px / 48px), 5rem / 2rem
|
|
10
|
+
// (compact, was 80px / 32px), 9rem / 4rem (aere, was 144px / 64px).
|
|
11
|
+
$padding-y: 7 * variables.$global-gap !default;
|
|
12
|
+
$gutter-x: 3 * variables.$global-gap !default;
|
|
13
|
+
|
|
14
|
+
// Inner content-width cap. 80rem = 1280px at the 16px root. Matches the
|
|
15
|
+
// `widescreen` breakpoint in `variables/_responsive.scss:$breakpoints`.
|
|
16
|
+
$max-width: 80rem !default;
|
|
17
|
+
|
|
18
|
+
$padding-y-compact: 5 * variables.$global-gap !default;
|
|
19
|
+
$gutter-x-compact: 2 * variables.$global-gap !default;
|
|
20
|
+
|
|
21
|
+
$padding-y-aere: 9 * variables.$global-gap !default;
|
|
22
|
+
$gutter-x-aere: 4 * variables.$global-gap !default;
|
|
23
|
+
|
|
24
|
+
$border-fallback: currentColor !default;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
@use "sass:list";
|
|
2
2
|
@use "variables" as *;
|
|
3
3
|
@use "../../variables";
|
|
4
|
-
@use "../../helper/controls" as controls;
|
|
4
|
+
@use "../../helper/controls-internal" as controls;
|
|
5
|
+
|
|
6
|
+
// Documentation: ../../../docs/src/pages/reference/components/module/tabs.mdx
|
|
5
7
|
|
|
6
8
|
// JS-free pattern. Markup contract: each tab is a flat sequence of
|
|
7
9
|
// input → label → panel siblings inside `.tabs`. The visible panel is
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
@use "sass:list";
|
|
2
|
+
@use "variables" as *;
|
|
3
|
+
@use "../../variables";
|
|
4
|
+
@use "../../helper/controls-internal" as controls;
|
|
5
|
+
|
|
6
|
+
// Documentation: ../../../docs/src/pages/reference/components/module/toast.mdx
|
|
7
|
+
|
|
8
|
+
@if variables.$feature-module-toast {
|
|
9
|
+
#{$container-selector} {
|
|
10
|
+
position: fixed;
|
|
11
|
+
z-index: $z-index;
|
|
12
|
+
inset-block-start: 0;
|
|
13
|
+
inset-inline-end: 0;
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
gap: $gap;
|
|
17
|
+
max-width: $max-width;
|
|
18
|
+
padding: $padding-x;
|
|
19
|
+
pointer-events: none;
|
|
20
|
+
|
|
21
|
+
&#{$top-start-modifier} {
|
|
22
|
+
inset-block-start: 0;
|
|
23
|
+
inset-block-end: auto;
|
|
24
|
+
inset-inline-start: 0;
|
|
25
|
+
inset-inline-end: auto;
|
|
26
|
+
align-items: flex-start;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&#{$top-center-modifier} {
|
|
30
|
+
inset-block-start: 0;
|
|
31
|
+
inset-block-end: auto;
|
|
32
|
+
inset-inline-start: 50%;
|
|
33
|
+
inset-inline-end: auto;
|
|
34
|
+
transform: translateX(-50%);
|
|
35
|
+
align-items: center;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&#{$top-end-modifier} {
|
|
39
|
+
inset-block-start: 0;
|
|
40
|
+
inset-block-end: auto;
|
|
41
|
+
inset-inline-start: auto;
|
|
42
|
+
inset-inline-end: 0;
|
|
43
|
+
align-items: flex-end;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&#{$bottom-start-modifier} {
|
|
47
|
+
inset-block-start: auto;
|
|
48
|
+
inset-block-end: 0;
|
|
49
|
+
inset-inline-start: 0;
|
|
50
|
+
inset-inline-end: auto;
|
|
51
|
+
align-items: flex-start;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&#{$bottom-center-modifier} {
|
|
55
|
+
inset-block-start: auto;
|
|
56
|
+
inset-block-end: 0;
|
|
57
|
+
inset-inline-start: 50%;
|
|
58
|
+
inset-inline-end: auto;
|
|
59
|
+
transform: translateX(-50%);
|
|
60
|
+
align-items: center;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&#{$bottom-end-modifier} {
|
|
64
|
+
inset-block-start: auto;
|
|
65
|
+
inset-block-end: 0;
|
|
66
|
+
inset-inline-start: auto;
|
|
67
|
+
inset-inline-end: 0;
|
|
68
|
+
align-items: flex-end;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
#{$selector} {
|
|
73
|
+
@include variables.backgroundColor(
|
|
74
|
+
toast-bg,
|
|
75
|
+
list.nth($default-combination, 1),
|
|
76
|
+
);
|
|
77
|
+
@include variables.textColor(toast-fg, list.nth($default-combination, 2));
|
|
78
|
+
width: 100%;
|
|
79
|
+
max-width: $max-width;
|
|
80
|
+
border-radius: $border-radius;
|
|
81
|
+
box-shadow: $shadow;
|
|
82
|
+
pointer-events: auto;
|
|
83
|
+
opacity: 0;
|
|
84
|
+
transition: opacity $transition-duration ease;
|
|
85
|
+
|
|
86
|
+
@media (prefers-reduced-motion: reduce) {
|
|
87
|
+
transition: none;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// Hooks for both reveal mechanisms. The JS path adds `.is-show` to
|
|
91
|
+
// fade the toast in, then sets `[hidden]` (or removes the class) to
|
|
92
|
+
// dismiss. The CSS path renders the toast with `.is-show` already
|
|
93
|
+
// on the markup and dismisses via a hidden `<input type="checkbox">`
|
|
94
|
+
// sibling toggled by a `<label class="toast__dismiss">`. The
|
|
95
|
+
// `.is-show` surface is shared between both branches so it lives
|
|
96
|
+
// outside the `@if` to avoid emitting the same rule twice when
|
|
97
|
+
// `$controls` includes both 'css' and 'js'.
|
|
98
|
+
@if variables.has-controls("css", $controls)
|
|
99
|
+
or variables.has-controls("js", $controls) {
|
|
100
|
+
&#{$show-modifier} {
|
|
101
|
+
opacity: 1;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
@if variables.has-controls("js", $controls) {
|
|
106
|
+
&[hidden] {
|
|
107
|
+
display: none;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
@if variables.has-controls("css", $controls) {
|
|
112
|
+
&:has(#{$toggle-selector}:checked) {
|
|
113
|
+
display: none;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// Focus from the hidden checkbox lights up the paired dismiss
|
|
117
|
+
// label so keyboard users still see a focus ring on the visible
|
|
118
|
+
// close glyph.
|
|
119
|
+
&:has(#{$toggle-selector}:focus-visible) #{$dismiss-selector} {
|
|
120
|
+
@include controls.focus-ring();
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
#{$header-selector} {
|
|
125
|
+
display: flex;
|
|
126
|
+
align-items: center;
|
|
127
|
+
justify-content: space-between;
|
|
128
|
+
gap: $gap;
|
|
129
|
+
padding: $padding-y $padding-x;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
#{$title-selector} {
|
|
133
|
+
font-weight: 600;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
#{$dismiss-selector} {
|
|
137
|
+
// Reset UA chrome so a `<button>` renders as a bare glyph slot.
|
|
138
|
+
appearance: none;
|
|
139
|
+
background: none;
|
|
140
|
+
border: 0;
|
|
141
|
+
padding: 0;
|
|
142
|
+
cursor: pointer;
|
|
143
|
+
color: inherit;
|
|
144
|
+
font: inherit;
|
|
145
|
+
// 60% opacity is the smallest value that keeps the glyph legible
|
|
146
|
+
// against the toast surface while still reading as a secondary
|
|
147
|
+
// affordance next to the title. Hover/focus restore full opacity.
|
|
148
|
+
opacity: 0.6;
|
|
149
|
+
transition: opacity $transition-duration ease;
|
|
150
|
+
|
|
151
|
+
@media (prefers-reduced-motion: reduce) {
|
|
152
|
+
transition: none;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
&:hover,
|
|
156
|
+
&:focus-visible {
|
|
157
|
+
opacity: 1;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
&:focus-visible {
|
|
161
|
+
@include controls.focus-ring();
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
#{$body-selector} {
|
|
166
|
+
padding: $padding-y $padding-x;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// Nested links inherit the surface fg and carry an underline. Same
|
|
170
|
+
// rationale as alert/card: the page-level `--kc-link` is calibrated
|
|
171
|
+
// against the page bg, not the toast surface bg, so pairing with
|
|
172
|
+
// currentColor avoids contrast failures on themed `.is-*` variants.
|
|
173
|
+
@include controls.nestedLinks;
|
|
174
|
+
|
|
175
|
+
@include controls.combinations-apply();
|
|
176
|
+
@if $enable-light {
|
|
177
|
+
@include controls.combinations-apply-light();
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
@media (forced-colors: active) {
|
|
181
|
+
border: 1px solid CanvasText;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
@use "../../variables";
|
|
2
|
+
|
|
3
|
+
// Documentation: ../../../docs/src/pages/reference/components/module/toast.mdx
|
|
4
|
+
|
|
5
|
+
$selector: ".toast" !default;
|
|
6
|
+
$container-selector: ".toast-container" !default;
|
|
7
|
+
$header-selector: ".toast__header" !default;
|
|
8
|
+
$title-selector: ".toast__title" !default;
|
|
9
|
+
$body-selector: ".toast__body" !default;
|
|
10
|
+
$dismiss-selector: ".toast__dismiss" !default;
|
|
11
|
+
|
|
12
|
+
// Hidden checkbox sibling that drives CSS-only dismissal. Paired with a
|
|
13
|
+
// `<label for=…>` that re-uses `$dismiss-selector` so the same chrome
|
|
14
|
+
// styles both the `<button>` (JS path) and the `<label>` (CSS path).
|
|
15
|
+
$toggle-selector: ".toast__toggle" !default;
|
|
16
|
+
|
|
17
|
+
// State modifiers. `$show-modifier` is the canonical "shown" hook for
|
|
18
|
+
// JS-driven reveals; the toast renders invisible at rest so consumer JS
|
|
19
|
+
// can fade it in by adding the class.
|
|
20
|
+
$show-modifier: "#{variables.$selector-prefix-is}show" !default;
|
|
21
|
+
|
|
22
|
+
// Anchor-position modifiers on the container.
|
|
23
|
+
$top-start-modifier: "#{variables.$selector-prefix-is}top-start" !default;
|
|
24
|
+
$top-center-modifier: "#{variables.$selector-prefix-is}top-center" !default;
|
|
25
|
+
$top-end-modifier: "#{variables.$selector-prefix-is}top-end" !default;
|
|
26
|
+
$bottom-start-modifier: "#{variables.$selector-prefix-is}bottom-start" !default;
|
|
27
|
+
$bottom-center-modifier: "#{variables.$selector-prefix-is}bottom-center"
|
|
28
|
+
!default;
|
|
29
|
+
$bottom-end-modifier: "#{variables.$selector-prefix-is}bottom-end" !default;
|
|
30
|
+
|
|
31
|
+
// Reveal mechanism(s). `'css'` emits the `<input type="checkbox">` +
|
|
32
|
+
// `<label>` dismiss branch (`:has(toggle:checked) { display: none }`).
|
|
33
|
+
// `'js'` emits the `.is-show` reveal + `[hidden]` dismiss hooks for
|
|
34
|
+
// consumer JS to drive. Both ship by default (matches the framework
|
|
35
|
+
// `$global-controls` contract).
|
|
36
|
+
$controls: variables.$global-controls !default;
|
|
37
|
+
|
|
38
|
+
// Local toggle for `.is-<combo>.is-light` emission. Derived from the
|
|
39
|
+
// framework-wide `$feature-light-variants` flag — see
|
|
40
|
+
// `variables/_feature.scss` for the cross-component rationale.
|
|
41
|
+
$enable-light: variables.$feature-light-variants !default;
|
|
42
|
+
|
|
43
|
+
$max-width: 420px !default;
|
|
44
|
+
$gap: variables.$size-extra-small !default;
|
|
45
|
+
$padding-y: variables.$size-small !default;
|
|
46
|
+
$padding-x: variables.$size-normal !default;
|
|
47
|
+
|
|
48
|
+
$border-radius: variables.$global-border-radius !default;
|
|
49
|
+
|
|
50
|
+
$z-index: 1090 !default;
|
|
51
|
+
|
|
52
|
+
$shadow: 0 6px 20px rgb(0 0 0 / 0.15) !default;
|
|
53
|
+
|
|
54
|
+
$transition-duration: variables.$global-transition-duration !default;
|
|
55
|
+
|
|
56
|
+
$default-combination: variables.$color-combination-default !default;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
@use "sass:map";
|
|
2
2
|
@use "../../variables";
|
|
3
3
|
|
|
4
|
+
// Reference: ../../../docs/src/pages/reference/components/typography/typography.mdx
|
|
5
|
+
|
|
4
6
|
$default-color: map.get(variables.$color-palette, black) !default;
|
|
5
7
|
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
// `!default` accepts an explicit `@use 'typography/base' with (...)`.
|
|
8
|
+
// Fundamentals derive from `$global-*` so consumers configure once at the
|
|
9
|
+
// top level; per-component override still works via the local `!default`.
|
|
9
10
|
$family-sans-serif: variables.$global-family-sans-serif !default;
|
|
10
11
|
$family-monospace: variables.$global-family-monospace !default;
|
|
11
12
|
$base-size: variables.$global-base-size !default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
@use "variables" as *;
|
|
2
|
+
@use "../../variables";
|
|
3
|
+
|
|
4
|
+
// Documentation: ../../../docs/src/pages/reference/components/typography/blockquote.mdx
|
|
5
|
+
|
|
6
|
+
@if variables.$feature-typography-blockquote {
|
|
7
|
+
#{$selector} {
|
|
8
|
+
padding-inline-start: $padding-inline-start;
|
|
9
|
+
border-inline-start: $border-inline-start;
|
|
10
|
+
font-size: $font-size;
|
|
11
|
+
|
|
12
|
+
#{$footer-selector} {
|
|
13
|
+
display: block;
|
|
14
|
+
font-size: $footer-font-size;
|
|
15
|
+
color: color-mix(in srgb, currentColor $footer-color-mix, transparent);
|
|
16
|
+
|
|
17
|
+
&::before {
|
|
18
|
+
content: "— ";
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Reference: ../../../docs/src/pages/reference/components/typography/blockquote.mdx
|
|
2
|
+
|
|
3
|
+
$selector: "blockquote, .blockquote" !default;
|
|
4
|
+
$footer-selector: ".blockquote-footer" !default;
|
|
5
|
+
$padding-inline-start: 1rem !default;
|
|
6
|
+
|
|
7
|
+
$border-inline-start: 4px
|
|
8
|
+
solid
|
|
9
|
+
color-mix(in srgb, currentColor 30%, transparent) !default;
|
|
10
|
+
|
|
11
|
+
$font-size: 1.125rem !default;
|
|
12
|
+
$footer-font-size: 0.875rem !default;
|
|
13
|
+
$footer-color-mix: 70% !default;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
@use "variables" as *;
|
|
2
|
+
@use "../../variables";
|
|
3
|
+
|
|
4
|
+
// Documentation: ../../../docs/src/pages/reference/components/typography/figure.mdx
|
|
5
|
+
|
|
6
|
+
@if variables.$feature-typography-figure {
|
|
7
|
+
#{$selector} {
|
|
8
|
+
display: $display;
|
|
9
|
+
margin-block-end: $margin-block-end;
|
|
10
|
+
|
|
11
|
+
> img,
|
|
12
|
+
> picture > img,
|
|
13
|
+
> #{$img-selector} {
|
|
14
|
+
display: block;
|
|
15
|
+
max-inline-size: 100%;
|
|
16
|
+
block-size: auto;
|
|
17
|
+
margin-block-end: $img-margin-block-end;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
#{$caption-selector} {
|
|
21
|
+
font-size: $caption-font-size;
|
|
22
|
+
color: color-mix(
|
|
23
|
+
in srgb,
|
|
24
|
+
currentColor #{$caption-color-mix},
|
|
25
|
+
transparent
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Reference: ../../../docs/src/pages/reference/components/typography/figure.mdx
|
|
2
|
+
|
|
3
|
+
$selector: "figure, .figure" !default;
|
|
4
|
+
$img-selector: ".figure-img" !default;
|
|
5
|
+
$caption-selector: "figcaption, .figure-caption" !default;
|
|
6
|
+
|
|
7
|
+
$display: inline-block !default;
|
|
8
|
+
$margin-block-end: 1rem !default;
|
|
9
|
+
|
|
10
|
+
$img-margin-block-end: 0.5rem !default;
|
|
11
|
+
|
|
12
|
+
$caption-font-size: 0.875rem !default;
|
|
13
|
+
$caption-color-mix: 70% !default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
@use "variables" as *;
|
|
2
|
+
@use "../../variables";
|
|
3
|
+
|
|
4
|
+
// Documentation: ../../../docs/src/pages/reference/components/typography/lead.mdx
|
|
5
|
+
|
|
6
|
+
@if variables.$feature-typography-lead {
|
|
7
|
+
#{$selector} {
|
|
8
|
+
font-size: $font-size;
|
|
9
|
+
font-weight: $font-weight;
|
|
10
|
+
line-height: $line-height;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
@use "variables" as *;
|
|
2
2
|
@use "../../variables";
|
|
3
3
|
|
|
4
|
+
// Reference: ../../../docs/src/pages/reference/components/typography/typography.mdx
|
|
5
|
+
|
|
4
6
|
// Visual contract shared between bare `<a>` and `.button.is-link`. Both
|
|
5
7
|
// surfaces emit the same underline + pointer affordance + `--kc-link` /
|
|
6
8
|
// `--kc-link-hover` token wiring; per-surface concerns (button's transparent
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
@use "sass:map";
|
|
2
2
|
@use "../../variables";
|
|
3
3
|
|
|
4
|
+
// Reference: ../../../docs/src/pages/reference/components/typography/typography.mdx
|
|
5
|
+
|
|
4
6
|
$default-color: map.get(variables.$color-palette, black) !default;
|
|
5
7
|
$color: $default-color !default;
|
|
6
8
|
$hover-color: $color !default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
@use "variables" as *;
|
|
2
|
+
@use "../../variables";
|
|
3
|
+
|
|
4
|
+
// Documentation: ../../../docs/src/pages/reference/components/typography/list.mdx
|
|
5
|
+
|
|
6
|
+
@if variables.$feature-typography-list {
|
|
7
|
+
#{$unstyled-selector},
|
|
8
|
+
#{$inline-selector} {
|
|
9
|
+
list-style: none;
|
|
10
|
+
padding-inline-start: 0;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
#{$inline-selector} > li,
|
|
14
|
+
#{$inline-item-selector} {
|
|
15
|
+
display: inline-block;
|
|
16
|
+
margin-inline-end: $inline-item-gap;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -2,17 +2,23 @@
|
|
|
2
2
|
@use "sass:list";
|
|
3
3
|
@use "sass:map";
|
|
4
4
|
|
|
5
|
-
// Deep-accent palette, hex-encoded.
|
|
6
|
-
// amber
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
//
|
|
11
|
-
//
|
|
12
|
-
//
|
|
13
|
-
//
|
|
14
|
-
//
|
|
15
|
-
//
|
|
5
|
+
// Deep-accent palette, hex-encoded. Most functional accents (sage / moss /
|
|
6
|
+
// amber) are tuned so `colour + white text` clears WCAG 1.4.6 AAA body
|
|
7
|
+
// (≥ 7:1) and the colour-vs-white page boundary clears WCAG 1.4.11 (≥ 3:1).
|
|
8
|
+
// Verified ratios vs white: sage ~7.19:1, moss ~7.38:1, amber ~7.16:1 (all
|
|
9
|
+
// PASS AAA). `coral` (`#8c351a`) is the one functional accent that lands at
|
|
10
|
+
// ~6.27:1 vs white — PASS AA body, FAIL AAA body. It carries the `danger`
|
|
11
|
+
// semantic and the default-theme `link-visited` colour; darkening it
|
|
12
|
+
// further to push past 7:1 would drift the hue away from a recognisable
|
|
13
|
+
// orange-red into a brown-red that reads as muddy. `emerald` is the brand
|
|
14
|
+
// green from the Krysalicss logo, darkened from its logo-literal value to
|
|
15
|
+
// clear WCAG 1.4.3 AA body (~5.06:1 vs white) while staying recognisable
|
|
16
|
+
// as the brand hue. Pushing further into AAA territory (≥ 7:1) would
|
|
17
|
+
// require a forest-dark green that loses the brand identity, so `primary`
|
|
18
|
+
// trades AAA body for brand fidelity. Net: `primary` (emerald) and
|
|
19
|
+
// `danger` / `link-visited` (coral) clear WCAG 2.2 AA body but not AAA;
|
|
20
|
+
// every other shipped (bg, fg) pair clears AAA. Hex keeps swatches stable
|
|
21
|
+
// on round-trips through design tools.
|
|
16
22
|
$palette: (
|
|
17
23
|
sage: #1a6347,
|
|
18
24
|
moss: #525a22,
|
|
@@ -50,7 +56,9 @@ $complement-overrides: () !default;
|
|
|
50
56
|
// First entry is the default applied to components without a modifier.
|
|
51
57
|
// `primary` uses `emerald` (brand green): clears AA body against white
|
|
52
58
|
// (~5.06:1) but not AAA — see palette comment for the brand-fidelity
|
|
53
|
-
// trade-off. `success`
|
|
59
|
+
// trade-off. `success` (moss ~7.38:1) and `warning` (amber ~7.16:1) clear
|
|
60
|
+
// AAA on white. `danger` (coral ~6.27:1) clears AA but not AAA — same
|
|
61
|
+
// hue-fidelity trade-off as `primary`, documented in the palette comment.
|
|
54
62
|
$combinations: (
|
|
55
63
|
default: (map.get($palette, white), map.get($palette, black)),
|
|
56
64
|
primary: (map.get($palette, emerald), map.get($palette, white)),
|