@oneplatformdev/ui 0.1.10-1 → 0.1.10-11
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/Badge/Badge.d.ts +3 -4
- package/Badge/Badge.d.ts.map +1 -1
- package/Badge/Badge.js +20 -7
- package/Badge/Badge.types.d.ts +2 -1
- package/Badge/Badge.types.d.ts.map +1 -1
- package/Badge/badgeVariants.d.ts.map +1 -1
- package/Badge/badgeVariants.js +5 -5
- package/Button/Button.js +4 -5
- package/Button/buttonVariants.d.ts.map +1 -1
- package/Button/buttonVariants.js +4 -3
- package/ButtonIcon/ButtonIcon.js +3 -4
- package/CHANGELOG.md +80 -0
- package/Combobox/ComboboxOptionItem.d.ts +1 -1
- package/Combobox/ComboboxOptionItem.d.ts.map +1 -1
- package/Combobox/ComboboxOptionItem.js +17 -79
- package/DatePicker/DatePicker.js +1 -1
- package/FormRadio/FormRadio.types.d.ts +1 -1
- package/Popover/Popover.d.ts +6 -6
- package/Popover/Popover.d.ts.map +1 -1
- package/Popover/Popover.js +37 -29
- package/Sheet/Sheet.d.ts +1 -1
- package/Sidebar/Sidebar.js +11 -12
- package/Switch/Switch.d.ts +2 -2
- package/Switch/Switch.d.ts.map +1 -1
- package/Switch/Switch.js +29 -25
- package/Textarea/useAutosizeTextArea.d.ts +1 -1
- package/Tooltip/TooltipRoot.d.ts +4 -4
- package/Tooltip/TooltipRoot.d.ts.map +1 -1
- package/Tooltip/TooltipRoot.js +52 -20
- package/{packages/hooks/src → hooks/dist}/useIsMobile/useIsMobile.js +5 -5
- package/index.d.ts.map +1 -1
- package/index.js +371 -372
- package/package.json +15 -24
- package/styles.css +0 -1
package/Switch/Switch.js
CHANGED
|
@@ -1,27 +1,31 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
)
|
|
24
|
-
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import * as t from "@radix-ui/react-switch";
|
|
3
|
+
import { cn as a } from "@oneplatformdev/utils";
|
|
4
|
+
function s({
|
|
5
|
+
className: r,
|
|
6
|
+
...n
|
|
7
|
+
}) {
|
|
8
|
+
return /* @__PURE__ */ e(
|
|
9
|
+
t.Root,
|
|
10
|
+
{
|
|
11
|
+
"data-slot": "switch",
|
|
12
|
+
className: a(
|
|
13
|
+
"peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
14
|
+
r
|
|
15
|
+
),
|
|
16
|
+
...n,
|
|
17
|
+
children: /* @__PURE__ */ e(
|
|
18
|
+
t.Thumb,
|
|
19
|
+
{
|
|
20
|
+
"data-slot": "switch-thumb",
|
|
21
|
+
className: a(
|
|
22
|
+
"bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"
|
|
23
|
+
)
|
|
24
|
+
}
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
}
|
|
25
29
|
export {
|
|
26
|
-
|
|
30
|
+
s as Switch
|
|
27
31
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { IUseAutosizeTextAreaProps } from '
|
|
1
|
+
import { IUseAutosizeTextAreaProps } from '@oneplatformdev/ui';
|
|
2
2
|
export declare const useAutosizeTextArea: ({ textAreaRef, triggerAutoSize, maxHeight, minHeight, }: IUseAutosizeTextAreaProps) => void;
|
|
3
3
|
//# sourceMappingURL=useAutosizeTextArea.d.ts.map
|
package/Tooltip/TooltipRoot.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
3
|
-
declare
|
|
4
|
-
declare
|
|
5
|
-
declare
|
|
6
|
-
declare
|
|
3
|
+
declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function TooltipRoot({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function TooltipContent({ className, sideOffset, children, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export { TooltipRoot, TooltipTrigger, TooltipContent, TooltipProvider };
|
|
8
8
|
//# sourceMappingURL=TooltipRoot.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TooltipRoot.d.ts","sourceRoot":"","sources":["../../src/Tooltip/TooltipRoot.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAA;AAI3D,
|
|
1
|
+
{"version":3,"file":"TooltipRoot.d.ts","sourceRoot":"","sources":["../../src/Tooltip/TooltipRoot.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAA;AAI3D,iBAAS,eAAe,CAAC,EACE,aAAiB,EACjB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,QAAQ,CAAC,2CAQjF;AAED,iBAAS,WAAW,CAAC,EACF,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,2CAMrE;AAED,iBAAS,cAAc,CAAC,EACE,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,2CAE/E;AAED,iBAAS,cAAc,CAAC,EACE,SAAS,EACT,UAAc,EACd,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,2CAiB/E;AAED,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,CAAA"}
|
package/Tooltip/TooltipRoot.js
CHANGED
|
@@ -1,23 +1,55 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as d from "react";
|
|
1
|
+
import { jsx as i, jsxs as n } from "react/jsx-runtime";
|
|
3
2
|
import * as o from "@radix-ui/react-tooltip";
|
|
4
|
-
import { cn as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
)
|
|
17
|
-
|
|
3
|
+
import { cn as d } from "@oneplatformdev/utils";
|
|
4
|
+
function l({
|
|
5
|
+
delayDuration: t = 0,
|
|
6
|
+
...r
|
|
7
|
+
}) {
|
|
8
|
+
return /* @__PURE__ */ i(
|
|
9
|
+
o.Provider,
|
|
10
|
+
{
|
|
11
|
+
"data-slot": "tooltip-provider",
|
|
12
|
+
delayDuration: t,
|
|
13
|
+
...r
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
function p({
|
|
18
|
+
...t
|
|
19
|
+
}) {
|
|
20
|
+
return /* @__PURE__ */ i(l, { children: /* @__PURE__ */ i(o.Root, { "data-slot": "tooltip", ...t }) });
|
|
21
|
+
}
|
|
22
|
+
function f({
|
|
23
|
+
...t
|
|
24
|
+
}) {
|
|
25
|
+
return /* @__PURE__ */ i(o.Trigger, { "data-slot": "tooltip-trigger", ...t });
|
|
26
|
+
}
|
|
27
|
+
function c({
|
|
28
|
+
className: t,
|
|
29
|
+
sideOffset: r = 0,
|
|
30
|
+
children: e,
|
|
31
|
+
...a
|
|
32
|
+
}) {
|
|
33
|
+
return /* @__PURE__ */ i(o.Portal, { children: /* @__PURE__ */ n(
|
|
34
|
+
o.Content,
|
|
35
|
+
{
|
|
36
|
+
"data-slot": "tooltip-content",
|
|
37
|
+
sideOffset: r,
|
|
38
|
+
className: d(
|
|
39
|
+
"bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
|
|
40
|
+
t
|
|
41
|
+
),
|
|
42
|
+
...a,
|
|
43
|
+
children: [
|
|
44
|
+
e,
|
|
45
|
+
/* @__PURE__ */ i(o.Arrow, { className: "bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
) });
|
|
49
|
+
}
|
|
18
50
|
export {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
51
|
+
c as TooltipContent,
|
|
52
|
+
l as TooltipProvider,
|
|
53
|
+
p as TooltipRoot,
|
|
54
|
+
f as TooltipTrigger
|
|
23
55
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as o from "react";
|
|
2
|
-
const
|
|
3
|
-
function c(
|
|
2
|
+
const s = 768;
|
|
3
|
+
function c(r = {}) {
|
|
4
4
|
const {
|
|
5
|
-
mobileBreakpoint: e =
|
|
6
|
-
} =
|
|
5
|
+
mobileBreakpoint: e = s
|
|
6
|
+
} = r, [a, n] = o.useState(void 0);
|
|
7
7
|
return o.useEffect(() => {
|
|
8
8
|
const t = window.matchMedia(`(max-width: ${e - 1}px)`), i = () => {
|
|
9
9
|
n(window.innerWidth < e);
|
|
10
10
|
};
|
|
11
11
|
return t.addEventListener("change", i), n(window.innerWidth < e), () => t.removeEventListener("change", i);
|
|
12
|
-
}, [e]), !!
|
|
12
|
+
}, [e]), !!a;
|
|
13
13
|
}
|
|
14
14
|
export {
|
|
15
15
|
c as useIsMobile
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,c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