@octohirono/stitch-design-system 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/dist/components/Accordion/Accordion.d.ts +45 -0
- package/dist/components/Accordion/Accordion.js +26 -0
- package/dist/components/Accordion/accordion.module.js +4 -0
- package/dist/components/Accordion/index.d.ts +2 -0
- package/dist/components/AlertDialog/AlertDialog.d.ts +45 -0
- package/dist/components/AlertDialog/AlertDialog.js +32 -0
- package/dist/components/AlertDialog/alert-dialog.module.js +4 -0
- package/dist/components/AlertDialog/index.d.ts +2 -0
- package/dist/components/AspectRatio/AspectRatio.d.ts +29 -0
- package/dist/components/AspectRatio/AspectRatio.js +15 -0
- package/dist/components/AspectRatio/aspect-ratio.module.js +4 -0
- package/dist/components/AspectRatio/index.d.ts +2 -0
- package/dist/components/Avatar/Avatar.d.ts +42 -0
- package/dist/components/Avatar/Avatar.js +21 -0
- package/dist/components/Avatar/avatar.module.js +13 -0
- package/dist/components/Avatar/index.d.ts +2 -0
- package/dist/components/Button/Button.d.ts +60 -0
- package/dist/components/Button/Button.js +22 -0
- package/dist/components/Button/button.module.js +19 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/Card/Card.d.ts +50 -0
- package/dist/components/Card/Card.js +21 -0
- package/dist/components/Card/card.module.js +22 -0
- package/dist/components/Card/index.d.ts +2 -0
- package/dist/components/Checkbox/Checkbox.d.ts +45 -0
- package/dist/components/Checkbox/Checkbox.js +56 -0
- package/dist/components/Checkbox/checkbox.module.js +17 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/CodeBlock/CodeBlock.d.ts +10 -0
- package/dist/components/CodeBlock/CodeBlock.js +50 -0
- package/dist/components/CodeBlock/codeblock.module.js +17 -0
- package/dist/components/CodeBlock/index.d.ts +2 -0
- package/dist/components/Collapse/Collapse.d.ts +38 -0
- package/dist/components/Collapse/Collapse.js +50 -0
- package/dist/components/Collapse/collapse.module.js +13 -0
- package/dist/components/Collapse/index.d.ts +2 -0
- package/dist/components/ContextMenu/ContextMenu.d.ts +47 -0
- package/dist/components/ContextMenu/ContextMenu.js +50 -0
- package/dist/components/ContextMenu/context-menu.module.js +13 -0
- package/dist/components/ContextMenu/index.d.ts +2 -0
- package/dist/components/Divider/Divider.d.ts +50 -0
- package/dist/components/Divider/Divider.js +23 -0
- package/dist/components/Divider/divider.module.js +14 -0
- package/dist/components/Divider/index.d.ts +2 -0
- package/dist/components/Drawer/Drawer.d.ts +36 -0
- package/dist/components/Drawer/Drawer.js +76 -0
- package/dist/components/Drawer/drawer.module.js +21 -0
- package/dist/components/Drawer/index.d.ts +2 -0
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +55 -0
- package/dist/components/DropdownMenu/DropdownMenu.js +54 -0
- package/dist/components/DropdownMenu/dropdown-menu.module.js +13 -0
- package/dist/components/DropdownMenu/index.d.ts +2 -0
- package/dist/components/Form/Form.d.ts +20 -0
- package/dist/components/Form/Form.js +105 -0
- package/dist/components/Form/FormItem.d.ts +3 -0
- package/dist/components/Form/FormItem.js +96 -0
- package/dist/components/Form/context.d.ts +22 -0
- package/dist/components/Form/context.js +5 -0
- package/dist/components/Form/form.module.js +25 -0
- package/dist/components/Form/index.d.ts +7 -0
- package/dist/components/Form/types.d.ts +164 -0
- package/dist/components/Form/types.js +6 -0
- package/dist/components/Form/useForm.d.ts +15 -0
- package/dist/components/Form/useForm.js +188 -0
- package/dist/components/Form/validators.d.ts +3 -0
- package/dist/components/Form/validators.js +73 -0
- package/dist/components/HoverCard/HoverCard.d.ts +47 -0
- package/dist/components/HoverCard/HoverCard.js +26 -0
- package/dist/components/HoverCard/hover-card.module.js +9 -0
- package/dist/components/HoverCard/index.d.ts +2 -0
- package/dist/components/Icon/Icon.d.ts +100 -0
- package/dist/components/Icon/Icon.js +150 -0
- package/dist/components/Icon/icon.module.js +7 -0
- package/dist/components/Icon/index.d.ts +2 -0
- package/dist/components/Image/Image.d.ts +50 -0
- package/dist/components/Image/Image.js +95 -0
- package/dist/components/Image/image.module.js +27 -0
- package/dist/components/Image/index.d.ts +2 -0
- package/dist/components/Input/Input.d.ts +41 -0
- package/dist/components/Input/Input.js +62 -0
- package/dist/components/Input/index.d.ts +2 -0
- package/dist/components/Input/input.module.js +17 -0
- package/dist/components/Label/Label.d.ts +28 -0
- package/dist/components/Label/Label.js +15 -0
- package/dist/components/Label/index.d.ts +2 -0
- package/dist/components/Label/label.module.js +4 -0
- package/dist/components/Loading/Loading.d.ts +22 -0
- package/dist/components/Loading/Loading.js +32 -0
- package/dist/components/Loading/index.d.ts +2 -0
- package/dist/components/Loading/loading.module.js +14 -0
- package/dist/components/Menubar/Menubar.d.ts +64 -0
- package/dist/components/Menubar/Menubar.js +70 -0
- package/dist/components/Menubar/index.d.ts +2 -0
- package/dist/components/Menubar/menubar.module.js +15 -0
- package/dist/components/Modal/Modal.d.ts +38 -0
- package/dist/components/Modal/Modal.js +68 -0
- package/dist/components/Modal/index.d.ts +2 -0
- package/dist/components/Modal/modal.module.js +13 -0
- package/dist/components/NavigationMenu/NavigationMenu.d.ts +47 -0
- package/dist/components/NavigationMenu/NavigationMenu.js +47 -0
- package/dist/components/NavigationMenu/index.d.ts +2 -0
- package/dist/components/NavigationMenu/navigation-menu.module.js +16 -0
- package/dist/components/Notification/Notification.d.ts +14 -0
- package/dist/components/Notification/Notification.js +87 -0
- package/dist/components/Notification/NotificationPortal.d.ts +29 -0
- package/dist/components/Notification/NotificationPortal.js +90 -0
- package/dist/components/Notification/index.d.ts +4 -0
- package/dist/components/Notification/notification.module.js +31 -0
- package/dist/components/Notification/types.d.ts +44 -0
- package/dist/components/OtpField/OtpField.d.ts +40 -0
- package/dist/components/OtpField/OtpField.js +20 -0
- package/dist/components/OtpField/index.d.ts +2 -0
- package/dist/components/OtpField/otp-field.module.js +7 -0
- package/dist/components/PasswordInput/PasswordInput.d.ts +36 -0
- package/dist/components/PasswordInput/PasswordInput.js +28 -0
- package/dist/components/PasswordInput/index.d.ts +2 -0
- package/dist/components/PasswordInput/password-input.module.js +4 -0
- package/dist/components/Popover/Popover.d.ts +42 -0
- package/dist/components/Popover/Popover.js +24 -0
- package/dist/components/Popover/index.d.ts +2 -0
- package/dist/components/Popover/popover.module.js +9 -0
- package/dist/components/Progress/Progress.d.ts +44 -0
- package/dist/components/Progress/Progress.js +55 -0
- package/dist/components/Progress/index.d.ts +2 -0
- package/dist/components/Progress/progress.module.js +21 -0
- package/dist/components/Radio/Radio.d.ts +47 -0
- package/dist/components/Radio/Radio.js +102 -0
- package/dist/components/Radio/index.d.ts +2 -0
- package/dist/components/Radio/radio.module.js +17 -0
- package/dist/components/ScrollArea/ScrollArea.d.ts +34 -0
- package/dist/components/ScrollArea/ScrollArea.js +34 -0
- package/dist/components/ScrollArea/index.d.ts +2 -0
- package/dist/components/ScrollArea/scroll-area.module.js +10 -0
- package/dist/components/Select/Select.d.ts +54 -0
- package/dist/components/Select/Select.js +118 -0
- package/dist/components/Select/index.d.ts +2 -0
- package/dist/components/Select/select.module.js +24 -0
- package/dist/components/Skeleton/Skeleton.d.ts +71 -0
- package/dist/components/Skeleton/Skeleton.js +147 -0
- package/dist/components/Skeleton/index.d.ts +2 -0
- package/dist/components/Skeleton/skeleton.module.js +16 -0
- package/dist/components/Slider/Slider.d.ts +58 -0
- package/dist/components/Slider/Slider.js +33 -0
- package/dist/components/Slider/index.d.ts +2 -0
- package/dist/components/Slider/slider.module.js +9 -0
- package/dist/components/Switch/Switch.d.ts +50 -0
- package/dist/components/Switch/Switch.js +43 -0
- package/dist/components/Switch/index.d.ts +2 -0
- package/dist/components/Switch/switch.module.js +15 -0
- package/dist/components/Table/Table.d.ts +65 -0
- package/dist/components/Table/Table.js +75 -0
- package/dist/components/Table/index.d.ts +2 -0
- package/dist/components/Table/table.module.js +21 -0
- package/dist/components/Tabs/Tabs.d.ts +37 -0
- package/dist/components/Tabs/Tabs.js +68 -0
- package/dist/components/Tabs/index.d.ts +2 -0
- package/dist/components/Tabs/tabs.module.js +13 -0
- package/dist/components/Tag/Tag.d.ts +67 -0
- package/dist/components/Tag/Tag.js +54 -0
- package/dist/components/Tag/index.d.ts +2 -0
- package/dist/components/Tag/tag.module.js +28 -0
- package/dist/components/Toggle/Toggle.d.ts +39 -0
- package/dist/components/Toggle/Toggle.js +29 -0
- package/dist/components/Toggle/index.d.ts +2 -0
- package/dist/components/Toggle/toggle.module.js +7 -0
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +88 -0
- package/dist/components/ToggleGroup/ToggleGroup.js +42 -0
- package/dist/components/ToggleGroup/index.d.ts +2 -0
- package/dist/components/ToggleGroup/toggle-group.module.js +8 -0
- package/dist/components/Toolbar/Toolbar.d.ts +116 -0
- package/dist/components/Toolbar/Toolbar.js +72 -0
- package/dist/components/Toolbar/index.d.ts +2 -0
- package/dist/components/Toolbar/toolbar.module.js +14 -0
- package/dist/components/Tooltip/Tooltip.d.ts +41 -0
- package/dist/components/Tooltip/Tooltip.js +38 -0
- package/dist/components/Tooltip/index.d.ts +2 -0
- package/dist/components/Tooltip/tooltip.module.js +21 -0
- package/dist/components/_internal/useOverlay.d.ts +15 -0
- package/dist/components/_internal/useOverlay.js +55 -0
- package/dist/index.d.ts +82 -0
- package/dist/index.js +43 -0
- package/dist/style.css +3693 -0
- package/package.json +36 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region packages/react/src/components/Toolbar/toolbar.module.less
|
|
2
|
+
var e = "_root_1m3hm_1", t = "_button_1m3hm_15", n = "_buttonDanger_1m3hm_48", r = "_buttonIcon_1m3hm_55", i = "_toggleGroup_1m3hm_61", a = "_toggleItem_1m3hm_65", o = "_itemIcon_1m3hm_103", s = "_separator_1m3hm_106", c = "_link_1m3hm_118", l = {
|
|
3
|
+
root: e,
|
|
4
|
+
button: t,
|
|
5
|
+
buttonDanger: n,
|
|
6
|
+
buttonIcon: r,
|
|
7
|
+
toggleGroup: i,
|
|
8
|
+
toggleItem: a,
|
|
9
|
+
itemIcon: o,
|
|
10
|
+
separator: s,
|
|
11
|
+
link: c
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { t as button, n as buttonDanger, r as buttonIcon, l as default, o as itemIcon, c as link, e as root, s as separator, i as toggleGroup, a as toggleItem };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type TooltipPlacement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';
|
|
3
|
+
export type TooltipTrigger = 'hover' | 'focus' | 'click';
|
|
4
|
+
/**
|
|
5
|
+
* 文字提示浮层(Ant `Tooltip` 语义):`title` 内容 + `placement`(12 向)+ `trigger`
|
|
6
|
+
* (`hover` / `focus` / `click`)+ 受控 `open` / `defaultOpen` / `onOpenChange`。标准矩形浮层,
|
|
7
|
+
* 圆角 / 边框 / 阴影由主题决定。
|
|
8
|
+
*
|
|
9
|
+
* 跨-prop 注意事项:
|
|
10
|
+
* - **受控/非受控双模式**:给 `open` 由父管(配 `onOpenChange`),只给 `defaultOpen` 组件自管。
|
|
11
|
+
* - **a11y 描述关联**:显示时把 tooltip 的 id 拼进触发器的 `aria-describedby`(保留子元素原有值),
|
|
12
|
+
* 隐藏时撤回;浮层 `role="tooltip"` + `aria-hidden` 随显隐切换。
|
|
13
|
+
* - **面 = 浅底浮起层**:气泡走 `--stitch-bg-elevated`(浮起面)+ 深字 `--stitch-text-primary`;
|
|
14
|
+
* 边框 / 箭头走 `--stitch-text-disabled`。箭头几何(菱形边长、位置微调、gap)为浮层结构量、
|
|
15
|
+
* 非主题值。
|
|
16
|
+
*/
|
|
17
|
+
export interface TooltipProps {
|
|
18
|
+
/** 提示内容,支持多行(可用 \n 或 <br/> 换行) */
|
|
19
|
+
title: React.ReactNode;
|
|
20
|
+
/** 弹出位置 @default 'top' */
|
|
21
|
+
placement?: TooltipPlacement;
|
|
22
|
+
/** 触发方式 @default 'hover' */
|
|
23
|
+
trigger?: TooltipTrigger;
|
|
24
|
+
/** 受控显隐(气泡浮层约定:Ant v5 `open`) */
|
|
25
|
+
open?: boolean;
|
|
26
|
+
/** 非受控初始显隐 @default false */
|
|
27
|
+
defaultOpen?: boolean;
|
|
28
|
+
/** 显隐变化回调(气泡浮层约定:Ant v5 `onOpenChange`) */
|
|
29
|
+
onOpenChange?: (open: boolean) => void;
|
|
30
|
+
/** 子元素(触发器) */
|
|
31
|
+
children: React.ReactElement;
|
|
32
|
+
/** 自定义类名 */
|
|
33
|
+
className?: string;
|
|
34
|
+
/** 自定义样式 */
|
|
35
|
+
style?: React.CSSProperties;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* 文字提示浮层:hover / focus / click 触发,12 向定位。
|
|
39
|
+
* 显示时通过 `aria-describedby` 把内容关联到触发器,屏幕阅读器可读;受控(`open`/`onOpenChange`)与非受控双模式。
|
|
40
|
+
*/
|
|
41
|
+
export declare const Tooltip: React.FC<TooltipProps>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import e from "./tooltip.module.js";
|
|
2
|
+
import t, { useCallback as n, useEffect as r, useId as i, useRef as a, useState as o } from "react";
|
|
3
|
+
import s from "clsx";
|
|
4
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
5
|
+
//#region packages/react/src/components/Tooltip/Tooltip.tsx
|
|
6
|
+
var u = ({ title: u, placement: d = "top", trigger: f = "hover", open: p, defaultOpen: m = !1, onOpenChange: h, children: g, className: _, style: v }) => {
|
|
7
|
+
let [y, b] = o(m), x = p !== void 0, S = x ? p : y, C = a(void 0), w = `stitch-tooltip-${i().replace(/:/g, "")}`, T = n((e) => {
|
|
8
|
+
x || b(e), h?.(e);
|
|
9
|
+
}, [x, h]), E = n(() => {
|
|
10
|
+
clearTimeout(C.current), T(!0);
|
|
11
|
+
}, [T]), D = n(() => {
|
|
12
|
+
C.current = setTimeout(() => T(!1), 100);
|
|
13
|
+
}, [T]);
|
|
14
|
+
r(() => () => clearTimeout(C.current), []);
|
|
15
|
+
let O = t.Children.only(g), k = O.props["aria-describedby"], A = { "aria-describedby": S ? [k, w].filter(Boolean).join(" ") : k }, j = {};
|
|
16
|
+
f === "hover" ? (j.onMouseEnter = E, j.onMouseLeave = D) : f === "focus" ? (j.onFocus = E, j.onBlur = D) : f === "click" && (j.onClick = () => T(!S));
|
|
17
|
+
let M = e[d.replace(/-/g, "_")];
|
|
18
|
+
return /* @__PURE__ */ l("div", {
|
|
19
|
+
className: s(e.tooltipWrapper, _),
|
|
20
|
+
style: v,
|
|
21
|
+
...j,
|
|
22
|
+
children: [t.cloneElement(O, A), /* @__PURE__ */ c("div", {
|
|
23
|
+
className: s(e.tooltip, M, S && e.visible),
|
|
24
|
+
role: "tooltip",
|
|
25
|
+
id: w,
|
|
26
|
+
"aria-hidden": !S,
|
|
27
|
+
onMouseEnter: f === "hover" ? E : void 0,
|
|
28
|
+
onMouseLeave: f === "hover" ? D : void 0,
|
|
29
|
+
children: /* @__PURE__ */ c("div", {
|
|
30
|
+
className: e.content,
|
|
31
|
+
children: u
|
|
32
|
+
})
|
|
33
|
+
})]
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
u.displayName = "Tooltip";
|
|
37
|
+
//#endregion
|
|
38
|
+
export { u as Tooltip };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//#region packages/react/src/components/Tooltip/tooltip.module.less
|
|
2
|
+
var e = "_tooltipWrapper_ivtw5_1", t = "_tooltip_ivtw5_1", n = "_visible_ivtw5_27", r = "_content_ivtw5_39", i = "_top_ivtw5_45", a = "_top_start_ivtw5_60", o = "_top_end_ivtw5_75", s = "_bottom_ivtw5_90", c = "_bottom_start_ivtw5_105", l = "_bottom_end_ivtw5_120", u = "_left_ivtw5_135", d = "_left_start_ivtw5_150", f = "_left_end_ivtw5_165", p = "_right_ivtw5_180", m = "_right_start_ivtw5_195", h = "_right_end_ivtw5_210", g = {
|
|
3
|
+
tooltipWrapper: e,
|
|
4
|
+
tooltip: t,
|
|
5
|
+
visible: n,
|
|
6
|
+
content: r,
|
|
7
|
+
top: i,
|
|
8
|
+
top_start: a,
|
|
9
|
+
top_end: o,
|
|
10
|
+
bottom: s,
|
|
11
|
+
bottom_start: c,
|
|
12
|
+
bottom_end: l,
|
|
13
|
+
left: u,
|
|
14
|
+
left_start: d,
|
|
15
|
+
left_end: f,
|
|
16
|
+
right: p,
|
|
17
|
+
right_start: m,
|
|
18
|
+
right_end: h
|
|
19
|
+
};
|
|
20
|
+
//#endregion
|
|
21
|
+
export { s as bottom, l as bottom_end, c as bottom_start, r as content, g as default, u as left, f as left_end, d as left_start, p as right, h as right_end, m as right_start, t as tooltip, e as tooltipWrapper, i as top, o as top_end, a as top_start, n as visible };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** 取容器内所有可聚焦元素(跳过 disabled / aria-hidden)。 */
|
|
2
|
+
export declare const getFocusable: (root: HTMLElement) => HTMLElement[];
|
|
3
|
+
export interface UseOverlayOptions {
|
|
4
|
+
/** 浮层是否打开 */
|
|
5
|
+
open: boolean;
|
|
6
|
+
/** 浮层根节点 ref(焦点陷阱与初始聚焦的范围) */
|
|
7
|
+
containerRef: React.RefObject<HTMLElement | null>;
|
|
8
|
+
/** 按下 Esc 时触发(通常 = 关闭) */
|
|
9
|
+
onEscape?: () => void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* 覆盖层通用行为:焦点转移 + 焦点陷阱 + Esc 关闭 + 滚动锁 + 焦点归还。
|
|
13
|
+
* Modal / Drawer 共享,避免在每个浮层组件里重复实现。
|
|
14
|
+
*/
|
|
15
|
+
export declare function useOverlay({ open, containerRef, onEscape, }: UseOverlayOptions): void;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { useEffect as e } from "react";
|
|
2
|
+
//#region packages/react/src/components/_internal/useOverlay.ts
|
|
3
|
+
var t = [
|
|
4
|
+
"a[href]",
|
|
5
|
+
"area[href]",
|
|
6
|
+
"button:not([disabled])",
|
|
7
|
+
"input:not([disabled]):not([type=\"hidden\"])",
|
|
8
|
+
"select:not([disabled])",
|
|
9
|
+
"textarea:not([disabled])",
|
|
10
|
+
"[tabindex]:not([tabindex=\"-1\"])",
|
|
11
|
+
"audio[controls]",
|
|
12
|
+
"video[controls]",
|
|
13
|
+
"[contenteditable]:not([contenteditable=\"false\"])"
|
|
14
|
+
].join(","), n = (e) => Array.from(e.querySelectorAll(t)).filter((e) => !e.hasAttribute("disabled") && e.getAttribute("aria-hidden") !== "true");
|
|
15
|
+
function r({ open: t, containerRef: r, onEscape: i }) {
|
|
16
|
+
e(() => {
|
|
17
|
+
if (!t) return;
|
|
18
|
+
let e = document.activeElement, i = window.setTimeout(() => {
|
|
19
|
+
let e = r.current;
|
|
20
|
+
e && (n(e)[0] ?? e).focus();
|
|
21
|
+
}, 0);
|
|
22
|
+
return () => {
|
|
23
|
+
window.clearTimeout(i), e?.focus?.();
|
|
24
|
+
};
|
|
25
|
+
}, [t, r]), e(() => {
|
|
26
|
+
if (!t) return;
|
|
27
|
+
let e = (e) => {
|
|
28
|
+
if (e.key === "Escape") {
|
|
29
|
+
i?.();
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
if (e.key !== "Tab") return;
|
|
33
|
+
let t = r.current;
|
|
34
|
+
if (!t) return;
|
|
35
|
+
let a = n(t);
|
|
36
|
+
if (a.length === 0) {
|
|
37
|
+
e.preventDefault(), t.focus();
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
let o = a[0], s = a[a.length - 1], c = document.activeElement;
|
|
41
|
+
e.shiftKey ? (c === o || !t.contains(c)) && (e.preventDefault(), s.focus()) : (c === s || !t.contains(c)) && (e.preventDefault(), o.focus());
|
|
42
|
+
};
|
|
43
|
+
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
44
|
+
}, [
|
|
45
|
+
t,
|
|
46
|
+
i,
|
|
47
|
+
r
|
|
48
|
+
]), e(() => {
|
|
49
|
+
if (t) return document.body.style.overflow = "hidden", () => {
|
|
50
|
+
document.body.style.overflow = "";
|
|
51
|
+
};
|
|
52
|
+
}, [t]);
|
|
53
|
+
}
|
|
54
|
+
//#endregion
|
|
55
|
+
export { n as getFocusable, r as useOverlay };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
export { Button } from './components/Button';
|
|
2
|
+
export type { ButtonProps, ButtonType, ButtonSize, ButtonHTMLType, } from './components/Button';
|
|
3
|
+
export { Icon, ICON_LIST } from './components/Icon';
|
|
4
|
+
export type { IconProps, IconName } from './components/Icon';
|
|
5
|
+
export { Toggle } from './components/Toggle';
|
|
6
|
+
export type { ToggleProps } from './components/Toggle';
|
|
7
|
+
export { ToggleGroup } from './components/ToggleGroup';
|
|
8
|
+
export type { ToggleGroupProps, ToggleGroupSingleProps, ToggleGroupMultipleProps, ToggleGroupItem, } from './components/ToggleGroup';
|
|
9
|
+
export { Image } from './components/Image';
|
|
10
|
+
export type { ImageProps, ImageColor } from './components/Image';
|
|
11
|
+
export { Card } from './components/Card';
|
|
12
|
+
export type { CardProps, CardVariant, CardColor } from './components/Card';
|
|
13
|
+
export { Divider } from './components/Divider';
|
|
14
|
+
export type { DividerProps, DividerType, DividerVariant, DividerOrientation, } from './components/Divider';
|
|
15
|
+
export { Collapse } from './components/Collapse';
|
|
16
|
+
export type { CollapseProps } from './components/Collapse';
|
|
17
|
+
export { Tabs } from './components/Tabs';
|
|
18
|
+
export type { TabsProps, TabItem } from './components/Tabs';
|
|
19
|
+
export { Accordion } from './components/Accordion';
|
|
20
|
+
export type { AccordionProps, AccordionItem } from './components/Accordion';
|
|
21
|
+
export { AspectRatio } from './components/AspectRatio';
|
|
22
|
+
export type { AspectRatioProps } from './components/AspectRatio';
|
|
23
|
+
export { Avatar } from './components/Avatar';
|
|
24
|
+
export type { AvatarProps, AvatarSize, AvatarShape } from './components/Avatar';
|
|
25
|
+
export { Input } from './components/Input';
|
|
26
|
+
export type { InputProps, InputSize } from './components/Input';
|
|
27
|
+
export { PasswordInput } from './components/PasswordInput';
|
|
28
|
+
export type { PasswordInputProps } from './components/PasswordInput';
|
|
29
|
+
export { OtpField } from './components/OtpField';
|
|
30
|
+
export type { OtpFieldProps } from './components/OtpField';
|
|
31
|
+
export { Checkbox } from './components/Checkbox';
|
|
32
|
+
export type { CheckboxProps, CheckboxOption, CheckboxSize, } from './components/Checkbox';
|
|
33
|
+
export { Radio } from './components/Radio';
|
|
34
|
+
export type { RadioProps, RadioOption, RadioSize } from './components/Radio';
|
|
35
|
+
export { Switch } from './components/Switch';
|
|
36
|
+
export type { SwitchProps, SwitchSize } from './components/Switch';
|
|
37
|
+
export { Slider } from './components/Slider';
|
|
38
|
+
export type { SliderProps, SliderOrientation } from './components/Slider';
|
|
39
|
+
export { Label } from './components/Label';
|
|
40
|
+
export type { LabelProps } from './components/Label';
|
|
41
|
+
export { Select } from './components/Select';
|
|
42
|
+
export type { SelectProps, SelectOption, SelectSize, } from './components/Select';
|
|
43
|
+
export { Form } from './components/Form';
|
|
44
|
+
export type { FormProps, FormItemProps, FormInstance, FormLayout, FormLabelAlign, FormSize, FormItemLayout, RequiredMark, ValidateStatus, RuleObject, RuleRender, RuleType, Rules, NamePath, ColProps, FieldData, ValidateError, ValidateInfo, ScrollOptions, StoreValue, FormProviderProps, } from './components/Form';
|
|
45
|
+
export { Tag } from './components/Tag';
|
|
46
|
+
export type { TagProps, TagSize, TagVariant, TagColor } from './components/Tag';
|
|
47
|
+
export { Table } from './components/Table';
|
|
48
|
+
export type { TableProps, TableColumn } from './components/Table';
|
|
49
|
+
export { CodeBlock } from './components/CodeBlock';
|
|
50
|
+
export type { CodeBlockProps } from './components/CodeBlock';
|
|
51
|
+
export { Loading } from './components/Loading';
|
|
52
|
+
export type { LoadingProps, LoadingSize } from './components/Loading';
|
|
53
|
+
export { Progress } from './components/Progress';
|
|
54
|
+
export type { ProgressProps, ProgressSize, ProgressInfoPosition, } from './components/Progress';
|
|
55
|
+
export { Skeleton } from './components/Skeleton';
|
|
56
|
+
export type { SkeletonProps, SkeletonVariant, SkeletonButtonProps, SkeletonInputProps, SkeletonAvatarProps, } from './components/Skeleton';
|
|
57
|
+
export { Notification } from './components/Notification';
|
|
58
|
+
export type { NotificationStatic, NotificationConfig, NotificationType, NotificationPosition, NotificationPlacement, } from './components/Notification';
|
|
59
|
+
export { Modal } from './components/Modal';
|
|
60
|
+
export type { ModalProps } from './components/Modal';
|
|
61
|
+
export { AlertDialog } from './components/AlertDialog';
|
|
62
|
+
export type { AlertDialogProps } from './components/AlertDialog';
|
|
63
|
+
export { Drawer } from './components/Drawer';
|
|
64
|
+
export type { DrawerProps, DrawerPlacement } from './components/Drawer';
|
|
65
|
+
export { Tooltip } from './components/Tooltip';
|
|
66
|
+
export type { TooltipProps, TooltipPlacement, TooltipTrigger, } from './components/Tooltip';
|
|
67
|
+
export { Popover } from './components/Popover';
|
|
68
|
+
export type { PopoverProps } from './components/Popover';
|
|
69
|
+
export { HoverCard } from './components/HoverCard';
|
|
70
|
+
export type { HoverCardProps } from './components/HoverCard';
|
|
71
|
+
export { DropdownMenu } from './components/DropdownMenu';
|
|
72
|
+
export type { DropdownMenuProps, DropdownMenuItem, } from './components/DropdownMenu';
|
|
73
|
+
export { ContextMenu } from './components/ContextMenu';
|
|
74
|
+
export type { ContextMenuProps, ContextMenuItem, } from './components/ContextMenu';
|
|
75
|
+
export { Menubar } from './components/Menubar';
|
|
76
|
+
export type { MenubarProps, MenubarMenu, MenubarMenuItem, } from './components/Menubar';
|
|
77
|
+
export { Toolbar } from './components/Toolbar';
|
|
78
|
+
export type { ToolbarProps, ToolbarButtonProps, ToolbarLinkProps, ToolbarSeparatorProps, ToolbarToggleGroupProps, ToolbarToggleGroupSingleProps, ToolbarToggleGroupMultipleProps, } from './components/Toolbar';
|
|
79
|
+
export { NavigationMenu } from './components/NavigationMenu';
|
|
80
|
+
export type { NavigationMenuProps, NavItem } from './components/NavigationMenu';
|
|
81
|
+
export { ScrollArea } from './components/ScrollArea';
|
|
82
|
+
export type { ScrollAreaProps, ScrollAreaOrientation, } from './components/ScrollArea';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { Button as e } from "./components/Button/Button.js";
|
|
3
|
+
import { ICON_LIST as t, Icon as n } from "./components/Icon/Icon.js";
|
|
4
|
+
import { Toggle as r } from "./components/Toggle/Toggle.js";
|
|
5
|
+
import { ToggleGroup as i } from "./components/ToggleGroup/ToggleGroup.js";
|
|
6
|
+
import { Image as a } from "./components/Image/Image.js";
|
|
7
|
+
import { Card as o } from "./components/Card/Card.js";
|
|
8
|
+
import { Divider as s } from "./components/Divider/Divider.js";
|
|
9
|
+
import { Collapse as c } from "./components/Collapse/Collapse.js";
|
|
10
|
+
import { Tabs as l } from "./components/Tabs/Tabs.js";
|
|
11
|
+
import { Accordion as u } from "./components/Accordion/Accordion.js";
|
|
12
|
+
import { AspectRatio as d } from "./components/AspectRatio/AspectRatio.js";
|
|
13
|
+
import { Avatar as f } from "./components/Avatar/Avatar.js";
|
|
14
|
+
import { Input as p } from "./components/Input/Input.js";
|
|
15
|
+
import { PasswordInput as m } from "./components/PasswordInput/PasswordInput.js";
|
|
16
|
+
import { OtpField as h } from "./components/OtpField/OtpField.js";
|
|
17
|
+
import { Checkbox as g } from "./components/Checkbox/Checkbox.js";
|
|
18
|
+
import { Radio as _ } from "./components/Radio/Radio.js";
|
|
19
|
+
import { Switch as v } from "./components/Switch/Switch.js";
|
|
20
|
+
import { Slider as y } from "./components/Slider/Slider.js";
|
|
21
|
+
import { Label as b } from "./components/Label/Label.js";
|
|
22
|
+
import { Select as x } from "./components/Select/Select.js";
|
|
23
|
+
import { Form as S } from "./components/Form/Form.js";
|
|
24
|
+
import { Tag as C } from "./components/Tag/Tag.js";
|
|
25
|
+
import { Table as w } from "./components/Table/Table.js";
|
|
26
|
+
import { CodeBlock as T } from "./components/CodeBlock/CodeBlock.js";
|
|
27
|
+
import { Loading as E } from "./components/Loading/Loading.js";
|
|
28
|
+
import { Progress as D } from "./components/Progress/Progress.js";
|
|
29
|
+
import { Skeleton as O } from "./components/Skeleton/Skeleton.js";
|
|
30
|
+
import { Notification as k } from "./components/Notification/NotificationPortal.js";
|
|
31
|
+
import { Modal as A } from "./components/Modal/Modal.js";
|
|
32
|
+
import { AlertDialog as j } from "./components/AlertDialog/AlertDialog.js";
|
|
33
|
+
import { Drawer as M } from "./components/Drawer/Drawer.js";
|
|
34
|
+
import { Tooltip as N } from "./components/Tooltip/Tooltip.js";
|
|
35
|
+
import { Popover as P } from "./components/Popover/Popover.js";
|
|
36
|
+
import { HoverCard as F } from "./components/HoverCard/HoverCard.js";
|
|
37
|
+
import { DropdownMenu as I } from "./components/DropdownMenu/DropdownMenu.js";
|
|
38
|
+
import { ContextMenu as L } from "./components/ContextMenu/ContextMenu.js";
|
|
39
|
+
import { Menubar as R } from "./components/Menubar/Menubar.js";
|
|
40
|
+
import { Toolbar as z } from "./components/Toolbar/Toolbar.js";
|
|
41
|
+
import { NavigationMenu as B } from "./components/NavigationMenu/NavigationMenu.js";
|
|
42
|
+
import { ScrollArea as V } from "./components/ScrollArea/ScrollArea.js";
|
|
43
|
+
export { u as Accordion, j as AlertDialog, d as AspectRatio, f as Avatar, e as Button, o as Card, g as Checkbox, T as CodeBlock, c as Collapse, L as ContextMenu, s as Divider, M as Drawer, I as DropdownMenu, S as Form, F as HoverCard, t as ICON_LIST, n as Icon, a as Image, p as Input, b as Label, E as Loading, R as Menubar, A as Modal, B as NavigationMenu, k as Notification, h as OtpField, m as PasswordInput, P as Popover, D as Progress, _ as Radio, V as ScrollArea, x as Select, O as Skeleton, y as Slider, v as Switch, w as Table, l as Tabs, C as Tag, r as Toggle, i as ToggleGroup, z as Toolbar, N as Tooltip };
|