@neo-ui-kit/react 0.0.0-stage → 1.0.1
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 +213 -2
- package/dist/artwork/icons.json.d.ts +2 -0
- package/dist/artwork/illustrations.json.d.ts +2 -0
- package/dist/chunks/chunk-347P6ZE4.js +104 -0
- package/dist/chunks/chunk-BJSFN52W.js +417 -0
- package/dist/chunks/chunk-FCOU3ODR.js +63 -0
- package/dist/chunks/chunk-JZ4GDTH5.js +87 -0
- package/dist/chunks/chunk-UGDRXR7P.js +3362 -0
- package/dist/chunks/chunk-VK6GHRLV.js +335 -0
- package/dist/chunks/chunk-YKCUOZ7V.js +777 -0
- package/dist/components/artwork/DatabaseArt/DatabaseArt.d.ts +6 -0
- package/dist/components/artwork/DatabaseArt/styles.css +58 -0
- package/dist/components/artwork/Landscape/Landscape.d.ts +7 -0
- package/dist/components/artwork/Landscape/styles.css +79 -0
- package/dist/components/artwork/NeonWaves/NeonWaves.d.ts +15 -0
- package/dist/components/artwork/NeonWaves/styles.css +48 -0
- package/dist/components/artwork/Planet/Planet.d.ts +4 -0
- package/dist/components/artwork/Planet/styles.css +52 -0
- package/dist/components/artwork/QuantumField/QuantumField.d.ts +42 -0
- package/dist/components/artwork/QuantumField/QuantumFieldExperience.d.ts +22 -0
- package/dist/components/artwork/QuantumField/UPSTREAM-LICENSE.txt +21 -0
- package/dist/components/artwork/QuantumField/audio.d.ts +15 -0
- package/dist/components/artwork/QuantumField/renderer.d.ts +24 -0
- package/dist/components/artwork/QuantumField/styles.css +77 -0
- package/dist/components/artwork/ServerArt/ServerArt.d.ts +8 -0
- package/dist/components/artwork/ServerArt/styles.css +43 -0
- package/dist/components/artwork/Spectrum/Spectrum.d.ts +7 -0
- package/dist/components/artwork/Spectrum/styles.css +35 -0
- package/dist/components/artwork/layers.d.ts +15 -0
- package/dist/components/artwork/useArtwork.d.ts +8 -0
- package/dist/components/controls/Autocomplete/Autocomplete.d.ts +2 -0
- package/dist/components/controls/Autocomplete/styles.css +1 -0
- package/dist/components/controls/Button/Button.d.ts +2 -0
- package/dist/components/controls/Button/styles.css +1 -0
- package/dist/components/controls/Checkbox/Checkbox.d.ts +2 -0
- package/dist/components/controls/Checkbox/styles.css +70 -0
- package/dist/components/controls/Chip/Chip.d.ts +21 -0
- package/dist/components/controls/Chip/styles.css +74 -0
- package/dist/components/controls/ChipField.d.ts +25 -0
- package/dist/components/controls/ColorPicker/ColorPicker.d.ts +16 -0
- package/dist/components/controls/ColorPicker/color.d.ts +9 -0
- package/dist/components/controls/ColorPicker/styles.css +103 -0
- package/dist/components/controls/DatePicker/DatePicker.d.ts +19 -0
- package/dist/components/controls/DatePicker/styles.css +69 -0
- package/dist/components/controls/FilePicker/FilePicker.d.ts +2 -0
- package/dist/components/controls/FilePicker/styles.css +149 -0
- package/dist/components/controls/IconButton/IconButton.d.ts +2 -0
- package/dist/components/controls/IconButton/styles.css +4 -0
- package/dist/components/controls/InputBase/InputBase.d.ts +21 -0
- package/dist/components/controls/InputBase/styles.css +379 -0
- package/dist/components/controls/Link/Link.d.ts +11 -0
- package/dist/components/controls/Link/styles.css +50 -0
- package/dist/components/controls/NumberField/NumberField.d.ts +2 -0
- package/dist/components/controls/NumberField/styles.css +1 -0
- package/dist/components/controls/PeoplePicker/PeoplePicker.d.ts +37 -0
- package/dist/components/controls/PeoplePicker/styles.css +7 -0
- package/dist/components/controls/SegmentedControl/SegmentedControl.d.ts +2 -0
- package/dist/components/controls/SegmentedControl/styles.css +9 -0
- package/dist/components/controls/Select/Select.d.ts +8 -0
- package/dist/components/controls/Select/styles.css +142 -0
- package/dist/components/controls/Slider/Slider.d.ts +3 -0
- package/dist/components/controls/Slider/styles.css +138 -0
- package/dist/components/controls/SplitButton/SplitButton.d.ts +2 -0
- package/dist/components/controls/SplitButton/styles.css +169 -0
- package/dist/components/controls/Switch/Switch.d.ts +2 -0
- package/dist/components/controls/Switch/styles.css +54 -0
- package/dist/components/controls/Tab/Tab.d.ts +2 -0
- package/dist/components/controls/Tab/styles.css +111 -0
- package/dist/components/controls/Tabs/Tabs.d.ts +2 -0
- package/dist/components/controls/Tabs/styles.css +239 -0
- package/dist/components/controls/TagInput/TagInput.d.ts +24 -0
- package/dist/components/controls/TagInput/styles.css +24 -0
- package/dist/components/controls/TextArea/TextArea.d.ts +2 -0
- package/dist/components/controls/TextArea/styles.css +15 -0
- package/dist/components/controls/TextField/TextField.d.ts +2 -0
- package/dist/components/controls/ThemePicker/ThemePicker.d.ts +24 -0
- package/dist/components/controls/ThemePicker/styles.css +128 -0
- package/dist/components/controls/ToggleButton/ToggleButton.d.ts +2 -0
- package/dist/components/controls/ToggleButton/styles.css +49 -0
- package/dist/components/controls/internal.d.ts +62 -0
- package/dist/components/controls/shared.css +694 -0
- package/dist/components/controls/shared.d.ts +204 -0
- package/dist/components/editor/PianoRoll/PianoRoll.d.ts +65 -0
- package/dist/components/editor/PianoRoll/styles.css +186 -0
- package/dist/components/editor/shared.css +1 -0
- package/dist/components/effects/AnimatedBorder/AnimatedBorder.d.ts +9 -0
- package/dist/components/effects/AnimatedBorder/styles.css +7 -0
- package/dist/components/effects/Beacon/Beacon.d.ts +9 -0
- package/dist/components/effects/Beacon/styles.css +38 -0
- package/dist/components/effects/Equalizer/Equalizer.d.ts +14 -0
- package/dist/components/effects/Equalizer/styles.css +38 -0
- package/dist/components/effects/GlowText/GlowText.d.ts +9 -0
- package/dist/components/effects/GlowText/styles.css +56 -0
- package/dist/components/effects/ImageShine/ImageShine.d.ts +13 -0
- package/dist/components/effects/ImageShine/styles.css +66 -0
- package/dist/components/effects/Marquee/Marquee.d.ts +9 -0
- package/dist/components/effects/Marquee/styles.css +46 -0
- package/dist/components/effects/MelodixText/MelodixText.d.ts +15 -0
- package/dist/components/effects/MelodixText/styles.css +28 -0
- package/dist/components/effects/Reveal/Reveal.d.ts +13 -0
- package/dist/components/effects/Reveal/styles.css +25 -0
- package/dist/components/effects/Shimmer/Shimmer.d.ts +10 -0
- package/dist/components/effects/Shimmer/styles.css +48 -0
- package/dist/components/effects/Sparkles/Sparkles.d.ts +9 -0
- package/dist/components/effects/Sparkles/styles.css +28 -0
- package/dist/components/effects/Spotlight/Spotlight.d.ts +11 -0
- package/dist/components/effects/Spotlight/styles.css +45 -0
- package/dist/components/effects/Tilt/Tilt.d.ts +11 -0
- package/dist/components/effects/Tilt/styles.css +67 -0
- package/dist/components/feedback/Badge/Badge.d.ts +3 -0
- package/dist/components/feedback/Badge/styles.css +91 -0
- package/dist/components/feedback/CollapsibleSection/CollapsibleSection.d.ts +2 -0
- package/dist/components/feedback/CollapsibleSection/styles.css +76 -0
- package/dist/components/feedback/DataTable/DataTable.d.ts +16 -0
- package/dist/components/feedback/DataTable/styles.css +522 -0
- package/dist/components/feedback/Dialog/Dialog.d.ts +2 -0
- package/dist/components/feedback/Dialog/styles.css +82 -0
- package/dist/components/feedback/EmptyState/EmptyState.d.ts +2 -0
- package/dist/components/feedback/EmptyState/styles.css +80 -0
- package/dist/components/feedback/KeyValueList/KeyValueList.d.ts +2 -0
- package/dist/components/feedback/KeyValueList/styles.css +51 -0
- package/dist/components/feedback/Menu/Menu.d.ts +2 -0
- package/dist/components/feedback/Menu/styles.css +123 -0
- package/dist/components/feedback/MenuItem/MenuItem.d.ts +2 -0
- package/dist/components/feedback/MenuItem/styles.css +71 -0
- package/dist/components/feedback/MessageBar/MessageBar.d.ts +2 -0
- package/dist/components/feedback/MessageBar/styles.css +116 -0
- package/dist/components/feedback/Popover/Popover.d.ts +2 -0
- package/dist/components/feedback/Popover/styles.css +44 -0
- package/dist/components/feedback/ProgressBar/ProgressBar.d.ts +2 -0
- package/dist/components/feedback/ProgressBar/styles.css +76 -0
- package/dist/components/feedback/SignalBars/SignalBars.d.ts +11 -0
- package/dist/components/feedback/SignalBars/styles.css +31 -0
- package/dist/components/feedback/StatusIndicator/StatusIndicator.d.ts +2 -0
- package/dist/components/feedback/StatusIndicator/styles.css +88 -0
- package/dist/components/feedback/Steps/Steps.d.ts +2 -0
- package/dist/components/feedback/Steps/styles.css +152 -0
- package/dist/components/feedback/Toast/Toast.d.ts +2 -0
- package/dist/components/feedback/Toast/styles.css +89 -0
- package/dist/components/feedback/Tooltip/Tooltip.d.ts +15 -0
- package/dist/components/feedback/Tooltip/styles.css +38 -0
- package/dist/components/feedback/shared.css +22 -0
- package/dist/components/feedback/shared.d.ts +231 -0
- package/dist/components/forms/Form/Form.d.ts +35 -0
- package/dist/components/forms/Form/styles.css +1 -0
- package/dist/components/forms/FormFields/FormFields.d.ts +20 -0
- package/dist/components/forms/FormFields/styles.css +72 -0
- package/dist/components/foundation/Loader/Loader.d.ts +30 -0
- package/dist/components/foundation/LoaderGenerator/LoaderGenerator.d.ts +38 -0
- package/dist/components/foundation/LoaderGenerator/styles.css +104 -0
- package/dist/components/foundation/ThemeEditor/ThemeEditor.d.ts +15 -0
- package/dist/components/foundation/ThemeEditor/styles.css +97 -0
- package/dist/components/foundation/ThemeEditor/themeConfig.d.ts +47 -0
- package/dist/components/foundation/ThemeProvider/ThemeProvider.d.ts +32 -0
- package/dist/components/foundation/ThemeProvider/styles.css +59 -0
- package/dist/components/foundation/Typography/Typography.d.ts +17 -0
- package/dist/components/foundation/Typography/styles.css +115 -0
- package/dist/components/layout/Avatar/Avatar.d.ts +2 -0
- package/dist/components/layout/Avatar/HostSeal.d.ts +5 -0
- package/dist/components/layout/Avatar/styles.css +166 -0
- package/dist/components/layout/BrandMark/BrandMark.d.ts +2 -0
- package/dist/components/layout/BrandMark/styles.css +39 -0
- package/dist/components/layout/ButtonGroup/ButtonGroup.d.ts +12 -0
- package/dist/components/layout/ButtonGroup/styles.css +36 -0
- package/dist/components/layout/Card/Card.d.ts +14 -0
- package/dist/components/layout/Card/styles.css +37 -0
- package/dist/components/layout/DialogActions/DialogActions.d.ts +12 -0
- package/dist/components/layout/DialogActions/styles.css +31 -0
- package/dist/components/layout/DialogBody/DialogBody.d.ts +12 -0
- package/dist/components/layout/DialogBody/styles.css +28 -0
- package/dist/components/layout/Divider/Divider.d.ts +2 -0
- package/dist/components/layout/Divider/styles.css +58 -0
- package/dist/components/layout/FloatingPanel/FloatingPanel.d.ts +15 -0
- package/dist/components/layout/FloatingPanel/styles.css +47 -0
- package/dist/components/layout/FloatingPanel/useFloatingPanel.d.ts +54 -0
- package/dist/components/layout/Grid/Grid.d.ts +24 -0
- package/dist/components/layout/Grid/styles.css +90 -0
- package/dist/components/layout/Header/Header.d.ts +2 -0
- package/dist/components/layout/Header/styles.css +42 -0
- package/dist/components/layout/Icon/Icon.d.ts +4 -0
- package/dist/components/layout/Icon/styles.css +62 -0
- package/dist/components/layout/Illustration/Illustration.d.ts +2 -0
- package/dist/components/layout/Illustration/styles.css +104 -0
- package/dist/components/layout/ScrollArea/ScrollArea.d.ts +2 -0
- package/dist/components/layout/ScrollArea/styles.css +61 -0
- package/dist/components/layout/Stack/Stack.d.ts +21 -0
- package/dist/components/layout/Stack/styles.css +53 -0
- package/dist/components/layout/StatTile/StatTile.d.ts +20 -0
- package/dist/components/layout/StatTile/styles.css +90 -0
- package/dist/components/layout/TabPanel/TabPanel.d.ts +2 -0
- package/dist/components/layout/TabPanel/styles.css +16 -0
- package/dist/components/layout/Text/Text.d.ts +2 -0
- package/dist/components/layout/Text/styles.css +29 -0
- package/dist/components/layout/Toolbar/Toolbar.d.ts +12 -0
- package/dist/components/layout/Toolbar/styles.css +7 -0
- package/dist/components/layout/shared.css +79 -0
- package/dist/components/layout/shared.d.ts +64 -0
- package/dist/components/media/AudioPlayer/AudioPlayer.d.ts +2 -0
- package/dist/components/media/AudioPlayer/styles.css +86 -0
- package/dist/components/media/KaraokeLyrics/KaraokeLyrics.d.ts +25 -0
- package/dist/components/media/KaraokeLyrics/styles.css +56 -0
- package/dist/components/media/LevelMeter/LevelMeter.d.ts +7 -0
- package/dist/components/media/LevelMeter/styles.css +30 -0
- package/dist/components/media/MediaCard/MediaCard.d.ts +24 -0
- package/dist/components/media/MediaCard/styles.css +108 -0
- package/dist/components/media/MelodyRoll/MelodyRoll.d.ts +48 -0
- package/dist/components/media/MelodyRoll/styles.css +196 -0
- package/dist/components/media/PianoKeyboard/PianoKeyboard.d.ts +24 -0
- package/dist/components/media/PianoKeyboard/styles.css +83 -0
- package/dist/components/media/RotaryKnob/RotaryKnob.d.ts +3 -0
- package/dist/components/media/RotaryKnob/styles.css +319 -0
- package/dist/components/media/Sparkline/Sparkline.d.ts +2 -0
- package/dist/components/media/Sparkline/styles.css +70 -0
- package/dist/components/media/WaveDecoration/WaveDecoration.d.ts +2 -0
- package/dist/components/media/WaveDecoration/styles.css +2 -0
- package/dist/components/media/Waveform/Waveform.d.ts +9 -0
- package/dist/components/media/Waveform/styles.css +375 -0
- package/dist/components/media/Waveform/useWaveformPeaks.d.ts +11 -0
- package/dist/components/media/shared.css +7 -0
- package/dist/components/media/shared.d.ts +80 -0
- package/dist/components/navigation/Router/Router.d.ts +32 -0
- package/dist/components/navigation/Router/styles.css +1 -0
- package/dist/components.css +102 -0
- package/dist/core/artwork.d.ts +17 -0
- package/dist/core/base.d.ts +65 -0
- package/dist/core/environment.d.ts +5 -0
- package/dist/core/i18n.d.ts +34 -0
- package/dist/core/messages.d.ts +1 -0
- package/dist/core/motion/hooks.d.ts +17 -0
- package/dist/core/motion-engine.d.ts +13 -0
- package/dist/core/noise.d.ts +20 -0
- package/dist/core/providers/context.d.ts +4 -0
- package/dist/core/responsive.d.ts +13 -0
- package/dist/core.d.ts +8 -0
- package/dist/core.js +56 -0
- package/dist/editor.d.ts +2 -0
- package/dist/editor.js +8 -0
- package/dist/fonts/melodix/Melodix-100.woff2 +0 -0
- package/dist/fonts/melodix/Melodix-200.woff2 +0 -0
- package/dist/fonts/melodix/Melodix-300.woff2 +0 -0
- package/dist/fonts/melodix/Melodix-400.woff2 +0 -0
- package/dist/fonts/melodix/Melodix-500.woff2 +0 -0
- package/dist/fonts/melodix/Melodix-600.woff2 +0 -0
- package/dist/fonts/melodix/Melodix-700.woff2 +0 -0
- package/dist/fonts/melodix/Melodix-800.woff2 +0 -0
- package/dist/fonts/melodix/Melodix-900.woff2 +0 -0
- package/dist/fonts/melodix/MelodixText-100.woff2 +0 -0
- package/dist/fonts/melodix/MelodixText-200.woff2 +0 -0
- package/dist/fonts/melodix/MelodixText-300.woff2 +0 -0
- package/dist/fonts/melodix/MelodixText-400.woff2 +0 -0
- package/dist/fonts/melodix/MelodixText-500.woff2 +0 -0
- package/dist/fonts/melodix/MelodixText-600.woff2 +0 -0
- package/dist/fonts/melodix/MelodixText-700.woff2 +0 -0
- package/dist/fonts/melodix/MelodixText-800.woff2 +0 -0
- package/dist/fonts/melodix/MelodixText-900.woff2 +0 -0
- package/dist/fonts/melodix/OFL-PlayfairDisplay.txt +93 -0
- package/dist/fonts/melodix.css +123 -0
- package/dist/forms.d.ts +4 -0
- package/dist/forms.js +17 -0
- package/dist/index.d.ts +163 -0
- package/dist/index.js +9683 -0
- package/dist/router.d.ts +2 -0
- package/dist/router.js +11 -0
- package/dist/styles.css +2 -0
- package/dist/theme/base.css +221 -0
- package/dist/theme/tokens.css +196 -0
- package/dist/theme/typography.d.ts +24 -0
- package/dist/tokens.css +1 -0
- package/package.json +83 -4
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/* Styles owned by Checkbox: the box pops and the check mark is drawn as a stroke. */
|
|
2
|
+
.ad-checkbox .ad-toggle-track {
|
|
3
|
+
--ad-box: calc(var(--ad-size-h) * 0.5);
|
|
4
|
+
width: var(--ad-box);
|
|
5
|
+
height: var(--ad-box);
|
|
6
|
+
border-radius: calc(var(--ad-box) * 0.28);
|
|
7
|
+
transition:
|
|
8
|
+
background 0.2s,
|
|
9
|
+
border-color 0.2s,
|
|
10
|
+
box-shadow 0.25s;
|
|
11
|
+
}
|
|
12
|
+
.ad-checkbox .ad-toggle-track i {
|
|
13
|
+
display: none;
|
|
14
|
+
}
|
|
15
|
+
.ad-checkbox:hover input:not(:disabled) + .ad-toggle-track {
|
|
16
|
+
border-color: var(--ad-secondary);
|
|
17
|
+
box-shadow: 0 0 0.5rem rgb(from var(--ad-primary) r g b / 0.19);
|
|
18
|
+
}
|
|
19
|
+
.ad-checkbox input:checked + .ad-toggle-track {
|
|
20
|
+
border-color: var(--ad-secondary);
|
|
21
|
+
background: linear-gradient(180deg, var(--ad-primary), var(--ad-primary-600));
|
|
22
|
+
box-shadow:
|
|
23
|
+
inset 0 0.0625rem 0 rgb(from var(--ad-secondary-100) r g b / 0.53),
|
|
24
|
+
0 0 0.7rem rgb(from var(--ad-primary) r g b / 0.4);
|
|
25
|
+
animation: ad-check-pop 0.4s cubic-bezier(0.34, 1.6, 0.5, 1);
|
|
26
|
+
}
|
|
27
|
+
.ad-checkbox input:checked + .ad-toggle-track::after {
|
|
28
|
+
content: "";
|
|
29
|
+
position: absolute;
|
|
30
|
+
left: 28%;
|
|
31
|
+
top: 24%;
|
|
32
|
+
width: 46%;
|
|
33
|
+
height: 26%;
|
|
34
|
+
border-left: 0.125rem solid #fff;
|
|
35
|
+
border-bottom: 0.125rem solid #fff;
|
|
36
|
+
transform: rotate(-45deg);
|
|
37
|
+
filter: drop-shadow(0 0 0.15rem #fff8);
|
|
38
|
+
animation: ad-check-draw 0.35s 0.08s ease-out both;
|
|
39
|
+
}
|
|
40
|
+
.ad-checkbox input:disabled + .ad-toggle-track {
|
|
41
|
+
opacity: 0.45;
|
|
42
|
+
}
|
|
43
|
+
@keyframes ad-check-pop {
|
|
44
|
+
0% {
|
|
45
|
+
scale: 0.7;
|
|
46
|
+
}
|
|
47
|
+
60% {
|
|
48
|
+
scale: 1.15;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
@keyframes ad-check-draw {
|
|
52
|
+
from {
|
|
53
|
+
clip-path: inset(0 100% 0 0);
|
|
54
|
+
}
|
|
55
|
+
to {
|
|
56
|
+
clip-path: inset(0 0 0 0);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
/* Indeterminate: a lit box with a dash instead of the check. */
|
|
60
|
+
.ad-checkbox input:indeterminate + .ad-toggle-track {
|
|
61
|
+
border-color: var(--ad-secondary);
|
|
62
|
+
background: linear-gradient(180deg, var(--ad-primary), var(--ad-primary-600));
|
|
63
|
+
}
|
|
64
|
+
.ad-checkbox input:indeterminate + .ad-toggle-track::after {
|
|
65
|
+
content: "";
|
|
66
|
+
position: absolute;
|
|
67
|
+
inset: 45% 24%;
|
|
68
|
+
border-radius: 999rem;
|
|
69
|
+
background: #fff;
|
|
70
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { type CommonProps } from "../../../core/base";
|
|
3
|
+
export interface ChipProps extends CommonProps {
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
/** Icon before the label. */
|
|
6
|
+
icon?: string;
|
|
7
|
+
/** A person's picture before the label. */
|
|
8
|
+
avatar?: {
|
|
9
|
+
name: string;
|
|
10
|
+
src?: string;
|
|
11
|
+
};
|
|
12
|
+
/** Shows a × that calls this. */
|
|
13
|
+
onRemove?: () => void;
|
|
14
|
+
removeLabel?: string;
|
|
15
|
+
/** Makes the chip a toggle, e.g. a filter. */
|
|
16
|
+
onClick?: () => void;
|
|
17
|
+
selected?: boolean;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/** A compact pill for a tag, a person or a filter: optional picture or icon, removable or pressable. */
|
|
21
|
+
export declare function Chip({ label, icon, avatar, onRemove, removeLabel, onClick, selected, disabled, ...p }: ChipProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/* Styles owned by Chip: a glassy pill that pops in; the × lights up under the pointer. */
|
|
2
|
+
.ad-chip {
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
max-width: 100%;
|
|
6
|
+
min-height: 1.75rem;
|
|
7
|
+
border: 0.0625rem solid rgb(from var(--ad-primary) r g b / 0.45);
|
|
8
|
+
border-radius: var(--ad-radius-pill);
|
|
9
|
+
background: linear-gradient(180deg, rgb(from var(--ad-primary) r g b / 0.2), rgb(from var(--ad-primary-900) r g b / 0.35));
|
|
10
|
+
color: var(--ad-neutral-200);
|
|
11
|
+
font-size: var(--ad-font-size-body-sm);
|
|
12
|
+
line-height: 1.2;
|
|
13
|
+
animation: ad-chip-in 0.28s var(--ad-ease-spring) both;
|
|
14
|
+
}
|
|
15
|
+
.ad-chip[data-selected] {
|
|
16
|
+
border-color: var(--ad-secondary);
|
|
17
|
+
background: linear-gradient(180deg, var(--ad-primary-700), var(--ad-primary-900));
|
|
18
|
+
color: #fff;
|
|
19
|
+
box-shadow: 0 0 0.6rem rgb(from var(--ad-primary) r g b / 0.4);
|
|
20
|
+
}
|
|
21
|
+
.ad-chip[data-disabled] {
|
|
22
|
+
opacity: 0.5;
|
|
23
|
+
}
|
|
24
|
+
.ad-chip-body {
|
|
25
|
+
display: inline-flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
gap: 0.35rem;
|
|
28
|
+
min-width: 0;
|
|
29
|
+
padding: 0.15rem 0.65rem;
|
|
30
|
+
border: 0;
|
|
31
|
+
background: none;
|
|
32
|
+
color: inherit;
|
|
33
|
+
font: inherit;
|
|
34
|
+
--ad-icon-size: 0.9rem;
|
|
35
|
+
}
|
|
36
|
+
button.ad-chip-body {
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
}
|
|
39
|
+
.ad-chip-body:has(> .ad-avatar) {
|
|
40
|
+
padding-inline-start: 0.15rem;
|
|
41
|
+
}
|
|
42
|
+
.ad-chip-label {
|
|
43
|
+
overflow: hidden;
|
|
44
|
+
text-overflow: ellipsis;
|
|
45
|
+
white-space: nowrap;
|
|
46
|
+
}
|
|
47
|
+
.ad-chip:has(> .ad-chip-remove) > .ad-chip-body {
|
|
48
|
+
padding-inline-end: 0.2rem;
|
|
49
|
+
}
|
|
50
|
+
.ad-chip-remove {
|
|
51
|
+
display: grid;
|
|
52
|
+
place-items: center;
|
|
53
|
+
margin-inline-end: 0.2rem;
|
|
54
|
+
padding: 0.2rem;
|
|
55
|
+
border: 0;
|
|
56
|
+
border-radius: 50%;
|
|
57
|
+
background: none;
|
|
58
|
+
color: inherit;
|
|
59
|
+
cursor: pointer;
|
|
60
|
+
--ad-icon-size: 0.65rem;
|
|
61
|
+
transition: background var(--ad-duration-fast), color var(--ad-duration-fast);
|
|
62
|
+
}
|
|
63
|
+
.ad-chip-remove:hover,
|
|
64
|
+
.ad-chip-remove:focus-visible {
|
|
65
|
+
background: rgb(from var(--ad-primary) r g b / 0.45);
|
|
66
|
+
color: #fff;
|
|
67
|
+
outline: none;
|
|
68
|
+
}
|
|
69
|
+
@keyframes ad-chip-in {
|
|
70
|
+
from {
|
|
71
|
+
opacity: 0;
|
|
72
|
+
transform: scale(0.8);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type KeyboardEvent, type ReactNode } from "react";
|
|
2
|
+
import type { InputVariant } from "./shared";
|
|
3
|
+
import type { Size } from "../../core/base";
|
|
4
|
+
/** A field whose value is a row of chips followed by a text input (tags, people). */
|
|
5
|
+
export declare function ChipField({ className, label, description, error, required, disabled, size, variant, labelPlacement, chips, query, placeholder, startAdornment, boxRef, onQueryChange, onKeyDown, onFocus, onBlur, inputProps, }: {
|
|
6
|
+
className: string;
|
|
7
|
+
label?: ReactNode;
|
|
8
|
+
description?: ReactNode;
|
|
9
|
+
error?: ReactNode;
|
|
10
|
+
required?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
size?: Size;
|
|
13
|
+
variant?: InputVariant;
|
|
14
|
+
labelPlacement?: "top" | "floating";
|
|
15
|
+
chips: ReactNode;
|
|
16
|
+
query: string;
|
|
17
|
+
placeholder?: string;
|
|
18
|
+
startAdornment?: ReactNode;
|
|
19
|
+
boxRef?: React.Ref<HTMLDivElement>;
|
|
20
|
+
onQueryChange: (query: string) => void;
|
|
21
|
+
onKeyDown?: (event: KeyboardEvent<HTMLInputElement>) => void;
|
|
22
|
+
onFocus?: () => void;
|
|
23
|
+
onBlur?: () => void;
|
|
24
|
+
inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
|
|
25
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type CommonProps } from "../../../core/base";
|
|
2
|
+
export interface ColorPickerProps extends CommonProps {
|
|
3
|
+
/** #rrggbb */
|
|
4
|
+
value?: string;
|
|
5
|
+
defaultValue?: string;
|
|
6
|
+
onValueChange?: (hex: string) => void;
|
|
7
|
+
label?: React.ReactNode;
|
|
8
|
+
description?: React.ReactNode;
|
|
9
|
+
/** Ready colours offered under the picker. */
|
|
10
|
+
swatches?: string[];
|
|
11
|
+
/** The panel itself, without a field and a popover (e.g. inside a theme editor). */
|
|
12
|
+
inline?: boolean;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/** A colour field: its swatch and code; a click opens the picker panel. With `inline` the panel stands alone. */
|
|
16
|
+
export declare function ColorPicker({ value: controlled, defaultValue, onValueChange, swatches, inline, ...p }: ColorPickerProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Colour arithmetic for the picker: hex ⇄ HSV. */
|
|
2
|
+
export type Hsv = {
|
|
3
|
+
h: number;
|
|
4
|
+
s: number;
|
|
5
|
+
v: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const normalizeHex: (value: string) => string | null;
|
|
8
|
+
export declare const hexToHsv: (hex: string) => Hsv;
|
|
9
|
+
export declare const hsvToHex: ({ h, s, v }: Hsv) => string;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/* Styles owned by ColorPicker: a saturation/brightness square, a hue strip, the code and swatches. */
|
|
2
|
+
.ad-color-picker {
|
|
3
|
+
min-width: 0;
|
|
4
|
+
}
|
|
5
|
+
.ad-color-panel {
|
|
6
|
+
display: grid;
|
|
7
|
+
grid-template-columns: minmax(0, 1fr);
|
|
8
|
+
gap: 0.65rem;
|
|
9
|
+
width: min(15rem, calc(100vw - 3rem));
|
|
10
|
+
}
|
|
11
|
+
.ad-color-picker[data-inline] .ad-color-panel {
|
|
12
|
+
width: min(100%, 18rem);
|
|
13
|
+
}
|
|
14
|
+
.ad-color-area {
|
|
15
|
+
position: relative;
|
|
16
|
+
aspect-ratio: 4 / 3;
|
|
17
|
+
border-radius: var(--ad-radius);
|
|
18
|
+
background:
|
|
19
|
+
linear-gradient(to top, #000, transparent),
|
|
20
|
+
linear-gradient(to right, #fff, var(--ad-color-hue));
|
|
21
|
+
cursor: crosshair;
|
|
22
|
+
touch-action: none;
|
|
23
|
+
}
|
|
24
|
+
.ad-color-hue {
|
|
25
|
+
position: relative;
|
|
26
|
+
height: 0.85rem;
|
|
27
|
+
border-radius: var(--ad-radius-pill);
|
|
28
|
+
background: linear-gradient(90deg, red, #ff0, lime, cyan, blue, #f0f, red);
|
|
29
|
+
cursor: ew-resize;
|
|
30
|
+
touch-action: none;
|
|
31
|
+
}
|
|
32
|
+
.ad-color-area > i,
|
|
33
|
+
.ad-color-hue > i {
|
|
34
|
+
position: absolute;
|
|
35
|
+
width: 1rem;
|
|
36
|
+
height: 1rem;
|
|
37
|
+
border: 0.15rem solid #fff;
|
|
38
|
+
border-radius: 50%;
|
|
39
|
+
box-shadow: 0 0 0 0.0625rem #0008, 0 0.15rem 0.4rem #0009;
|
|
40
|
+
translate: -50% -50%;
|
|
41
|
+
pointer-events: none;
|
|
42
|
+
}
|
|
43
|
+
.ad-color-hue > i {
|
|
44
|
+
top: 50%;
|
|
45
|
+
}
|
|
46
|
+
.ad-color-area:focus-visible,
|
|
47
|
+
.ad-color-hue:focus-visible {
|
|
48
|
+
outline: 0.125rem solid var(--ad-focus);
|
|
49
|
+
outline-offset: 0.15rem;
|
|
50
|
+
}
|
|
51
|
+
.ad-color-hex {
|
|
52
|
+
display: flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
gap: 0.5rem;
|
|
55
|
+
padding: 0.35rem 0.6rem;
|
|
56
|
+
border: 0.0625rem solid rgb(from var(--ad-primary) r g b / 0.35);
|
|
57
|
+
border-radius: var(--ad-radius-pill);
|
|
58
|
+
background: var(--ad-neutral-950);
|
|
59
|
+
}
|
|
60
|
+
.ad-color-hex > input {
|
|
61
|
+
flex: 1;
|
|
62
|
+
min-width: 0;
|
|
63
|
+
width: 100%;
|
|
64
|
+
border: 0;
|
|
65
|
+
background: none;
|
|
66
|
+
color: var(--ad-text);
|
|
67
|
+
font: inherit;
|
|
68
|
+
font-family: var(--ad-font-family-mono);
|
|
69
|
+
text-transform: uppercase;
|
|
70
|
+
outline: none;
|
|
71
|
+
}
|
|
72
|
+
.ad-color-sample {
|
|
73
|
+
flex: none;
|
|
74
|
+
width: 1.15rem;
|
|
75
|
+
height: 1.15rem;
|
|
76
|
+
border-radius: 50%;
|
|
77
|
+
box-shadow: inset 0 0 0 0.0625rem #fff4, 0 0 0.5rem currentColor;
|
|
78
|
+
}
|
|
79
|
+
.ad-color-control {
|
|
80
|
+
font-family: var(--ad-font-family-mono);
|
|
81
|
+
text-align: start;
|
|
82
|
+
}
|
|
83
|
+
.ad-color-swatches {
|
|
84
|
+
display: flex;
|
|
85
|
+
flex-wrap: wrap;
|
|
86
|
+
gap: 0.4rem;
|
|
87
|
+
}
|
|
88
|
+
.ad-color-swatches > button {
|
|
89
|
+
width: 1.5rem;
|
|
90
|
+
height: 1.5rem;
|
|
91
|
+
padding: 0;
|
|
92
|
+
border: 0.125rem solid transparent;
|
|
93
|
+
border-radius: 50%;
|
|
94
|
+
box-shadow: inset 0 0 0 0.0625rem #fff3;
|
|
95
|
+
cursor: pointer;
|
|
96
|
+
transition: transform var(--ad-duration-fast) var(--ad-ease-spring);
|
|
97
|
+
}
|
|
98
|
+
.ad-color-swatches > button:hover {
|
|
99
|
+
transform: scale(1.15);
|
|
100
|
+
}
|
|
101
|
+
.ad-color-swatches > button[aria-pressed="true"] {
|
|
102
|
+
border-color: #fff;
|
|
103
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type CommonProps } from "../../../core/base";
|
|
2
|
+
export interface DatePickerProps extends CommonProps {
|
|
3
|
+
/** The date as YYYY-MM-DD, or "" for none. */
|
|
4
|
+
value?: string;
|
|
5
|
+
defaultValue?: string;
|
|
6
|
+
onValueChange?: (date: string) => void;
|
|
7
|
+
label?: React.ReactNode;
|
|
8
|
+
description?: React.ReactNode;
|
|
9
|
+
error?: React.ReactNode;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
/** Earliest and latest dates that can be chosen, YYYY-MM-DD. */
|
|
12
|
+
min?: string;
|
|
13
|
+
max?: string;
|
|
14
|
+
/** Language of month and day names (by default the library's current language). */
|
|
15
|
+
locale?: string;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
required?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare function DatePicker({ value: controlled, defaultValue, onValueChange, min, max, locale: requestedLocale, placeholder, ...p }: DatePickerProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/* Styles owned by DatePicker: a month grid; today glows, the chosen day is a lit disc. */
|
|
2
|
+
.ad-date-picker {
|
|
3
|
+
min-width: 0;
|
|
4
|
+
}
|
|
5
|
+
.ad-date-popover {
|
|
6
|
+
width: 18rem;
|
|
7
|
+
}
|
|
8
|
+
.ad-calendar {
|
|
9
|
+
display: grid;
|
|
10
|
+
gap: 0.5rem;
|
|
11
|
+
}
|
|
12
|
+
.ad-calendar-head {
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
justify-content: space-between;
|
|
16
|
+
text-transform: capitalize;
|
|
17
|
+
}
|
|
18
|
+
.ad-calendar-next .ad-icon {
|
|
19
|
+
rotate: 180deg;
|
|
20
|
+
}
|
|
21
|
+
.ad-calendar-grid {
|
|
22
|
+
display: grid;
|
|
23
|
+
grid-template-columns: repeat(7, 1fr);
|
|
24
|
+
gap: 0.15rem;
|
|
25
|
+
}
|
|
26
|
+
.ad-calendar-weekday {
|
|
27
|
+
padding-block: 0.25rem;
|
|
28
|
+
color: var(--ad-muted);
|
|
29
|
+
font-size: var(--ad-font-size-caption);
|
|
30
|
+
text-align: center;
|
|
31
|
+
text-transform: capitalize;
|
|
32
|
+
}
|
|
33
|
+
.ad-calendar-day {
|
|
34
|
+
aspect-ratio: 1;
|
|
35
|
+
padding: 0;
|
|
36
|
+
border: 0;
|
|
37
|
+
border-radius: 50%;
|
|
38
|
+
background: none;
|
|
39
|
+
color: var(--ad-neutral-200);
|
|
40
|
+
font: inherit;
|
|
41
|
+
font-size: var(--ad-font-size-body-sm);
|
|
42
|
+
cursor: pointer;
|
|
43
|
+
transition: background var(--ad-duration-fast), color var(--ad-duration-fast);
|
|
44
|
+
}
|
|
45
|
+
.ad-calendar-day:hover:not(:disabled) {
|
|
46
|
+
background: rgb(from var(--ad-primary) r g b / 0.2);
|
|
47
|
+
color: #fff;
|
|
48
|
+
}
|
|
49
|
+
.ad-calendar-day[data-outside] {
|
|
50
|
+
color: var(--ad-neutral-600);
|
|
51
|
+
}
|
|
52
|
+
.ad-calendar-day[data-today] {
|
|
53
|
+
box-shadow: inset 0 0 0 0.0625rem var(--ad-secondary);
|
|
54
|
+
color: var(--ad-secondary-100);
|
|
55
|
+
}
|
|
56
|
+
.ad-calendar-day[aria-pressed="true"] {
|
|
57
|
+
background: radial-gradient(circle at 35% 30%, var(--ad-secondary), var(--ad-primary));
|
|
58
|
+
color: #fff;
|
|
59
|
+
font-weight: 700;
|
|
60
|
+
box-shadow: 0 0 0.7rem rgb(from var(--ad-primary) r g b / 0.6);
|
|
61
|
+
}
|
|
62
|
+
.ad-calendar-day:disabled {
|
|
63
|
+
opacity: 0.3;
|
|
64
|
+
cursor: not-allowed;
|
|
65
|
+
}
|
|
66
|
+
.ad-calendar-foot {
|
|
67
|
+
display: flex;
|
|
68
|
+
justify-content: space-between;
|
|
69
|
+
}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/* Styles owned by FilePicker. */
|
|
2
|
+
.ad-file-picker {
|
|
3
|
+
display: flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
gap: var(--ad-size-gap);
|
|
6
|
+
flex-wrap: wrap;
|
|
7
|
+
min-width: 0;
|
|
8
|
+
}
|
|
9
|
+
.ad-file-picker > .ad-button {
|
|
10
|
+
flex: none;
|
|
11
|
+
}
|
|
12
|
+
.ad-file-picker > small {
|
|
13
|
+
flex: 1 1 8rem;
|
|
14
|
+
min-width: 0;
|
|
15
|
+
font-size: calc(var(--ad-size-font) * 0.88);
|
|
16
|
+
color: var(--ad-muted);
|
|
17
|
+
white-space: nowrap;
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
text-overflow: ellipsis;
|
|
20
|
+
}
|
|
21
|
+
/* The folder icon hops on hover; a picked file name slides in with a check glow. */
|
|
22
|
+
.ad-file-picker > .ad-button:hover:not(:disabled) > .ad-icon {
|
|
23
|
+
animation: ad-file-hop 0.6s cubic-bezier(0.34, 1.6, 0.5, 1);
|
|
24
|
+
}
|
|
25
|
+
.ad-file-picker > small[data-picked] {
|
|
26
|
+
color: var(--ad-neutral-200);
|
|
27
|
+
animation: ad-file-name 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
|
|
28
|
+
}
|
|
29
|
+
.ad-file-picker > small[data-picked]::before {
|
|
30
|
+
content: "✓ ";
|
|
31
|
+
color: var(--ad-pink);
|
|
32
|
+
text-shadow: 0 0 0.5em var(--ad-red);
|
|
33
|
+
}
|
|
34
|
+
@keyframes ad-file-hop {
|
|
35
|
+
40% {
|
|
36
|
+
transform: translateY(-0.25rem) rotate(-8deg);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
@keyframes ad-file-name {
|
|
40
|
+
from {
|
|
41
|
+
opacity: 0;
|
|
42
|
+
transform: translateX(-0.75rem);
|
|
43
|
+
filter: blur(0.2rem);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
/* The zone: a dashed glowing area; it lights up while a file is held over it. */
|
|
47
|
+
.ad-file-picker[data-variant="zone"] {
|
|
48
|
+
display: flex;
|
|
49
|
+
flex-wrap: nowrap;
|
|
50
|
+
align-items: center;
|
|
51
|
+
gap: var(--ad-space-4);
|
|
52
|
+
width: 100%;
|
|
53
|
+
padding: var(--ad-space-5);
|
|
54
|
+
border: 0.125rem dashed rgb(from var(--ad-primary) r g b / 0.5);
|
|
55
|
+
border-radius: var(--ad-radius-lg);
|
|
56
|
+
background: rgb(from var(--ad-primary) r g b / 0.06);
|
|
57
|
+
color: var(--ad-text);
|
|
58
|
+
font: inherit;
|
|
59
|
+
text-align: start;
|
|
60
|
+
cursor: pointer;
|
|
61
|
+
--ad-icon-size: 2rem;
|
|
62
|
+
transition: background var(--ad-duration-normal), border-color var(--ad-duration-normal), box-shadow var(--ad-duration-normal);
|
|
63
|
+
}
|
|
64
|
+
.ad-file-picker[data-variant="zone"]:hover:not(:disabled),
|
|
65
|
+
.ad-file-picker[data-variant="zone"]:focus-visible,
|
|
66
|
+
.ad-file-picker[data-variant="zone"][data-over] {
|
|
67
|
+
border-color: var(--ad-primary);
|
|
68
|
+
background: rgb(from var(--ad-primary) r g b / 0.12);
|
|
69
|
+
box-shadow: 0 0 1.5rem rgb(from var(--ad-primary) r g b / 0.25);
|
|
70
|
+
outline: none;
|
|
71
|
+
}
|
|
72
|
+
.ad-file-picker[data-variant="zone"]:hover:not(:disabled) > .ad-icon {
|
|
73
|
+
animation: ad-file-hop 0.6s cubic-bezier(0.34, 1.6, 0.5, 1);
|
|
74
|
+
}
|
|
75
|
+
.ad-file-picker[data-variant="zone"]:disabled {
|
|
76
|
+
opacity: 0.5;
|
|
77
|
+
cursor: not-allowed;
|
|
78
|
+
}
|
|
79
|
+
.ad-file-picker-text {
|
|
80
|
+
display: grid;
|
|
81
|
+
gap: var(--ad-space-1);
|
|
82
|
+
min-width: 0;
|
|
83
|
+
}
|
|
84
|
+
.ad-file-picker-text > strong {
|
|
85
|
+
font-size: var(--ad-font-size-title);
|
|
86
|
+
}
|
|
87
|
+
.ad-file-picker-text > small {
|
|
88
|
+
overflow: hidden;
|
|
89
|
+
color: var(--ad-muted);
|
|
90
|
+
font-size: var(--ad-font-size-caption);
|
|
91
|
+
white-space: nowrap;
|
|
92
|
+
text-overflow: ellipsis;
|
|
93
|
+
}
|
|
94
|
+
.ad-file-picker-text > small[data-picked] {
|
|
95
|
+
color: var(--ad-neutral-200);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* The avatar is the chooser itself; its host seal keeps animating under the edit affordance. */
|
|
99
|
+
.ad-file-picker[data-variant="avatar"] {
|
|
100
|
+
display: inline-flex;
|
|
101
|
+
width: fit-content;
|
|
102
|
+
}
|
|
103
|
+
.ad-file-picker-avatar-button {
|
|
104
|
+
position: relative;
|
|
105
|
+
display: block;
|
|
106
|
+
padding: 0;
|
|
107
|
+
border: 0;
|
|
108
|
+
border-radius: 50%;
|
|
109
|
+
background: transparent;
|
|
110
|
+
color: inherit;
|
|
111
|
+
cursor: pointer;
|
|
112
|
+
}
|
|
113
|
+
.ad-file-picker-avatar-button:focus-visible {
|
|
114
|
+
outline: 0.125rem solid var(--ad-secondary);
|
|
115
|
+
outline-offset: 0.25rem;
|
|
116
|
+
}
|
|
117
|
+
.ad-file-picker-avatar-edit {
|
|
118
|
+
position: absolute;
|
|
119
|
+
z-index: 1;
|
|
120
|
+
right: -0.1rem;
|
|
121
|
+
bottom: 0.1rem;
|
|
122
|
+
display: grid;
|
|
123
|
+
place-items: center;
|
|
124
|
+
width: 1.8rem;
|
|
125
|
+
aspect-ratio: 1;
|
|
126
|
+
border: 0.0625rem solid var(--ad-secondary);
|
|
127
|
+
border-radius: 50%;
|
|
128
|
+
background: var(--ad-primary-800);
|
|
129
|
+
color: var(--ad-on-accent);
|
|
130
|
+
box-shadow: 0 0 0.6rem rgb(from var(--ad-primary) r g b / 0.5);
|
|
131
|
+
opacity: 0;
|
|
132
|
+
transform: translateY(0.3rem) scale(0.8);
|
|
133
|
+
transition: opacity 0.2s, transform 0.2s;
|
|
134
|
+
pointer-events: none;
|
|
135
|
+
--ad-icon-size: 1rem;
|
|
136
|
+
}
|
|
137
|
+
.ad-file-picker-avatar-button:is(:hover, :focus-visible) .ad-file-picker-avatar-edit,
|
|
138
|
+
.ad-file-picker[data-variant="avatar"][data-over] .ad-file-picker-avatar-edit {
|
|
139
|
+
opacity: 1;
|
|
140
|
+
transform: none;
|
|
141
|
+
}
|
|
142
|
+
.ad-file-picker-avatar-button:disabled {
|
|
143
|
+
cursor: not-allowed;
|
|
144
|
+
filter: grayscale(1);
|
|
145
|
+
opacity: 0.45;
|
|
146
|
+
}
|
|
147
|
+
@media (hover: none) {
|
|
148
|
+
.ad-file-picker-avatar-edit { opacity: 1; transform: none; }
|
|
149
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type MouseEventHandler, type ReactNode, type Ref } from "react";
|
|
2
|
+
import { type CommonProps } from "../../../core/base";
|
|
3
|
+
import type { InputVariant } from "../shared";
|
|
4
|
+
export interface InputBaseProps extends CommonProps {
|
|
5
|
+
startAdornment?: ReactNode;
|
|
6
|
+
endAdornment?: ReactNode;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
readOnly?: boolean;
|
|
9
|
+
error?: boolean;
|
|
10
|
+
multiline?: boolean;
|
|
11
|
+
variant?: InputVariant;
|
|
12
|
+
/** Floating label drawn inside the box; it rises when focused or filled. */
|
|
13
|
+
label?: ReactNode;
|
|
14
|
+
/** Id of the floating label, for the control's aria-labelledby. */
|
|
15
|
+
labelId?: string;
|
|
16
|
+
/** The control has a value, so a floating label stays raised. */
|
|
17
|
+
filled?: boolean;
|
|
18
|
+
ref?: Ref<HTMLDivElement>;
|
|
19
|
+
onClick?: MouseEventHandler<HTMLDivElement>;
|
|
20
|
+
}
|
|
21
|
+
export declare const InputBase: import("react").ForwardRefExoticComponent<Omit<InputBaseProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|