@greese/ui 1.1.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/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 +978 -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 +18830 -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/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 +53 -23
- 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/extrude.css +42 -42
- package/themes/folio.css +200 -200
- package/themes/folio.scss +880 -878
- 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/ticket.css +180 -180
- package/themes/ticket.scss +881 -879
- package/themes/tilt.css +25 -25
package/dist/tokens.css
CHANGED
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
--greese-breakpoint-md: 900px;
|
|
57
57
|
--greese-breakpoint-lg: 1200px;
|
|
58
58
|
--greese-breakpoint-xl: 1536px;
|
|
59
|
+
--greese-breakpoint-keys: xs sm md lg xl;
|
|
59
60
|
--greese-type-p1-font-size: 1.125rem;
|
|
60
61
|
--greese-type-p1-font-weight: 400;
|
|
61
62
|
--greese-type-p1-line-height: 1.6;
|
|
@@ -111,7 +112,7 @@
|
|
|
111
112
|
--greese-type-caption-line-height: 1.4;
|
|
112
113
|
--greese-type-caption-letter-spacing: 0.02em;
|
|
113
114
|
--greese-type-button-font-size: 0.9375rem;
|
|
114
|
-
--greese-type-button-font-weight:
|
|
115
|
+
--greese-type-button-font-weight: 700;
|
|
115
116
|
--greese-type-button-line-height: 1.25;
|
|
116
117
|
--greese-type-button-letter-spacing: 0;
|
|
117
118
|
}
|
|
@@ -251,3 +252,31 @@
|
|
|
251
252
|
}
|
|
252
253
|
}
|
|
253
254
|
}
|
|
255
|
+
|
|
256
|
+
@layer greese.utilities {
|
|
257
|
+
[data-greese-motion='reduce'],
|
|
258
|
+
[data-greese-motion='reduce'] [data-greese-theme] {
|
|
259
|
+
--greese-duration-fast: 0.01ms;
|
|
260
|
+
--greese-duration-normal: 0.01ms;
|
|
261
|
+
--greese-duration-slow: 0.01ms;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
[data-greese-motion='reduce'],
|
|
265
|
+
[data-greese-motion='reduce'] *,
|
|
266
|
+
[data-greese-motion='reduce'] ::before,
|
|
267
|
+
[data-greese-motion='reduce'] ::after {
|
|
268
|
+
animation-duration: 0.01ms;
|
|
269
|
+
animation-delay: 0s;
|
|
270
|
+
animation-iteration-count: 1;
|
|
271
|
+
transition-duration: 0.01ms;
|
|
272
|
+
transition-delay: 0s;
|
|
273
|
+
scroll-behavior: auto;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
:root[data-greese-motion='reduce']::view-transition-group(*),
|
|
277
|
+
:root[data-greese-motion='reduce']::view-transition-old(*),
|
|
278
|
+
:root[data-greese-motion='reduce']::view-transition-new(*) {
|
|
279
|
+
animation-duration: 0.01ms;
|
|
280
|
+
animation-delay: 0s;
|
|
281
|
+
}
|
|
282
|
+
}
|
package/dist/typography.js
CHANGED
|
@@ -94,7 +94,7 @@ export const typography = {
|
|
|
94
94
|
p2: { base: t('1rem', '400', '1.55') },
|
|
95
95
|
p3: { base: t('0.875rem', '400', '1.5') },
|
|
96
96
|
caption: { base: t('0.75rem', '400', '1.4', '0.02em') },
|
|
97
|
-
button: { base: t('0.9375rem', '
|
|
97
|
+
button: { base: t('0.9375rem', '700', '1.25') },
|
|
98
98
|
};
|
|
99
99
|
/** `--greese-type-h1-font-size`, for the type property `fontSize`. */
|
|
100
100
|
export const typeVar = (variant, prop) => `--greese-type-${variant}-${cssProperty(prop)}`;
|
package/dist/utilities.css
CHANGED
|
@@ -2019,6 +2019,219 @@
|
|
|
2019
2019
|
.border-color-current {
|
|
2020
2020
|
border-color: currentcolor;
|
|
2021
2021
|
}
|
|
2022
|
+
.fill-canvas {
|
|
2023
|
+
fill: var(--greese-color-canvas);
|
|
2024
|
+
}
|
|
2025
|
+
.fill-surface {
|
|
2026
|
+
fill: var(--greese-color-surface);
|
|
2027
|
+
}
|
|
2028
|
+
.fill-surface-overlay {
|
|
2029
|
+
fill: var(--greese-color-surface-overlay);
|
|
2030
|
+
}
|
|
2031
|
+
.fill-fg {
|
|
2032
|
+
fill: var(--greese-color-fg);
|
|
2033
|
+
}
|
|
2034
|
+
.fill-fg-muted {
|
|
2035
|
+
fill: var(--greese-color-fg-muted);
|
|
2036
|
+
}
|
|
2037
|
+
.fill-border {
|
|
2038
|
+
fill: var(--greese-color-border);
|
|
2039
|
+
}
|
|
2040
|
+
.fill-border-strong {
|
|
2041
|
+
fill: var(--greese-color-border-strong);
|
|
2042
|
+
}
|
|
2043
|
+
.fill-track {
|
|
2044
|
+
fill: var(--greese-color-track);
|
|
2045
|
+
}
|
|
2046
|
+
.fill-primary {
|
|
2047
|
+
fill: var(--greese-color-primary);
|
|
2048
|
+
}
|
|
2049
|
+
.fill-primary-strong {
|
|
2050
|
+
fill: var(--greese-color-primary-strong);
|
|
2051
|
+
}
|
|
2052
|
+
.fill-primary-content {
|
|
2053
|
+
fill: var(--greese-color-primary-content);
|
|
2054
|
+
}
|
|
2055
|
+
.fill-secondary {
|
|
2056
|
+
fill: var(--greese-color-secondary);
|
|
2057
|
+
}
|
|
2058
|
+
.fill-secondary-strong {
|
|
2059
|
+
fill: var(--greese-color-secondary-strong);
|
|
2060
|
+
}
|
|
2061
|
+
.fill-secondary-content {
|
|
2062
|
+
fill: var(--greese-color-secondary-content);
|
|
2063
|
+
}
|
|
2064
|
+
.fill-tertiary {
|
|
2065
|
+
fill: var(--greese-color-tertiary);
|
|
2066
|
+
}
|
|
2067
|
+
.fill-tertiary-strong {
|
|
2068
|
+
fill: var(--greese-color-tertiary-strong);
|
|
2069
|
+
}
|
|
2070
|
+
.fill-tertiary-content {
|
|
2071
|
+
fill: var(--greese-color-tertiary-content);
|
|
2072
|
+
}
|
|
2073
|
+
.fill-accent {
|
|
2074
|
+
fill: var(--greese-color-accent);
|
|
2075
|
+
}
|
|
2076
|
+
.fill-accent-strong {
|
|
2077
|
+
fill: var(--greese-color-accent-strong);
|
|
2078
|
+
}
|
|
2079
|
+
.fill-accent-content {
|
|
2080
|
+
fill: var(--greese-color-accent-content);
|
|
2081
|
+
}
|
|
2082
|
+
.fill-focus-ring {
|
|
2083
|
+
fill: var(--greese-color-focus-ring);
|
|
2084
|
+
}
|
|
2085
|
+
.fill-positive {
|
|
2086
|
+
fill: var(--greese-color-positive);
|
|
2087
|
+
}
|
|
2088
|
+
.fill-negative {
|
|
2089
|
+
fill: var(--greese-color-negative);
|
|
2090
|
+
}
|
|
2091
|
+
.fill-negative-content {
|
|
2092
|
+
fill: var(--greese-color-negative-content);
|
|
2093
|
+
}
|
|
2094
|
+
.fill-warning {
|
|
2095
|
+
fill: var(--greese-color-warning);
|
|
2096
|
+
}
|
|
2097
|
+
.fill-info {
|
|
2098
|
+
fill: var(--greese-color-info);
|
|
2099
|
+
}
|
|
2100
|
+
.fill-white {
|
|
2101
|
+
fill: var(--greese-color-white);
|
|
2102
|
+
}
|
|
2103
|
+
.fill-black {
|
|
2104
|
+
fill: var(--greese-color-black);
|
|
2105
|
+
}
|
|
2106
|
+
.fill-scrim {
|
|
2107
|
+
fill: var(--greese-color-scrim);
|
|
2108
|
+
}
|
|
2109
|
+
.fill-transparent {
|
|
2110
|
+
fill: transparent;
|
|
2111
|
+
}
|
|
2112
|
+
.fill-inherit {
|
|
2113
|
+
fill: inherit;
|
|
2114
|
+
}
|
|
2115
|
+
.fill-current {
|
|
2116
|
+
fill: currentcolor;
|
|
2117
|
+
}
|
|
2118
|
+
.fill-none {
|
|
2119
|
+
fill: none;
|
|
2120
|
+
}
|
|
2121
|
+
.stroke-canvas {
|
|
2122
|
+
stroke: var(--greese-color-canvas);
|
|
2123
|
+
}
|
|
2124
|
+
.stroke-surface {
|
|
2125
|
+
stroke: var(--greese-color-surface);
|
|
2126
|
+
}
|
|
2127
|
+
.stroke-surface-overlay {
|
|
2128
|
+
stroke: var(--greese-color-surface-overlay);
|
|
2129
|
+
}
|
|
2130
|
+
.stroke-fg {
|
|
2131
|
+
stroke: var(--greese-color-fg);
|
|
2132
|
+
}
|
|
2133
|
+
.stroke-fg-muted {
|
|
2134
|
+
stroke: var(--greese-color-fg-muted);
|
|
2135
|
+
}
|
|
2136
|
+
.stroke-border {
|
|
2137
|
+
stroke: var(--greese-color-border);
|
|
2138
|
+
}
|
|
2139
|
+
.stroke-border-strong {
|
|
2140
|
+
stroke: var(--greese-color-border-strong);
|
|
2141
|
+
}
|
|
2142
|
+
.stroke-track {
|
|
2143
|
+
stroke: var(--greese-color-track);
|
|
2144
|
+
}
|
|
2145
|
+
.stroke-primary {
|
|
2146
|
+
stroke: var(--greese-color-primary);
|
|
2147
|
+
}
|
|
2148
|
+
.stroke-primary-strong {
|
|
2149
|
+
stroke: var(--greese-color-primary-strong);
|
|
2150
|
+
}
|
|
2151
|
+
.stroke-primary-content {
|
|
2152
|
+
stroke: var(--greese-color-primary-content);
|
|
2153
|
+
}
|
|
2154
|
+
.stroke-secondary {
|
|
2155
|
+
stroke: var(--greese-color-secondary);
|
|
2156
|
+
}
|
|
2157
|
+
.stroke-secondary-strong {
|
|
2158
|
+
stroke: var(--greese-color-secondary-strong);
|
|
2159
|
+
}
|
|
2160
|
+
.stroke-secondary-content {
|
|
2161
|
+
stroke: var(--greese-color-secondary-content);
|
|
2162
|
+
}
|
|
2163
|
+
.stroke-tertiary {
|
|
2164
|
+
stroke: var(--greese-color-tertiary);
|
|
2165
|
+
}
|
|
2166
|
+
.stroke-tertiary-strong {
|
|
2167
|
+
stroke: var(--greese-color-tertiary-strong);
|
|
2168
|
+
}
|
|
2169
|
+
.stroke-tertiary-content {
|
|
2170
|
+
stroke: var(--greese-color-tertiary-content);
|
|
2171
|
+
}
|
|
2172
|
+
.stroke-accent {
|
|
2173
|
+
stroke: var(--greese-color-accent);
|
|
2174
|
+
}
|
|
2175
|
+
.stroke-accent-strong {
|
|
2176
|
+
stroke: var(--greese-color-accent-strong);
|
|
2177
|
+
}
|
|
2178
|
+
.stroke-accent-content {
|
|
2179
|
+
stroke: var(--greese-color-accent-content);
|
|
2180
|
+
}
|
|
2181
|
+
.stroke-focus-ring {
|
|
2182
|
+
stroke: var(--greese-color-focus-ring);
|
|
2183
|
+
}
|
|
2184
|
+
.stroke-positive {
|
|
2185
|
+
stroke: var(--greese-color-positive);
|
|
2186
|
+
}
|
|
2187
|
+
.stroke-negative {
|
|
2188
|
+
stroke: var(--greese-color-negative);
|
|
2189
|
+
}
|
|
2190
|
+
.stroke-negative-content {
|
|
2191
|
+
stroke: var(--greese-color-negative-content);
|
|
2192
|
+
}
|
|
2193
|
+
.stroke-warning {
|
|
2194
|
+
stroke: var(--greese-color-warning);
|
|
2195
|
+
}
|
|
2196
|
+
.stroke-info {
|
|
2197
|
+
stroke: var(--greese-color-info);
|
|
2198
|
+
}
|
|
2199
|
+
.stroke-white {
|
|
2200
|
+
stroke: var(--greese-color-white);
|
|
2201
|
+
}
|
|
2202
|
+
.stroke-black {
|
|
2203
|
+
stroke: var(--greese-color-black);
|
|
2204
|
+
}
|
|
2205
|
+
.stroke-scrim {
|
|
2206
|
+
stroke: var(--greese-color-scrim);
|
|
2207
|
+
}
|
|
2208
|
+
.stroke-transparent {
|
|
2209
|
+
stroke: transparent;
|
|
2210
|
+
}
|
|
2211
|
+
.stroke-inherit {
|
|
2212
|
+
stroke: inherit;
|
|
2213
|
+
}
|
|
2214
|
+
.stroke-current {
|
|
2215
|
+
stroke: currentcolor;
|
|
2216
|
+
}
|
|
2217
|
+
.stroke-none {
|
|
2218
|
+
stroke: none;
|
|
2219
|
+
}
|
|
2220
|
+
.stroke-width-0 {
|
|
2221
|
+
stroke-width: 0;
|
|
2222
|
+
}
|
|
2223
|
+
.stroke-width-1 {
|
|
2224
|
+
stroke-width: 1;
|
|
2225
|
+
}
|
|
2226
|
+
.stroke-width-2 {
|
|
2227
|
+
stroke-width: 2;
|
|
2228
|
+
}
|
|
2229
|
+
.stroke-width-3 {
|
|
2230
|
+
stroke-width: 3;
|
|
2231
|
+
}
|
|
2232
|
+
.stroke-width-4 {
|
|
2233
|
+
stroke-width: 4;
|
|
2234
|
+
}
|
|
2022
2235
|
.opacity-0 {
|
|
2023
2236
|
opacity: 0;
|
|
2024
2237
|
}
|
|
@@ -2070,6 +2283,30 @@
|
|
|
2070
2283
|
.user-select-auto {
|
|
2071
2284
|
user-select: auto;
|
|
2072
2285
|
}
|
|
2286
|
+
.touch-action-none {
|
|
2287
|
+
touch-action: none;
|
|
2288
|
+
}
|
|
2289
|
+
.touch-action-auto {
|
|
2290
|
+
touch-action: auto;
|
|
2291
|
+
}
|
|
2292
|
+
.touch-action-pan-x {
|
|
2293
|
+
touch-action: pan-x;
|
|
2294
|
+
}
|
|
2295
|
+
.touch-action-pan-y {
|
|
2296
|
+
touch-action: pan-y;
|
|
2297
|
+
}
|
|
2298
|
+
.touch-action-manipulation {
|
|
2299
|
+
touch-action: manipulation;
|
|
2300
|
+
}
|
|
2301
|
+
.scrollbar-width-auto {
|
|
2302
|
+
scrollbar-width: auto;
|
|
2303
|
+
}
|
|
2304
|
+
.scrollbar-width-thin {
|
|
2305
|
+
scrollbar-width: thin;
|
|
2306
|
+
}
|
|
2307
|
+
.scrollbar-width-none {
|
|
2308
|
+
scrollbar-width: none;
|
|
2309
|
+
}
|
|
2073
2310
|
.transition {
|
|
2074
2311
|
transition-property: color, background-color, border-color, opacity, box-shadow, translate, scale, rotate;
|
|
2075
2312
|
transition-duration: var(--greese-duration-normal);
|
|
@@ -2388,6 +2625,204 @@
|
|
|
2388
2625
|
.hover-border-color-current:hover {
|
|
2389
2626
|
border-color: currentcolor;
|
|
2390
2627
|
}
|
|
2628
|
+
.hover-fill-canvas:hover {
|
|
2629
|
+
fill: var(--greese-color-canvas);
|
|
2630
|
+
}
|
|
2631
|
+
.hover-fill-surface:hover {
|
|
2632
|
+
fill: var(--greese-color-surface);
|
|
2633
|
+
}
|
|
2634
|
+
.hover-fill-surface-overlay:hover {
|
|
2635
|
+
fill: var(--greese-color-surface-overlay);
|
|
2636
|
+
}
|
|
2637
|
+
.hover-fill-fg:hover {
|
|
2638
|
+
fill: var(--greese-color-fg);
|
|
2639
|
+
}
|
|
2640
|
+
.hover-fill-fg-muted:hover {
|
|
2641
|
+
fill: var(--greese-color-fg-muted);
|
|
2642
|
+
}
|
|
2643
|
+
.hover-fill-border:hover {
|
|
2644
|
+
fill: var(--greese-color-border);
|
|
2645
|
+
}
|
|
2646
|
+
.hover-fill-border-strong:hover {
|
|
2647
|
+
fill: var(--greese-color-border-strong);
|
|
2648
|
+
}
|
|
2649
|
+
.hover-fill-track:hover {
|
|
2650
|
+
fill: var(--greese-color-track);
|
|
2651
|
+
}
|
|
2652
|
+
.hover-fill-primary:hover {
|
|
2653
|
+
fill: var(--greese-color-primary);
|
|
2654
|
+
}
|
|
2655
|
+
.hover-fill-primary-strong:hover {
|
|
2656
|
+
fill: var(--greese-color-primary-strong);
|
|
2657
|
+
}
|
|
2658
|
+
.hover-fill-primary-content:hover {
|
|
2659
|
+
fill: var(--greese-color-primary-content);
|
|
2660
|
+
}
|
|
2661
|
+
.hover-fill-secondary:hover {
|
|
2662
|
+
fill: var(--greese-color-secondary);
|
|
2663
|
+
}
|
|
2664
|
+
.hover-fill-secondary-strong:hover {
|
|
2665
|
+
fill: var(--greese-color-secondary-strong);
|
|
2666
|
+
}
|
|
2667
|
+
.hover-fill-secondary-content:hover {
|
|
2668
|
+
fill: var(--greese-color-secondary-content);
|
|
2669
|
+
}
|
|
2670
|
+
.hover-fill-tertiary:hover {
|
|
2671
|
+
fill: var(--greese-color-tertiary);
|
|
2672
|
+
}
|
|
2673
|
+
.hover-fill-tertiary-strong:hover {
|
|
2674
|
+
fill: var(--greese-color-tertiary-strong);
|
|
2675
|
+
}
|
|
2676
|
+
.hover-fill-tertiary-content:hover {
|
|
2677
|
+
fill: var(--greese-color-tertiary-content);
|
|
2678
|
+
}
|
|
2679
|
+
.hover-fill-accent:hover {
|
|
2680
|
+
fill: var(--greese-color-accent);
|
|
2681
|
+
}
|
|
2682
|
+
.hover-fill-accent-strong:hover {
|
|
2683
|
+
fill: var(--greese-color-accent-strong);
|
|
2684
|
+
}
|
|
2685
|
+
.hover-fill-accent-content:hover {
|
|
2686
|
+
fill: var(--greese-color-accent-content);
|
|
2687
|
+
}
|
|
2688
|
+
.hover-fill-focus-ring:hover {
|
|
2689
|
+
fill: var(--greese-color-focus-ring);
|
|
2690
|
+
}
|
|
2691
|
+
.hover-fill-positive:hover {
|
|
2692
|
+
fill: var(--greese-color-positive);
|
|
2693
|
+
}
|
|
2694
|
+
.hover-fill-negative:hover {
|
|
2695
|
+
fill: var(--greese-color-negative);
|
|
2696
|
+
}
|
|
2697
|
+
.hover-fill-negative-content:hover {
|
|
2698
|
+
fill: var(--greese-color-negative-content);
|
|
2699
|
+
}
|
|
2700
|
+
.hover-fill-warning:hover {
|
|
2701
|
+
fill: var(--greese-color-warning);
|
|
2702
|
+
}
|
|
2703
|
+
.hover-fill-info:hover {
|
|
2704
|
+
fill: var(--greese-color-info);
|
|
2705
|
+
}
|
|
2706
|
+
.hover-fill-white:hover {
|
|
2707
|
+
fill: var(--greese-color-white);
|
|
2708
|
+
}
|
|
2709
|
+
.hover-fill-black:hover {
|
|
2710
|
+
fill: var(--greese-color-black);
|
|
2711
|
+
}
|
|
2712
|
+
.hover-fill-scrim:hover {
|
|
2713
|
+
fill: var(--greese-color-scrim);
|
|
2714
|
+
}
|
|
2715
|
+
.hover-fill-transparent:hover {
|
|
2716
|
+
fill: transparent;
|
|
2717
|
+
}
|
|
2718
|
+
.hover-fill-inherit:hover {
|
|
2719
|
+
fill: inherit;
|
|
2720
|
+
}
|
|
2721
|
+
.hover-fill-current:hover {
|
|
2722
|
+
fill: currentcolor;
|
|
2723
|
+
}
|
|
2724
|
+
.hover-fill-none:hover {
|
|
2725
|
+
fill: none;
|
|
2726
|
+
}
|
|
2727
|
+
.hover-stroke-canvas:hover {
|
|
2728
|
+
stroke: var(--greese-color-canvas);
|
|
2729
|
+
}
|
|
2730
|
+
.hover-stroke-surface:hover {
|
|
2731
|
+
stroke: var(--greese-color-surface);
|
|
2732
|
+
}
|
|
2733
|
+
.hover-stroke-surface-overlay:hover {
|
|
2734
|
+
stroke: var(--greese-color-surface-overlay);
|
|
2735
|
+
}
|
|
2736
|
+
.hover-stroke-fg:hover {
|
|
2737
|
+
stroke: var(--greese-color-fg);
|
|
2738
|
+
}
|
|
2739
|
+
.hover-stroke-fg-muted:hover {
|
|
2740
|
+
stroke: var(--greese-color-fg-muted);
|
|
2741
|
+
}
|
|
2742
|
+
.hover-stroke-border:hover {
|
|
2743
|
+
stroke: var(--greese-color-border);
|
|
2744
|
+
}
|
|
2745
|
+
.hover-stroke-border-strong:hover {
|
|
2746
|
+
stroke: var(--greese-color-border-strong);
|
|
2747
|
+
}
|
|
2748
|
+
.hover-stroke-track:hover {
|
|
2749
|
+
stroke: var(--greese-color-track);
|
|
2750
|
+
}
|
|
2751
|
+
.hover-stroke-primary:hover {
|
|
2752
|
+
stroke: var(--greese-color-primary);
|
|
2753
|
+
}
|
|
2754
|
+
.hover-stroke-primary-strong:hover {
|
|
2755
|
+
stroke: var(--greese-color-primary-strong);
|
|
2756
|
+
}
|
|
2757
|
+
.hover-stroke-primary-content:hover {
|
|
2758
|
+
stroke: var(--greese-color-primary-content);
|
|
2759
|
+
}
|
|
2760
|
+
.hover-stroke-secondary:hover {
|
|
2761
|
+
stroke: var(--greese-color-secondary);
|
|
2762
|
+
}
|
|
2763
|
+
.hover-stroke-secondary-strong:hover {
|
|
2764
|
+
stroke: var(--greese-color-secondary-strong);
|
|
2765
|
+
}
|
|
2766
|
+
.hover-stroke-secondary-content:hover {
|
|
2767
|
+
stroke: var(--greese-color-secondary-content);
|
|
2768
|
+
}
|
|
2769
|
+
.hover-stroke-tertiary:hover {
|
|
2770
|
+
stroke: var(--greese-color-tertiary);
|
|
2771
|
+
}
|
|
2772
|
+
.hover-stroke-tertiary-strong:hover {
|
|
2773
|
+
stroke: var(--greese-color-tertiary-strong);
|
|
2774
|
+
}
|
|
2775
|
+
.hover-stroke-tertiary-content:hover {
|
|
2776
|
+
stroke: var(--greese-color-tertiary-content);
|
|
2777
|
+
}
|
|
2778
|
+
.hover-stroke-accent:hover {
|
|
2779
|
+
stroke: var(--greese-color-accent);
|
|
2780
|
+
}
|
|
2781
|
+
.hover-stroke-accent-strong:hover {
|
|
2782
|
+
stroke: var(--greese-color-accent-strong);
|
|
2783
|
+
}
|
|
2784
|
+
.hover-stroke-accent-content:hover {
|
|
2785
|
+
stroke: var(--greese-color-accent-content);
|
|
2786
|
+
}
|
|
2787
|
+
.hover-stroke-focus-ring:hover {
|
|
2788
|
+
stroke: var(--greese-color-focus-ring);
|
|
2789
|
+
}
|
|
2790
|
+
.hover-stroke-positive:hover {
|
|
2791
|
+
stroke: var(--greese-color-positive);
|
|
2792
|
+
}
|
|
2793
|
+
.hover-stroke-negative:hover {
|
|
2794
|
+
stroke: var(--greese-color-negative);
|
|
2795
|
+
}
|
|
2796
|
+
.hover-stroke-negative-content:hover {
|
|
2797
|
+
stroke: var(--greese-color-negative-content);
|
|
2798
|
+
}
|
|
2799
|
+
.hover-stroke-warning:hover {
|
|
2800
|
+
stroke: var(--greese-color-warning);
|
|
2801
|
+
}
|
|
2802
|
+
.hover-stroke-info:hover {
|
|
2803
|
+
stroke: var(--greese-color-info);
|
|
2804
|
+
}
|
|
2805
|
+
.hover-stroke-white:hover {
|
|
2806
|
+
stroke: var(--greese-color-white);
|
|
2807
|
+
}
|
|
2808
|
+
.hover-stroke-black:hover {
|
|
2809
|
+
stroke: var(--greese-color-black);
|
|
2810
|
+
}
|
|
2811
|
+
.hover-stroke-scrim:hover {
|
|
2812
|
+
stroke: var(--greese-color-scrim);
|
|
2813
|
+
}
|
|
2814
|
+
.hover-stroke-transparent:hover {
|
|
2815
|
+
stroke: transparent;
|
|
2816
|
+
}
|
|
2817
|
+
.hover-stroke-inherit:hover {
|
|
2818
|
+
stroke: inherit;
|
|
2819
|
+
}
|
|
2820
|
+
.hover-stroke-current:hover {
|
|
2821
|
+
stroke: currentcolor;
|
|
2822
|
+
}
|
|
2823
|
+
.hover-stroke-none:hover {
|
|
2824
|
+
stroke: none;
|
|
2825
|
+
}
|
|
2391
2826
|
.hover-opacity-0:hover {
|
|
2392
2827
|
opacity: 0;
|
|
2393
2828
|
}
|
package/dist/utilities.d.ts
CHANGED
|
@@ -64,6 +64,14 @@ export declare const utilityClasses: ({ prefix, groups, breakpoints, }?: Utility
|
|
|
64
64
|
* `purgeUtilities`).
|
|
65
65
|
*/
|
|
66
66
|
export declare const generateUtilities: (options?: UtilityOptions) => string;
|
|
67
|
+
/**
|
|
68
|
+
* The utility table as a Sass module, written to `dist/_utilities-table.scss`
|
|
69
|
+
* for `pkg:@greese/ui/scss/utilities`: every definition's group, stem and
|
|
70
|
+
* variants, and each value's declarations, in the order `generateUtilities`
|
|
71
|
+
* writes them. The Sass mixin there writes the same classes, with the
|
|
72
|
+
* breakpoints the stylesheet is built with (a test keeps the two equal).
|
|
73
|
+
*/
|
|
74
|
+
export declare const utilitiesScss: () => string;
|
|
67
75
|
/** Every token in some source text that could be a class name. */
|
|
68
76
|
export declare const scanContent: (text: string) => Set<string>;
|
|
69
77
|
export interface PurgeOptions extends Omit<UtilityOptions, 'used'> {
|
package/dist/utilities.js
CHANGED
|
@@ -514,6 +514,27 @@ const definitions = [
|
|
|
514
514
|
values: colors,
|
|
515
515
|
hover: true,
|
|
516
516
|
},
|
|
517
|
+
// SVG paint: a drawing's fills and strokes in the theme's colors.
|
|
518
|
+
{
|
|
519
|
+
group: 'color',
|
|
520
|
+
stem: 'fill',
|
|
521
|
+
property: 'fill',
|
|
522
|
+
values: { ...colors, none: 'none' },
|
|
523
|
+
hover: true,
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
group: 'color',
|
|
527
|
+
stem: 'stroke',
|
|
528
|
+
property: 'stroke',
|
|
529
|
+
values: { ...colors, none: 'none' },
|
|
530
|
+
hover: true,
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
group: 'color',
|
|
534
|
+
stem: 'stroke-width',
|
|
535
|
+
property: 'stroke-width',
|
|
536
|
+
values: { '0': '0', '1': '1', '2': '2', '3': '3', '4': '4' },
|
|
537
|
+
},
|
|
517
538
|
// Effects and interaction.
|
|
518
539
|
{
|
|
519
540
|
group: 'effects',
|
|
@@ -540,6 +561,27 @@ const definitions = [
|
|
|
540
561
|
property: 'user-select',
|
|
541
562
|
values: same('none', 'text', 'all', 'auto'),
|
|
542
563
|
},
|
|
564
|
+
/*
|
|
565
|
+
* Two whole-element concerns a dense interface needs, in the same shape as
|
|
566
|
+
* `cursor` and `user-select` beside them. A tool surface that pans and zooms
|
|
567
|
+
* has to tell the browser not to scroll or pinch it
|
|
568
|
+
* (`touch-action-none`), and a panel that scrolls inside a packed layout
|
|
569
|
+
* needs its scrollbar out of the way (`scrollbar-width-thin`). Both were
|
|
570
|
+
* found in a consumer's stylesheets, where each was the only reason the file
|
|
571
|
+
* existed.
|
|
572
|
+
*/
|
|
573
|
+
{
|
|
574
|
+
group: 'effects',
|
|
575
|
+
stem: 'touch-action',
|
|
576
|
+
property: 'touch-action',
|
|
577
|
+
values: same('none', 'auto', 'pan-x', 'pan-y', 'manipulation'),
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
group: 'effects',
|
|
581
|
+
stem: 'scrollbar-width',
|
|
582
|
+
property: 'scrollbar-width',
|
|
583
|
+
values: same('auto', 'thin', 'none'),
|
|
584
|
+
},
|
|
543
585
|
{
|
|
544
586
|
group: 'effects',
|
|
545
587
|
stem: 'transition',
|
|
@@ -614,6 +656,39 @@ export const generateUtilities = (options = {}) => {
|
|
|
614
656
|
.map((c) => rule(`.${c.name}${variant === 'hover' ? ':hover' : ''}`, c.declarations, ' ')));
|
|
615
657
|
return `/* GENERATED by @greese/ui from src/utilities.ts - do not edit. */\n${LAYER_ORDER}\n${blocks.length ? `@layer greese.utilities {\n${blocks.join('\n')}\n}\n` : ''}`;
|
|
616
658
|
};
|
|
659
|
+
/**
|
|
660
|
+
* The utility table as a Sass module, written to `dist/_utilities-table.scss`
|
|
661
|
+
* for `pkg:@greese/ui/scss/utilities`: every definition's group, stem and
|
|
662
|
+
* variants, and each value's declarations, in the order `generateUtilities`
|
|
663
|
+
* writes them. The Sass mixin there writes the same classes, with the
|
|
664
|
+
* breakpoints the stylesheet is built with (a test keeps the two equal).
|
|
665
|
+
*/
|
|
666
|
+
export const utilitiesScss = () => {
|
|
667
|
+
const str = (value) => JSON.stringify(value);
|
|
668
|
+
const entries = definitions.map((d) => {
|
|
669
|
+
const values = Object.entries(d.values).map(([value, setting]) => {
|
|
670
|
+
const declarations = Object.entries(declarationsOf(d, setting))
|
|
671
|
+
.map(([property, v]) => `${str(property)}: ${str(v)}`)
|
|
672
|
+
.join(', ');
|
|
673
|
+
return ` ${str(value)}: (${declarations}),`;
|
|
674
|
+
});
|
|
675
|
+
return ` (
|
|
676
|
+
group: ${d.group},
|
|
677
|
+
stem: ${str(d.stem)},
|
|
678
|
+
responsive: ${!!d.responsive},
|
|
679
|
+
hover: ${!!d.hover},
|
|
680
|
+
values: (
|
|
681
|
+
${values.join('\n')}
|
|
682
|
+
),
|
|
683
|
+
),`;
|
|
684
|
+
});
|
|
685
|
+
return `// GENERATED by @greese/ui from src/utilities.ts - do not edit.
|
|
686
|
+
$groups: (${[...new Set(definitions.map((d) => d.group))].join(', ')});
|
|
687
|
+
$definitions: (
|
|
688
|
+
${entries.join('\n')}
|
|
689
|
+
);
|
|
690
|
+
`;
|
|
691
|
+
};
|
|
617
692
|
/** Every token in some source text that could be a class name. */
|
|
618
693
|
export const scanContent = (text) => new Set(text.match(/[A-Za-z0-9_-]+/g) ?? []);
|
|
619
694
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@greese/ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "greese ui's CSS and design tokens: a framework-free stylesheet, per-component CSS, custom properties, Sass kit and TypeScript constants. Works in plain HTML, or under any framework.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"css",
|
|
@@ -66,6 +66,10 @@
|
|
|
66
66
|
"types": "./dist/utilitiesFiles.d.ts",
|
|
67
67
|
"default": "./dist/utilitiesFiles.js"
|
|
68
68
|
},
|
|
69
|
+
"./theme-files": {
|
|
70
|
+
"types": "./dist/themeFiles/index.d.ts",
|
|
71
|
+
"default": "./dist/themeFiles/index.js"
|
|
72
|
+
},
|
|
69
73
|
"./vite": {
|
|
70
74
|
"types": "./dist/vite.d.ts",
|
|
71
75
|
"default": "./dist/vite.js"
|
|
@@ -86,9 +90,15 @@
|
|
|
86
90
|
"./scss/config": {
|
|
87
91
|
"sass": "./src/styles/_config.scss"
|
|
88
92
|
},
|
|
93
|
+
"./scss/core": {
|
|
94
|
+
"sass": "./src/styles/_core.scss"
|
|
95
|
+
},
|
|
89
96
|
"./scss/mixins": {
|
|
90
97
|
"sass": "./src/styles/public/_mixins.scss"
|
|
91
98
|
},
|
|
99
|
+
"./scss/breakpoints": {
|
|
100
|
+
"sass": "./src/styles/public/_breakpoints.scss"
|
|
101
|
+
},
|
|
92
102
|
"./scss/tones": {
|
|
93
103
|
"sass": "./src/styles/public/_tones.scss"
|
|
94
104
|
},
|
|
@@ -98,6 +108,15 @@
|
|
|
98
108
|
"./scss/controls": {
|
|
99
109
|
"sass": "./src/styles/public/_controls.scss"
|
|
100
110
|
},
|
|
111
|
+
"./scss/slides": {
|
|
112
|
+
"sass": "./src/styles/public/_slides.scss"
|
|
113
|
+
},
|
|
114
|
+
"./scss/utilities": {
|
|
115
|
+
"sass": "./src/styles/public/_utilities.scss"
|
|
116
|
+
},
|
|
117
|
+
"./scss/components/*": {
|
|
118
|
+
"sass": "./dist/scss/components/_*.scss"
|
|
119
|
+
},
|
|
101
120
|
"./scss/tokens": "./dist/_tokens.scss",
|
|
102
121
|
"./scss/layers": "./dist/_layers.scss",
|
|
103
122
|
"./scss/maps": "./dist/_maps.scss",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use '../../styles/
|
|
1
|
+
@use '../../styles/layout-props';
|
|
2
2
|
|
|
3
3
|
// Registered so they never inherit: a nested item without a size must not
|
|
4
4
|
// pick up its parent item's.
|
|
@@ -62,29 +62,5 @@
|
|
|
62
62
|
);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
|
|
66
|
-
@include mixins.responsive-prop(
|
|
67
|
-
'greese-AutoLayout',
|
|
68
|
-
'gap',
|
|
69
|
-
(column-gap, row-gap, --greese-autolayout-column-gap),
|
|
70
|
-
mixins.space-tokens()
|
|
71
|
-
);
|
|
72
|
-
|
|
73
|
-
// After `gap`, so it wins where both apply.
|
|
74
|
-
@include mixins.responsive-prop(
|
|
75
|
-
'greese-AutoLayout',
|
|
76
|
-
'row-gap',
|
|
77
|
-
row-gap,
|
|
78
|
-
mixins.space-tokens()
|
|
79
|
-
);
|
|
80
|
-
@include mixins.responsive-prop(
|
|
81
|
-
'greese-AutoLayoutItem',
|
|
82
|
-
'size',
|
|
83
|
-
--greese-autolayoutitem-s
|
|
84
|
-
);
|
|
85
|
-
@include mixins.responsive-prop(
|
|
86
|
-
'greese-AutoLayoutItem',
|
|
87
|
-
'max',
|
|
88
|
-
--greese-autolayoutitem-m
|
|
89
|
-
);
|
|
65
|
+
@include layout-props.autolayout;
|
|
90
66
|
}
|