@algolia/satellite 2.3.0-rc.9 → 2.3.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/dist/cjs/Actions/Button/PolymorphicButton.js +5 -5
- package/dist/cjs/Actions/Button/PolymorphicIconButton.js +2 -2
- package/dist/cjs/Actions/Button/styles.d.ts +1 -0
- package/dist/cjs/Actions/Button/styles.js +15 -10
- package/dist/cjs/Actions/SegmentedControl/SegmentedControl.js +3 -2
- package/dist/cjs/Actions/SegmentedControl/SegmentedControlOption.js +6 -3
- package/dist/cjs/Actions/ToggleButton/ToggleButtonBase.js +3 -3
- package/dist/cjs/Fields/Field/Field.js +3 -3
- package/dist/cjs/Fields/Input/Input.js +10 -13
- package/dist/cjs/Fields/RadioGroup/RadioGroupContext.d.ts +2 -0
- package/dist/cjs/Fields/Switch/Switch.tailwind.js +9 -9
- package/dist/cjs/Helpers/MarkdownContent/MarkdownContent.d.ts +15 -0
- package/dist/cjs/Helpers/MarkdownContent/MarkdownContent.js +29 -0
- package/dist/cjs/Helpers/MarkdownContent/MarkdownContent.tailwind.d.ts +5 -0
- package/dist/cjs/Helpers/MarkdownContent/MarkdownContent.tailwind.js +138 -0
- package/dist/cjs/Helpers/MarkdownContent/index.d.ts +1 -0
- package/dist/cjs/Helpers/MarkdownContent/index.js +16 -0
- package/dist/cjs/Helpers/index.d.ts +1 -0
- package/dist/cjs/Helpers/index.js +11 -0
- package/dist/cjs/Icons/index.d.ts +1 -1
- package/dist/cjs/Icons/index.js +6 -0
- package/dist/cjs/Overlay/MenuButton/MenuButton.d.ts +23 -7
- package/dist/cjs/Overlay/Modal/Modal.js +8 -8
- package/dist/cjs/styles/helpers/prefixTailwindClassName.js +7 -1
- package/dist/cjs/styles/tailwind.config.js +1 -1
- package/dist/esm/Actions/Button/PolymorphicButton.js +6 -6
- package/dist/esm/Actions/Button/PolymorphicIconButton.js +2 -2
- package/dist/esm/Actions/Button/styles.d.ts +1 -0
- package/dist/esm/Actions/Button/styles.js +14 -9
- package/dist/esm/Actions/SegmentedControl/SegmentedControl.js +3 -2
- package/dist/esm/Actions/SegmentedControl/SegmentedControlOption.js +6 -3
- package/dist/esm/Actions/ToggleButton/ToggleButtonBase.js +4 -4
- package/dist/esm/Fields/Field/Field.js +3 -3
- package/dist/esm/Fields/Input/Input.js +10 -13
- package/dist/esm/Fields/RadioGroup/RadioGroupContext.d.ts +2 -0
- package/dist/esm/Fields/Switch/Switch.tailwind.js +9 -9
- package/dist/esm/Helpers/MarkdownContent/MarkdownContent.d.ts +15 -0
- package/dist/esm/Helpers/MarkdownContent/MarkdownContent.js +22 -0
- package/dist/esm/Helpers/MarkdownContent/MarkdownContent.tailwind.d.ts +5 -0
- package/dist/esm/Helpers/MarkdownContent/MarkdownContent.tailwind.js +138 -0
- package/dist/esm/Helpers/MarkdownContent/index.d.ts +1 -0
- package/dist/esm/Helpers/MarkdownContent/index.js +1 -0
- package/dist/esm/Helpers/index.d.ts +1 -0
- package/dist/esm/Helpers/index.js +2 -1
- package/dist/esm/Icons/index.d.ts +1 -1
- package/dist/esm/Icons/index.js +1 -1
- package/dist/esm/Overlay/MenuButton/MenuButton.d.ts +23 -7
- package/dist/esm/Overlay/Modal/Modal.js +8 -8
- package/dist/esm/styles/helpers/prefixTailwindClassName.js +7 -1
- package/dist/esm/styles/tailwind.config.js +1 -1
- package/dist/satellite.min.css +1 -1
- package/package.json +2 -1
@@ -17,4 +17,4 @@ export { QueryBreakdownIcon } from "./QueryBreakdownIcon";
|
|
17
17
|
export { BulbIcon } from "./BulbIcon";
|
18
18
|
export { TestingIcon } from "./TestingIcon";
|
19
19
|
export { RocketIcon } from "./RocketIcon";
|
20
|
-
export { ActivityIcon, AirplayIcon, AlertCircleIcon, AlertOctagonIcon, AlertTriangleIcon, AlignCenterIcon, AlignJustifyIcon, AlignLeftIcon, AlignRightIcon, AnchorIcon, ApertureIcon, ArchiveIcon, ArrowDownCircleIcon, ArrowDownIcon, ArrowDownLeftIcon, ArrowDownRightIcon, ArrowLeftCircleIcon, ArrowLeftIcon, ArrowRightCircleIcon, ArrowRightIcon, ArrowUpCircleIcon, ArrowUpIcon, ArrowUpLeftIcon, ArrowUpRightIcon, AtSignIcon, AwardIcon, BanIcon, BarChart2Icon, BarChartIcon, BatteryChargingIcon, BatteryIcon, BellIcon, BellOffIcon, BlocksIcon, BluetoothIcon, BoldIcon, BookIcon, BookmarkIcon, BookOpenIcon, BoxIcon, BriefcaseIcon, CalendarIcon, CameraIcon, CameraOffIcon, CastIcon, CheckCircleIcon, CheckIcon, CheckSquareIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronsDownIcon, ChevronsLeftIcon, ChevronsRightIcon, ChevronsUpIcon, ChevronUpIcon, ChromeIcon, CircleIcon, ClipboardIcon, ClockIcon, CloudDrizzleIcon, CloudIcon, CloudLightningIcon, CloudOffIcon, CloudRainIcon, CloudSnowIcon, CodeIcon, CodepenIcon, CodesandboxIcon, CoffeeIcon, ColumnsIcon, CommandIcon, CompassIcon, CopyIcon, CornerDownLeftIcon, CornerDownRightIcon, CornerLeftDownIcon, CornerLeftUpIcon, CornerRightDownIcon, CornerRightUpIcon, CornerUpLeftIcon, CornerUpRightIcon, CpuIcon, CreditCardIcon, CropIcon, CrosshairIcon, DatabaseIcon, DeleteIcon, DiscIcon, DivideCircleIcon, DivideIcon, DivideSquareIcon, DollarSignIcon, DownloadCloudIcon, DownloadIcon, DribbbleIcon, DropletIcon, Edit2Icon, Edit3Icon, EditIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FacebookIcon, FastForwardIcon, FeatherIcon, FigmaIcon, FileIcon, FileMinusIcon, FilePlusIcon, FileSearchIcon, FileTextIcon, FilmIcon, FilterIcon, FlagIcon, FlaskConicalIcon, FolderIcon, FolderMinusIcon, FolderPlusIcon, FramerIcon, FrownIcon, GiftIcon, GitBranchIcon, GitCommitIcon, GithubIcon, GitlabIcon, GitMergeIcon, GitPullRequestIcon, GlobeIcon, HardDriveIcon, HashIcon, HeadphonesIcon, HeartIcon, HelpCircleIcon, HexagonIcon, HomeIcon, ImageIcon, ImageOffIcon, InboxIcon, InfoIcon, InstagramIcon, ItalicIcon, KeyIcon, Landmark, LayersIcon, LayoutGridIcon, LayoutIcon, LifeBuoyIcon, Link2Icon, LinkedinIcon, LinkIcon, ListIcon, LoaderIcon, LockIcon, LogInIcon, LogOutIcon, MailIcon, MapIcon, MapPinIcon, Maximize2Icon, MaximizeIcon, MehIcon, MenuIcon, MergeIcon, MessageCircleIcon, MessageSquareIcon, MicIcon, MicOffIcon, Minimize2Icon, MinimizeIcon, MinusCircleIcon, MinusIcon, MinusSquareIcon, MonitorIcon, MoonIcon, MoreHorizontalIcon, MoreVerticalIcon, MousePointerIcon, MoveIcon, MusicIcon, Navigation2Icon, NavigationIcon, OctagonIcon, PackageIcon, PaperclipIcon, PauseCircleIcon, PauseIcon, PenToolIcon, PercentIcon, PhoneCallIcon, PhoneForwardedIcon, PhoneIcon, PhoneIncomingIcon, PhoneMissedIcon, PhoneOffIcon, PhoneOutgoingIcon, PieChartIcon, PlayCircleIcon, PlayIcon, PlusCircleIcon, PlusIcon, PlusSquareIcon, PocketIcon, PowerIcon, PrinterIcon, PuzzleIcon, RadioIcon, RefreshCcwIcon, RefreshCwIcon, RepeatIcon, RewindIcon, RotateCcwIcon, RotateCwIcon, RssIcon, SaveIcon, ScissorsIcon, SearchIcon, SearchXIcon, SendIcon, ServerCogIcon, ServerCrashIcon, ServerIcon, SettingsIcon, Share2Icon, ShareIcon, ShieldIcon, ShieldOffIcon, ShoppingBagIcon, ShoppingCartIcon, ShuffleIcon, SidebarIcon, SkipBackIcon, SkipForwardIcon, SlackIcon, SlidersIcon, SmartphoneIcon, SmileIcon, SparklesIcon, SpeakerIcon, SquareIcon, StarIcon, StopCircleIcon, SunIcon, SunriseIcon, SunsetIcon, TableIcon, TabletIcon, TagIcon, TargetIcon, TerminalIcon, ThermometerIcon, ThumbsDownIcon, ThumbsUpIcon, ToggleLeftIcon, ToggleRightIcon, Trash2Icon, TrashIcon, TrelloIcon, TrendingDownIcon, TrendingUpIcon, TriangleIcon, TruckIcon, TvIcon, TwitchIcon, TwitterIcon, TypeIcon, UmbrellaIcon, UnderlineIcon, UnlockIcon, UploadCloudIcon, UploadIcon, UserCheckIcon, UserIcon, UserMinusIcon, UserPlusIcon, UsersIcon, UserXIcon, VideoIcon, VideoOffIcon, VoicemailIcon, Volume1Icon, Volume2Icon, VolumeIcon, VolumeXIcon, WatchIcon, WifiIcon, WifiOffIcon, WindIcon, WrenchIcon, XCircleIcon, XIcon, XOctagonIcon, XSquareIcon, YoutubeIcon, ZapIcon, ZapOffIcon, ZoomInIcon, ZoomOutIcon, } from "lucide-react";
|
20
|
+
export { ActivityIcon, AirplayIcon, AlertCircleIcon, AlertOctagonIcon, AlertTriangleIcon, AlignCenterIcon, AlignJustifyIcon, AlignLeftIcon, AlignRightIcon, AnchorIcon, ApertureIcon, ArchiveIcon, ArrowDownCircleIcon, ArrowDownIcon, ArrowDownLeftIcon, ArrowDownRightIcon, ArrowLeftCircleIcon, ArrowLeftIcon, ArrowRightCircleIcon, ArrowRightIcon, ArrowUpCircleIcon, ArrowUpIcon, ArrowUpLeftIcon, ArrowUpRightIcon, AtSignIcon, AwardIcon, BanIcon, BarChart2Icon, BarChartIcon, BatteryChargingIcon, BatteryIcon, BellIcon, BellOffIcon, BlocksIcon, BluetoothIcon, BoldIcon, BookIcon, BookmarkIcon, BookOpenIcon, BoxIcon, BriefcaseIcon, CalendarIcon, CameraIcon, CameraOffIcon, CastIcon, CheckCircleIcon, CheckIcon, CheckSquareIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronsDownIcon, ChevronsLeftIcon, ChevronsRightIcon, ChevronsUpIcon, ChevronUpIcon, ChromeIcon, CircleIcon, ClipboardIcon, ClockIcon, CloudDrizzleIcon, CloudIcon, CloudLightningIcon, CloudOffIcon, CloudRainIcon, CloudSnowIcon, CodeIcon, CodepenIcon, CodesandboxIcon, CoffeeIcon, ColumnsIcon, CommandIcon, CompassIcon, CopyIcon, CornerDownLeftIcon, CornerDownRightIcon, CornerLeftDownIcon, CornerLeftUpIcon, CornerRightDownIcon, CornerRightUpIcon, CornerUpLeftIcon, CornerUpRightIcon, CpuIcon, CreditCardIcon, CropIcon, CrosshairIcon, DatabaseIcon, DeleteIcon, DiscIcon, DivideCircleIcon, DivideIcon, DivideSquareIcon, DollarSignIcon, DownloadCloudIcon, DownloadIcon, DribbbleIcon, DropletIcon, Edit2Icon, Edit3Icon, EditIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FacebookIcon, FastForwardIcon, FeatherIcon, FigmaIcon, FileIcon, FileMinusIcon, FilePlusIcon, FileSearchIcon, FileTextIcon, FilmIcon, FilterIcon, FlagIcon, FlaskConicalIcon, FolderIcon, FolderMinusIcon, FolderPlusIcon, FramerIcon, FrownIcon, GiftIcon, GitBranchIcon, GitCommitIcon, GithubIcon, GitlabIcon, GitMergeIcon, GitPullRequestIcon, GlobeIcon, HardDriveIcon, HashIcon, HeadphonesIcon, HeartIcon, HelpCircleIcon, HexagonIcon, HomeIcon, ImageIcon, ImageOffIcon, InboxIcon, InfoIcon, InstagramIcon, ItalicIcon, KeyIcon, Landmark, LayersIcon, LayoutGridIcon, LayoutIcon, LifeBuoyIcon, Link2Icon, LinkedinIcon, LinkIcon, ListIcon, LoaderIcon, LockIcon, LogInIcon, LogOutIcon, MailIcon, MapIcon, MapPinIcon, Maximize2Icon, MaximizeIcon, MehIcon, MenuIcon, MergeIcon, MessageCircleIcon, MessageSquareIcon, MicIcon, MicOffIcon, Minimize2Icon, MinimizeIcon, MinusCircleIcon, MinusIcon, MinusSquareIcon, MonitorIcon, MoonIcon, MoreHorizontalIcon, MoreVerticalIcon, MousePointerIcon, MoveIcon, MusicIcon, Navigation2Icon, NavigationIcon, OctagonIcon, PackageIcon, PaperclipIcon, PauseCircleIcon, PauseIcon, PenToolIcon, PercentIcon, PhoneCallIcon, PhoneForwardedIcon, PhoneIcon, PhoneIncomingIcon, PhoneMissedIcon, PhoneOffIcon, PhoneOutgoingIcon, PieChartIcon, PlayCircleIcon, PlayIcon, PlusCircleIcon, PlusIcon, PlusSquareIcon, PocketIcon, PowerIcon, PrinterIcon, PuzzleIcon, RadioIcon, RefreshCcwIcon, RefreshCwIcon, RepeatIcon, RewindIcon, RotateCcwIcon, RotateCwIcon, RssIcon, SaveIcon, ScissorsIcon, SearchIcon, SearchXIcon, SendIcon, ServerCogIcon, ServerCrashIcon, ServerIcon, SettingsIcon, Share2Icon, ShareIcon, ShieldIcon, ShieldOffIcon, ShoppingBagIcon, ShoppingCartIcon, ShuffleIcon, SidebarIcon, SkipBackIcon, SkipForwardIcon, SlackIcon, SlidersIcon, SmartphoneIcon, SmileIcon, SparklesIcon, SpeakerIcon, SquareIcon, StarIcon, StopCircleIcon, SunIcon, SunriseIcon, SunsetIcon, TableIcon, TabletIcon, TagIcon, TargetIcon, TerminalIcon, ThermometerIcon, ThumbsDownIcon, ThumbsUpIcon, ToggleLeftIcon, ToggleRightIcon, Trash2Icon, TrashIcon, TrelloIcon, TrendingDownIcon, TrendingUpIcon, TriangleIcon, TrophyIcon, TruckIcon, TvIcon, TwitchIcon, TwitterIcon, TypeIcon, UmbrellaIcon, UnderlineIcon, UnlockIcon, UploadCloudIcon, UploadIcon, UserCheckIcon, UserIcon, UserMinusIcon, UserPlusIcon, UsersIcon, UserXIcon, VideoIcon, VideoOffIcon, VoicemailIcon, Volume1Icon, Volume2Icon, VolumeIcon, VolumeXIcon, WatchIcon, WifiIcon, WifiOffIcon, WindIcon, WrenchIcon, XCircleIcon, XIcon, XOctagonIcon, XSquareIcon, YoutubeIcon, ZapIcon, ZapOffIcon, ZoomInIcon, ZoomOutIcon, } from "lucide-react";
|
package/dist/cjs/Icons/index.js
CHANGED
@@ -1653,6 +1653,12 @@ Object.defineProperty(exports, "TriangleIcon", {
|
|
1653
1653
|
return _lucideReact.TriangleIcon;
|
1654
1654
|
}
|
1655
1655
|
});
|
1656
|
+
Object.defineProperty(exports, "TrophyIcon", {
|
1657
|
+
enumerable: true,
|
1658
|
+
get: function get() {
|
1659
|
+
return _lucideReact.TrophyIcon;
|
1660
|
+
}
|
1661
|
+
});
|
1656
1662
|
Object.defineProperty(exports, "TruckIcon", {
|
1657
1663
|
enumerable: true,
|
1658
1664
|
get: function get() {
|
@@ -1,7 +1,23 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import * as DropdownMenu from "@radix-ui/react-dropdown-menu";
|
3
3
|
import type { DropdownMenuProps } from "@radix-ui/react-dropdown-menu";
|
4
|
+
import { type CollapsibleItemProps, type CollapsibleItemsExclusiveGroupProps, type CollapsibleItemsMultiGroupProps } from "./components/collapsible";
|
5
|
+
import { type CustomTriggerProps } from "./components/CustomTrigger";
|
6
|
+
import { type DefaultTriggerProps } from "./components/DefaultTrigger";
|
7
|
+
import { type ItemProps, type LinkItemProps, type RadioItemProps, type ToggleItemProps } from "./components/items";
|
8
|
+
import { type LabelProps } from "./components/Label";
|
4
9
|
export declare type MenuButtonProps = DropdownMenuProps;
|
10
|
+
export declare type MenuButtonCollapsibleItemProps = CollapsibleItemProps;
|
11
|
+
export declare type MenuButtonCollapsibleItemsExclusiveGroupProps = CollapsibleItemsExclusiveGroupProps;
|
12
|
+
export declare type MenuButtonCollapsibleItemsMultiGroupProps = CollapsibleItemsMultiGroupProps;
|
13
|
+
export { type MenuButtonContentProps } from "./components/Content";
|
14
|
+
export declare type MenuButtonCustomTriggerProps = CustomTriggerProps;
|
15
|
+
export declare type MenuButtonDefaultTriggerProps = DefaultTriggerProps;
|
16
|
+
export declare type MenuButtonItemProps = ItemProps;
|
17
|
+
export declare type MenuButtonLinkItemProps = LinkItemProps;
|
18
|
+
export declare type MenuButtonRadioItemProps = RadioItemProps;
|
19
|
+
export declare type MenuButtonToggleItemProps = ToggleItemProps;
|
20
|
+
export declare type MenuButtonLabelProps = LabelProps;
|
5
21
|
/**
|
6
22
|
* The `MenuButton` component helps users select an item from a list of available options.
|
7
23
|
*
|
@@ -9,13 +25,13 @@ export declare type MenuButtonProps = DropdownMenuProps;
|
|
9
25
|
*/
|
10
26
|
export declare const MenuButton: {
|
11
27
|
(props: MenuButtonProps): import("react/jsx-runtime").JSX.Element;
|
12
|
-
CollapsibleItem: import("react").ForwardRefExoticComponent<
|
28
|
+
CollapsibleItem: import("react").ForwardRefExoticComponent<CollapsibleItemProps & {
|
13
29
|
children?: import("react").ReactNode;
|
14
30
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
15
|
-
CollapsibleItemsMultipleGroup: import("react").FC<import("react").PropsWithChildren<
|
16
|
-
CollapsibleItemsSingleGroup: import("react").FC<import("react").PropsWithChildren<
|
31
|
+
CollapsibleItemsMultipleGroup: import("react").FC<import("react").PropsWithChildren<CollapsibleItemsMultiGroupProps>>;
|
32
|
+
CollapsibleItemsSingleGroup: import("react").FC<import("react").PropsWithChildren<CollapsibleItemsExclusiveGroupProps>>;
|
17
33
|
Content: import("react").ForwardRefExoticComponent<import("./components/Content").MenuButtonContentProps & import("react").RefAttributes<HTMLDivElement>>;
|
18
|
-
CustomTrigger: import("react").ForwardRefExoticComponent<
|
34
|
+
CustomTrigger: import("react").ForwardRefExoticComponent<CustomTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
19
35
|
Divider: import("react").ForwardRefExoticComponent<import("react").RefAttributes<HTMLDivElement>>;
|
20
36
|
Item: import("react").ForwardRefExoticComponent<import("./useMenuItemProps").BaseItemProps<HTMLDivElement> & DropdownMenu.DropdownMenuItemProps & {
|
21
37
|
startIcon?: import("../..").IconComponentType | undefined;
|
@@ -24,12 +40,12 @@ export declare const MenuButton: {
|
|
24
40
|
children?: import("react").ReactNode;
|
25
41
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
26
42
|
Label: import("react").FC<import("react").PropsWithChildren<DropdownMenu.DropdownMenuLabelProps>>;
|
27
|
-
LinkItem: import("react").FC<
|
43
|
+
LinkItem: import("react").FC<LinkItemProps>;
|
28
44
|
RadioGroup: import("react").ForwardRefExoticComponent<DropdownMenu.DropdownMenuRadioGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
29
45
|
RadioItem: import("react").ForwardRefExoticComponent<Pick<DropdownMenu.DropdownMenuRadioItemProps, "value" | "defaultChecked"> & {
|
30
46
|
children?: import("react").ReactNode;
|
31
47
|
} & import("./useMenuItemProps").BaseItemProps<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
32
|
-
ToggleItem: import("react").FC<import("react").PropsWithChildren<
|
33
|
-
Trigger: import("react").ForwardRefExoticComponent<
|
48
|
+
ToggleItem: import("react").FC<import("react").PropsWithChildren<ToggleItemProps>>;
|
49
|
+
Trigger: import("react").ForwardRefExoticComponent<DefaultTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
34
50
|
displayName: string;
|
35
51
|
};
|
@@ -21,7 +21,7 @@ var _Satellite = require("./../../Satellite");
|
|
21
21
|
var _satellitePrefixer = _interopRequireDefault(require("./../../styles/helpers/satellitePrefixer"));
|
22
22
|
var _prefersReducedMotion = require("./../../utils/prefersReducedMotion");
|
23
23
|
var _jsxRuntime = require("react/jsx-runtime");
|
24
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18;
|
24
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19;
|
25
25
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
26
26
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
27
27
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
@@ -86,10 +86,10 @@ var Modal = exports.Modal = function Modal(_ref) {
|
|
86
86
|
asChild: true,
|
87
87
|
children: triggerButton
|
88
88
|
}), createPortal( /*#__PURE__*/(0, _jsxRuntime.jsx)(Dialog.Overlay, {
|
89
|
-
className: (0, _clsx["default"])(animate && !_prefersReducedMotion.prefersReducedMotion && (0, _satellitePrefixer["default"])(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["modal-animated"]))), (0, _satellitePrefixer["default"])(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])(["modal-overlay bg-grey-900/30 z-modalOverlay inset-0 fixed w-full h-full flex items-start justify-center overflow-x-hidden overflow-y-auto
|
89
|
+
className: (0, _clsx["default"])(animate && !_prefersReducedMotion.prefersReducedMotion && (0, _satellitePrefixer["default"])(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["modal-animated"]))), (0, _satellitePrefixer["default"])(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])(["modal-overlay bg-grey-900/30 z-modalOverlay inset-0 fixed w-full h-full flex items-start justify-center px-8 py-10"]))), (0, _satellitePrefixer["default"])(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2["default"])(["overflow-x-hidden overflow-y-auto [scrollbar-gutter:stable_both-edges]"])))),
|
90
90
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Dialog.Content, {
|
91
91
|
ref: dialogContentRef,
|
92
|
-
className: (0, _clsx["default"])((0, _satellitePrefixer["default"])(
|
92
|
+
className: (0, _clsx["default"])((0, _satellitePrefixer["default"])(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2["default"])(["modal-content"]))), SIZE_CLASSNAMES[size], centerY && (0, _satellitePrefixer["default"])(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2["default"])(["flex m-auto justify-center"])))),
|
93
93
|
"aria-describedby": undefined,
|
94
94
|
onOpenAutoFocus: function onOpenAutoFocus(e) {
|
95
95
|
var _closeButtonRef$curre;
|
@@ -107,18 +107,18 @@ var Modal = exports.Modal = function Modal(_ref) {
|
|
107
107
|
}
|
108
108
|
},
|
109
109
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
110
|
-
className: (0, _satellitePrefixer["default"])(
|
110
|
+
className: (0, _satellitePrefixer["default"])(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2["default"])(["modal-container"]))),
|
111
111
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Layout.Card, {
|
112
112
|
as: "div",
|
113
113
|
elevation: "500",
|
114
|
-
className: (0, _clsx["default"])((0, _satellitePrefixer["default"])(
|
114
|
+
className: (0, _clsx["default"])((0, _satellitePrefixer["default"])(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2["default"])(["relative"]))), className),
|
115
115
|
fullBleed: true,
|
116
116
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("header", {
|
117
|
-
className: (0, _clsx["default"])((0, _satellitePrefixer["default"])(
|
117
|
+
className: (0, _clsx["default"])((0, _satellitePrefixer["default"])(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2["default"])(["min-h-14 flex items-center justify-between space-x-2"]))), title ? (0, _satellitePrefixer["default"])(_templateObject15 || (_templateObject15 = (0, _taggedTemplateLiteral2["default"])(["border-b border-grey-100 pl-8 pr-16"]))) : (0, _satellitePrefixer["default"])(_templateObject16 || (_templateObject16 = (0, _taggedTemplateLiteral2["default"])(["justify-end px-8"]))), !title && hideCloseIcon && (0, _satellitePrefixer["default"])(_templateObject17 || (_templateObject17 = (0, _taggedTemplateLiteral2["default"])(["hidden"])))),
|
118
118
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Dialog.Title, {
|
119
119
|
asChild: true,
|
120
120
|
children: title ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
121
|
-
className: (0, _satellitePrefixer["default"])(
|
121
|
+
className: (0, _satellitePrefixer["default"])(_templateObject18 || (_templateObject18 = (0, _taggedTemplateLiteral2["default"])(["flex-1 display-heading truncate"]))),
|
122
122
|
children: title
|
123
123
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactVisuallyHidden.VisuallyHidden, {
|
124
124
|
children: locale.modalTitle
|
@@ -128,7 +128,7 @@ var Modal = exports.Modal = function Modal(_ref) {
|
|
128
128
|
className: (0, _clsx["default"])(!fullBleed && SIZE_PADDING_CLASSNAMES[size]),
|
129
129
|
children: children
|
130
130
|
}), !hideCloseIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
131
|
-
className: (0, _satellitePrefixer["default"])(
|
131
|
+
className: (0, _satellitePrefixer["default"])(_templateObject19 || (_templateObject19 = (0, _taggedTemplateLiteral2["default"])(["-mr-2 absolute top-3 right-8"]))),
|
132
132
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Dialog.Close, {
|
133
133
|
ref: closeButtonRef,
|
134
134
|
asChild: true,
|
@@ -9,7 +9,7 @@
|
|
9
9
|
*/
|
10
10
|
function prefixTailwindClassName(tailwindPrefix, classname) {
|
11
11
|
if (classname.startsWith("@container")) return "".concat(tailwindPrefix).concat(classname);
|
12
|
-
var searchZone = classname.replace(
|
12
|
+
var searchZone = classname.replace(/\[[^\]]+\]$/, "");
|
13
13
|
|
14
14
|
// important marker
|
15
15
|
var prefixInsertIndex = searchZone.lastIndexOf("!");
|
@@ -24,6 +24,12 @@ function prefixTailwindClassName(tailwindPrefix, classname) {
|
|
24
24
|
prefixInsertIndex = searchZone.lastIndexOf("@");
|
25
25
|
}
|
26
26
|
prefixInsertIndex += 1;
|
27
|
+
|
28
|
+
// This can happen when using arbitrary properties like [scrollbar-gutter:stable]
|
29
|
+
// In which case we don't want to prefix the classname
|
30
|
+
if (classname[prefixInsertIndex] === "[") {
|
31
|
+
return classname;
|
32
|
+
}
|
27
33
|
return classname.slice(0, prefixInsertIndex) + tailwindPrefix + classname.slice(prefixInsertIndex);
|
28
34
|
}
|
29
35
|
module.exports = prefixTailwindClassName;
|
@@ -144,5 +144,5 @@ module.exports = {
|
|
144
144
|
}
|
145
145
|
}
|
146
146
|
},
|
147
|
-
plugins: [require("@tailwindcss/container-queries"), require("./base.tailwind"), require("../Helpers/utilities/overlay.tailwind"), require("../Helpers/utilities/utilities.tailwind"), require("../Helpers/utilities/focusable.tailwind"), require("../Typography/Typography.tailwind"), require("../Layout/FlexGrid/FlexGrid.tailwind"), require("../Fields/AutoComplete/AutoComplete.tailwind"), require("../Actions/Button/Button.tailwind"), require("../Actions/ToggleGroup/ToggleGroup.tailwind"), require("../Actions/Accordion/Accordion.tailwind"), require("../Layout/Card/Card.tailwind"), require("../Fields/Checkbox/Checkbox.tailwind"), require("../Indicators/Toast/Toast.tailwind"), require("../Helpers/HelpUnderline/HelpUnderline.tailwind"), require("../Fields/Input/Input.tailwind"), require("../Helpers/InstantSearch/InstantSearch.tailwind"), require("../Indicators/KeyboardKey/KeyboardKey.tailwind"), require("../Indicators/Medallion/Medallion.tailwind"), require("../Overlay/Modal/Modal.tailwind"), require("../Indicators/ProgressBar/ProgressBar.tailwind"), require("../Indicators/ProgressSpinner/ProgressSpinner.tailwind"), require("../Fields/RadioGroup/RadioButton.tailwind"), require("../Indicators/ScrollIndicator/ScrollIndicator.tailwind"), require("../Fields/Select/Select.tailwind"), require("../Indicators/Separator/Separator.tailwind"), require("../Actions/SegmentedControl/SegmentedControl.tailwind"), require("../Navigation/Tabs/Tabs.tailwind"), require("../Layout/CollapsibleCard/CollapsibleCard.tailwind"), require("../Layout/Tables/DataTable/DataTable.tailwind"), require("../Layout/Tables/Table/Table.tailwind"), require("../Helpers/ShimmerText/ShimmerText.tailwind"), require("../Indicators/Tag/Tag.tailwind"), require("../Fields/TextArea/TextArea.tailwind"), require("../Fields/Switch/Switch.tailwind"), require("../Overlay/Tooltip/Tooltip.tailwind"), require("../Helpers/UserContent/UserContent.tailwind"), require("../Fields/DatePicker/DatePicker.tailwind")]
|
147
|
+
plugins: [require("@tailwindcss/container-queries"), require("./base.tailwind"), require("../Helpers/utilities/overlay.tailwind"), require("../Helpers/utilities/utilities.tailwind"), require("../Helpers/utilities/focusable.tailwind"), require("../Typography/Typography.tailwind"), require("../Layout/FlexGrid/FlexGrid.tailwind"), require("../Fields/AutoComplete/AutoComplete.tailwind"), require("../Actions/Button/Button.tailwind"), require("../Actions/ToggleGroup/ToggleGroup.tailwind"), require("../Actions/Accordion/Accordion.tailwind"), require("../Layout/Card/Card.tailwind"), require("../Fields/Checkbox/Checkbox.tailwind"), require("../Indicators/Toast/Toast.tailwind"), require("../Helpers/HelpUnderline/HelpUnderline.tailwind"), require("../Fields/Input/Input.tailwind"), require("../Helpers/InstantSearch/InstantSearch.tailwind"), require("../Indicators/KeyboardKey/KeyboardKey.tailwind"), require("../Indicators/Medallion/Medallion.tailwind"), require("../Overlay/Modal/Modal.tailwind"), require("../Indicators/ProgressBar/ProgressBar.tailwind"), require("../Indicators/ProgressSpinner/ProgressSpinner.tailwind"), require("../Fields/RadioGroup/RadioButton.tailwind"), require("../Indicators/ScrollIndicator/ScrollIndicator.tailwind"), require("../Fields/Select/Select.tailwind"), require("../Indicators/Separator/Separator.tailwind"), require("../Actions/SegmentedControl/SegmentedControl.tailwind"), require("../Navigation/Tabs/Tabs.tailwind"), require("../Layout/CollapsibleCard/CollapsibleCard.tailwind"), require("../Layout/Tables/DataTable/DataTable.tailwind"), require("../Layout/Tables/Table/Table.tailwind"), require("../Helpers/ShimmerText/ShimmerText.tailwind"), require("../Indicators/Tag/Tag.tailwind"), require("../Fields/TextArea/TextArea.tailwind"), require("../Fields/Switch/Switch.tailwind"), require("../Overlay/Tooltip/Tooltip.tailwind"), require("../Helpers/UserContent/UserContent.tailwind"), require("../Helpers/MarkdownContent/MarkdownContent.tailwind"), require("../Fields/DatePicker/DatePicker.tailwind")]
|
148
148
|
};
|
@@ -7,12 +7,12 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
7
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
8
8
|
import cx from "clsx";
|
9
9
|
import React, { forwardRef } from "react";
|
10
|
-
import { BUTTON_LOADER_ICON_SIZES, BUTTON_SIZE_CLASSNAMES, BUTTON_VARIANT_CLASSNAMES, getIconColorClassName } from "./styles";
|
10
|
+
import { BUTTON_LOADER_ICON_SIZES, BUTTON_PADDING_CLASSNAMES, BUTTON_SIZE_CLASSNAMES, BUTTON_VARIANT_CLASSNAMES, getIconColorClassName } from "./styles";
|
11
11
|
import { isButtonType } from "./types";
|
12
12
|
import { ProgressSpinner } from "./../../Indicators";
|
13
13
|
import stl from "./../../styles/helpers/satellitePrefixer";
|
14
14
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
15
|
-
var BASE_CLASSNAMES = stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["btn inline-flex justify-center items-center
|
15
|
+
var BASE_CLASSNAMES = stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["btn inline-flex justify-center items-center typo-display-body focusable-visible"])));
|
16
16
|
var ICON_SIZE = 16;
|
17
17
|
/**
|
18
18
|
* `PolymorphicButton` is intended for internal use.
|
@@ -36,7 +36,7 @@ export var PolymorphicButton = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
36
36
|
// @ts-expect-error disabled is not present in PolymorphicButtonProps
|
37
37
|
cleanedProps.disabled = true;
|
38
38
|
}
|
39
|
-
var buttonClassName = cx(BASE_CLASSNAMES, BUTTON_SIZE_CLASSNAMES[size], BUTTON_VARIANT_CLASSNAMES[variant], cleanedProps.disabled && stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["btn-disabled"]))), className);
|
39
|
+
var buttonClassName = cx(BASE_CLASSNAMES, BUTTON_SIZE_CLASSNAMES[size], BUTTON_PADDING_CLASSNAMES[size], BUTTON_VARIANT_CLASSNAMES[variant], cleanedProps.disabled && stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["btn-disabled"]))), className);
|
40
40
|
var loaderClassNames = stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["absolute ", ""])), (variant === "destructive" || variant === "primary") && "text-white");
|
41
41
|
var iconClassNames = cx(getIconColorClassName(props), loading && stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["invisible"]))));
|
42
42
|
var textClassNames = cx(loading && stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["invisible"]))));
|
@@ -54,14 +54,14 @@ export var PolymorphicButton = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
54
54
|
}), StartIcon && /*#__PURE__*/_jsx(StartIcon, {
|
55
55
|
width: ICON_SIZE,
|
56
56
|
height: ICON_SIZE,
|
57
|
-
className: cx(stl(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["shrink-0"]))), iconClassNames)
|
57
|
+
className: cx(stl(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["shrink-0 mr-1"]))), iconClassNames)
|
58
58
|
}), /*#__PURE__*/_jsx("span", {
|
59
|
-
className: cx(stl(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["whitespace-nowrap
|
59
|
+
className: cx(stl(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["whitespace-nowrap"]))), textClassNames),
|
60
60
|
children: children
|
61
61
|
}), EndIcon && /*#__PURE__*/_jsx(EndIcon, {
|
62
62
|
width: ICON_SIZE,
|
63
63
|
height: ICON_SIZE,
|
64
|
-
className: cx(stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["shrink-0"]))), iconClassNames)
|
64
|
+
className: cx(stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["shrink-0 ml-1"]))), iconClassNames)
|
65
65
|
})]
|
66
66
|
}));
|
67
67
|
});
|
@@ -15,9 +15,9 @@ import stl from "./../../styles/helpers/satellitePrefixer";
|
|
15
15
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
16
16
|
var BASE_CLASSNAMES = stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["btn inline-flex items-center justify-center focusable-visible"])));
|
17
17
|
var SIZE_CLASSNAMES = {
|
18
|
-
small: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["max-h-6 max-w-6 min-h-6 min-w-6 text-
|
18
|
+
small: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["max-h-6 max-w-6 min-h-6 min-w-6 text-md"]))),
|
19
19
|
medium: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["max-h-8 max-w-8 min-h-8 min-w-8 text-md"]))),
|
20
|
-
large: stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["max-h-10 max-w-10 min-h-10 min-w-10 text-
|
20
|
+
large: stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["max-h-10 max-w-10 min-h-10 min-w-10 text-md"])))
|
21
21
|
};
|
22
22
|
var VARIANT_CLASSNAMES = _objectSpread(_objectSpread({}, BUTTON_VARIANT_CLASSNAMES), {}, {
|
23
23
|
neutral: stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["btn-neutral text-grey-600"]))),
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import type { ButtonBaseProps, ButtonSize, ButtonVariant } from "./types";
|
2
2
|
export declare const BUTTON_SIZE_CLASSNAMES: Record<ButtonSize, string>;
|
3
|
+
export declare const BUTTON_PADDING_CLASSNAMES: Record<ButtonSize, string>;
|
3
4
|
export declare const BUTTON_LOADER_ICON_SIZES: Record<ButtonSize, number>;
|
4
5
|
export declare const BUTTON_VARIANT_CLASSNAMES: Record<ButtonVariant, string>;
|
5
6
|
export declare const getIconColorClassName: ({ disabled, variant }: Pick<ButtonBaseProps, "disabled" | "variant">) => string | null;
|
@@ -1,30 +1,35 @@
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
2
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
|
2
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13;
|
3
3
|
import stl from "./../../styles/helpers/satellitePrefixer";
|
4
4
|
export var BUTTON_SIZE_CLASSNAMES = {
|
5
5
|
small: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["h-6"]))),
|
6
6
|
medium: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["h-8"]))),
|
7
7
|
large: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["h-10"])))
|
8
8
|
};
|
9
|
+
export var BUTTON_PADDING_CLASSNAMES = {
|
10
|
+
small: stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["px-2"]))),
|
11
|
+
medium: stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["px-4"]))),
|
12
|
+
large: stl(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["px-4"])))
|
13
|
+
};
|
9
14
|
export var BUTTON_LOADER_ICON_SIZES = {
|
10
|
-
small:
|
15
|
+
small: 16,
|
11
16
|
medium: 16,
|
12
|
-
large:
|
17
|
+
large: 16
|
13
18
|
};
|
14
19
|
export var BUTTON_VARIANT_CLASSNAMES = {
|
15
|
-
subtle: stl(
|
16
|
-
neutral: stl(
|
17
|
-
primary: stl(
|
18
|
-
destructive: stl(
|
20
|
+
subtle: stl(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["btn-subtle"]))),
|
21
|
+
neutral: stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["btn-neutral"]))),
|
22
|
+
primary: stl(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["btn-primary"]))),
|
23
|
+
destructive: stl(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["btn-destructive"])))
|
19
24
|
};
|
20
25
|
export var getIconColorClassName = function getIconColorClassName(_ref) {
|
21
26
|
var disabled = _ref.disabled,
|
22
27
|
variant = _ref.variant;
|
23
28
|
if (variant === "destructive" || variant === "primary") {
|
24
|
-
return stl(
|
29
|
+
return stl(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["text-white"])));
|
25
30
|
}
|
26
31
|
if (variant === "subtle" && !disabled) {
|
27
32
|
return null;
|
28
33
|
}
|
29
|
-
return disabled ? stl(
|
34
|
+
return disabled ? stl(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["text-grey-300"]))) : stl(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["text-grey-600"])));
|
30
35
|
};
|
@@ -69,11 +69,12 @@ export var SegmentedControl = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
69
69
|
value: value,
|
70
70
|
name: radioName,
|
71
71
|
onChange: onChange,
|
72
|
-
disabled: disabled
|
72
|
+
disabled: disabled,
|
73
|
+
size: size
|
73
74
|
},
|
74
75
|
children: /*#__PURE__*/_jsxs("div", {
|
75
76
|
ref: mergeRefs([ref, containerRef]),
|
76
|
-
className: cx(stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["segmented-control focusable-visible-within\n relative inline-flex typo-display-body rounded bg-grey-100\n ", "\n "])), size === "large" ? "segmented-control-large space-x-1" : "space-x-
|
77
|
+
className: cx(stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["segmented-control focusable-visible-within\n relative inline-flex typo-display-body rounded bg-grey-100\n ", "\n "])), size === "large" ? "segmented-control-large space-x-1" : "space-x-0.5"), BUTTON_SIZE_CLASSNAMES[size], className),
|
77
78
|
children: [/*#__PURE__*/_jsx("div", {
|
78
79
|
ref: valueIndicatorRef,
|
79
80
|
style: valueIndicatorStyle,
|
@@ -1,9 +1,11 @@
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
2
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
3
|
-
var _templateObject, _templateObject2;
|
3
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
4
4
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
5
5
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
6
|
+
import cx from "clsx";
|
6
7
|
import { buildAnimationProps } from "./utils";
|
8
|
+
import { BUTTON_PADDING_CLASSNAMES } from "./../Button/styles";
|
7
9
|
import { useRadioGroupContext } from "./../../Fields/RadioGroup/RadioGroupContext";
|
8
10
|
import { OverflowTooltipWrapper } from "./../../Overlay";
|
9
11
|
import stl from "./../../styles/helpers/satellitePrefixer";
|
@@ -15,11 +17,12 @@ export var SegmentedControlOption = function SegmentedControlOption(_ref) {
|
|
15
17
|
var context = useRadioGroupContext();
|
16
18
|
var checked = context.value === value;
|
17
19
|
var inputDisabled = context.disabled || disabled;
|
20
|
+
var size = context.size || "medium";
|
18
21
|
return /*#__PURE__*/_jsxs("label", _objectSpread(_objectSpread({
|
19
|
-
className: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["
|
22
|
+
className: cx(stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["inline-flex grow shrink justify-center items-center min-w-16 max-w-48 z-10 text-grey-600"]))), BUTTON_PADDING_CLASSNAMES[size], inputDisabled ? stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["cursor-not-allowed opacity-60 rounded bg-grey-100"]))) : stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["cursor-pointer hover:text-grey-900"]))), !checked && !inputDisabled && stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["rounded active:bg-accent-200/20"]))))
|
20
23
|
}, buildAnimationProps(context.name, value)), {}, {
|
21
24
|
children: [/*#__PURE__*/_jsx("input", {
|
22
|
-
className: stl(
|
25
|
+
className: stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["w-0 h-0 opacity-0"]))),
|
23
26
|
type: "radio",
|
24
27
|
value: value,
|
25
28
|
name: context.name,
|
@@ -2,12 +2,12 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
3
3
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
4
4
|
var _excluded = ["className", "size", "icon", "children", "label"];
|
5
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10
|
5
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
|
6
6
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
7
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
8
8
|
import cx from "clsx";
|
9
9
|
import { forwardRef } from "react";
|
10
|
-
import { BUTTON_SIZE_CLASSNAMES } from "./../Button/styles";
|
10
|
+
import { BUTTON_PADDING_CLASSNAMES, BUTTON_SIZE_CLASSNAMES } from "./../Button/styles";
|
11
11
|
import { TooltipWrapper } from "./../../Overlay";
|
12
12
|
import stl from "./../../styles/helpers/satellitePrefixer";
|
13
13
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
@@ -37,11 +37,11 @@ export var ToggleButtonBase = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
37
37
|
ref: ref,
|
38
38
|
type: "button",
|
39
39
|
"aria-label": label,
|
40
|
-
className: cx(stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["inline-flex items-center justify-center gap-1 min-w-min whitespace-nowrap typo-display-body"]))), stl(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["group/toggle-button rounded focusable-visible focus-visible:border-transparent disabled:cursor-not-allowed"]))), stl(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["data-[state=on]:text-accent-600 disabled:!text-grey-300"]))), stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["bg-white data-[state=off]:hover:bg-grey-100 data-[state=on]:bg-accent-100 disabled:!bg-grey-50"]))), stl(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["border border-grey-200 data-[state=on]:border-accent-600 disabled:!border-grey-200"]))), !isIconOnly &&
|
40
|
+
className: cx(stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["inline-flex items-center justify-center gap-1 min-w-min whitespace-nowrap typo-display-body"]))), stl(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["group/toggle-button rounded focusable-visible focus-visible:border-transparent disabled:cursor-not-allowed"]))), stl(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["data-[state=on]:text-accent-600 disabled:!text-grey-300"]))), stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["bg-white data-[state=off]:hover:bg-grey-100 data-[state=on]:bg-accent-100 disabled:!bg-grey-50"]))), stl(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["border border-grey-200 data-[state=on]:border-accent-600 disabled:!border-grey-200"]))), !isIconOnly && BUTTON_PADDING_CLASSNAMES[size], isIconOnly ? ICON_ONLY_CLASSNAMES[size] : BUTTON_SIZE_CLASSNAMES[size], className)
|
41
41
|
}, rest), {}, {
|
42
42
|
children: [!!Icon && /*#__PURE__*/_jsx(Icon, {
|
43
43
|
"aria-hidden": "true",
|
44
|
-
className: stl(
|
44
|
+
className: stl(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["shrink-0 h-4 w-4 text-grey-600 group-data-[state=on]/toggle-button:text-inherit group-disabled/toggle-button:text-inherit"])))
|
45
45
|
}), !!children && /*#__PURE__*/_jsx("div", {
|
46
46
|
children: children
|
47
47
|
})]
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
3
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8
|
3
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
4
4
|
import cx from "clsx";
|
5
5
|
import { useEffect, useMemo, useState } from "react";
|
6
6
|
import { DEFAULT_FIELD_STATE, FieldContext } from "./FieldContext";
|
@@ -104,7 +104,7 @@ export var Field = function Field(_ref) {
|
|
104
104
|
children: "*"
|
105
105
|
})]
|
106
106
|
}), /*#__PURE__*/_jsx("div", {
|
107
|
-
className: cx(inline && stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["ml-auto
|
107
|
+
className: cx(inline && stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["ml-auto flex items-center"])))),
|
108
108
|
children: children
|
109
109
|
})]
|
110
110
|
}), state.status === "invalid" && state.errors.length > 0 ? /*#__PURE__*/_jsx("ul", {
|
@@ -123,7 +123,7 @@ export var Field = function Field(_ref) {
|
|
123
123
|
})
|
124
124
|
}) : description ? /*#__PURE__*/_jsx("p", {
|
125
125
|
id: descriptionId,
|
126
|
-
className:
|
126
|
+
className: stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["display-caption text-grey-600 mt-1"]))),
|
127
127
|
children: description
|
128
128
|
}) : null]
|
129
129
|
})
|
@@ -3,7 +3,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
4
4
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
5
5
|
var _excluded = ["className", "style", "startIcon", "endItem", "disabled", "readOnly", "clearable", "type", "variant", "locale", "required"];
|
6
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16;
|
6
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18;
|
7
7
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
8
8
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
9
9
|
import cx from "clsx";
|
@@ -102,7 +102,6 @@ export var Input = /*#__PURE__*/forwardRef(function (_ref, externalRef) {
|
|
102
102
|
}
|
103
103
|
}, [inputProps.value, isControlled]);
|
104
104
|
var Icon = startIcon ? startIcon : type === "search" ? SearchIcon : undefined;
|
105
|
-
var iconSize = variant === "small" ? "1rem" : "1.5rem";
|
106
105
|
var isInvalid = status === "invalid";
|
107
106
|
var StatusIcon = isInvalid ? InvalidIcon : status === "validated" ? ValidatedIcon : Fragment;
|
108
107
|
var clearable = typeof clearableProp === "boolean" ? clearableProp : type === "search";
|
@@ -116,11 +115,9 @@ export var Input = /*#__PURE__*/forwardRef(function (_ref, externalRef) {
|
|
116
115
|
}
|
117
116
|
},
|
118
117
|
children: [Icon && /*#__PURE__*/_jsx(Icon, {
|
119
|
-
className: stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["ml-4 shrink-0 ", ""])), disabled ? "text-grey-300" : focused ? "text-accent-600" : "text-grey-500")
|
120
|
-
width: iconSize,
|
121
|
-
height: iconSize
|
118
|
+
className: stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["ml-4 shrink-0 size-4 ", ""])), disabled ? "text-grey-300" : focused ? "text-accent-600" : "text-grey-500")
|
122
119
|
}), /*#__PURE__*/_jsx("input", _objectSpread(_objectSpread({
|
123
|
-
className: stl(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["
|
120
|
+
className: cx(stl(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["no-search-input-decoration"]))), Icon ? stl(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["mx-2"]))) : stl(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["mx-4"])))),
|
124
121
|
ref: inputRefCallback,
|
125
122
|
type: type,
|
126
123
|
"aria-labelledby": labelId,
|
@@ -149,7 +146,7 @@ export var Input = /*#__PURE__*/forwardRef(function (_ref, externalRef) {
|
|
149
146
|
(_inputProps$onBlur = inputProps.onBlur) === null || _inputProps$onBlur === void 0 || _inputProps$onBlur.call(inputProps, evt);
|
150
147
|
}
|
151
148
|
})), clearable && !disabled && !readOnly && !isValueEmpty ? /*#__PURE__*/_jsx(IconButton, {
|
152
|
-
className: stl(
|
149
|
+
className: stl(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["mr-2 ", ""])), focused ? "visible" : "invisible group-hover:visible"),
|
153
150
|
title: locale.clearInput,
|
154
151
|
icon: XIcon,
|
155
152
|
variant: "subtle",
|
@@ -161,15 +158,15 @@ export var Input = /*#__PURE__*/forwardRef(function (_ref, externalRef) {
|
|
161
158
|
triggerInputChange("");
|
162
159
|
}
|
163
160
|
}) : null, !!endItem && /*#__PURE__*/_jsx("div", {
|
164
|
-
className: stl(
|
161
|
+
className: stl(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["mr-4"]))),
|
165
162
|
children: endItem
|
166
163
|
}), /*#__PURE__*/_jsx(StatusIcon, {}), type === "number" && !disabled && /*#__PURE__*/_jsxs("div", {
|
167
|
-
className: stl(
|
164
|
+
className: stl(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["input-spinner"]))),
|
168
165
|
children: [/*#__PURE__*/_jsx("button", {
|
169
166
|
tabIndex: -1,
|
170
167
|
type: "button",
|
171
168
|
disabled: readOnly,
|
172
|
-
className: stl(
|
169
|
+
className: stl(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["input-spinner-button ", ""])), readOnly && "cursor-not-allowed"),
|
173
170
|
"aria-label": locale.increment,
|
174
171
|
onClick: function onClick() {
|
175
172
|
var _inputRef$current$val, _inputRef$current2;
|
@@ -187,13 +184,13 @@ export var Input = /*#__PURE__*/forwardRef(function (_ref, externalRef) {
|
|
187
184
|
},
|
188
185
|
children: /*#__PURE__*/_jsx(ChevronUpIcon, {
|
189
186
|
size: 12,
|
190
|
-
className: cx(isInvalid && stl(
|
187
|
+
className: cx(isInvalid && stl(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["text-red-700"]))))
|
191
188
|
})
|
192
189
|
}), /*#__PURE__*/_jsx("button", {
|
193
190
|
tabIndex: -1,
|
194
191
|
type: "button",
|
195
192
|
disabled: readOnly,
|
196
|
-
className: stl(
|
193
|
+
className: stl(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["input-spinner-button ", ""])), readOnly && "cursor-not-allowed"),
|
197
194
|
"aria-label": locale.decrement,
|
198
195
|
onClick: function onClick() {
|
199
196
|
var _inputRef$current$val2, _inputRef$current3;
|
@@ -211,7 +208,7 @@ export var Input = /*#__PURE__*/forwardRef(function (_ref, externalRef) {
|
|
211
208
|
},
|
212
209
|
children: /*#__PURE__*/_jsx(ChevronDownIcon, {
|
213
210
|
size: 12,
|
214
|
-
className: cx(isInvalid && stl(
|
211
|
+
className: cx(isInvalid && stl(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["text-red-700"]))))
|
215
212
|
})
|
216
213
|
})]
|
217
214
|
})]
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import type { ForwardedRef } from "react";
|
2
|
+
import type { ButtonSize } from "../../Actions/Button/types";
|
2
3
|
import type { FieldState } from "../../Fields/Field";
|
3
4
|
export interface RadioGroupContextType {
|
4
5
|
id?: string;
|
@@ -13,6 +14,7 @@ export interface RadioGroupContextType {
|
|
13
14
|
descriptionId?: string;
|
14
15
|
state?: FieldState;
|
15
16
|
ref?: ForwardedRef<HTMLInputElement>;
|
17
|
+
size?: ButtonSize;
|
16
18
|
}
|
17
19
|
export declare const RadioGroupContext: import("react").Context<RadioGroupContextType | null>;
|
18
20
|
export declare const useRadioGroupContext: () => RadioGroupContextType;
|
@@ -11,8 +11,8 @@ var switchPlugin = plugin(function (_ref) {
|
|
11
11
|
".switch-container": {
|
12
12
|
position: "relative",
|
13
13
|
display: "block",
|
14
|
-
height: "
|
15
|
-
width: "
|
14
|
+
height: "24px",
|
15
|
+
width: "43px",
|
16
16
|
".switch-handle": {
|
17
17
|
position: "absolute",
|
18
18
|
top: "0px",
|
@@ -29,13 +29,13 @@ var switchPlugin = plugin(function (_ref) {
|
|
29
29
|
transform: "translateX(2px)"
|
30
30
|
},
|
31
31
|
"&:hover .switch-handle.switch-checked ~ .switch:after": {
|
32
|
-
transform: "translateX(
|
32
|
+
transform: "translateX(17px)"
|
33
33
|
},
|
34
34
|
"&:hover .switch-handle.switch-disabled ~ .switch:after": {
|
35
35
|
transform: "translateX(0px)"
|
36
36
|
},
|
37
37
|
"&:hover .switch-handle.switch-checked.switch-disabled ~ .switch:after": {
|
38
|
-
transform: "translateX(
|
38
|
+
transform: "translateX(19px)"
|
39
39
|
}
|
40
40
|
},
|
41
41
|
".switch": {
|
@@ -51,10 +51,10 @@ var switchPlugin = plugin(function (_ref) {
|
|
51
51
|
transition: transition,
|
52
52
|
"&::after": {
|
53
53
|
position: "absolute",
|
54
|
-
top: "
|
55
|
-
left: "
|
56
|
-
width: "
|
57
|
-
height: "
|
54
|
+
top: "2px",
|
55
|
+
left: "2px",
|
56
|
+
width: "20px",
|
57
|
+
height: "20px",
|
58
58
|
content: '" "',
|
59
59
|
borderRadius: "9999px",
|
60
60
|
background: "linear-gradient(-180deg, ".concat(theme("colors.white"), " 0%, ").concat(theme("colors.grey.50"), " 100%)"),
|
@@ -65,7 +65,7 @@ var switchPlugin = plugin(function (_ref) {
|
|
65
65
|
background: theme("colors.accent.600"),
|
66
66
|
boxShadow: "inset 0px 1px 4px 0px ".concat(rgba(theme("colors.grey.900"), 0.1)),
|
67
67
|
"&:after": {
|
68
|
-
transform: "translateX(
|
68
|
+
transform: "translateX(19px)"
|
69
69
|
}
|
70
70
|
},
|
71
71
|
".switch-handle.switch-disabled ~ &": {
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import type { FC } from "react";
|
2
|
+
export interface MarkdownContentProps {
|
3
|
+
/**
|
4
|
+
* Additional classes to apply to the `MarkdownContent`.
|
5
|
+
*/
|
6
|
+
className?: string;
|
7
|
+
/**
|
8
|
+
* The content of the `MarkdownContent`.
|
9
|
+
*/
|
10
|
+
content?: string;
|
11
|
+
}
|
12
|
+
/**
|
13
|
+
* The `MarkdownContent` component is used to style user generated content that comes as Markdown.
|
14
|
+
*/
|
15
|
+
export declare const MarkdownContent: FC<MarkdownContentProps>;
|