@greese/ui 1.0.0 → 1.2.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 +19 -14
- package/dist/_maps.scss +1 -1
- package/dist/_tokens-base.scss +30 -6
- package/dist/_tokens.scss +31 -2
- package/dist/_utilities-table.scss +1615 -0
- package/dist/clipboard.d.ts +18 -0
- package/dist/clipboard.js +62 -0
- package/dist/css/Button.css +2 -2
- package/dist/css/Carousel.css +145 -47
- package/dist/css/Checkbox.css +2 -2
- package/dist/css/Chip.css +38 -8
- package/dist/css/ChoiceGroup.css +42 -1
- package/dist/css/Collapsible.css +1 -0
- package/dist/css/ColorPicker.css +84 -0
- package/dist/css/Combobox.css +2 -2
- package/dist/css/Dialog.css +24 -22
- package/dist/css/EditableField.css +219 -0
- package/dist/css/Input.css +11 -2
- package/dist/css/Menu.css +9 -0
- package/dist/css/NumberField.css +53 -8
- package/dist/css/NumberStepper.css +9 -0
- package/dist/css/OtpField.css +1 -1
- package/dist/css/PageTransition.css +12 -0
- package/dist/css/Radio.css +2 -2
- package/dist/css/ScrollCarousel.css +225 -0
- package/dist/css/SegmentedControl.css +2 -2
- package/dist/css/Select.css +3 -2
- package/dist/css/Slider.css +45 -5
- package/dist/css/Switch.css +6 -6
- package/dist/css/Text.css +14 -14
- package/dist/css/Textarea.css +1 -1
- package/dist/css/core.css +36 -6
- package/dist/css/resets.css +162 -0
- package/dist/css.d.ts +2 -0
- package/dist/css.js +2 -0
- package/dist/greese.css +990 -138
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/scss/components/_Accordion.scss +2 -0
- package/dist/scss/components/_ActionSelect.scss +2 -0
- package/dist/scss/components/_Alert.scss +2 -0
- package/dist/scss/components/_AppBar.scss +2 -0
- package/dist/scss/components/_AspectRatio.scss +2 -0
- package/dist/scss/components/_AutoLayout.scss +2 -0
- package/dist/scss/components/_Avatar.scss +2 -0
- package/dist/scss/components/_Badge.scss +2 -0
- package/dist/scss/components/_Box.scss +2 -0
- package/dist/scss/components/_Breadcrumbs.scss +2 -0
- package/dist/scss/components/_Button.scss +2 -0
- package/dist/scss/components/_ButtonGroup.scss +2 -0
- package/dist/scss/components/_Card.scss +2 -0
- package/dist/scss/components/_Carousel.scss +2 -0
- package/dist/scss/components/_Center.scss +2 -0
- package/dist/scss/components/_ChatBubble.scss +2 -0
- package/dist/scss/components/_Checkbox.scss +2 -0
- package/dist/scss/components/_Chip.scss +2 -0
- package/dist/scss/components/_ChoiceGroup.scss +2 -0
- package/dist/scss/components/_Code.scss +2 -0
- package/dist/scss/components/_Collapsible.scss +2 -0
- package/dist/scss/components/_ColorPicker.scss +2 -0
- package/dist/scss/components/_Combobox.scss +2 -0
- package/dist/scss/components/_Container.scss +2 -0
- package/dist/scss/components/_Countdown.scss +2 -0
- package/dist/scss/components/_DateField.scss +2 -0
- package/dist/scss/components/_Dialog.scss +2 -0
- package/dist/scss/components/_Diff.scss +2 -0
- package/dist/scss/components/_Divider.scss +2 -0
- package/dist/scss/components/_Dock.scss +2 -0
- package/dist/scss/components/_EditableField.scss +2 -0
- package/dist/scss/components/_Field.scss +2 -0
- package/dist/scss/components/_Fieldset.scss +2 -0
- package/dist/scss/components/_FileInput.scss +2 -0
- package/dist/scss/components/_Footer.scss +2 -0
- package/dist/scss/components/_Grid.scss +2 -0
- package/dist/scss/components/_Header.scss +2 -0
- package/dist/scss/components/_Heading.scss +2 -0
- package/dist/scss/components/_Icon.scss +2 -0
- package/dist/scss/components/_IconButton.scss +2 -0
- package/dist/scss/components/_Image.scss +2 -0
- package/dist/scss/components/_Indicator.scss +2 -0
- package/dist/scss/components/_Input.scss +2 -0
- package/dist/scss/components/_Key.scss +2 -0
- package/dist/scss/components/_Link.scss +2 -0
- package/dist/scss/components/_List.scss +2 -0
- package/dist/scss/components/_Media.scss +2 -0
- package/dist/scss/components/_Menu.scss +2 -0
- package/dist/scss/components/_Motion.scss +2 -0
- package/dist/scss/components/_NumberField.scss +2 -0
- package/dist/scss/components/_NumberStepper.scss +2 -0
- package/dist/scss/components/_OtpField.scss +2 -0
- package/dist/scss/components/_PageTransition.scss +2 -0
- package/dist/scss/components/_Pagination.scss +2 -0
- package/dist/scss/components/_Popover.scss +2 -0
- package/dist/scss/components/_Progress.scss +2 -0
- package/dist/scss/components/_RadialProgress.scss +2 -0
- package/dist/scss/components/_Radio.scss +2 -0
- package/dist/scss/components/_Rating.scss +2 -0
- package/dist/scss/components/_ScrollCarousel.scss +2 -0
- package/dist/scss/components/_ScrollSpy.scss +2 -0
- package/dist/scss/components/_SegmentedControl.scss +2 -0
- package/dist/scss/components/_Select.scss +2 -0
- package/dist/scss/components/_Sidebar.scss +2 -0
- package/dist/scss/components/_Skeleton.scss +2 -0
- package/dist/scss/components/_Slider.scss +2 -0
- package/dist/scss/components/_Spacer.scss +2 -0
- package/dist/scss/components/_SpeedDial.scss +2 -0
- package/dist/scss/components/_Spinner.scss +2 -0
- package/dist/scss/components/_Stack.scss +2 -0
- package/dist/scss/components/_Stat.scss +2 -0
- package/dist/scss/components/_Status.scss +2 -0
- package/dist/scss/components/_Steps.scss +2 -0
- package/dist/scss/components/_Swap.scss +2 -0
- package/dist/scss/components/_Switch.scss +2 -0
- package/dist/scss/components/_Table.scss +2 -0
- package/dist/scss/components/_Tabs.scss +2 -0
- package/dist/scss/components/_Text.scss +2 -0
- package/dist/scss/components/_TextRotate.scss +2 -0
- package/dist/scss/components/_Textarea.scss +2 -0
- package/dist/scss/components/_ThemeProvider.scss +2 -0
- package/dist/scss/components/_Tile.scss +2 -0
- package/dist/scss/components/_Toast.scss +2 -0
- package/dist/scss/components/_ToggleButton.scss +2 -0
- package/dist/scss/components/_Tooltip.scss +2 -0
- package/dist/scss/components/_Type.scss +2 -0
- package/dist/scss/components/_Visibility.scss +2 -0
- package/dist/scss/components/_VisuallyHidden.scss +2 -0
- package/dist/shapes.d.ts +12 -1
- package/dist/shapes.js +11 -10
- package/dist/style-manifest.json +18837 -132
- package/dist/theme.js +6 -1
- package/dist/themeFiles/index.d.ts +9 -0
- package/dist/themeFiles/index.js +9 -0
- package/dist/themeFiles/scssModule.d.ts +100 -0
- package/dist/themeFiles/scssModule.js +384 -0
- package/dist/themeFiles/spec.d.ts +198 -0
- package/dist/themeFiles/spec.js +877 -0
- package/dist/tokens.css +30 -1
- package/dist/typography.js +1 -1
- package/dist/utilities.css +435 -0
- package/dist/utilities.d.ts +8 -0
- package/dist/utilities.js +75 -0
- package/package.json +20 -1
- package/src/components/AutoLayout/AutoLayout.scss +2 -26
- package/src/components/Carousel/Carousel.scss +122 -126
- package/src/components/Checkbox/Checkbox.scss +2 -2
- package/src/components/Chip/Chip.scss +63 -8
- package/src/components/ChoiceGroup/ChoiceGroup.scss +19 -1
- package/src/components/Collapsible/Collapsible.scss +3 -0
- package/src/components/ColorPicker/ColorPicker.scss +95 -0
- package/src/components/Combobox/Combobox.scss +4 -2
- package/src/components/Dialog/Dialog.scss +24 -7
- package/src/components/EditableField/EditableField.scss +275 -0
- package/src/components/Grid/Grid.scss +2 -70
- package/src/components/Input/Input.scss +29 -0
- package/src/components/Menu/Menu.scss +18 -0
- package/src/components/NumberField/NumberField.scss +56 -9
- package/src/components/NumberStepper/NumberStepper.scss +13 -0
- package/src/components/PageTransition/PageTransition.scss +29 -0
- package/src/components/Radio/Radio.scss +2 -2
- package/src/components/ScrollCarousel/ScrollCarousel.scss +142 -0
- package/src/components/Select/Select.scss +4 -0
- package/src/components/Slider/Slider.scss +51 -6
- package/src/components/Stack/Stack.scss +2 -48
- package/src/components/Switch/Switch.scss +9 -6
- package/src/components/Text/Text.scss +5 -2
- package/src/styles/_breakpoint-vars.scss +17 -11
- package/src/styles/_controls.scss +2 -2
- package/src/styles/_core.scss +1 -0
- package/src/styles/_kit.scss +483 -56
- package/src/styles/_layout-props.scss +197 -0
- package/src/styles/_manifest.scss +55 -25
- package/src/styles/_mixins.scss +53 -15
- package/src/styles/_slides.scss +112 -0
- package/src/styles/_utilities.scss +104 -0
- package/src/styles/breakpoints.test.ts +21 -1
- package/src/styles/entryPoints.test.ts +25 -2
- package/src/styles/index.scss +3 -1
- package/src/styles/kit.test.ts +171 -1
- package/src/styles/public/_breakpoints.scss +43 -0
- package/src/styles/public/_slides.scss +3 -0
- package/src/styles/public/_utilities.scss +3 -0
- package/src/styles/resets.scss +7 -0
- package/src/styles/utilities.test.ts +39 -0
- package/themes/bevel.css +187 -187
- package/themes/bevel.scss +960 -958
- package/themes/candy.css +87 -0
- package/themes/candy.scss +32 -0
- package/themes/extrude.css +42 -42
- package/themes/folio.css +200 -200
- package/themes/folio.scss +880 -878
- package/themes/forest.css +87 -0
- package/themes/forest.scss +32 -0
- package/themes/grape.css +87 -0
- package/themes/grape.scss +32 -0
- package/themes/greese.css +36 -0
- package/themes/greese.scss +21 -0
- package/themes/mono.css +87 -0
- package/themes/mono.scss +32 -0
- package/themes/ocean.css +87 -0
- package/themes/ocean.scss +32 -0
- package/themes/outline.css +18 -18
- package/themes/pebble.css +8 -8
- package/themes/ridge.css +188 -188
- package/themes/ridge.scss +820 -818
- package/themes/soft.css +11 -11
- package/themes/sunset.css +87 -0
- package/themes/sunset.scss +32 -0
- package/themes/ticket.css +180 -180
- package/themes/ticket.scss +881 -879
- package/themes/tilt.css +25 -25
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
@use '../../styles/mixins';
|
|
2
|
+
@use '../../styles/slides';
|
|
3
|
+
|
|
4
|
+
@layer greese.components {
|
|
5
|
+
.greese-ScrollCarousel {
|
|
6
|
+
@include mixins.component-root;
|
|
7
|
+
|
|
8
|
+
position: relative;
|
|
9
|
+
display: grid;
|
|
10
|
+
gap: var(--greese-space-3);
|
|
11
|
+
min-inline-size: 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// Native scrolling and snapping: swipe, trackpad and keys all work.
|
|
15
|
+
.greese-ScrollCarousel-viewport {
|
|
16
|
+
--greese-scrollcarousel-per-view: 1;
|
|
17
|
+
--greese-scrollcarousel-gap: var(--greese-space-3);
|
|
18
|
+
|
|
19
|
+
display: flex;
|
|
20
|
+
gap: var(--greese-scrollcarousel-gap);
|
|
21
|
+
overflow-x: auto;
|
|
22
|
+
overscroll-behavior-x: contain;
|
|
23
|
+
scroll-snap-type: x mandatory;
|
|
24
|
+
scrollbar-width: none;
|
|
25
|
+
border-radius: var(--greese-corner-panel);
|
|
26
|
+
|
|
27
|
+
&::-webkit-scrollbar {
|
|
28
|
+
display: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@include mixins.focus-ring;
|
|
32
|
+
|
|
33
|
+
// The buttons and dots read this to choose a smooth or instant scroll.
|
|
34
|
+
@include mixins.motion-safe {
|
|
35
|
+
scroll-behavior: smooth;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Vertical: a column in a viewport of its own height, snapping on y.
|
|
40
|
+
.greese-ScrollCarousel--vertical > .greese-ScrollCarousel-viewport {
|
|
41
|
+
flex-direction: column;
|
|
42
|
+
block-size: var(--greese-scrollcarousel-size, 20rem);
|
|
43
|
+
overflow: hidden auto;
|
|
44
|
+
overscroll-behavior: auto contain;
|
|
45
|
+
scroll-snap-type: y mandatory;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Each slide's width: the viewport shared by `per-view` slides and the gaps.
|
|
49
|
+
.greese-ScrollCarouselSlide {
|
|
50
|
+
--greese-scrollcarousel-gaps: calc(
|
|
51
|
+
(var(--greese-scrollcarousel-per-view) - 1) * var(--greese-scrollcarousel-gap)
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
flex: 0 0
|
|
55
|
+
calc(
|
|
56
|
+
(100% - var(--greese-scrollcarousel-gaps)) / var(--greese-scrollcarousel-per-view)
|
|
57
|
+
);
|
|
58
|
+
min-inline-size: 0;
|
|
59
|
+
scroll-snap-align: start;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@include slides.controls('greese-ScrollCarousel', scrollcarousel);
|
|
63
|
+
|
|
64
|
+
// Vertical: the buttons sit centred on the top and bottom edges, the
|
|
65
|
+
// chevron turned to point up and down.
|
|
66
|
+
.greese-ScrollCarousel--vertical > .greese-ScrollCarousel-control {
|
|
67
|
+
inset-inline: 0;
|
|
68
|
+
margin-inline: auto;
|
|
69
|
+
translate: none;
|
|
70
|
+
|
|
71
|
+
> svg {
|
|
72
|
+
rotate: 90deg;
|
|
73
|
+
scale: 1;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.greese-ScrollCarousel--vertical > .greese-ScrollCarousel-control--previous {
|
|
78
|
+
inset-block-start: var(--greese-space-2);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.greese-ScrollCarousel--vertical > .greese-ScrollCarousel-control--next {
|
|
82
|
+
inset-block: auto calc(var(--greese-space-2) + var(--greese-scrollcarousel-dots, 0px));
|
|
83
|
+
|
|
84
|
+
> svg {
|
|
85
|
+
rotate: -90deg;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// A strip of controls (tabs, a toolbar): each as wide as its content, no
|
|
90
|
+
// snapping, and small buttons over the ends that scroll it a view along.
|
|
91
|
+
.greese-ScrollCarousel--strip {
|
|
92
|
+
gap: 0;
|
|
93
|
+
|
|
94
|
+
> .greese-ScrollCarousel-viewport {
|
|
95
|
+
--greese-scrollcarousel-gap: var(--greese-space-1);
|
|
96
|
+
|
|
97
|
+
align-items: center;
|
|
98
|
+
scroll-snap-type: none;
|
|
99
|
+
border-radius: 0;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
> .greese-ScrollCarousel-control {
|
|
103
|
+
inset-block-start: 50%;
|
|
104
|
+
inline-size: 1.5rem;
|
|
105
|
+
block-size: 1.5rem;
|
|
106
|
+
box-shadow: var(--greese-shadow-sm);
|
|
107
|
+
|
|
108
|
+
> svg {
|
|
109
|
+
inline-size: 0.875rem;
|
|
110
|
+
block-size: 0.875rem;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
> .greese-ScrollCarousel-control--previous {
|
|
115
|
+
inset-inline-start: 0;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
> .greese-ScrollCarousel-control--next {
|
|
119
|
+
inset-inline-end: 0;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.greese-ScrollCarousel--strip
|
|
124
|
+
> .greese-ScrollCarousel-viewport
|
|
125
|
+
> .greese-ScrollCarouselSlide {
|
|
126
|
+
flex: none;
|
|
127
|
+
scroll-snap-align: none;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// Phones swipe; the buttons come back where a pointer can hover.
|
|
131
|
+
@media (hover: none) {
|
|
132
|
+
.greese-ScrollCarousel-control {
|
|
133
|
+
display: none;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
@include mixins.responsive-prop(
|
|
138
|
+
'greese-ScrollCarousel',
|
|
139
|
+
'per-view',
|
|
140
|
+
--greese-scrollcarousel-per-view
|
|
141
|
+
);
|
|
142
|
+
}
|
|
@@ -17,6 +17,10 @@
|
|
|
17
17
|
padding-inline: var(--greese-select-padding)
|
|
18
18
|
calc(var(--greese-select-padding) + 1.5em);
|
|
19
19
|
font: inherit;
|
|
20
|
+
|
|
21
|
+
// A line no taller than the text, so the frame's height is the size's on
|
|
22
|
+
// every pointer, not the font's default line.
|
|
23
|
+
line-height: 1.25;
|
|
20
24
|
color: inherit;
|
|
21
25
|
cursor: pointer;
|
|
22
26
|
background: none;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../../styles/controls';
|
|
1
3
|
@use '../../styles/mixins';
|
|
2
4
|
|
|
3
5
|
// Vendor pseudo-elements are the only way to style range parts.
|
|
@@ -13,6 +15,18 @@
|
|
|
13
15
|
border-radius: var(--greese-corner-pill);
|
|
14
16
|
}
|
|
15
17
|
|
|
18
|
+
// The thumb's size, on the wrapper as well as the slider: a custom property
|
|
19
|
+
// inherits down, and the bubble's anchor is the slider's sibling, so reading
|
|
20
|
+
// it from the slider alone would leave the anchor's `calc()` invalid.
|
|
21
|
+
@mixin thumb-size {
|
|
22
|
+
--greese-slider-thumb: 1.25rem;
|
|
23
|
+
|
|
24
|
+
// A thumb big enough for fingers.
|
|
25
|
+
@media (pointer: coarse) {
|
|
26
|
+
--greese-slider-thumb: 1.75rem;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
16
30
|
@mixin thumb {
|
|
17
31
|
box-sizing: border-box;
|
|
18
32
|
inline-size: var(--greese-slider-thumb);
|
|
@@ -24,8 +38,44 @@
|
|
|
24
38
|
}
|
|
25
39
|
|
|
26
40
|
@layer greese.components {
|
|
41
|
+
// The thumb follows the control scale, so a slider in a row of inputs is
|
|
42
|
+
// the same height as they are.
|
|
43
|
+
@each $size, $spec in controls.$sizes {
|
|
44
|
+
.greese-Slider--size-#{$size} {
|
|
45
|
+
--greese-slider-thumb: calc(#{map.get($spec, height)} * 0.5);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Only present when the slider shows a value bubble, so a plain slider's
|
|
50
|
+
// markup is unchanged.
|
|
51
|
+
.greese-Slider-wrap {
|
|
52
|
+
@include thumb-size;
|
|
53
|
+
|
|
54
|
+
position: relative;
|
|
55
|
+
display: block;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// A zero-size anchor sitting at the centre of the thumb, so the bubble
|
|
59
|
+
// follows the value. The thumb's travel is inset by half its width at each
|
|
60
|
+
// end, which is why this is not simply the fill percentage.
|
|
61
|
+
.greese-Slider-thumbAnchor {
|
|
62
|
+
--greese-slider-travel: calc(100% - var(--greese-slider-thumb));
|
|
63
|
+
--greese-slider-offset: calc(
|
|
64
|
+
var(--greese-slider-travel) * var(--greese-slider-ratio, 0)
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
position: absolute;
|
|
68
|
+
inset-block-start: 0;
|
|
69
|
+
inset-inline-start: calc(
|
|
70
|
+
var(--greese-slider-thumb) / 2 + var(--greese-slider-offset)
|
|
71
|
+
);
|
|
72
|
+
inline-size: 0;
|
|
73
|
+
block-size: var(--greese-slider-thumb);
|
|
74
|
+
}
|
|
75
|
+
|
|
27
76
|
.greese-Slider {
|
|
28
|
-
|
|
77
|
+
@include thumb-size;
|
|
78
|
+
|
|
29
79
|
--greese-slider-towards: right;
|
|
30
80
|
|
|
31
81
|
@include mixins.component-root;
|
|
@@ -42,11 +92,6 @@
|
|
|
42
92
|
--greese-slider-towards: left;
|
|
43
93
|
}
|
|
44
94
|
|
|
45
|
-
// A thumb big enough for fingers.
|
|
46
|
-
@media (pointer: coarse) {
|
|
47
|
-
--greese-slider-thumb: 1.75rem;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
95
|
&:focus-visible {
|
|
51
96
|
outline: none;
|
|
52
97
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use '../../styles/
|
|
1
|
+
@use '../../styles/layout-props';
|
|
2
2
|
|
|
3
3
|
@layer greese.components {
|
|
4
4
|
.greese-Stack {
|
|
@@ -7,51 +7,5 @@
|
|
|
7
7
|
min-inline-size: 0;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
@include
|
|
11
|
-
'greese-Stack',
|
|
12
|
-
'direction',
|
|
13
|
-
flex-direction,
|
|
14
|
-
(
|
|
15
|
-
row: row,
|
|
16
|
-
column: column,
|
|
17
|
-
row-reverse: row-reverse,
|
|
18
|
-
column-reverse: column-reverse,
|
|
19
|
-
)
|
|
20
|
-
);
|
|
21
|
-
@include mixins.responsive-prop('greese-Stack', 'gap', gap, mixins.space-tokens());
|
|
22
|
-
@include mixins.responsive-prop(
|
|
23
|
-
'greese-Stack',
|
|
24
|
-
'align',
|
|
25
|
-
align-items,
|
|
26
|
-
(
|
|
27
|
-
start: flex-start,
|
|
28
|
-
center: center,
|
|
29
|
-
end: flex-end,
|
|
30
|
-
stretch: stretch,
|
|
31
|
-
baseline: baseline,
|
|
32
|
-
)
|
|
33
|
-
);
|
|
34
|
-
@include mixins.responsive-prop(
|
|
35
|
-
'greese-Stack',
|
|
36
|
-
'justify',
|
|
37
|
-
justify-content,
|
|
38
|
-
(
|
|
39
|
-
start: flex-start,
|
|
40
|
-
center: center,
|
|
41
|
-
end: flex-end,
|
|
42
|
-
between: space-between,
|
|
43
|
-
around: space-around,
|
|
44
|
-
evenly: space-evenly,
|
|
45
|
-
)
|
|
46
|
-
);
|
|
47
|
-
@include mixins.responsive-prop(
|
|
48
|
-
'greese-Stack',
|
|
49
|
-
'wrap',
|
|
50
|
-
flex-wrap,
|
|
51
|
-
(
|
|
52
|
-
wrap: wrap,
|
|
53
|
-
nowrap: nowrap,
|
|
54
|
-
wrap-reverse: wrap-reverse,
|
|
55
|
-
)
|
|
56
|
-
);
|
|
10
|
+
@include layout-props.stack;
|
|
57
11
|
}
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
display: inline-flex;
|
|
7
7
|
flex-shrink: 0;
|
|
8
8
|
align-items: center;
|
|
9
|
-
inline-size: 2
|
|
10
|
-
block-size: 1.
|
|
9
|
+
inline-size: calc(var(--greese-choice-box, 1.125rem) * 2);
|
|
10
|
+
block-size: calc(var(--greese-choice-box, 1.125rem) * 1.111);
|
|
11
11
|
margin-block: calc((1lh - 1.25rem) / 2);
|
|
12
12
|
}
|
|
13
13
|
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
|
|
44
44
|
.greese-Switch-thumb {
|
|
45
45
|
position: relative;
|
|
46
|
-
inline-size:
|
|
47
|
-
block-size:
|
|
46
|
+
inline-size: calc(var(--greese-choice-box, 1.125rem) * 0.889);
|
|
47
|
+
block-size: calc(var(--greese-choice-box, 1.125rem) * 0.889);
|
|
48
48
|
margin-inline-start: 0.125rem;
|
|
49
49
|
pointer-events: none;
|
|
50
50
|
background-color: var(--greese-color-canvas);
|
|
@@ -53,11 +53,14 @@
|
|
|
53
53
|
transition: translate var(--greese-duration-fast) var(--greese-easing-standard);
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
// The track's width less the thumb and a margin each side (the thumb is
|
|
57
|
+
// 0.889 of a box and the track 2), so it ends inside the track at every
|
|
58
|
+
// size: a fixed 1rem overshot the small one.
|
|
56
59
|
.greese-Switch-input:checked + .greese-Switch-thumb {
|
|
57
|
-
translate:
|
|
60
|
+
translate: calc(125% - 0.25rem) 0;
|
|
58
61
|
|
|
59
62
|
&:dir(rtl) {
|
|
60
|
-
translate: -
|
|
63
|
+
translate: calc(0.25rem - 125%) 0;
|
|
61
64
|
}
|
|
62
65
|
}
|
|
63
66
|
}
|
|
@@ -6,14 +6,17 @@
|
|
|
6
6
|
margin: 0;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
+
// Doubled with `.greese-Text` to beat the type variant every Text carries
|
|
10
|
+
// (`greese-Type--p1` when none is named), which comes later and sets weight
|
|
11
|
+
// and colour too. Text only renders a weight with no variant named.
|
|
9
12
|
@each $weight in (regular, medium, semibold, bold) {
|
|
10
|
-
.greese-Text--#{$weight} {
|
|
13
|
+
.greese-Text.greese-Text--#{$weight} {
|
|
11
14
|
font-weight: var(--greese-font-weight-#{$weight});
|
|
12
15
|
}
|
|
13
16
|
}
|
|
14
17
|
|
|
15
18
|
@each $tone, $pair in tones.$tones {
|
|
16
|
-
.greese-Text--#{$tone} {
|
|
19
|
+
.greese-Text.greese-Text--#{$tone} {
|
|
17
20
|
color: list.nth($pair, 1);
|
|
18
21
|
}
|
|
19
22
|
}
|
|
@@ -1,16 +1,22 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
1
|
+
// The breakpoints the stylesheet is built with, as custom properties for CSS
|
|
2
|
+
// and JavaScript to read: `--greese-breakpoint-md: 900px`, and the keys in
|
|
3
|
+
// order, `--greese-breakpoint-keys: xs sm md lg xl`, which
|
|
4
|
+
// `configureBreakpoints()` reads. Media queries can't use them, so they're
|
|
5
|
+
// written once, here, from the configured breakpoints.
|
|
6
|
+
@use 'sass:list';
|
|
7
|
+
@use 'sass:map';
|
|
5
8
|
@use 'config';
|
|
6
|
-
@use '../../dist/maps' as defaults;
|
|
7
9
|
|
|
8
|
-
@
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
--greese-breakpoint-#{$key}: #{$min};
|
|
13
|
-
}
|
|
10
|
+
@layer greese.tokens {
|
|
11
|
+
:root {
|
|
12
|
+
@each $key, $min in config.$breakpoints {
|
|
13
|
+
--greese-breakpoint-#{$key}: #{$min};
|
|
14
14
|
}
|
|
15
|
+
|
|
16
|
+
--greese-breakpoint-keys: #{list.join(
|
|
17
|
+
map.keys(config.$breakpoints),
|
|
18
|
+
(),
|
|
19
|
+
$separator: space
|
|
20
|
+
)};
|
|
15
21
|
}
|
|
16
22
|
}
|