@yahoo/uds 3.133.3 → 3.134.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/automated-config/dist/generated/autoVariants.cjs +14 -0
- package/dist/automated-config/dist/generated/autoVariants.d.cts +14 -0
- package/dist/automated-config/dist/generated/autoVariants.d.ts +14 -0
- package/dist/automated-config/dist/generated/autoVariants.js +14 -0
- package/dist/automated-config/dist/generated/generatedConfigs.cjs +2796 -1
- package/dist/automated-config/dist/generated/generatedConfigs.d.cts +288 -2
- package/dist/automated-config/dist/generated/generatedConfigs.d.ts +288 -2
- package/dist/automated-config/dist/generated/generatedConfigs.js +2796 -2
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.cjs +119 -0
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.d.cts +2 -1
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.d.ts +2 -1
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.js +119 -0
- package/dist/automated-config/dist/properties.cjs +15 -1
- package/dist/automated-config/dist/properties.d.cts +4 -0
- package/dist/automated-config/dist/properties.d.ts +4 -0
- package/dist/automated-config/dist/properties.js +15 -1
- package/dist/automated-config/dist/utils/getConfigVariantProperties.d.cts +2 -2
- package/dist/automated-config/dist/utils/getConfigVariantProperties.d.ts +2 -2
- package/dist/cli/commands/sync.cjs +4 -0
- package/dist/cli/commands/sync.js +4 -0
- package/dist/cli/dist/lib/args.cjs +7 -3
- package/dist/cli/dist/lib/args.js +7 -3
- package/dist/components/client/Menu/Menu.ItemCheckbox.d.cts +1 -1
- package/dist/components/client/Menu/Menu.ItemCheckbox.d.ts +1 -1
- package/dist/components/client/Modal/Modal.cjs +193 -0
- package/dist/components/client/Modal/Modal.d.cts +51 -0
- package/dist/components/client/Modal/Modal.d.ts +52 -0
- package/dist/components/client/Modal/Modal.js +191 -0
- package/dist/components/client/Modal/ModalActions.cjs +54 -0
- package/dist/components/client/Modal/ModalActions.d.cts +27 -0
- package/dist/components/client/Modal/ModalActions.d.ts +28 -0
- package/dist/components/client/Modal/ModalActions.js +52 -0
- package/dist/components/client/Modal/ModalContent.cjs +37 -0
- package/dist/components/client/Modal/ModalContent.d.cts +24 -0
- package/dist/components/client/Modal/ModalContent.d.ts +25 -0
- package/dist/components/client/Modal/ModalContent.js +35 -0
- package/dist/components/client/Modal/ModalContext.cjs +15 -0
- package/dist/components/client/Modal/ModalContext.d.cts +13 -0
- package/dist/components/client/Modal/ModalContext.d.ts +14 -0
- package/dist/components/client/Modal/ModalContext.js +12 -0
- package/dist/components/client/Modal/ModalDescription.cjs +29 -0
- package/dist/components/client/Modal/ModalDescription.d.cts +23 -0
- package/dist/components/client/Modal/ModalDescription.d.ts +24 -0
- package/dist/components/client/Modal/ModalDescription.js +27 -0
- package/dist/components/client/Modal/ModalTitle.cjs +29 -0
- package/dist/components/client/Modal/ModalTitle.d.cts +23 -0
- package/dist/components/client/Modal/ModalTitle.d.ts +24 -0
- package/dist/components/client/Modal/ModalTitle.js +27 -0
- package/dist/components/client/Modal/UDSModalConfigProvider.cjs +42 -0
- package/dist/components/client/Modal/UDSModalConfigProvider.d.cts +35 -0
- package/dist/components/client/Modal/UDSModalConfigProvider.d.ts +36 -0
- package/dist/components/client/Modal/UDSModalConfigProvider.js +39 -0
- package/dist/components/client/Modal/index.cjs +16 -0
- package/dist/components/client/Modal/index.d.cts +8 -0
- package/dist/components/client/Modal/index.d.ts +9 -0
- package/dist/components/client/Modal/index.js +9 -0
- package/dist/components/client/Modal/useScrollFade.cjs +38 -0
- package/dist/components/client/Modal/useScrollFade.d.cts +13 -0
- package/dist/components/client/Modal/useScrollFade.d.ts +14 -0
- package/dist/components/client/Modal/useScrollFade.js +36 -0
- package/dist/components/client/Modal/utils.cjs +32 -0
- package/dist/components/client/Modal/utils.d.cts +13 -0
- package/dist/components/client/Modal/utils.d.ts +14 -0
- package/dist/components/client/Modal/utils.js +30 -0
- package/dist/components/client/Popover/index.d.cts +1 -1
- package/dist/components/client/Popover/index.d.ts +1 -1
- package/dist/components/client/Toast/UDSToastConfigProvider.d.cts +1 -1
- package/dist/components/client/Toast/UDSToastConfigProvider.d.ts +1 -1
- package/dist/components/client/index.cjs +13 -0
- package/dist/components/client/index.d.cts +8 -2
- package/dist/components/client/index.d.ts +8 -2
- package/dist/components/client/index.js +7 -1
- package/dist/components/client/providers/UDSConfigProvider.cjs +6 -2
- package/dist/components/client/providers/UDSConfigProvider.d.cts +2 -1
- package/dist/components/client/providers/UDSConfigProvider.d.ts +2 -1
- package/dist/components/client/providers/UDSConfigProvider.js +6 -2
- package/dist/components/experimental/client/index.cjs +0 -5
- package/dist/components/experimental/client/index.d.cts +1 -2
- package/dist/components/experimental/client/index.d.ts +1 -2
- package/dist/components/experimental/client/index.js +1 -2
- package/dist/components/experimental/index.cjs +1 -10
- package/dist/components/experimental/index.d.cts +1 -2
- package/dist/components/experimental/index.d.ts +1 -2
- package/dist/components/experimental/index.js +2 -7
- package/dist/components/index.cjs +20 -0
- package/dist/components/index.d.cts +8 -2
- package/dist/components/index.d.ts +8 -2
- package/dist/components/index.js +14 -1
- package/dist/config/dist/index.cjs +129 -4
- package/dist/config/dist/index.js +129 -4
- package/dist/index.cjs +16 -0
- package/dist/index.d.cts +11 -4
- package/dist/index.d.ts +11 -4
- package/dist/index.js +9 -2
- package/dist/runtime/index.cjs +2 -0
- package/dist/runtime/index.d.cts +2 -1
- package/dist/runtime/index.d.ts +2 -1
- package/dist/runtime/index.js +2 -1
- package/dist/runtime/modalConfig.cjs +22 -0
- package/dist/runtime/modalConfig.d.cts +22 -0
- package/dist/runtime/modalConfig.d.ts +22 -0
- package/dist/runtime/modalConfig.js +21 -0
- package/dist/runtime/udsConfig.cjs +4 -2
- package/dist/runtime/udsConfig.d.cts +2 -0
- package/dist/runtime/udsConfig.d.ts +2 -0
- package/dist/runtime/udsConfig.js +4 -2
- package/dist/styles/styler.d.cts +35 -21
- package/dist/styles/styler.d.ts +35 -21
- package/dist/styles/variants.d.cts +42 -0
- package/dist/styles/variants.d.ts +42 -0
- package/dist/tailwind/dist/automated-config/dist/generated/autoVariants.cjs +14 -0
- package/dist/tailwind/dist/automated-config/dist/generated/autoVariants.js +14 -0
- package/dist/tailwind/dist/automated-config/dist/generated/autoVariants.js.map +1 -1
- package/dist/tailwind/dist/automated-config/dist/generated/generatedConfigs.cjs +2796 -1
- package/dist/tailwind/dist/automated-config/dist/generated/generatedConfigs.js +2796 -2
- package/dist/tailwind/dist/automated-config/dist/generated/generatedConfigs.js.map +1 -1
- package/dist/tailwind/dist/automated-config/dist/properties.cjs +15 -1
- package/dist/tailwind/dist/automated-config/dist/properties.js +15 -1
- package/dist/tailwind/dist/automated-config/dist/properties.js.map +1 -1
- package/dist/tailwind/dist/commands/css.cjs +1 -0
- package/dist/tailwind/dist/commands/css.d.cts.map +1 -1
- package/dist/tailwind/dist/commands/css.d.ts.map +1 -1
- package/dist/tailwind/dist/commands/css.helpers.cjs +8 -1
- package/dist/tailwind/dist/commands/css.helpers.js +8 -1
- package/dist/tailwind/dist/commands/css.helpers.js.map +1 -1
- package/dist/tailwind/dist/commands/css.js +1 -0
- package/dist/tailwind/dist/commands/css.js.map +1 -1
- package/dist/tailwind/dist/config/dist/index.cjs +129 -4
- package/dist/tailwind/dist/config/dist/index.js +129 -4
- package/dist/tailwind/dist/config/dist/index.js.map +1 -1
- package/dist/tailwind/dist/css/generate.cjs +7 -4
- package/dist/tailwind/dist/css/generate.d.cts.map +1 -1
- package/dist/tailwind/dist/css/generate.d.ts.map +1 -1
- package/dist/tailwind/dist/css/generate.js +7 -4
- package/dist/tailwind/dist/css/generate.js.map +1 -1
- package/dist/tailwind/dist/css/nodeUtils.cjs +19 -8
- package/dist/tailwind/dist/css/nodeUtils.js +19 -8
- package/dist/tailwind/dist/css/nodeUtils.js.map +1 -1
- package/dist/tailwind/dist/css/perf.cjs +92 -0
- package/dist/tailwind/dist/css/perf.js +89 -0
- package/dist/tailwind/dist/css/perf.js.map +1 -0
- package/dist/tailwind/dist/css/purgeWorker.cjs +47 -0
- package/dist/tailwind/dist/css/purgeWorker.d.cts +2 -0
- package/dist/tailwind/dist/css/purgeWorker.d.ts +2 -0
- package/dist/tailwind/dist/css/purgeWorker.js +48 -0
- package/dist/tailwind/dist/css/purgeWorker.js.map +1 -0
- package/dist/tailwind/dist/css/runner.cjs +158 -145
- package/dist/tailwind/dist/css/runner.js +158 -145
- package/dist/tailwind/dist/css/runner.js.map +1 -1
- package/dist/tailwind/dist/css/utils.cjs +8 -0
- package/dist/tailwind/dist/css/utils.js +8 -0
- package/dist/tailwind/dist/css/utils.js.map +1 -1
- package/dist/tailwind/dist/css/workerPool.cjs +89 -0
- package/dist/tailwind/dist/css/workerPool.js +90 -0
- package/dist/tailwind/dist/css/workerPool.js.map +1 -0
- package/dist/tailwind/dist/purger/optimized/ast/expressions.cjs +95 -15
- package/dist/tailwind/dist/purger/optimized/ast/expressions.js +95 -15
- package/dist/tailwind/dist/purger/optimized/ast/expressions.js.map +1 -1
- package/dist/tailwind/dist/purger/optimized/purgeFromCode.cjs +38 -14
- package/dist/tailwind/dist/purger/optimized/purgeFromCode.d.cts.map +1 -1
- package/dist/tailwind/dist/purger/optimized/purgeFromCode.d.ts.map +1 -1
- package/dist/tailwind/dist/purger/optimized/purgeFromCode.js +39 -15
- package/dist/tailwind/dist/purger/optimized/purgeFromCode.js.map +1 -1
- package/dist/tailwind/dist/purger/optimized/types.d.cts +10 -0
- package/dist/tailwind/dist/purger/optimized/types.d.cts.map +1 -1
- package/dist/tailwind/dist/purger/optimized/types.d.ts +10 -0
- package/dist/tailwind/dist/purger/optimized/types.d.ts.map +1 -1
- package/dist/tailwind/dist/runtimeConfig/hookMetadata.cjs +34 -0
- package/dist/tailwind/dist/runtimeConfig/hookMetadata.js +34 -0
- package/dist/tailwind/dist/runtimeConfig/hookMetadata.js.map +1 -1
- package/dist/tailwind/dist/tailwind/plugins/blurBgFallback.cjs +3 -0
- package/dist/tailwind/dist/tailwind/plugins/blurBgFallback.js +3 -0
- package/dist/tailwind/dist/tailwind/plugins/blurBgFallback.js.map +1 -1
- package/dist/tailwind/dist/tailwind/plugins/components.cjs +1 -0
- package/dist/tailwind/dist/tailwind/plugins/components.js +2 -1
- package/dist/tailwind/dist/tailwind/plugins/components.js.map +1 -1
- package/dist/tailwind/dist/types/dist/index.d.cts.map +1 -1
- package/dist/tailwind/dist/types/dist/index.d.ts.map +1 -1
- package/dist/tokens/automation/configs/index.cjs +1 -0
- package/dist/tokens/automation/configs/index.d.cts +2 -2
- package/dist/tokens/automation/configs/index.d.ts +2 -2
- package/dist/tokens/automation/configs/index.js +2 -2
- package/dist/tokens/automation/index.cjs +1 -0
- package/dist/tokens/automation/index.d.cts +2 -2
- package/dist/tokens/automation/index.d.ts +2 -2
- package/dist/tokens/automation/index.js +2 -2
- package/dist/tokens/index.cjs +1 -0
- package/dist/tokens/index.d.cts +3 -3
- package/dist/tokens/index.d.ts +3 -3
- package/dist/tokens/index.js +2 -2
- package/dist/tokens/types.d.cts +2 -2
- package/dist/tokens/types.d.ts +2 -2
- package/dist/types/dist/index.d.cts +68 -2
- package/dist/types/dist/index.d.ts +68 -2
- package/dist/uds/generated/componentData.cjs +1024 -833
- package/dist/uds/generated/componentData.js +995 -840
- package/dist/uds/generated/tailwindPurge.cjs +137 -96
- package/dist/uds/generated/tailwindPurge.js +137 -96
- package/dist/utils/exposeAriakitScrollbarWidth.cjs +17 -0
- package/dist/utils/exposeAriakitScrollbarWidth.d.cts +13 -0
- package/dist/utils/exposeAriakitScrollbarWidth.d.ts +13 -0
- package/dist/utils/exposeAriakitScrollbarWidth.js +16 -0
- package/generated/componentData.json +1761 -1550
- package/generated/tailwindPurge.ts +4 -4
- package/package.json +1 -1
- package/dist/components/experimental/client/Modal.cjs +0 -60
- package/dist/components/experimental/client/Modal.d.cts +0 -27
- package/dist/components/experimental/client/Modal.d.ts +0 -28
- package/dist/components/experimental/client/Modal.js +0 -55
- package/dist/tailwind/dist/purger/optimized/ast/jsx.cjs +0 -16
- package/dist/tailwind/dist/purger/optimized/ast/jsx.js +0 -17
- package/dist/tailwind/dist/purger/optimized/ast/jsx.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
-
"use client";
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
require("../../../_virtual/_rolldown/runtime.cjs");
|
|
5
|
-
const require_styles_styler = require("../../../styles/styler.cjs");
|
|
6
|
-
const require_components_Text = require("../../Text.cjs");
|
|
7
|
-
const require_components_HStack = require("../../HStack.cjs");
|
|
8
|
-
const require_components_VStack = require("../../VStack.cjs");
|
|
9
|
-
const require_components_client_IconButton = require("../../client/IconButton.cjs");
|
|
10
|
-
let _yahoo_uds_icons = require("@yahoo/uds-icons");
|
|
11
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
12
|
-
let _ariakit_react = require("@ariakit/react");
|
|
13
|
-
//#region src/components/experimental/client/Modal.tsx
|
|
14
|
-
function useModalStore(params) {
|
|
15
|
-
return (0, _ariakit_react.useDialogStore)({
|
|
16
|
-
animated: true,
|
|
17
|
-
...params
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
function ModalHeader({ children, handleClose }) {
|
|
21
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_components_HStack.HStack, {
|
|
22
|
-
alignItems: "center",
|
|
23
|
-
justifyContent: "space-between",
|
|
24
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Text.Text, {
|
|
25
|
-
variant: "headline1",
|
|
26
|
-
color: "primary",
|
|
27
|
-
children
|
|
28
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_client_IconButton.IconButton, {
|
|
29
|
-
"aria-label": "Close",
|
|
30
|
-
size: "sm",
|
|
31
|
-
variant: "tertiary",
|
|
32
|
-
name: _yahoo_uds_icons.Cross,
|
|
33
|
-
onClick: handleClose
|
|
34
|
-
})]
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
ModalHeader.displayName = "ModalHeader";
|
|
38
|
-
function Modal({ className, ...props }) {
|
|
39
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_VStack.VStack, {
|
|
40
|
-
borderRadius: "md",
|
|
41
|
-
position: "fixed",
|
|
42
|
-
backgroundColor: "primary",
|
|
43
|
-
dropShadow: "md",
|
|
44
|
-
className: require_styles_styler.cx("inset-8 top-[250px] z-50 mx-auto h-fit w-[600px] origin-center scale-95 opacity-0 transition duration-150 data-[enter]:scale-100 data-[enter]:opacity-100", className),
|
|
45
|
-
spacing: "8",
|
|
46
|
-
asChild: true,
|
|
47
|
-
overflow: "hidden",
|
|
48
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ariakit_react.Dialog, {
|
|
49
|
-
backdrop: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: "data-[enter]:bg-primary opacity-0 backdrop-blur-0 transition duration-150 data-[enter]:opacity-60 data-[enter]:backdrop-blur-sm" }),
|
|
50
|
-
...props
|
|
51
|
-
})
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
Modal.displayName = "Modal";
|
|
55
|
-
const ModalDismiss = _ariakit_react.DialogDismiss;
|
|
56
|
-
//#endregion
|
|
57
|
-
exports.Modal = Modal;
|
|
58
|
-
exports.ModalDismiss = ModalDismiss;
|
|
59
|
-
exports.ModalHeader = ModalHeader;
|
|
60
|
-
exports.useModalStore = useModalStore;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
-
import { DialogDismiss, DialogProps, DialogStore as ModalStore, useDialogStore } from "@ariakit/react";
|
|
4
|
-
|
|
5
|
-
//#region src/components/experimental/client/Modal.d.ts
|
|
6
|
-
type ModalProps = DialogProps;
|
|
7
|
-
declare function useModalStore(params?: Parameters<typeof useDialogStore>[0]): ModalStore;
|
|
8
|
-
interface ModalHeaderProps extends React.PropsWithChildren {
|
|
9
|
-
handleClose?: () => void;
|
|
10
|
-
}
|
|
11
|
-
declare function ModalHeader({
|
|
12
|
-
children,
|
|
13
|
-
handleClose
|
|
14
|
-
}: ModalHeaderProps): _$react_jsx_runtime0.JSX.Element;
|
|
15
|
-
declare namespace ModalHeader {
|
|
16
|
-
var displayName: string;
|
|
17
|
-
}
|
|
18
|
-
declare function Modal({
|
|
19
|
-
className,
|
|
20
|
-
...props
|
|
21
|
-
}: ModalProps): _$react_jsx_runtime0.JSX.Element;
|
|
22
|
-
declare namespace Modal {
|
|
23
|
-
var displayName: string;
|
|
24
|
-
}
|
|
25
|
-
declare const ModalDismiss: typeof DialogDismiss;
|
|
26
|
-
//#endregion
|
|
27
|
-
export { Modal, ModalDismiss, ModalHeader, type ModalProps, type ModalStore, useModalStore };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
"use client";
|
|
3
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
-
import { DialogDismiss, DialogProps, DialogStore as ModalStore, useDialogStore } from "@ariakit/react";
|
|
5
|
-
|
|
6
|
-
//#region src/components/experimental/client/Modal.d.ts
|
|
7
|
-
type ModalProps = DialogProps;
|
|
8
|
-
declare function useModalStore(params?: Parameters<typeof useDialogStore>[0]): ModalStore;
|
|
9
|
-
interface ModalHeaderProps extends React.PropsWithChildren {
|
|
10
|
-
handleClose?: () => void;
|
|
11
|
-
}
|
|
12
|
-
declare function ModalHeader({
|
|
13
|
-
children,
|
|
14
|
-
handleClose
|
|
15
|
-
}: ModalHeaderProps): _$react_jsx_runtime0.JSX.Element;
|
|
16
|
-
declare namespace ModalHeader {
|
|
17
|
-
var displayName: string;
|
|
18
|
-
}
|
|
19
|
-
declare function Modal({
|
|
20
|
-
className,
|
|
21
|
-
...props
|
|
22
|
-
}: ModalProps): _$react_jsx_runtime0.JSX.Element;
|
|
23
|
-
declare namespace Modal {
|
|
24
|
-
var displayName: string;
|
|
25
|
-
}
|
|
26
|
-
declare const ModalDismiss: typeof DialogDismiss;
|
|
27
|
-
//#endregion
|
|
28
|
-
export { Modal, ModalDismiss, ModalHeader, type ModalProps, type ModalStore, useModalStore };
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
-
"use client";
|
|
3
|
-
import { cx } from "../../../styles/styler.js";
|
|
4
|
-
import { Text } from "../../Text.js";
|
|
5
|
-
import { HStack } from "../../HStack.js";
|
|
6
|
-
import { VStack } from "../../VStack.js";
|
|
7
|
-
import { IconButton } from "../../client/IconButton.js";
|
|
8
|
-
import { Cross } from "@yahoo/uds-icons";
|
|
9
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
-
import { Dialog, DialogDismiss, useDialogStore } from "@ariakit/react";
|
|
11
|
-
//#region src/components/experimental/client/Modal.tsx
|
|
12
|
-
function useModalStore(params) {
|
|
13
|
-
return useDialogStore({
|
|
14
|
-
animated: true,
|
|
15
|
-
...params
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
function ModalHeader({ children, handleClose }) {
|
|
19
|
-
return /* @__PURE__ */ jsxs(HStack, {
|
|
20
|
-
alignItems: "center",
|
|
21
|
-
justifyContent: "space-between",
|
|
22
|
-
children: [/* @__PURE__ */ jsx(Text, {
|
|
23
|
-
variant: "headline1",
|
|
24
|
-
color: "primary",
|
|
25
|
-
children
|
|
26
|
-
}), /* @__PURE__ */ jsx(IconButton, {
|
|
27
|
-
"aria-label": "Close",
|
|
28
|
-
size: "sm",
|
|
29
|
-
variant: "tertiary",
|
|
30
|
-
name: Cross,
|
|
31
|
-
onClick: handleClose
|
|
32
|
-
})]
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
ModalHeader.displayName = "ModalHeader";
|
|
36
|
-
function Modal({ className, ...props }) {
|
|
37
|
-
return /* @__PURE__ */ jsx(VStack, {
|
|
38
|
-
borderRadius: "md",
|
|
39
|
-
position: "fixed",
|
|
40
|
-
backgroundColor: "primary",
|
|
41
|
-
dropShadow: "md",
|
|
42
|
-
className: cx("inset-8 top-[250px] z-50 mx-auto h-fit w-[600px] origin-center scale-95 opacity-0 transition duration-150 data-[enter]:scale-100 data-[enter]:opacity-100", className),
|
|
43
|
-
spacing: "8",
|
|
44
|
-
asChild: true,
|
|
45
|
-
overflow: "hidden",
|
|
46
|
-
children: /* @__PURE__ */ jsx(Dialog, {
|
|
47
|
-
backdrop: /* @__PURE__ */ jsx("div", { className: "data-[enter]:bg-primary opacity-0 backdrop-blur-0 transition duration-150 data-[enter]:opacity-60 data-[enter]:backdrop-blur-sm" }),
|
|
48
|
-
...props
|
|
49
|
-
})
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
Modal.displayName = "Modal";
|
|
53
|
-
const ModalDismiss = DialogDismiss;
|
|
54
|
-
//#endregion
|
|
55
|
-
export { Modal, ModalDismiss, ModalHeader, useModalStore };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
|
|
2
|
-
require("../../../_virtual/_rolldown/runtime.cjs");
|
|
3
|
-
let ts_morph = require("ts-morph");
|
|
4
|
-
//#region src/purger/optimized/ast/jsx.ts
|
|
5
|
-
/**
|
|
6
|
-
* Find all JSX usages of a component from its identifier
|
|
7
|
-
*/
|
|
8
|
-
const findJsxReferences = (identifier) => {
|
|
9
|
-
try {
|
|
10
|
-
return identifier.findReferencesAsNodes().map((reference) => reference.getFirstAncestor((n) => ts_morph.Node.isJsxOpeningElement(n) || ts_morph.Node.isJsxSelfClosingElement(n))).filter((node) => Boolean(node) && (ts_morph.Node.isJsxOpeningElement(node) || ts_morph.Node.isJsxSelfClosingElement(node)));
|
|
11
|
-
} catch {
|
|
12
|
-
return [];
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
//#endregion
|
|
16
|
-
exports.findJsxReferences = findJsxReferences;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
|
|
2
|
-
import { Node } from "ts-morph";
|
|
3
|
-
//#region src/purger/optimized/ast/jsx.ts
|
|
4
|
-
/**
|
|
5
|
-
* Find all JSX usages of a component from its identifier
|
|
6
|
-
*/
|
|
7
|
-
const findJsxReferences = (identifier) => {
|
|
8
|
-
try {
|
|
9
|
-
return identifier.findReferencesAsNodes().map((reference) => reference.getFirstAncestor((n) => Node.isJsxOpeningElement(n) || Node.isJsxSelfClosingElement(n))).filter((node) => Boolean(node) && (Node.isJsxOpeningElement(node) || Node.isJsxSelfClosingElement(node)));
|
|
10
|
-
} catch {
|
|
11
|
-
return [];
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
//#endregion
|
|
15
|
-
export { findJsxReferences };
|
|
16
|
-
|
|
17
|
-
//# sourceMappingURL=jsx.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"jsx.js","names":[],"sources":["../../../../src/purger/optimized/ast/jsx.ts"],"sourcesContent":["import type {\n ArrowFunction,\n CallExpression,\n FunctionDeclaration,\n FunctionExpression,\n Identifier,\n JsxElement,\n JsxSelfClosingElement,\n VariableDeclaration,\n} from 'ts-morph';\nimport { Node, SyntaxKind } from 'ts-morph';\n\nimport type { JsxElementWithAttributes, ParentComponentInfo } from '../types';\n\n/**\n * Check if an expression is using React.forwardRef\n */\nexport const isForwardRefExpression = (node: Node): node is CallExpression => {\n if (!Node.isCallExpression(node)) {\n return false;\n }\n\n const expression = node.getExpression();\n\n if (Node.isIdentifier(expression) && expression.getText() === 'forwardRef') {\n return true;\n }\n\n if (Node.isPropertyAccessExpression(expression) && expression.getText() === 'React.forwardRef') {\n return true;\n }\n\n return false;\n};\n\n/**\n * Check if a node is a JSX component (PascalCase name)\n */\nexport const isJsxComponent = (\n node: Node,\n): node is VariableDeclaration | FunctionDeclaration | FunctionExpression | ArrowFunction => {\n let name: string | undefined;\n\n if (\n Node.isVariableDeclaration(node) ||\n Node.isFunctionDeclaration(node) ||\n Node.isClassDeclaration(node)\n ) {\n name = node.getName();\n } else if (Node.isFunctionExpression(node) || Node.isArrowFunction(node)) {\n const variableDeclaration = node.getFirstAncestorByKind(SyntaxKind.VariableDeclaration);\n name = variableDeclaration?.getName();\n }\n\n return name ? /^[A-Z]/.test(name) : false;\n};\n\n/**\n * Get the function declaration from a component, unwrapping forwardRef if needed\n */\nexport const getReactFunctionDeclaration = (\n declaration: Node,\n): ArrowFunction | FunctionDeclaration | FunctionExpression | null => {\n if (!isJsxComponent(declaration)) {\n return null;\n }\n\n if (Node.isFunctionDeclaration(declaration)) {\n return declaration;\n }\n\n if (Node.isVariableDeclaration(declaration)) {\n const initializer = declaration.getInitializer();\n if (!initializer) {\n return null;\n }\n\n if (isForwardRefExpression(initializer)) {\n const [arg] = initializer.getArguments();\n if (\n Node.isFunctionDeclaration(arg) ||\n Node.isFunctionExpression(arg) ||\n Node.isArrowFunction(arg)\n ) {\n return arg;\n }\n } else if (\n Node.isFunctionDeclaration(initializer) ||\n Node.isFunctionExpression(initializer) ||\n Node.isArrowFunction(initializer)\n ) {\n return initializer;\n }\n }\n\n return null;\n};\n\n/**\n * Get all JSX elements from a node\n */\nexport const getJsxElements = (node: Node): (JsxElement | JsxSelfClosingElement)[] => {\n return node\n .getDescendants()\n .filter((n) => Node.isJsxElement(n) || Node.isJsxSelfClosingElement(n)) as (\n | JsxElement\n | JsxSelfClosingElement\n )[];\n};\n\n/**\n * Find all JSX usages of a component from its identifier\n */\nexport const findJsxReferences = (identifier: Identifier): JsxElementWithAttributes[] => {\n try {\n return identifier\n .findReferencesAsNodes()\n .map((reference) =>\n reference.getFirstAncestor(\n (n) => Node.isJsxOpeningElement(n) || Node.isJsxSelfClosingElement(n),\n ),\n )\n .filter(\n (node): node is JsxElementWithAttributes =>\n Boolean(node) && (Node.isJsxOpeningElement(node) || Node.isJsxSelfClosingElement(node)),\n );\n } catch {\n return [];\n }\n};\n\n/**\n * Get the parent component that contains a JSX reference.\n * Returns information about the component including spread rest identifier.\n */\nexport const getParentComponentInfo = (\n reference: JsxElementWithAttributes,\n): ParentComponentInfo | undefined => {\n // Walk up to find the parent component\n const block = reference.getParentWhile((parent) => !getReactFunctionDeclaration(parent));\n if (!block) {\n return undefined;\n }\n\n const blockParent = block.getParent();\n if (!blockParent) {\n return undefined;\n }\n\n const reactComponent = getReactFunctionDeclaration(blockParent);\n if (!reactComponent) {\n return undefined;\n }\n\n // Get component name\n let componentName: string | undefined;\n const variableDeclaration = reactComponent.getFirstAncestorByKind(SyntaxKind.VariableDeclaration);\n if (variableDeclaration) {\n componentName = variableDeclaration.getName();\n } else if (Node.isFunctionDeclaration(reactComponent)) {\n componentName = reactComponent.getName();\n }\n\n if (!componentName) {\n return undefined;\n }\n\n // Extract parameter info\n let spreadRestIdentifier: string | undefined;\n let paramIdentifier: string | undefined;\n\n reactComponent.getParameters().forEach((parameter) => {\n const objectBindingPattern = parameter.getChildrenOfKind(SyntaxKind.ObjectBindingPattern)[0];\n const identifier = parameter.getChildrenOfKind(SyntaxKind.Identifier)[0];\n\n if (objectBindingPattern) {\n const dotDotToken = objectBindingPattern.getFirstDescendantByKind(SyntaxKind.DotDotDotToken);\n if (dotDotToken) {\n spreadRestIdentifier = dotDotToken\n .getParent()\n ?.getFirstChildByKindOrThrow(SyntaxKind.Identifier)\n .getText();\n }\n } else if (identifier) {\n paramIdentifier = identifier.getText();\n }\n });\n\n return { componentName, spreadRestIdentifier, paramIdentifier };\n};\n"],"mappings":";;;;;;AAiHA,MAAa,qBAAqB,eAAuD;AACvF,KAAI;AACF,SAAO,WACJ,uBAAuB,CACvB,KAAK,cACJ,UAAU,kBACP,MAAM,KAAK,oBAAoB,EAAE,IAAI,KAAK,wBAAwB,EAAE,CACtE,CACF,CACA,QACE,SACC,QAAQ,KAAK,KAAK,KAAK,oBAAoB,KAAK,IAAI,KAAK,wBAAwB,KAAK,EACzF;SACG;AACN,SAAO,EAAE"}
|