@greese/ui 0.0.0-stage → 1.0.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/LICENSE +21 -0
- package/README.md +55 -2
- package/bin/greese-utilities.mjs +56 -0
- package/dist/_layers.scss +2 -0
- package/dist/_maps.scss +1884 -0
- package/dist/_tokens-base.scss +174 -0
- package/dist/_tokens.scss +2140 -0
- package/dist/base.css +67 -0
- package/dist/colorScheme.d.ts +16 -0
- package/dist/colorScheme.js +13 -0
- package/dist/contrast.d.ts +15 -0
- package/dist/contrast.js +43 -0
- package/dist/css/Accordion.css +9 -0
- package/dist/css/ActionSelect.css +6 -0
- package/dist/css/Alert.css +84 -0
- package/dist/css/AppBar.css +35 -0
- package/dist/css/AspectRatio.css +40 -0
- package/dist/css/AutoLayout.css +508 -0
- package/dist/css/Avatar.css +88 -0
- package/dist/css/Badge.css +66 -0
- package/dist/css/Box.css +640 -0
- package/dist/css/Breadcrumbs.css +57 -0
- package/dist/css/Button.css +275 -0
- package/dist/css/ButtonGroup.css +40 -0
- package/dist/css/Card.css +101 -0
- package/dist/css/Carousel.css +170 -0
- package/dist/css/Center.css +11 -0
- package/dist/css/ChatBubble.css +128 -0
- package/dist/css/Checkbox.css +65 -0
- package/dist/css/Chip.css +124 -0
- package/dist/css/ChoiceGroup.css +57 -0
- package/dist/css/Code.css +29 -0
- package/dist/css/Collapsible.css +126 -0
- package/dist/css/ColorPicker.css +191 -0
- package/dist/css/Combobox.css +90 -0
- package/dist/css/Container.css +30 -0
- package/dist/css/Countdown.css +25 -0
- package/dist/css/DateField.css +15 -0
- package/dist/css/Dialog.css +640 -0
- package/dist/css/Diff.css +103 -0
- package/dist/css/Divider.css +19 -0
- package/dist/css/Dock.css +91 -0
- package/dist/css/Field.css +33 -0
- package/dist/css/Fieldset.css +54 -0
- package/dist/css/FileInput.css +65 -0
- package/dist/css/Footer.css +72 -0
- package/dist/css/Grid.css +998 -0
- package/dist/css/Header.css +89 -0
- package/dist/css/Heading.css +6 -0
- package/dist/css/Icon.css +12 -0
- package/dist/css/IconButton.css +7 -0
- package/dist/css/Image.css +69 -0
- package/dist/css/Indicator.css +41 -0
- package/dist/css/Input.css +115 -0
- package/dist/css/Key.css +42 -0
- package/dist/css/Link.css +72 -0
- package/dist/css/List.css +52 -0
- package/dist/css/Media.css +8 -0
- package/dist/css/Menu.css +161 -0
- package/dist/css/Motion.css +1356 -0
- package/dist/css/NumberField.css +49 -0
- package/dist/css/OtpField.css +90 -0
- package/dist/css/PageTransition.css +979 -0
- package/dist/css/Pagination.css +43 -0
- package/dist/css/Popover.css +93 -0
- package/dist/css/Progress.css +101 -0
- package/dist/css/RadialProgress.css +44 -0
- package/dist/css/Radio.css +41 -0
- package/dist/css/Rating.css +100 -0
- package/dist/css/ScrollSpy.css +6 -0
- package/dist/css/SegmentedControl.css +101 -0
- package/dist/css/Select.css +115 -0
- package/dist/css/Sidebar.css +207 -0
- package/dist/css/Skeleton.css +48 -0
- package/dist/css/Slider.css +75 -0
- package/dist/css/Spacer.css +34 -0
- package/dist/css/SpeedDial.css +165 -0
- package/dist/css/Spinner.css +44 -0
- package/dist/css/Stack.css +528 -0
- package/dist/css/Stat.css +107 -0
- package/dist/css/Status.css +86 -0
- package/dist/css/Steps.css +201 -0
- package/dist/css/Swap.css +49 -0
- package/dist/css/Switch.css +66 -0
- package/dist/css/Table.css +269 -0
- package/dist/css/Tabs.css +119 -0
- package/dist/css/Text.css +60 -0
- package/dist/css/TextRotate.css +147 -0
- package/dist/css/Textarea.css +107 -0
- package/dist/css/ThemeProvider.css +6 -0
- package/dist/css/Tile.css +18 -0
- package/dist/css/Toast.css +110 -0
- package/dist/css/ToggleButton.css +20 -0
- package/dist/css/Tooltip.css +94 -0
- package/dist/css/Type.css +211 -0
- package/dist/css/Visibility.css +78 -0
- package/dist/css/VisuallyHidden.css +15 -0
- package/dist/css/core.css +251 -0
- package/dist/css.d.ts +29 -0
- package/dist/css.js +28 -0
- package/dist/effect-classes.d.ts +8 -0
- package/dist/effect-classes.js +5 -0
- package/dist/effects/css.d.ts +71 -0
- package/dist/effects/css.js +184 -0
- package/dist/effects/definitions.d.ts +555 -0
- package/dist/effects/definitions.js +379 -0
- package/dist/effects/frames.d.ts +18 -0
- package/dist/effects/frames.js +68 -0
- package/dist/effects/sequence.d.ts +33 -0
- package/dist/effects/sequence.js +106 -0
- package/dist/effects.d.ts +30 -0
- package/dist/effects.js +30 -0
- package/dist/greese.css +11907 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +10 -0
- package/dist/kebab.d.ts +2 -0
- package/dist/kebab.js +2 -0
- package/dist/palette.css +249 -0
- package/dist/palette.d.ts +599 -0
- package/dist/palette.js +334 -0
- package/dist/shapes.d.ts +193 -0
- package/dist/shapes.js +852 -0
- package/dist/storage.d.ts +47 -0
- package/dist/storage.js +118 -0
- package/dist/style-manifest.json +3010 -0
- package/dist/theme.d.ts +71 -0
- package/dist/theme.js +180 -0
- package/dist/tokens.css +253 -0
- package/dist/tokens.d.ts +343 -0
- package/dist/tokens.js +179 -0
- package/dist/typography.d.ts +55 -0
- package/dist/typography.js +144 -0
- package/dist/utilities.css +6975 -0
- package/dist/utilities.d.ts +82 -0
- package/dist/utilities.js +636 -0
- package/dist/utilitiesFiles.d.ts +18 -0
- package/dist/utilitiesFiles.js +26 -0
- package/dist/vite.d.ts +40 -0
- package/dist/vite.js +43 -0
- package/package.json +131 -4
- package/src/components/Accordion/Accordion.scss +9 -0
- package/src/components/ActionSelect/ActionSelect.scss +6 -0
- package/src/components/Alert/Alert.scss +71 -0
- package/src/components/AppBar/AppBar.scss +43 -0
- package/src/components/AspectRatio/AspectRatio.scss +22 -0
- package/src/components/AutoLayout/AutoLayout.scss +90 -0
- package/src/components/Avatar/Avatar.scss +91 -0
- package/src/components/Badge/Badge.scss +52 -0
- package/src/components/Box/Box.scss +63 -0
- package/src/components/Breadcrumbs/Breadcrumbs.scss +59 -0
- package/src/components/Button/Button.scss +231 -0
- package/src/components/ButtonGroup/ButtonGroup.scss +56 -0
- package/src/components/Card/Card.scss +99 -0
- package/src/components/Carousel/Carousel.scss +161 -0
- package/src/components/Center/Center.scss +11 -0
- package/src/components/ChatBubble/ChatBubble.scss +119 -0
- package/src/components/Checkbox/Checkbox.scss +66 -0
- package/src/components/Chip/Chip.scss +119 -0
- package/src/components/ChoiceGroup/ChoiceGroup.scss +69 -0
- package/src/components/Code/Code.scss +28 -0
- package/src/components/Collapsible/Collapsible.scss +136 -0
- package/src/components/ColorPicker/ColorPicker.scss +235 -0
- package/src/components/Combobox/Combobox.scss +83 -0
- package/src/components/Container/Container.scss +28 -0
- package/src/components/Countdown/Countdown.scss +28 -0
- package/src/components/DateField/DateField.scss +19 -0
- package/src/components/Dialog/Dialog.scss +268 -0
- package/src/components/Diff/Diff.scss +125 -0
- package/src/components/Divider/Divider.scss +22 -0
- package/src/components/Dock/Dock.scss +86 -0
- package/src/components/Field/Field.scss +38 -0
- package/src/components/Fieldset/Fieldset.scss +63 -0
- package/src/components/FileInput/FileInput.scss +66 -0
- package/src/components/Footer/Footer.scss +79 -0
- package/src/components/Grid/Grid.scss +86 -0
- package/src/components/Header/Header.scss +111 -0
- package/src/components/Heading/Heading.scss +7 -0
- package/src/components/Icon/Icon.scss +12 -0
- package/src/components/IconButton/IconButton.scss +6 -0
- package/src/components/Image/Image.scss +46 -0
- package/src/components/Indicator/Indicator.scss +48 -0
- package/src/components/Input/Input.scss +58 -0
- package/src/components/Key/Key.scss +48 -0
- package/src/components/Link/Link.scss +50 -0
- package/src/components/List/List.scss +62 -0
- package/src/components/Media/Media.scss +7 -0
- package/src/components/Menu/Menu.scss +91 -0
- package/src/components/Motion/Motion.scss +106 -0
- package/src/components/NumberField/NumberField.scss +44 -0
- package/src/components/OtpField/OtpField.scss +91 -0
- package/src/components/PageTransition/PageTransition.scss +168 -0
- package/src/components/Pagination/Pagination.scss +55 -0
- package/src/components/Popover/Popover.scss +13 -0
- package/src/components/Progress/Progress.scss +126 -0
- package/src/components/RadialProgress/RadialProgress.scss +65 -0
- package/src/components/Radio/Radio.scss +36 -0
- package/src/components/Rating/Rating.scss +121 -0
- package/src/components/ScrollSpy/ScrollSpy.scss +6 -0
- package/src/components/SegmentedControl/SegmentedControl.scss +107 -0
- package/src/components/Select/Select.scss +59 -0
- package/src/components/Sidebar/Sidebar.scss +88 -0
- package/src/components/Skeleton/Skeleton.scss +60 -0
- package/src/components/Slider/Slider.scss +96 -0
- package/src/components/Spacer/Spacer.scss +15 -0
- package/src/components/SpeedDial/SpeedDial.scss +109 -0
- package/src/components/Spinner/Spinner.scss +43 -0
- package/src/components/Stack/Stack.scss +57 -0
- package/src/components/Stat/Stat.scss +96 -0
- package/src/components/Status/Status.scss +60 -0
- package/src/components/Steps/Steps.scss +216 -0
- package/src/components/Swap/Swap.scss +62 -0
- package/src/components/Switch/Switch.scss +63 -0
- package/src/components/Table/Table.scss +183 -0
- package/src/components/Tabs/Tabs.scss +108 -0
- package/src/components/Text/Text.scss +34 -0
- package/src/components/TextRotate/TextRotate.scss +51 -0
- package/src/components/Textarea/Textarea.scss +56 -0
- package/src/components/ThemeProvider/ThemeProvider.scss +7 -0
- package/src/components/Tile/Tile.scss +23 -0
- package/src/components/Toast/Toast.scss +93 -0
- package/src/components/ToggleButton/ToggleButton.scss +23 -0
- package/src/components/Tooltip/Tooltip.scss +21 -0
- package/src/components/Type/Type.scss +35 -0
- package/src/components/Visibility/Visibility.scss +39 -0
- package/src/components/VisuallyHidden/VisuallyHidden.scss +17 -0
- package/src/styles/_breakpoint-vars.scss +16 -0
- package/src/styles/_config.scss +48 -0
- package/src/styles/_controls.scss +88 -0
- package/src/styles/_core.scss +4 -0
- package/src/styles/_effect.scss +51 -0
- package/src/styles/_floating.scss +141 -0
- package/src/styles/_kit.scss +1548 -0
- package/src/styles/_manifest.scss +670 -0
- package/src/styles/_mixins.scss +261 -0
- package/src/styles/_tones.scss +63 -0
- package/src/styles/_type-emit.scss +76 -0
- package/src/styles/_typography-vars.scss +8 -0
- package/src/styles/base.scss +80 -0
- package/src/styles/breakpoints.test.ts +73 -0
- package/src/styles/entryPoints.test.ts +68 -0
- package/src/styles/index.scss +93 -0
- package/src/styles/kit.test.ts +754 -0
- package/src/styles/public/_controls.scss +3 -0
- package/src/styles/public/_floating.scss +3 -0
- package/src/styles/public/_mixins.scss +5 -0
- package/src/styles/public/_tones.scss +4 -0
- package/themes/bevel.css +1077 -0
- package/themes/bevel.scss +1166 -0
- package/themes/depth.css +123 -0
- package/themes/depth.scss +46 -0
- package/themes/extrude.css +219 -0
- package/themes/extrude.scss +255 -0
- package/themes/folio.css +986 -0
- package/themes/folio.scss +1047 -0
- package/themes/gentle.css +66 -0
- package/themes/gentle.scss +39 -0
- package/themes/outline.css +127 -0
- package/themes/outline.scss +126 -0
- package/themes/pebble.css +65 -0
- package/themes/pebble.scss +69 -0
- package/themes/pocket.css +137 -0
- package/themes/pocket.scss +45 -0
- package/themes/ridge.css +927 -0
- package/themes/ridge.scss +998 -0
- package/themes/snappy.css +82 -0
- package/themes/snappy.scss +40 -0
- package/themes/soft.css +79 -0
- package/themes/soft.scss +84 -0
- package/themes/ticket.css +960 -0
- package/themes/ticket.scss +1031 -0
- package/themes/tilt.css +148 -0
- package/themes/tilt.scss +169 -0
- package/themes/wipe.css +186 -0
- package/themes/wipe.scss +46 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
// Shared by everything in the top layer: popovers, menus, tooltips, dialogs.
|
|
2
|
+
@use 'mixins';
|
|
3
|
+
|
|
4
|
+
/// A surface: background, border, radius, shadow.
|
|
5
|
+
@mixin surface {
|
|
6
|
+
color: var(--greese-color-fg);
|
|
7
|
+
background-color: var(--greese-color-surface-overlay);
|
|
8
|
+
border: 1px solid var(--greese-color-border);
|
|
9
|
+
border-radius: var(--greese-corner-panel);
|
|
10
|
+
box-shadow: var(--greese-shadow-lg);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/// A popover anchored to its trigger (see utils/anchor.ts). Resets the UA
|
|
14
|
+
/// popover centring; `position-anchor`, `position-area` and the gap (as
|
|
15
|
+
/// `margin`) come inline.
|
|
16
|
+
@mixin anchored {
|
|
17
|
+
inset: auto;
|
|
18
|
+
max-inline-size: calc(100vw - 2 * var(--greese-space-3));
|
|
19
|
+
max-block-size: calc(100dvh - 2 * var(--greese-space-3));
|
|
20
|
+
padding: 0;
|
|
21
|
+
overflow: auto;
|
|
22
|
+
position-try-fallbacks: flip-block, flip-inline;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/// What an overlay's exit sets, and the base theme's values: a fade back toward
|
|
26
|
+
/// the overlay's origin, no mask.
|
|
27
|
+
$_exit: (
|
|
28
|
+
opacity: 0,
|
|
29
|
+
translate: var(--greese-overlay-origin),
|
|
30
|
+
scale: 1,
|
|
31
|
+
mask-image: none,
|
|
32
|
+
mask-repeat: no-repeat,
|
|
33
|
+
mask-position: 50% 50%,
|
|
34
|
+
mask-size: 100% 100%,
|
|
35
|
+
mask-from: 100% 100%,
|
|
36
|
+
transform: none,
|
|
37
|
+
transform-origin: 50% 50%,
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
/// Which of the theme's motion roles an overlay takes (ADR 0025): `$role`'s
|
|
41
|
+
/// entrance and exit, else the `overlay` role's (when `$shared`), else the base
|
|
42
|
+
/// theme's. A theme assigns roles with the kit's `motion-defaults()`
|
|
43
|
+
/// (`dialog: iris-in`, `popover-exit: wipe-out-up`); the effects keep their
|
|
44
|
+
/// own keyframes. Resolved into the overlay's own variables, so a part can
|
|
45
|
+
/// take another role: a drawer is a dialog that takes `drawer`.
|
|
46
|
+
@mixin motion-role($role, $shared: true) {
|
|
47
|
+
$enter: greese-overlay-in;
|
|
48
|
+
|
|
49
|
+
@if $shared {
|
|
50
|
+
$enter: var(--greese-motion-overlay, greese-overlay-in);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
--greese-overlay-enter: var(--greese-motion-#{$role}, #{$enter});
|
|
54
|
+
|
|
55
|
+
@each $property, $base in $_exit {
|
|
56
|
+
$value: $base;
|
|
57
|
+
|
|
58
|
+
@if $shared {
|
|
59
|
+
$value: var(--greese-motion-overlay-exit-#{$property}, #{$base});
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
--greese-overlay-exit-#{$property}: var(
|
|
63
|
+
--greese-motion-#{$role}-exit-#{$property},
|
|
64
|
+
#{$value}
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/// An overlay's exit value: an instance's or a component's own exit
|
|
70
|
+
/// (`--greese-motion-exit-*`, from the `greese` prop or the kit's `motion()`),
|
|
71
|
+
/// else its role's.
|
|
72
|
+
@function _exit($property) {
|
|
73
|
+
@return var(--greese-motion-exit-#{$property}, var(--greese-overlay-exit-#{$property}));
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/// An overlay's motion is the theme's (ADR 0025): the component only says
|
|
77
|
+
/// what it is (`$role`) and where it opens from (`$origin`, as
|
|
78
|
+
/// `--greese-overlay-origin`: a drawer's edge, a popover's trigger); the
|
|
79
|
+
/// theme decides what to do with them.
|
|
80
|
+
///
|
|
81
|
+
/// - Arriving: its role's entrance, over `--greese-motion-overlay-duration`
|
|
82
|
+
/// (the base theme's is a short fade from the origin). A component's
|
|
83
|
+
/// `motion((enter: …))` or an instance's `greese` prop overrides it.
|
|
84
|
+
/// - Leaving: its role's exit (the base theme fades back toward the origin),
|
|
85
|
+
/// over the theme's exit timing, or the instance's or component's exit.
|
|
86
|
+
///
|
|
87
|
+
/// The transition here isn't motion of its own: closing, an overlay has to
|
|
88
|
+
/// stay rendered (`display` and `overlay`, allow-discrete) while the exit
|
|
89
|
+
/// plays, and its properties move to the exit's values. Opening, there is
|
|
90
|
+
/// nothing to transition from, so only the animation plays. Under reduced
|
|
91
|
+
/// motion the duration tokens collapse and the animation is off.
|
|
92
|
+
@mixin enter-exit($open-selector, $origin: 0 0, $role: dialog) {
|
|
93
|
+
@include motion-role($role);
|
|
94
|
+
|
|
95
|
+
--greese-overlay-origin: #{$origin};
|
|
96
|
+
|
|
97
|
+
transition-property:
|
|
98
|
+
opacity, translate, scale, transform, mask-size, mask-position, display, overlay;
|
|
99
|
+
transition-duration: var(--greese-motion-exit-duration, var(--greese-duration-fast));
|
|
100
|
+
transition-timing-function: var(--greese-motion-exit-ease, var(--greese-easing-exit));
|
|
101
|
+
transition-behavior: allow-discrete;
|
|
102
|
+
|
|
103
|
+
// A wipe, iris or pocket exit's mask: held open, at the size it starts
|
|
104
|
+
// from, then sized away as it closes. Without one, the image is `none`.
|
|
105
|
+
mask-image: _exit(mask-image);
|
|
106
|
+
mask-repeat: _exit(mask-repeat);
|
|
107
|
+
mask-position: _exit(mask-position);
|
|
108
|
+
mask-size: _exit(mask-from);
|
|
109
|
+
transform-origin: _exit(transform-origin);
|
|
110
|
+
|
|
111
|
+
&#{$open-selector} {
|
|
112
|
+
@include mixins.motion-safe {
|
|
113
|
+
animation-name: var(--greese-overlay-enter);
|
|
114
|
+
animation-duration: var(
|
|
115
|
+
--greese-motion-overlay-duration,
|
|
116
|
+
var(--greese-duration-fast)
|
|
117
|
+
);
|
|
118
|
+
animation-timing-function: var(
|
|
119
|
+
--greese-motion-enter-ease,
|
|
120
|
+
var(--greese-easing-enter)
|
|
121
|
+
);
|
|
122
|
+
animation-fill-mode: backwards;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&:not(#{$open-selector}) {
|
|
127
|
+
opacity: _exit(opacity);
|
|
128
|
+
translate: _exit(translate);
|
|
129
|
+
scale: _exit(scale);
|
|
130
|
+
transform: _exit(transform);
|
|
131
|
+
mask-size: _exit(mask-size);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// The base theme's entrance: a fade from the component's origin.
|
|
135
|
+
@keyframes greese-overlay-in {
|
|
136
|
+
from {
|
|
137
|
+
opacity: 0;
|
|
138
|
+
translate: var(--greese-overlay-origin);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|