@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,31 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
@use "../variables";
|
|
3
|
+
|
|
4
|
+
// Documentation: ../../docs/src/pages/reference/components/helper/shadow.mdx
|
|
5
|
+
|
|
6
|
+
$selector-prefix: "#{variables.$selector-prefix-has}shadow" !default;
|
|
7
|
+
|
|
8
|
+
$shadows: (
|
|
9
|
+
none: none,
|
|
10
|
+
sm: 0 1px 2px rgb(0 0 0 / 0.08),
|
|
11
|
+
base: 0 4px 12px rgb(0 0 0 / 0.12),
|
|
12
|
+
lg: 0 12px 32px rgb(0 0 0 / 0.18),
|
|
13
|
+
) !default;
|
|
14
|
+
|
|
15
|
+
@if variables.$feature-helper-shadow {
|
|
16
|
+
#{$selector-prefix}-none {
|
|
17
|
+
box-shadow: map.get($shadows, none) !important;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
#{$selector-prefix}-sm {
|
|
21
|
+
box-shadow: map.get($shadows, sm) !important;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
#{$selector-prefix} {
|
|
25
|
+
box-shadow: map.get($shadows, base) !important;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
#{$selector-prefix}-lg {
|
|
29
|
+
box-shadow: map.get($shadows, lg) !important;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
@use "../variables";
|
|
3
|
+
|
|
4
|
+
// Documentation: ../../docs/src/pages/reference/components/helper/sizing.mdx
|
|
5
|
+
|
|
6
|
+
$selector-prefix: variables.$selector-prefix-is !default;
|
|
7
|
+
|
|
8
|
+
// Per-utility prefix knobs. Selectors come from variables so consumers can
|
|
9
|
+
// rescope without forking the helper. Defaults mirror Bootstrap parity.
|
|
10
|
+
$selector-prefix-w: ".w-" !default;
|
|
11
|
+
$selector-prefix-h: ".h-" !default;
|
|
12
|
+
$selector-prefix-mw: ".mw-" !default;
|
|
13
|
+
$selector-prefix-mh: ".mh-" !default;
|
|
14
|
+
$selector-prefix-vw: ".vw-" !default;
|
|
15
|
+
$selector-prefix-vh: ".vh-" !default;
|
|
16
|
+
$selector-prefix-min-vw: ".min-vw-" !default;
|
|
17
|
+
$selector-prefix-min-vh: ".min-vh-" !default;
|
|
18
|
+
|
|
19
|
+
$widths: (
|
|
20
|
+
25: 25%,
|
|
21
|
+
50: 50%,
|
|
22
|
+
75: 75%,
|
|
23
|
+
100: 100%,
|
|
24
|
+
auto: auto,
|
|
25
|
+
) !default;
|
|
26
|
+
|
|
27
|
+
$heights: $widths !default;
|
|
28
|
+
|
|
29
|
+
@if variables.$feature-helper-sizing {
|
|
30
|
+
@each $key, $value in $widths {
|
|
31
|
+
#{$selector-prefix-w}#{$key} {
|
|
32
|
+
width: $value !important;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@each $key, $value in $heights {
|
|
37
|
+
#{$selector-prefix-h}#{$key} {
|
|
38
|
+
height: $value !important;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
#{$selector-prefix}fullwidth {
|
|
43
|
+
width: 100% !important;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
#{$selector-prefix}fullheight {
|
|
47
|
+
height: 100% !important;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
#{$selector-prefix-mw}100 {
|
|
51
|
+
max-width: 100% !important;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
#{$selector-prefix-mh}100 {
|
|
55
|
+
max-height: 100% !important;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
#{$selector-prefix-min-vw}100 {
|
|
59
|
+
min-width: 100vw !important;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
#{$selector-prefix-min-vh}100 {
|
|
63
|
+
min-height: 100vh !important;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
@use "sass:list";
|
|
2
|
+
@use "sass:map";
|
|
3
|
+
@use "../variables";
|
|
4
|
+
|
|
5
|
+
// Documentation: ../../docs/src/pages/reference/components/helper/spacing.mdx
|
|
6
|
+
|
|
7
|
+
// Per-utility prefix knobs. Selectors come from variables so consumers can
|
|
8
|
+
// rescope to `.is-m-`, `[data-m-]`, or any other shape without forking the
|
|
9
|
+
// helper. Defaults mirror Bootstrap conventions for migration parity.
|
|
10
|
+
$selector-prefix-m: ".m-" !default;
|
|
11
|
+
$selector-prefix-p: ".p-" !default;
|
|
12
|
+
$selector-prefix-mt: ".mt-" !default;
|
|
13
|
+
$selector-prefix-mb: ".mb-" !default;
|
|
14
|
+
$selector-prefix-ms: ".ms-" !default;
|
|
15
|
+
$selector-prefix-me: ".me-" !default;
|
|
16
|
+
$selector-prefix-mx: ".mx-" !default;
|
|
17
|
+
$selector-prefix-my: ".my-" !default;
|
|
18
|
+
$selector-prefix-pt: ".pt-" !default;
|
|
19
|
+
$selector-prefix-pb: ".pb-" !default;
|
|
20
|
+
$selector-prefix-ps: ".ps-" !default;
|
|
21
|
+
$selector-prefix-pe: ".pe-" !default;
|
|
22
|
+
$selector-prefix-px: ".px-" !default;
|
|
23
|
+
$selector-prefix-py: ".py-" !default;
|
|
24
|
+
|
|
25
|
+
$scale: (
|
|
26
|
+
0: 0,
|
|
27
|
+
1: 0.25rem,
|
|
28
|
+
2: 0.5rem,
|
|
29
|
+
3: 0.75rem,
|
|
30
|
+
4: 1rem,
|
|
31
|
+
5: 1.5rem,
|
|
32
|
+
6: 3rem,
|
|
33
|
+
auto: auto,
|
|
34
|
+
) !default;
|
|
35
|
+
|
|
36
|
+
$properties: (
|
|
37
|
+
m: margin,
|
|
38
|
+
p: padding,
|
|
39
|
+
) !default;
|
|
40
|
+
|
|
41
|
+
$sides: (
|
|
42
|
+
t: (block-start),
|
|
43
|
+
b: (block-end),
|
|
44
|
+
s: (inline-start),
|
|
45
|
+
e: (inline-end),
|
|
46
|
+
x: (inline-start, inline-end),
|
|
47
|
+
y: (block-start, block-end),
|
|
48
|
+
) !default;
|
|
49
|
+
|
|
50
|
+
$auto-allowed: (m) !default;
|
|
51
|
+
|
|
52
|
+
// Lookup map (property-letter + side-letter → prefix variable). Side
|
|
53
|
+
// letter `_` keys the no-side shorthand. Keys are quoted strings so the
|
|
54
|
+
// interpolated `#{$prop}#{$side}` lookup matches.
|
|
55
|
+
$_prefixes: (
|
|
56
|
+
"m_": $selector-prefix-m,
|
|
57
|
+
"p_": $selector-prefix-p,
|
|
58
|
+
"mt": $selector-prefix-mt,
|
|
59
|
+
"mb": $selector-prefix-mb,
|
|
60
|
+
"ms": $selector-prefix-ms,
|
|
61
|
+
"me": $selector-prefix-me,
|
|
62
|
+
"mx": $selector-prefix-mx,
|
|
63
|
+
"my": $selector-prefix-my,
|
|
64
|
+
"pt": $selector-prefix-pt,
|
|
65
|
+
"pb": $selector-prefix-pb,
|
|
66
|
+
"ps": $selector-prefix-ps,
|
|
67
|
+
"pe": $selector-prefix-pe,
|
|
68
|
+
"px": $selector-prefix-px,
|
|
69
|
+
"py": $selector-prefix-py,
|
|
70
|
+
) !default;
|
|
71
|
+
|
|
72
|
+
@if variables.$feature-helper-spacing {
|
|
73
|
+
@each $prop-letter, $prop-name in $properties {
|
|
74
|
+
@each $size-key, $size-value in $scale {
|
|
75
|
+
$is-auto: $size-key == auto;
|
|
76
|
+
$auto-ok: list.index($auto-allowed, $prop-letter) != null;
|
|
77
|
+
|
|
78
|
+
@if not $is-auto or $auto-ok {
|
|
79
|
+
$shorthand-prefix: map.get($_prefixes, "#{$prop-letter}_");
|
|
80
|
+
#{$shorthand-prefix}#{$size-key} {
|
|
81
|
+
#{$prop-name}: $size-value !important;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@each $side-letter, $side-props in $sides {
|
|
85
|
+
$sided-prefix: map.get($_prefixes, "#{$prop-letter}#{$side-letter}");
|
|
86
|
+
#{$sided-prefix}#{$size-key} {
|
|
87
|
+
@each $side-prop in $side-props {
|
|
88
|
+
#{$prop-name}-#{$side-prop}: $size-value !important;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
@use "../variables";
|
|
2
|
+
|
|
3
|
+
// Documentation: ../../docs/src/pages/reference/components/helper/stack.mdx
|
|
4
|
+
|
|
5
|
+
$hstack-selector: ".hstack" !default;
|
|
6
|
+
$vstack-selector: ".vstack" !default;
|
|
7
|
+
|
|
8
|
+
$gap-token: "stack-gap" !default;
|
|
9
|
+
|
|
10
|
+
@if variables.$feature-helper-stack {
|
|
11
|
+
#{$hstack-selector} {
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: row;
|
|
14
|
+
align-items: center;
|
|
15
|
+
gap: var(--kc-#{$gap-token}, 0);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
#{$vstack-selector} {
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
align-self: stretch;
|
|
22
|
+
gap: var(--kc-#{$gap-token}, 0);
|
|
23
|
+
}
|
|
24
|
+
}
|
package/src/helper/_state.scss
CHANGED
|
@@ -1,25 +1,10 @@
|
|
|
1
1
|
@use "sass:map";
|
|
2
2
|
@use "../variables";
|
|
3
3
|
|
|
4
|
-
//
|
|
5
|
-
|
|
6
|
-
// so colour-blind users, monochrome displays, and forced-colours mode all
|
|
7
|
-
// read the state. Consumers opt their markup in:
|
|
8
|
-
//
|
|
9
|
-
// <span data-state="success">Saved</span>
|
|
10
|
-
//
|
|
11
|
-
// Defaults are baked in as the `var()` fallback per label; consumers who set
|
|
12
|
-
// `--kc-state-icon-<label>` at any scope override the glyph (or `''` to drop
|
|
13
|
-
// it).
|
|
14
|
-
//
|
|
15
|
-
// Only labels with a non-empty glyph emit a rule: the `default`, `light`,
|
|
16
|
-
// and `primary` combinations have no inherent state semantic, so emitting an
|
|
17
|
-
// empty `::before` for them is pure dead weight. Consumers who want to opt
|
|
18
|
-
// those in can add `$icons` keys via `@use 'helper/state' with (...)`.
|
|
4
|
+
// Documentation: ../../docs/src/pages/reference/components/helper/state.mdx
|
|
5
|
+
|
|
19
6
|
$selector-attr: "data-state" !default;
|
|
20
7
|
|
|
21
|
-
// Trailing space is U+0020 so the icon visually separates from the label
|
|
22
|
-
// without an extra wrapping element.
|
|
23
8
|
$icons: (
|
|
24
9
|
success: "✓ ",
|
|
25
10
|
warning: "⚠ ",
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
@use "../variables";
|
|
3
|
+
@use "breakpoints";
|
|
4
|
+
|
|
5
|
+
// Documentation: ../../docs/src/pages/reference/components/helper/text.mdx
|
|
6
|
+
|
|
7
|
+
$selector-prefix-has: "#{variables.$selector-prefix-has}text-" !default;
|
|
8
|
+
$selector-prefix-is: variables.$selector-prefix-is !default;
|
|
9
|
+
|
|
10
|
+
$weights: (
|
|
11
|
+
light: 300,
|
|
12
|
+
normal: 400,
|
|
13
|
+
medium: 500,
|
|
14
|
+
semibold: 600,
|
|
15
|
+
bold: 700,
|
|
16
|
+
) !default;
|
|
17
|
+
|
|
18
|
+
$alignments: (left, center, right, justify) !default;
|
|
19
|
+
|
|
20
|
+
$breakpoints: (tablet, desktop, widescreen, fullhd) !default;
|
|
21
|
+
|
|
22
|
+
$alignments-responsive: (left, center, right) !default;
|
|
23
|
+
|
|
24
|
+
@mixin _alignments($suffix: "") {
|
|
25
|
+
@each $alignment in $alignments-responsive {
|
|
26
|
+
#{$selector-prefix-has}#{$alignment}#{$suffix} {
|
|
27
|
+
text-align: #{$alignment} !important;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@if variables.$feature-helper-text {
|
|
33
|
+
@each $alignment in $alignments {
|
|
34
|
+
#{$selector-prefix-has}#{$alignment} {
|
|
35
|
+
text-align: #{$alignment} !important;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@each $breakpoint in $breakpoints {
|
|
40
|
+
@include breakpoints.from($breakpoint) {
|
|
41
|
+
@include _alignments("-#{$breakpoint}");
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
#{$selector-prefix-is}uppercase {
|
|
46
|
+
text-transform: uppercase !important;
|
|
47
|
+
}
|
|
48
|
+
#{$selector-prefix-is}lowercase {
|
|
49
|
+
text-transform: lowercase !important;
|
|
50
|
+
}
|
|
51
|
+
#{$selector-prefix-is}capitalized {
|
|
52
|
+
text-transform: capitalize !important;
|
|
53
|
+
}
|
|
54
|
+
#{$selector-prefix-is}italic {
|
|
55
|
+
font-style: italic !important;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@each $name, $value in $weights {
|
|
59
|
+
#{$selector-prefix-has}weight-#{$name} {
|
|
60
|
+
font-weight: $value !important;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
#{$selector-prefix-is}underlined {
|
|
65
|
+
text-decoration: underline !important;
|
|
66
|
+
}
|
|
67
|
+
#{$selector-prefix-is}line-through {
|
|
68
|
+
text-decoration: line-through !important;
|
|
69
|
+
}
|
|
70
|
+
#{$selector-prefix-is}no-decoration {
|
|
71
|
+
text-decoration: none !important;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
#{$selector-prefix-is}truncated {
|
|
75
|
+
white-space: nowrap !important;
|
|
76
|
+
overflow: hidden !important;
|
|
77
|
+
text-overflow: ellipsis !important;
|
|
78
|
+
}
|
|
79
|
+
#{$selector-prefix-is}nowrap {
|
|
80
|
+
white-space: nowrap !important;
|
|
81
|
+
}
|
|
82
|
+
#{$selector-prefix-is}text-break {
|
|
83
|
+
overflow-wrap: break-word !important;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
#{$selector-prefix-is}family-sans-serif {
|
|
87
|
+
font-family: sans-serif !important;
|
|
88
|
+
}
|
|
89
|
+
#{$selector-prefix-is}family-monospace {
|
|
90
|
+
font-family: monospace !important;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
@use "../variables";
|
|
2
|
+
|
|
3
|
+
// Documentation: ../../docs/src/pages/reference/components/helper/tooltip.mdx
|
|
4
|
+
|
|
5
|
+
$selector: "[data-tooltip]" !default;
|
|
6
|
+
|
|
7
|
+
// Position attribute selectors. Class hooks (`.tooltip-bottom` etc.) were
|
|
8
|
+
// removed in favour of the data-driven API — the helper is attribute-keyed
|
|
9
|
+
// from the trigger anyway (`content: attr(data-tooltip)`), so keeping
|
|
10
|
+
// position on the same axis is the simpler, more consistent shape.
|
|
11
|
+
$position-bottom-selector: '[data-tooltip-position="bottom"]' !default;
|
|
12
|
+
$position-left-selector: '[data-tooltip-position="left"]' !default;
|
|
13
|
+
$position-right-selector: '[data-tooltip-position="right"]' !default;
|
|
14
|
+
|
|
15
|
+
// Theme-baked fallbacks for `--kc-tooltip-bg` and `--kc-tooltip-fg`. The
|
|
16
|
+
// `defaultProperty` mixin emits the fallback + `var()` pair atomically so
|
|
17
|
+
// theme tokens flow without bypassing the contract.
|
|
18
|
+
$bg: rgba(0, 0, 0, 0.85) !default;
|
|
19
|
+
$fg: #fff !default;
|
|
20
|
+
|
|
21
|
+
$padding: 0.4em 0.8em !default;
|
|
22
|
+
$border-radius: 4px !default;
|
|
23
|
+
$font-size: 0.8em !default;
|
|
24
|
+
$offset: 0.5rem !default;
|
|
25
|
+
$z-index: 1080 !default;
|
|
26
|
+
$transition-duration: 120ms !default;
|
|
27
|
+
|
|
28
|
+
@if variables.$feature-helper-tooltip {
|
|
29
|
+
#{$selector} {
|
|
30
|
+
position: relative;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
#{$selector}:not([data-tooltip=""]) {
|
|
34
|
+
&::after {
|
|
35
|
+
content: attr(data-tooltip);
|
|
36
|
+
position: absolute;
|
|
37
|
+
z-index: $z-index;
|
|
38
|
+
padding: $padding;
|
|
39
|
+
border-radius: $border-radius;
|
|
40
|
+
@include variables.backgroundColor(tooltip-bg, $bg);
|
|
41
|
+
@include variables.textColor(tooltip-fg, $fg);
|
|
42
|
+
font-size: $font-size;
|
|
43
|
+
white-space: nowrap;
|
|
44
|
+
pointer-events: none;
|
|
45
|
+
opacity: 0;
|
|
46
|
+
transition: opacity $transition-duration ease-in-out;
|
|
47
|
+
|
|
48
|
+
bottom: 100%;
|
|
49
|
+
left: 50%;
|
|
50
|
+
transform: translate(-50%, -#{$offset});
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&:hover::after,
|
|
54
|
+
&:focus-within::after {
|
|
55
|
+
opacity: 1;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&#{$position-bottom-selector}::after {
|
|
59
|
+
top: 100%;
|
|
60
|
+
bottom: auto;
|
|
61
|
+
left: 50%;
|
|
62
|
+
right: auto;
|
|
63
|
+
transform: translate(-50%, #{$offset});
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&#{$position-left-selector}::after {
|
|
67
|
+
top: 50%;
|
|
68
|
+
bottom: auto;
|
|
69
|
+
right: 100%;
|
|
70
|
+
left: auto;
|
|
71
|
+
transform: translate(-#{$offset}, -50%);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&#{$position-right-selector}::after {
|
|
75
|
+
top: 50%;
|
|
76
|
+
bottom: auto;
|
|
77
|
+
left: 100%;
|
|
78
|
+
right: auto;
|
|
79
|
+
transform: translate(#{$offset}, -50%);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@media (prefers-reduced-motion: reduce) {
|
|
84
|
+
#{$selector}:not([data-tooltip=""])::after {
|
|
85
|
+
transition: none;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Forced-colors / Windows high-contrast fallback. The rgba bubble bg
|
|
90
|
+
// resolves to a system surface colour and the foreground / border to
|
|
91
|
+
// system canvas-text so the tooltip remains legible against any
|
|
92
|
+
// user-imposed palette.
|
|
93
|
+
@media (forced-colors: active) {
|
|
94
|
+
#{$selector}:not([data-tooltip=""])::after {
|
|
95
|
+
background-color: Canvas;
|
|
96
|
+
color: CanvasText;
|
|
97
|
+
border: 1px solid CanvasText;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
@use "sass:list";
|
|
2
|
+
@use "../variables";
|
|
3
|
+
@use "breakpoints";
|
|
4
|
+
|
|
5
|
+
// Documentation: ../../docs/src/pages/reference/components/helper/visibility.mdx
|
|
6
|
+
|
|
7
|
+
$selector-prefix: variables.$selector-prefix-is !default;
|
|
8
|
+
|
|
9
|
+
$displays: (block, flex, inline, inline-block, inline-flex) !default;
|
|
10
|
+
|
|
11
|
+
// `fullhd-only` is omitted on purpose — fullhd is the last band, so the
|
|
12
|
+
// "only" variant would be identical to `-fullhd`.
|
|
13
|
+
$scopes: (
|
|
14
|
+
mobile: (null, tablet),
|
|
15
|
+
tablet-only: (tablet, desktop),
|
|
16
|
+
desktop-only: (desktop, widescreen),
|
|
17
|
+
widescreen-only: (widescreen, fullhd),
|
|
18
|
+
touch: (null, desktop),
|
|
19
|
+
tablet: (tablet, null),
|
|
20
|
+
desktop: (desktop, null),
|
|
21
|
+
widescreen: (widescreen, null),
|
|
22
|
+
fullhd: (fullhd, null),
|
|
23
|
+
) !default;
|
|
24
|
+
|
|
25
|
+
@mixin _displays($suffix: "") {
|
|
26
|
+
@each $display in $displays {
|
|
27
|
+
#{$selector-prefix}#{$display}#{$suffix} {
|
|
28
|
+
display: #{$display} !important;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
#{$selector-prefix}hidden#{$suffix} {
|
|
32
|
+
display: none !important;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@mixin _within($from, $until) {
|
|
37
|
+
@if $from != null and $until != null {
|
|
38
|
+
@include breakpoints.from($from) {
|
|
39
|
+
@include breakpoints.until($until) {
|
|
40
|
+
@content;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
} @else if $from != null {
|
|
44
|
+
@include breakpoints.from($from) {
|
|
45
|
+
@content;
|
|
46
|
+
}
|
|
47
|
+
} @else if $until != null {
|
|
48
|
+
@include breakpoints.until($until) {
|
|
49
|
+
@content;
|
|
50
|
+
}
|
|
51
|
+
} @else {
|
|
52
|
+
@content;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@if variables.$feature-helper-visibility {
|
|
57
|
+
@include _displays();
|
|
58
|
+
|
|
59
|
+
#{$selector-prefix}invisible {
|
|
60
|
+
visibility: hidden !important;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
#{$selector-prefix}sr-only {
|
|
64
|
+
position: absolute !important;
|
|
65
|
+
width: 1px !important;
|
|
66
|
+
height: 1px !important;
|
|
67
|
+
padding: 0 !important;
|
|
68
|
+
margin: -1px !important;
|
|
69
|
+
overflow: hidden !important;
|
|
70
|
+
clip: rect(0, 0, 0, 0) !important;
|
|
71
|
+
white-space: nowrap !important;
|
|
72
|
+
border: 0 !important;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
@each $name, $bounds in $scopes {
|
|
76
|
+
@include _within(list.nth($bounds, 1), list.nth($bounds, 2)) {
|
|
77
|
+
@include _displays("-#{$name}");
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
package/src/layout/_index.scss
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
@use "variables" as *;
|
|
2
2
|
@use "../../variables";
|
|
3
3
|
|
|
4
|
+
// Documentation: ../../../docs/src/pages/reference/components/layout/flex.mdx
|
|
5
|
+
|
|
4
6
|
@if variables.$feature-layout-flex {
|
|
5
7
|
#{$flex-selector} {
|
|
6
8
|
display: flex;
|
|
@@ -23,7 +25,6 @@
|
|
|
23
25
|
flex: 1 1 0;
|
|
24
26
|
min-width: 0;
|
|
25
27
|
|
|
26
|
-
// Sizes to its content instead of growing to share row width.
|
|
27
28
|
&#{$narrow-selector} {
|
|
28
29
|
flex: none;
|
|
29
30
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
@use "../../variables";
|
|
2
2
|
|
|
3
|
+
// Reference: ../../../docs/src/pages/reference/components/layout/flex.mdx
|
|
4
|
+
|
|
3
5
|
$flex-selector: ".flex" !default;
|
|
4
6
|
$column-selector: ".col" !default;
|
|
5
7
|
$narrow-selector: "#{variables.$selector-prefix-is}narrow" !default;
|
|
6
8
|
|
|
7
|
-
// Inter-item gap, applied via native CSS `gap` (Baseline since 2021).
|
|
8
|
-
// Defaults to the global token so flex and grid share spacing rhythm.
|
|
9
9
|
$gap: variables.$global-gap !default;
|
|
@@ -0,0 +1,24 @@
|
|
|
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/layout/footer.mdx
|
|
7
|
+
|
|
8
|
+
@if variables.$feature-layout-footer {
|
|
9
|
+
#{$selector} {
|
|
10
|
+
@include variables.backgroundColor(
|
|
11
|
+
footer-bg,
|
|
12
|
+
var(--kc-bg, #{list.nth($default-combination, 1)}),
|
|
13
|
+
);
|
|
14
|
+
@include variables.textColor(
|
|
15
|
+
footer-fg,
|
|
16
|
+
var(--kc-fg, #{list.nth($default-combination, 2)}),
|
|
17
|
+
);
|
|
18
|
+
padding: $padding-block-start $padding-inline $padding-block-end;
|
|
19
|
+
|
|
20
|
+
@include controls.nestedLinks;
|
|
21
|
+
|
|
22
|
+
@include controls.combinations-apply();
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
@use "../../variables";
|
|
2
|
+
|
|
3
|
+
// Reference: ../../../docs/src/pages/reference/components/layout/footer.mdx
|
|
4
|
+
|
|
5
|
+
$selector: ".footer" !default;
|
|
6
|
+
|
|
7
|
+
$padding-block-start: 3rem !default;
|
|
8
|
+
$padding-block-end: 6rem !default;
|
|
9
|
+
$padding-inline: variables.$global-gap !default;
|
|
10
|
+
|
|
11
|
+
$default-combination: variables.$color-combination-default !default;
|
|
@@ -1,32 +1,18 @@
|
|
|
1
1
|
@use "../../variables";
|
|
2
2
|
|
|
3
|
-
//
|
|
4
|
-
|
|
3
|
+
// Reference: ../../../docs/src/pages/reference/components/layout/grid.mdx
|
|
4
|
+
|
|
5
5
|
$selector: ".grid" !default;
|
|
6
6
|
$cell-selector: ".cell" !default;
|
|
7
7
|
|
|
8
|
-
// `gap` between rows + columns. Uses CSS `gap` natively (unlike flex which
|
|
9
|
-
// pads columns then negative-margins the row), so no half-step math needed.
|
|
10
8
|
$gap: variables.$global-gap !default;
|
|
11
9
|
|
|
12
|
-
// Auto-fit min cell width. The default `.grid` container is responsive:
|
|
13
|
-
// `repeat(auto-fit, minmax($auto-min, 1fr))`. Cells flow into as many columns
|
|
14
|
-
// as fit at the current viewport width. Override via:
|
|
15
|
-
// @use '@adnap/krysalicss' with ($layout-grid-auto-min: 14rem);
|
|
16
10
|
$auto-min: 16rem !default;
|
|
17
11
|
|
|
18
|
-
// Total columns for the explicit-grid variant (`.grid.is-cols-N` and
|
|
19
|
-
// `.cell.is-span-N`). 12 mirrors the flex grid's division count so consumers
|
|
20
|
-
// can reuse the same mental model.
|
|
21
12
|
$columns: 12 !default;
|
|
22
13
|
|
|
23
|
-
// Explicit column-count modifiers emitted as `.grid.is-cols-<N>`. Listed
|
|
24
|
-
// values get `repeat(<N>, minmax(0, 1fr))`. Trim the list to ship a smaller
|
|
25
|
-
// CSS surface; the default covers the common-case grid widths.
|
|
26
14
|
$column-modifiers: (2, 3, 4, 6, 12) !default;
|
|
27
15
|
|
|
28
|
-
// Named cell spans: match the flex grid's `.col.is-half`, `.is-one-third`,
|
|
29
|
-
// etc. naming so the API feels consistent across both layouts.
|
|
30
16
|
$named-spans: (
|
|
31
17
|
full: 12,
|
|
32
18
|
half: 6,
|
|
@@ -35,3 +21,21 @@ $named-spans: (
|
|
|
35
21
|
one-quarter: 3,
|
|
36
22
|
three-quarters: 9,
|
|
37
23
|
) !default;
|
|
24
|
+
|
|
25
|
+
$named-offsets: (
|
|
26
|
+
half: 6,
|
|
27
|
+
one-third: 4,
|
|
28
|
+
two-thirds: 8,
|
|
29
|
+
one-quarter: 3,
|
|
30
|
+
three-quarters: 9,
|
|
31
|
+
) !default;
|
|
32
|
+
|
|
33
|
+
$gap-scale: (
|
|
34
|
+
0: 0,
|
|
35
|
+
1: 0.25rem,
|
|
36
|
+
2: 0.5rem,
|
|
37
|
+
3: 0.75rem,
|
|
38
|
+
4: 1rem,
|
|
39
|
+
5: 1.5rem,
|
|
40
|
+
6: 3rem,
|
|
41
|
+
) !default;
|