@raystack/apsara 0.38.0 → 0.40.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/style.css +1 -1
- package/dist/v1/components/chip/chip.cjs +2 -2
- package/dist/v1/components/chip/chip.cjs.map +1 -1
- package/dist/v1/components/chip/chip.d.ts +2 -1
- package/dist/v1/components/chip/chip.d.ts.map +1 -1
- package/dist/v1/components/chip/chip.js +2 -2
- package/dist/v1/components/chip/chip.js.map +1 -1
- package/dist/v1/components/data-table/components/search.cjs +4 -3
- package/dist/v1/components/data-table/components/search.cjs.map +1 -1
- package/dist/v1/components/data-table/components/search.d.ts +1 -1
- package/dist/v1/components/data-table/components/search.d.ts.map +1 -1
- package/dist/v1/components/data-table/components/search.js +4 -3
- package/dist/v1/components/data-table/components/search.js.map +1 -1
- package/dist/v1/components/data-table/data-table.d.ts +1 -2
- package/dist/v1/components/data-table/data-table.d.ts.map +1 -1
- package/dist/v1/components/dialog/dialog.cjs +15 -7
- package/dist/v1/components/dialog/dialog.cjs.map +1 -1
- package/dist/v1/components/dialog/dialog.d.ts +16 -4
- package/dist/v1/components/dialog/dialog.d.ts.map +1 -1
- package/dist/v1/components/dialog/dialog.js +16 -8
- package/dist/v1/components/dialog/dialog.js.map +1 -1
- package/dist/v1/components/dialog/dialog.module.css.cjs +1 -1
- package/dist/v1/components/dialog/dialog.module.css.js +1 -1
- package/dist/v1/components/empty-state/empty-state.cjs +4 -1
- package/dist/v1/components/empty-state/empty-state.cjs.map +1 -1
- package/dist/v1/components/empty-state/empty-state.d.ts +3 -2
- package/dist/v1/components/empty-state/empty-state.d.ts.map +1 -1
- package/dist/v1/components/empty-state/empty-state.js +4 -1
- package/dist/v1/components/empty-state/empty-state.js.map +1 -1
- package/dist/v1/components/empty-state/empty-state.module.css.cjs +1 -1
- package/dist/v1/components/empty-state/empty-state.module.css.js +1 -1
- package/dist/v1/components/input-field/input-field.cjs +11 -5
- package/dist/v1/components/input-field/input-field.cjs.map +1 -1
- package/dist/v1/components/input-field/input-field.d.ts +3 -4
- package/dist/v1/components/input-field/input-field.d.ts.map +1 -1
- package/dist/v1/components/input-field/input-field.js +11 -5
- package/dist/v1/components/input-field/input-field.js.map +1 -1
- package/dist/v1/components/input-field/input-field.module.css.cjs +1 -1
- package/dist/v1/components/input-field/input-field.module.css.js +1 -1
- package/dist/v1/components/search/search.cjs +11 -15
- package/dist/v1/components/search/search.cjs.map +1 -1
- package/dist/v1/components/search/search.d.ts +4 -20
- package/dist/v1/components/search/search.d.ts.map +1 -1
- package/dist/v1/components/search/search.js +12 -16
- package/dist/v1/components/search/search.js.map +1 -1
- package/dist/v1/components/search/search.module.css.cjs +1 -1
- package/dist/v1/components/search/search.module.css.js +1 -1
- package/dist/v1/icons/assets/bell-slash.svg.cjs +45 -0
- package/dist/v1/icons/assets/bell-slash.svg.cjs.map +1 -0
- package/dist/v1/icons/assets/bell-slash.svg.js +24 -0
- package/dist/v1/icons/assets/bell-slash.svg.js.map +1 -0
- package/dist/v1/icons/assets/bell.svg.cjs +42 -0
- package/dist/v1/icons/assets/bell.svg.cjs.map +1 -0
- package/dist/v1/icons/assets/bell.svg.js +21 -0
- package/dist/v1/icons/assets/bell.svg.js.map +1 -0
- package/dist/v1/icons/assets/buildings-filled.svg.cjs +42 -0
- package/dist/v1/icons/assets/buildings-filled.svg.cjs.map +1 -0
- package/dist/v1/icons/assets/buildings-filled.svg.js +21 -0
- package/dist/v1/icons/assets/buildings-filled.svg.js.map +1 -0
- package/dist/v1/icons/assets/check-circle-filled.svg.cjs +2 -0
- package/dist/v1/icons/assets/check-circle-filled.svg.cjs.map +1 -1
- package/dist/v1/icons/assets/check-circle-filled.svg.js +2 -0
- package/dist/v1/icons/assets/check-circle-filled.svg.js.map +1 -1
- package/dist/v1/icons/assets/coin-colored.svg.cjs +54 -0
- package/dist/v1/icons/assets/coin-colored.svg.cjs.map +1 -0
- package/dist/v1/icons/assets/coin-colored.svg.js +33 -0
- package/dist/v1/icons/assets/coin-colored.svg.js.map +1 -0
- package/dist/v1/icons/assets/coin.svg.cjs +40 -0
- package/dist/v1/icons/assets/coin.svg.cjs.map +1 -0
- package/dist/v1/icons/assets/coin.svg.js +19 -0
- package/dist/v1/icons/assets/coin.svg.js.map +1 -0
- package/dist/v1/icons/assets/cross-circle-filled.svg.cjs +2 -1
- package/dist/v1/icons/assets/cross-circle-filled.svg.cjs.map +1 -1
- package/dist/v1/icons/assets/cross-circle-filled.svg.js +2 -1
- package/dist/v1/icons/assets/cross-circle-filled.svg.js.map +1 -1
- package/dist/v1/icons/assets/filter.svg.cjs +2 -1
- package/dist/v1/icons/assets/filter.svg.cjs.map +1 -1
- package/dist/v1/icons/assets/filter.svg.js +2 -1
- package/dist/v1/icons/assets/filter.svg.js.map +1 -1
- package/dist/v1/icons/assets/organization.svg.cjs +2 -1
- package/dist/v1/icons/assets/organization.svg.cjs.map +1 -1
- package/dist/v1/icons/assets/organization.svg.js +2 -1
- package/dist/v1/icons/assets/organization.svg.js.map +1 -1
- package/dist/v1/icons/assets/shopping-bag-filled.svg.cjs +42 -0
- package/dist/v1/icons/assets/shopping-bag-filled.svg.cjs.map +1 -0
- package/dist/v1/icons/assets/shopping-bag-filled.svg.js +21 -0
- package/dist/v1/icons/assets/shopping-bag-filled.svg.js.map +1 -0
- package/dist/v1/icons/assets/sidebar.svg.cjs +2 -1
- package/dist/v1/icons/assets/sidebar.svg.cjs.map +1 -1
- package/dist/v1/icons/assets/sidebar.svg.js +2 -1
- package/dist/v1/icons/assets/sidebar.svg.js.map +1 -1
- package/dist/v1/icons/index.cjs +12 -0
- package/dist/v1/icons/index.cjs.map +1 -1
- package/dist/v1/icons/index.d.ts +6 -0
- package/dist/v1/icons/index.d.ts.map +1 -1
- package/dist/v1/icons/index.js +6 -0
- package/dist/v1/icons/index.js.map +1 -1
- package/dist/v1/style.css +1 -1
- package/package.json +1 -2
|
@@ -25,12 +25,12 @@ const chip = index.cva(chip_module.default.chip, {
|
|
|
25
25
|
color: "neutral",
|
|
26
26
|
},
|
|
27
27
|
});
|
|
28
|
-
const Chip = ({ variant, size, color, trailingIcon, leadingIcon, isDismissible, children, className, onDismiss, onClick, role = "status", ariaLabel, }) => {
|
|
28
|
+
const Chip = ({ variant, size, color, trailingIcon, leadingIcon, isDismissible, children, className, onDismiss, onClick, role = "status", ariaLabel, "data-state": dataState, }) => {
|
|
29
29
|
const handleDismiss = (e) => {
|
|
30
30
|
e.stopPropagation();
|
|
31
31
|
onDismiss?.();
|
|
32
32
|
};
|
|
33
|
-
return (jsxRuntime.jsxRuntimeExports.jsxs("span", { className: chip({ variant, size, color, className }), role: role, "aria-label": ariaLabel || (typeof children === "string" ? children : undefined), onClick: onClick, children: [leadingIcon && (jsxRuntime.jsxRuntimeExports.jsx("span", { className: chip_module.default["leading-icon"], "aria-hidden": "true", role: "presentation", children: leadingIcon })), children, isDismissible ? (jsxRuntime.jsxRuntimeExports.jsx("button", { onClick: handleDismiss, className: chip_module.default["dismiss-button"], "aria-label": `Remove ${typeof children === "string" ? children : "item"}`, type: "button", children: jsxRuntime.jsxRuntimeExports.jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", role: "presentation", children: jsxRuntime.jsxRuntimeExports.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.5066 3.3066C9.73115 3.08205 9.73115 2.71798 9.5066 2.49343C9.28205 2.26887 8.91798 2.26887 8.69343 2.49343L6.00001 5.18684L3.3066 2.49343C3.08205 2.26887 2.71798 2.26887 2.49343 2.49343C2.26887 2.71798 2.26887 3.08205 2.49343 3.3066L5.18684 6.00001L2.49343 8.69343C2.26887 8.91798 2.26887 9.28205 2.49343 9.5066C2.71798 9.73115 3.08205 9.73115 3.3066 9.5066L6.00001 6.81318L8.69343 9.5066C8.91798 9.73115 9.28205 9.73115 9.5066 9.5066C9.73115 9.28205 9.73115 8.91798 9.5066 8.69343L6.81318 6.00001L9.5066 3.3066Z", fill: "currentColor" }) }) })) : trailingIcon ? (jsxRuntime.jsxRuntimeExports.jsx("span", { className: chip_module.default["trailing-icon"], "aria-hidden": "true", role: "presentation", children: trailingIcon })) : null] }));
|
|
33
|
+
return (jsxRuntime.jsxRuntimeExports.jsxs("span", { className: chip({ variant, size, color, className }), role: role, "aria-label": ariaLabel || (typeof children === "string" ? children : undefined), onClick: onClick, "data-state": dataState, children: [leadingIcon && (jsxRuntime.jsxRuntimeExports.jsx("span", { className: chip_module.default["leading-icon"], "aria-hidden": "true", role: "presentation", children: leadingIcon })), children, isDismissible ? (jsxRuntime.jsxRuntimeExports.jsx("button", { onClick: handleDismiss, className: chip_module.default["dismiss-button"], "aria-label": `Remove ${typeof children === "string" ? children : "item"}`, type: "button", children: jsxRuntime.jsxRuntimeExports.jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", role: "presentation", children: jsxRuntime.jsxRuntimeExports.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.5066 3.3066C9.73115 3.08205 9.73115 2.71798 9.5066 2.49343C9.28205 2.26887 8.91798 2.26887 8.69343 2.49343L6.00001 5.18684L3.3066 2.49343C3.08205 2.26887 2.71798 2.26887 2.49343 2.49343C2.26887 2.71798 2.26887 3.08205 2.49343 3.3066L5.18684 6.00001L2.49343 8.69343C2.26887 8.91798 2.26887 9.28205 2.49343 9.5066C2.71798 9.73115 3.08205 9.73115 3.3066 9.5066L6.00001 6.81318L8.69343 9.5066C8.91798 9.73115 9.28205 9.73115 9.5066 9.5066C9.73115 9.28205 9.73115 8.91798 9.5066 8.69343L6.81318 6.00001L9.5066 3.3066Z", fill: "currentColor" }) }) })) : trailingIcon ? (jsxRuntime.jsxRuntimeExports.jsx("span", { className: chip_module.default["trailing-icon"], "aria-hidden": "true", role: "presentation", children: trailingIcon })) : null] }));
|
|
34
34
|
};
|
|
35
35
|
Chip.displayName = "Chip";
|
|
36
36
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chip.cjs","sources":["../../../../v1/components/chip/chip.tsx"],"sourcesContent":["import { cva, type VariantProps } from \"class-variance-authority\";\nimport { ReactNode } from \"react\";\n\nimport styles from \"./chip.module.css\";\n\nconst chip = cva(styles.chip, {\n variants: {\n variant: {\n outline: styles[\"chip-variant-outline\"],\n filled: styles[\"chip-variant-filled\"],\n },\n size: {\n large: styles[\"chip-size-large\"],\n small: styles[\"chip-size-small\"],\n },\n color: {\n neutral: styles[\"chip-color-neutral\"],\n accent: styles[\"chip-color-accent\"],\n },\n },\n defaultVariants: {\n variant: \"outline\",\n size: \"small\",\n color: \"neutral\",\n },\n});\n\ntype ChipProps = VariantProps<typeof chip> & {\n trailingIcon?: ReactNode;\n leadingIcon?: ReactNode;\n isDismissible?: boolean;\n children: ReactNode;\n className?: string;\n onDismiss?: () => void;\n onClick?: () => void;\n role?: string;\n ariaLabel?: string;\n};\n\nexport const Chip = ({\n variant,\n size,\n color,\n trailingIcon,\n leadingIcon,\n isDismissible,\n children,\n className,\n onDismiss,\n onClick,\n role = \"status\",\n ariaLabel,\n}: ChipProps) => {\n const handleDismiss = (e: React.MouseEvent) => {\n e.stopPropagation();\n onDismiss?.();\n };\n\n return (\n <span\n className={chip({ variant, size, color, className })}\n role={role}\n aria-label={\n ariaLabel || (typeof children === \"string\" ? children : undefined)\n }\n onClick={onClick}\n >\n {leadingIcon && (\n <span\n className={styles[\"leading-icon\"]}\n aria-hidden=\"true\"\n role=\"presentation\"\n >\n {leadingIcon}\n </span>\n )}\n {children}\n {isDismissible ? (\n <button\n onClick={handleDismiss}\n className={styles[\"dismiss-button\"]}\n aria-label={`Remove ${\n typeof children === \"string\" ? children : \"item\"\n }`}\n type=\"button\"\n >\n <svg\n width=\"12\"\n height=\"12\"\n viewBox=\"0 0 12 12\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n role=\"presentation\"\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M9.5066 3.3066C9.73115 3.08205 9.73115 2.71798 9.5066 2.49343C9.28205 2.26887 8.91798 2.26887 8.69343 2.49343L6.00001 5.18684L3.3066 2.49343C3.08205 2.26887 2.71798 2.26887 2.49343 2.49343C2.26887 2.71798 2.26887 3.08205 2.49343 3.3066L5.18684 6.00001L2.49343 8.69343C2.26887 8.91798 2.26887 9.28205 2.49343 9.5066C2.71798 9.73115 3.08205 9.73115 3.3066 9.5066L6.00001 6.81318L8.69343 9.5066C8.91798 9.73115 9.28205 9.73115 9.5066 9.5066C9.73115 9.28205 9.73115 8.91798 9.5066 8.69343L6.81318 6.00001L9.5066 3.3066Z\"\n fill=\"currentColor\"\n />\n </svg>\n </button>\n ) : trailingIcon ? (\n <span\n className={styles[\"trailing-icon\"]}\n aria-hidden=\"true\"\n role=\"presentation\"\n >\n {trailingIcon}\n </span>\n ) : null}\n </span>\n );\n};\n\nChip.displayName = \"Chip\";\n"],"names":["cva","styles","_jsxs","_jsx"],"mappings":";;;;;;AAKA,MAAM,IAAI,GAAGA,SAAG,CAACC,mBAAM,CAAC,IAAI,EAAE;AAC5B,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAEA,mBAAM,CAAC,sBAAsB,CAAC;AACvC,YAAA,MAAM,EAAEA,mBAAM,CAAC,qBAAqB,CAAC;AACtC,SAAA;AACD,QAAA,IAAI,EAAE;AACJ,YAAA,KAAK,EAAEA,mBAAM,CAAC,iBAAiB,CAAC;AAChC,YAAA,KAAK,EAAEA,mBAAM,CAAC,iBAAiB,CAAC;AACjC,SAAA;AACD,QAAA,KAAK,EAAE;AACL,YAAA,OAAO,EAAEA,mBAAM,CAAC,oBAAoB,CAAC;AACrC,YAAA,MAAM,EAAEA,mBAAM,CAAC,mBAAmB,CAAC;AACpC,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,OAAO,EAAE,SAAS;AAClB,QAAA,IAAI,EAAE,OAAO;AACb,QAAA,KAAK,EAAE,SAAS;AACjB,KAAA;AACF,CAAA,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"chip.cjs","sources":["../../../../v1/components/chip/chip.tsx"],"sourcesContent":["import { cva, type VariantProps } from \"class-variance-authority\";\nimport { ReactNode } from \"react\";\n\nimport styles from \"./chip.module.css\";\n\nconst chip = cva(styles.chip, {\n variants: {\n variant: {\n outline: styles[\"chip-variant-outline\"],\n filled: styles[\"chip-variant-filled\"],\n },\n size: {\n large: styles[\"chip-size-large\"],\n small: styles[\"chip-size-small\"],\n },\n color: {\n neutral: styles[\"chip-color-neutral\"],\n accent: styles[\"chip-color-accent\"],\n },\n },\n defaultVariants: {\n variant: \"outline\",\n size: \"small\",\n color: \"neutral\",\n },\n});\n\ntype ChipProps = VariantProps<typeof chip> & {\n trailingIcon?: ReactNode;\n leadingIcon?: ReactNode;\n isDismissible?: boolean;\n children: ReactNode;\n className?: string;\n onDismiss?: () => void;\n onClick?: () => void;\n role?: string;\n ariaLabel?: string;\n \"data-state\"?: string;\n};\n\nexport const Chip = ({\n variant,\n size,\n color,\n trailingIcon,\n leadingIcon,\n isDismissible,\n children,\n className,\n onDismiss,\n onClick,\n role = \"status\",\n ariaLabel,\n \"data-state\": dataState,\n}: ChipProps) => {\n const handleDismiss = (e: React.MouseEvent) => {\n e.stopPropagation();\n onDismiss?.();\n };\n\n return (\n <span\n className={chip({ variant, size, color, className })}\n role={role}\n aria-label={\n ariaLabel || (typeof children === \"string\" ? children : undefined)\n }\n onClick={onClick}\n data-state={dataState}\n >\n {leadingIcon && (\n <span\n className={styles[\"leading-icon\"]}\n aria-hidden=\"true\"\n role=\"presentation\"\n >\n {leadingIcon}\n </span>\n )}\n {children}\n {isDismissible ? (\n <button\n onClick={handleDismiss}\n className={styles[\"dismiss-button\"]}\n aria-label={`Remove ${\n typeof children === \"string\" ? children : \"item\"\n }`}\n type=\"button\"\n >\n <svg\n width=\"12\"\n height=\"12\"\n viewBox=\"0 0 12 12\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n role=\"presentation\"\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M9.5066 3.3066C9.73115 3.08205 9.73115 2.71798 9.5066 2.49343C9.28205 2.26887 8.91798 2.26887 8.69343 2.49343L6.00001 5.18684L3.3066 2.49343C3.08205 2.26887 2.71798 2.26887 2.49343 2.49343C2.26887 2.71798 2.26887 3.08205 2.49343 3.3066L5.18684 6.00001L2.49343 8.69343C2.26887 8.91798 2.26887 9.28205 2.49343 9.5066C2.71798 9.73115 3.08205 9.73115 3.3066 9.5066L6.00001 6.81318L8.69343 9.5066C8.91798 9.73115 9.28205 9.73115 9.5066 9.5066C9.73115 9.28205 9.73115 8.91798 9.5066 8.69343L6.81318 6.00001L9.5066 3.3066Z\"\n fill=\"currentColor\"\n />\n </svg>\n </button>\n ) : trailingIcon ? (\n <span\n className={styles[\"trailing-icon\"]}\n aria-hidden=\"true\"\n role=\"presentation\"\n >\n {trailingIcon}\n </span>\n ) : null}\n </span>\n );\n};\n\nChip.displayName = \"Chip\";\n"],"names":["cva","styles","_jsxs","_jsx"],"mappings":";;;;;;AAKA,MAAM,IAAI,GAAGA,SAAG,CAACC,mBAAM,CAAC,IAAI,EAAE;AAC5B,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAEA,mBAAM,CAAC,sBAAsB,CAAC;AACvC,YAAA,MAAM,EAAEA,mBAAM,CAAC,qBAAqB,CAAC;AACtC,SAAA;AACD,QAAA,IAAI,EAAE;AACJ,YAAA,KAAK,EAAEA,mBAAM,CAAC,iBAAiB,CAAC;AAChC,YAAA,KAAK,EAAEA,mBAAM,CAAC,iBAAiB,CAAC;AACjC,SAAA;AACD,QAAA,KAAK,EAAE;AACL,YAAA,OAAO,EAAEA,mBAAM,CAAC,oBAAoB,CAAC;AAC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EAAC,QAAQ,EAEb,QAAA,EAAAE,gCAAA,CAAA,KAAA,EAAA,EACE,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,EAAA,aAAA,EACtB,MAAM,EAClB,IAAI,EAAC,cAAc,EAAA,QAAA,EAEnBA,2CACE,QAAQ,EAAC,SAAS,EAClB,QAAQ,EAAC,SAAS,EAClB,CAAC,EAAC,qgBAAqgB,EACvgB,IAAI,EAAC,cAAc,EAAA,CACnB,GACE,EACC,CAAA,IACP,YAAY,IACdA,gCAAA,CAAA,MAAA,EAAA,EACE,SAAS,EAAEF,mBAAM,CAAC,eAAe,CAAC,iBACtB,MAAM,EAClB,IAAI,EAAC,cAAc,YAElB,YAAY,EAAA,CACR,IACL,IAAI,CAAA,EAAA,CACH,EACP;AACJ,EAAE;AAEF,IAAI,CAAC,WAAW,GAAG,MAAM;;;;"}
|
|
@@ -15,9 +15,10 @@ type ChipProps = VariantProps<typeof chip> & {
|
|
|
15
15
|
onClick?: () => void;
|
|
16
16
|
role?: string;
|
|
17
17
|
ariaLabel?: string;
|
|
18
|
+
"data-state"?: string;
|
|
18
19
|
};
|
|
19
20
|
export declare const Chip: {
|
|
20
|
-
({ variant, size, color, trailingIcon, leadingIcon, isDismissible, children, className, onDismiss, onClick, role, ariaLabel, }: ChipProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
({ variant, size, color, trailingIcon, leadingIcon, isDismissible, children, className, onDismiss, onClick, role, ariaLabel, "data-state": dataState, }: ChipProps): import("react/jsx-runtime").JSX.Element;
|
|
21
22
|
displayName: string;
|
|
22
23
|
};
|
|
23
24
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chip.d.ts","sourceRoot":"","sources":["../../../../v1/components/chip/chip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,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12 +23,12 @@ const chip = cva(styles.chip, {
|
|
|
23
23
|
color: "neutral",
|
|
24
24
|
},
|
|
25
25
|
});
|
|
26
|
-
const Chip = ({ variant, size, color, trailingIcon, leadingIcon, isDismissible, children, className, onDismiss, onClick, role = "status", ariaLabel, }) => {
|
|
26
|
+
const Chip = ({ variant, size, color, trailingIcon, leadingIcon, isDismissible, children, className, onDismiss, onClick, role = "status", ariaLabel, "data-state": dataState, }) => {
|
|
27
27
|
const handleDismiss = (e) => {
|
|
28
28
|
e.stopPropagation();
|
|
29
29
|
onDismiss?.();
|
|
30
30
|
};
|
|
31
|
-
return (jsxRuntimeExports.jsxs("span", { className: chip({ variant, size, color, className }), role: role, "aria-label": ariaLabel || (typeof children === "string" ? children : undefined), onClick: onClick, children: [leadingIcon && (jsxRuntimeExports.jsx("span", { className: styles["leading-icon"], "aria-hidden": "true", role: "presentation", children: leadingIcon })), children, isDismissible ? (jsxRuntimeExports.jsx("button", { onClick: handleDismiss, className: styles["dismiss-button"], "aria-label": `Remove ${typeof children === "string" ? children : "item"}`, type: "button", children: jsxRuntimeExports.jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", role: "presentation", children: jsxRuntimeExports.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.5066 3.3066C9.73115 3.08205 9.73115 2.71798 9.5066 2.49343C9.28205 2.26887 8.91798 2.26887 8.69343 2.49343L6.00001 5.18684L3.3066 2.49343C3.08205 2.26887 2.71798 2.26887 2.49343 2.49343C2.26887 2.71798 2.26887 3.08205 2.49343 3.3066L5.18684 6.00001L2.49343 8.69343C2.26887 8.91798 2.26887 9.28205 2.49343 9.5066C2.71798 9.73115 3.08205 9.73115 3.3066 9.5066L6.00001 6.81318L8.69343 9.5066C8.91798 9.73115 9.28205 9.73115 9.5066 9.5066C9.73115 9.28205 9.73115 8.91798 9.5066 8.69343L6.81318 6.00001L9.5066 3.3066Z", fill: "currentColor" }) }) })) : trailingIcon ? (jsxRuntimeExports.jsx("span", { className: styles["trailing-icon"], "aria-hidden": "true", role: "presentation", children: trailingIcon })) : null] }));
|
|
31
|
+
return (jsxRuntimeExports.jsxs("span", { className: chip({ variant, size, color, className }), role: role, "aria-label": ariaLabel || (typeof children === "string" ? children : undefined), onClick: onClick, "data-state": dataState, children: [leadingIcon && (jsxRuntimeExports.jsx("span", { className: styles["leading-icon"], "aria-hidden": "true", role: "presentation", children: leadingIcon })), children, isDismissible ? (jsxRuntimeExports.jsx("button", { onClick: handleDismiss, className: styles["dismiss-button"], "aria-label": `Remove ${typeof children === "string" ? children : "item"}`, type: "button", children: jsxRuntimeExports.jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", role: "presentation", children: jsxRuntimeExports.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.5066 3.3066C9.73115 3.08205 9.73115 2.71798 9.5066 2.49343C9.28205 2.26887 8.91798 2.26887 8.69343 2.49343L6.00001 5.18684L3.3066 2.49343C3.08205 2.26887 2.71798 2.26887 2.49343 2.49343C2.26887 2.71798 2.26887 3.08205 2.49343 3.3066L5.18684 6.00001L2.49343 8.69343C2.26887 8.91798 2.26887 9.28205 2.49343 9.5066C2.71798 9.73115 3.08205 9.73115 3.3066 9.5066L6.00001 6.81318L8.69343 9.5066C8.91798 9.73115 9.28205 9.73115 9.5066 9.5066C9.73115 9.28205 9.73115 8.91798 9.5066 8.69343L6.81318 6.00001L9.5066 3.3066Z", fill: "currentColor" }) }) })) : trailingIcon ? (jsxRuntimeExports.jsx("span", { className: styles["trailing-icon"], "aria-hidden": "true", role: "presentation", children: trailingIcon })) : null] }));
|
|
32
32
|
};
|
|
33
33
|
Chip.displayName = "Chip";
|
|
34
34
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chip.js","sources":["../../../../v1/components/chip/chip.tsx"],"sourcesContent":["import { cva, type VariantProps } from \"class-variance-authority\";\nimport { ReactNode } from \"react\";\n\nimport styles from \"./chip.module.css\";\n\nconst chip = cva(styles.chip, {\n variants: {\n variant: {\n outline: styles[\"chip-variant-outline\"],\n filled: styles[\"chip-variant-filled\"],\n },\n size: {\n large: styles[\"chip-size-large\"],\n small: styles[\"chip-size-small\"],\n },\n color: {\n neutral: styles[\"chip-color-neutral\"],\n accent: styles[\"chip-color-accent\"],\n },\n },\n defaultVariants: {\n variant: \"outline\",\n size: \"small\",\n color: \"neutral\",\n },\n});\n\ntype ChipProps = VariantProps<typeof chip> & {\n trailingIcon?: ReactNode;\n leadingIcon?: ReactNode;\n isDismissible?: boolean;\n children: ReactNode;\n className?: string;\n onDismiss?: () => void;\n onClick?: () => void;\n role?: string;\n ariaLabel?: string;\n};\n\nexport const Chip = ({\n variant,\n size,\n color,\n trailingIcon,\n leadingIcon,\n isDismissible,\n children,\n className,\n onDismiss,\n onClick,\n role = \"status\",\n ariaLabel,\n}: ChipProps) => {\n const handleDismiss = (e: React.MouseEvent) => {\n e.stopPropagation();\n onDismiss?.();\n };\n\n return (\n <span\n className={chip({ variant, size, color, className })}\n role={role}\n aria-label={\n ariaLabel || (typeof children === \"string\" ? children : undefined)\n }\n onClick={onClick}\n >\n {leadingIcon && (\n <span\n className={styles[\"leading-icon\"]}\n aria-hidden=\"true\"\n role=\"presentation\"\n >\n {leadingIcon}\n </span>\n )}\n {children}\n {isDismissible ? (\n <button\n onClick={handleDismiss}\n className={styles[\"dismiss-button\"]}\n aria-label={`Remove ${\n typeof children === \"string\" ? children : \"item\"\n }`}\n type=\"button\"\n >\n <svg\n width=\"12\"\n height=\"12\"\n viewBox=\"0 0 12 12\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n role=\"presentation\"\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M9.5066 3.3066C9.73115 3.08205 9.73115 2.71798 9.5066 2.49343C9.28205 2.26887 8.91798 2.26887 8.69343 2.49343L6.00001 5.18684L3.3066 2.49343C3.08205 2.26887 2.71798 2.26887 2.49343 2.49343C2.26887 2.71798 2.26887 3.08205 2.49343 3.3066L5.18684 6.00001L2.49343 8.69343C2.26887 8.91798 2.26887 9.28205 2.49343 9.5066C2.71798 9.73115 3.08205 9.73115 3.3066 9.5066L6.00001 6.81318L8.69343 9.5066C8.91798 9.73115 9.28205 9.73115 9.5066 9.5066C9.73115 9.28205 9.73115 8.91798 9.5066 8.69343L6.81318 6.00001L9.5066 3.3066Z\"\n fill=\"currentColor\"\n />\n </svg>\n </button>\n ) : trailingIcon ? (\n <span\n className={styles[\"trailing-icon\"]}\n aria-hidden=\"true\"\n role=\"presentation\"\n >\n {trailingIcon}\n </span>\n ) : null}\n </span>\n );\n};\n\nChip.displayName = \"Chip\";\n"],"names":["_jsxs","_jsx"],"mappings":";;;;AAKA,MAAM,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE;AAC5B,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAE,MAAM,CAAC,sBAAsB,CAAC;AACvC,YAAA,MAAM,EAAE,MAAM,CAAC,qBAAqB,CAAC;AACtC,SAAA;AACD,QAAA,IAAI,EAAE;AACJ,YAAA,KAAK,EAAE,MAAM,CAAC,iBAAiB,CAAC;AAChC,YAAA,KAAK,EAAE,MAAM,CAAC,iBAAiB,CAAC;AACjC,SAAA;AACD,QAAA,KAAK,EAAE;AACL,YAAA,OAAO,EAAE,MAAM,CAAC,oBAAoB,CAAC;AACrC,YAAA,MAAM,EAAE,MAAM,CAAC,mBAAmB,CAAC;AACpC,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,OAAO,EAAE,SAAS;AAClB,QAAA,IAAI,EAAE,OAAO;AACb,QAAA,KAAK,EAAE,SAAS;AACjB,KAAA;AACF,CAAA,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"chip.js","sources":["../../../../v1/components/chip/chip.tsx"],"sourcesContent":["import { cva, type VariantProps } from \"class-variance-authority\";\nimport { ReactNode } from \"react\";\n\nimport styles from \"./chip.module.css\";\n\nconst chip = cva(styles.chip, {\n variants: {\n variant: {\n outline: styles[\"chip-variant-outline\"],\n filled: styles[\"chip-variant-filled\"],\n },\n size: {\n large: styles[\"chip-size-large\"],\n small: styles[\"chip-size-small\"],\n },\n color: {\n neutral: styles[\"chip-color-neutral\"],\n accent: styles[\"chip-color-accent\"],\n },\n },\n defaultVariants: {\n variant: \"outline\",\n size: \"small\",\n color: \"neutral\",\n },\n});\n\ntype ChipProps = VariantProps<typeof chip> & {\n trailingIcon?: ReactNode;\n leadingIcon?: ReactNode;\n isDismissible?: boolean;\n children: ReactNode;\n className?: string;\n onDismiss?: () => void;\n onClick?: () => void;\n role?: string;\n ariaLabel?: string;\n \"data-state\"?: string;\n};\n\nexport const Chip = ({\n variant,\n size,\n color,\n trailingIcon,\n leadingIcon,\n isDismissible,\n children,\n className,\n onDismiss,\n onClick,\n role = \"status\",\n ariaLabel,\n \"data-state\": dataState,\n}: ChipProps) => {\n const handleDismiss = (e: React.MouseEvent) => {\n e.stopPropagation();\n onDismiss?.();\n };\n\n return (\n <span\n className={chip({ variant, size, color, className })}\n role={role}\n aria-label={\n ariaLabel || (typeof children === \"string\" ? children : undefined)\n }\n onClick={onClick}\n data-state={dataState}\n >\n {leadingIcon && (\n <span\n className={styles[\"leading-icon\"]}\n aria-hidden=\"true\"\n role=\"presentation\"\n >\n {leadingIcon}\n </span>\n )}\n {children}\n {isDismissible ? (\n <button\n onClick={handleDismiss}\n className={styles[\"dismiss-button\"]}\n aria-label={`Remove ${\n typeof children === \"string\" ? children : \"item\"\n }`}\n type=\"button\"\n >\n <svg\n width=\"12\"\n height=\"12\"\n viewBox=\"0 0 12 12\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n role=\"presentation\"\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M9.5066 3.3066C9.73115 3.08205 9.73115 2.71798 9.5066 2.49343C9.28205 2.26887 8.91798 2.26887 8.69343 2.49343L6.00001 5.18684L3.3066 2.49343C3.08205 2.26887 2.71798 2.26887 2.49343 2.49343C2.26887 2.71798 2.26887 3.08205 2.49343 3.3066L5.18684 6.00001L2.49343 8.69343C2.26887 8.91798 2.26887 9.28205 2.49343 9.5066C2.71798 9.73115 3.08205 9.73115 3.3066 9.5066L6.00001 6.81318L8.69343 9.5066C8.91798 9.73115 9.28205 9.73115 9.5066 9.5066C9.73115 9.28205 9.73115 8.91798 9.5066 8.69343L6.81318 6.00001L9.5066 3.3066Z\"\n fill=\"currentColor\"\n />\n </svg>\n </button>\n ) : trailingIcon ? (\n <span\n className={styles[\"trailing-icon\"]}\n aria-hidden=\"true\"\n role=\"presentation\"\n >\n {trailingIcon}\n </span>\n ) : null}\n </span>\n );\n};\n\nChip.displayName = \"Chip\";\n"],"names":["_jsxs","_jsx"],"mappings":";;;;AAKA,MAAM,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE;AAC5B,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAE,MAAM,CAAC,sBAAsB,CAAC;AACvC,YAAA,MAAM,EAAE,MAAM,CAAC,qBAAqB,CAAC;AACtC,SAAA;AACD,QAAA,IAAI,EAAE;AACJ,YAAA,KAAK,EAAE,MAAM,CAAC,iBAAiB,CAAC;AAChC,YAAA,KAAK,EAAE,MAAM,CAAC,iBAAiB,CAAC;AACjC,SAAA;AACD,QAAA,KAAK,EAAE;AACL,YAAA,OAAO,EAAE,MAAM,CAAC,oBAAoB,CAAC;AACrC,YAAA,MAAM,EAAE,MAAM,CAAC,mBAAmB,CAAC;AACpC,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,OAAO,EAAE,SAAS;AAClB,QAAA,IAAI,EAAE,OAAO;AACb,QAAA,KAA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,EAAA,aAAA,EACtB,MAAM,EAClB,IAAI,EAAC,cAAc,EAAA,QAAA,EAEnBA,gCACE,QAAQ,EAAC,SAAS,EAClB,QAAQ,EAAC,SAAS,EAClB,CAAC,EAAC,qgBAAqgB,EACvgB,IAAI,EAAC,cAAc,EAAA,CACnB,GACE,EACC,CAAA,IACP,YAAY,IACdA,qBAAA,CAAA,MAAA,EAAA,EACE,SAAS,EAAE,MAAM,CAAC,eAAe,CAAC,iBACtB,MAAM,EAClB,IAAI,EAAC,cAAc,YAElB,YAAY,EAAA,CACR,IACL,IAAI,CAAA,EAAA,CACH,EACP;AACJ,EAAE;AAEF,IAAI,CAAC,WAAW,GAAG,MAAM;;;;"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('../../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.cjs');
|
|
4
|
+
var React = require('react');
|
|
4
5
|
var search = require('../../search/search.cjs');
|
|
5
6
|
var useDataTable = require('../hooks/useDataTable.cjs');
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
const TableSearch = React.forwardRef(({ ...props }, ref) => {
|
|
8
9
|
const { updateTableQuery, tableQuery } = useDataTable.useDataTable();
|
|
9
10
|
const handleSearch = (e) => {
|
|
10
11
|
const value = e.target.value;
|
|
@@ -23,8 +24,8 @@ function TableSearch({ ...props }) {
|
|
|
23
24
|
};
|
|
24
25
|
});
|
|
25
26
|
};
|
|
26
|
-
return (jsxRuntime.jsxRuntimeExports.jsx(search.Search, { ...props, onChange: handleSearch, value: tableQuery?.search, onClear: handleClear }));
|
|
27
|
-
}
|
|
27
|
+
return (jsxRuntime.jsxRuntimeExports.jsx(search.Search, { ...props, ref: ref, onChange: handleSearch, value: tableQuery?.search, onClear: handleClear }));
|
|
28
|
+
});
|
|
28
29
|
|
|
29
30
|
exports.TableSearch = TableSearch;
|
|
30
31
|
//# sourceMappingURL=search.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.cjs","sources":["../../../../../v1/components/data-table/components/search.tsx"],"sourcesContent":["import { Search } from \"../../search\";\nimport { SearchProps } from \"../../search/search\";\nimport { useDataTable } from \"../hooks/useDataTable\";\n\nexport
|
|
1
|
+
{"version":3,"file":"search.cjs","sources":["../../../../../v1/components/data-table/components/search.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport { Search } from \"../../search\";\nimport { SearchProps } from \"../../search/search\";\nimport { useDataTable } from \"../hooks/useDataTable\";\n\nexport const TableSearch = forwardRef<HTMLInputElement, SearchProps>(\n ({ ...props }, ref) => {\n const { updateTableQuery, tableQuery } = useDataTable();\n\n const handleSearch = (e: React.ChangeEvent<HTMLInputElement>) => {\n const value = e.target.value;\n updateTableQuery((query) => {\n return {\n ...query,\n search: value,\n };\n });\n };\n\n const handleClear = () => {\n updateTableQuery((query) => {\n return {\n ...query,\n search: \"\",\n };\n });\n };\n\n return (\n <Search\n {...props}\n ref={ref}\n onChange={handleSearch}\n value={tableQuery?.search}\n onClear={handleClear}\n />\n );\n }\n);\n"],"names":["forwardRef","useDataTable","_jsx","Search"],"mappings":";;;;;;;AAKO,MAAM,WAAW,GAAGA,gBAAU,CACnC,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,KAAI;IACpB,MAAM,EAAE,gBAAgB,EAAE,UAAU,EAAE,GAAGC,yBAAY,EAAE,CAAC;AAExD,IAAA,MAAM,YAAY,GAAG,CAAC,CAAsC,KAAI;AAC9D,QAAA,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;AAC7B,QAAA,gBAAgB,CAAC,CAAC,KAAK,KAAI;YACzB,OAAO;AACL,gBAAA,GAAG,KAAK;AACR,gBAAA,MAAM,EAAE,KAAK;aACd,CAAC;AACJ,SAAC,CAAC,CAAC;AACL,KAAC,CAAC;IAEF,MAAM,WAAW,GAAG,MAAK;AACvB,QAAA,gBAAgB,CAAC,CAAC,KAAK,KAAI;YACzB,OAAO;AACL,gBAAA,GAAG,KAAK;AACR,gBAAA,MAAM,EAAE,EAAE;aACX,CAAC;AACJ,SAAC,CAAC,CAAC;AACL,KAAC,CAAC;IAEF,QACEC,gCAAC,CAAAC,aAAM,EACD,EAAA,GAAA,KAAK,EACT,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,YAAY,EACtB,KAAK,EAAE,UAAU,EAAE,MAAM,EACzB,OAAO,EAAE,WAAW,EACpB,CAAA,EACF;AACJ,CAAC;;;;"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { SearchProps } from "../../search/search";
|
|
2
|
-
export declare
|
|
2
|
+
export declare const TableSearch: import("react").ForwardRefExoticComponent<Omit<SearchProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
3
3
|
//# sourceMappingURL=search.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../../../v1/components/data-table/components/search.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../../../v1/components/data-table/components/search.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGlD,eAAO,MAAM,WAAW,uHAiCvB,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { j as jsxRuntimeExports } from '../../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
2
3
|
import { Search } from '../../search/search.js';
|
|
3
4
|
import { useDataTable } from '../hooks/useDataTable.js';
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
const TableSearch = forwardRef(({ ...props }, ref) => {
|
|
6
7
|
const { updateTableQuery, tableQuery } = useDataTable();
|
|
7
8
|
const handleSearch = (e) => {
|
|
8
9
|
const value = e.target.value;
|
|
@@ -21,8 +22,8 @@ function TableSearch({ ...props }) {
|
|
|
21
22
|
};
|
|
22
23
|
});
|
|
23
24
|
};
|
|
24
|
-
return (jsxRuntimeExports.jsx(Search, { ...props, onChange: handleSearch, value: tableQuery?.search, onClear: handleClear }));
|
|
25
|
-
}
|
|
25
|
+
return (jsxRuntimeExports.jsx(Search, { ...props, ref: ref, onChange: handleSearch, value: tableQuery?.search, onClear: handleClear }));
|
|
26
|
+
});
|
|
26
27
|
|
|
27
28
|
export { TableSearch };
|
|
28
29
|
//# sourceMappingURL=search.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.js","sources":["../../../../../v1/components/data-table/components/search.tsx"],"sourcesContent":["import { Search } from \"../../search\";\nimport { SearchProps } from \"../../search/search\";\nimport { useDataTable } from \"../hooks/useDataTable\";\n\nexport
|
|
1
|
+
{"version":3,"file":"search.js","sources":["../../../../../v1/components/data-table/components/search.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport { Search } from \"../../search\";\nimport { SearchProps } from \"../../search/search\";\nimport { useDataTable } from \"../hooks/useDataTable\";\n\nexport const TableSearch = forwardRef<HTMLInputElement, SearchProps>(\n ({ ...props }, ref) => {\n const { updateTableQuery, tableQuery } = useDataTable();\n\n const handleSearch = (e: React.ChangeEvent<HTMLInputElement>) => {\n const value = e.target.value;\n updateTableQuery((query) => {\n return {\n ...query,\n search: value,\n };\n });\n };\n\n const handleClear = () => {\n updateTableQuery((query) => {\n return {\n ...query,\n search: \"\",\n };\n });\n };\n\n return (\n <Search\n {...props}\n ref={ref}\n onChange={handleSearch}\n value={tableQuery?.search}\n onClear={handleClear}\n />\n );\n }\n);\n"],"names":["_jsx"],"mappings":";;;;;AAKO,MAAM,WAAW,GAAG,UAAU,CACnC,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,KAAI;IACpB,MAAM,EAAE,gBAAgB,EAAE,UAAU,EAAE,GAAG,YAAY,EAAE,CAAC;AAExD,IAAA,MAAM,YAAY,GAAG,CAAC,CAAsC,KAAI;AAC9D,QAAA,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;AAC7B,QAAA,gBAAgB,CAAC,CAAC,KAAK,KAAI;YACzB,OAAO;AACL,gBAAA,GAAG,KAAK;AACR,gBAAA,MAAM,EAAE,KAAK;aACd,CAAC;AACJ,SAAC,CAAC,CAAC;AACL,KAAC,CAAC;IAEF,MAAM,WAAW,GAAG,MAAK;AACvB,QAAA,gBAAgB,CAAC,CAAC,KAAK,KAAI;YACzB,OAAO;AACL,gBAAA,GAAG,KAAK;AACR,gBAAA,MAAM,EAAE,EAAE;aACX,CAAC;AACJ,SAAC,CAAC,CAAC;AACL,KAAC,CAAC;IAEF,QACEA,qBAAC,CAAA,MAAM,EACD,EAAA,GAAA,KAAK,EACT,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,YAAY,EACtB,KAAK,EAAE,UAAU,EAAE,MAAM,EACzB,OAAO,EAAE,WAAW,EACpB,CAAA,EACF;AACJ,CAAC;;;;"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { DataTableProps } from "./data-table.types";
|
|
2
2
|
import { Content } from "./components/content";
|
|
3
3
|
import { Toolbar } from "./components/toolbar";
|
|
4
|
-
import { TableSearch } from "./components/search";
|
|
5
4
|
declare function DataTableRoot<TData, TValue>({ data, columns, query, mode, isLoading, loadingRowCount, defaultSort, children, onTableQueryChange, onLoadMore, onRowClick, }: React.PropsWithChildren<DataTableProps<TData, TValue>>): import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
export declare const DataTable: typeof DataTableRoot & {
|
|
7
6
|
Content: typeof Content;
|
|
8
7
|
Toolbar: typeof Toolbar;
|
|
9
|
-
Search:
|
|
8
|
+
Search: import("react").ForwardRefExoticComponent<Omit<import("../search/search").SearchProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
10
9
|
};
|
|
11
10
|
export {};
|
|
12
11
|
//# sourceMappingURL=data-table.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-table.d.ts","sourceRoot":"","sources":["../../../../v1/components/data-table/data-table.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,cAAc,EAMf,MAAM,oBAAoB,CAAC;AAkB5B,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"data-table.d.ts","sourceRoot":"","sources":["../../../../v1/components/data-table/data-table.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,cAAc,EAMf,MAAM,oBAAoB,CAAC;AAkB5B,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAG/C,iBAAS,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,EACpC,IAAS,EACT,OAAO,EACP,KAAK,EACL,IAAe,EACf,SAAiB,EACjB,eAAmB,EACnB,WAAW,EACX,QAAQ,EACR,kBAAkB,EAClB,UAAU,EACV,UAAU,GACX,EAAE,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,2CAmGxD;AAED,eAAO,MAAM,SAAS;;;;CAIpB,CAAC"}
|
|
@@ -6,24 +6,32 @@ var reactIcons_esm = require('../../node_modules/.pnpm/@radix-ui_react-icons@1.3
|
|
|
6
6
|
var index$1 = require('../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.cjs');
|
|
7
7
|
var clsx = require('../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.cjs');
|
|
8
8
|
var React = require('react');
|
|
9
|
+
var flex = require('../flex/flex.cjs');
|
|
9
10
|
var dialog_module = require('./dialog.module.css.cjs');
|
|
10
11
|
|
|
11
12
|
const dialogContent = index$1.cva(dialog_module.default.dialogContent);
|
|
12
|
-
const DialogContent = React.forwardRef(({ className, children, ariaLabel, ariaDescription, overlayBlur = false, overlayClassName, overlayStyle, width,
|
|
13
|
+
const DialogContent = React.forwardRef(({ className, children, ariaLabel, ariaDescription, overlayBlur = false, overlayClassName, overlayStyle, width, ...props }, ref) => (jsxRuntime.jsxRuntimeExports.jsxs(index.Portal, { children: [jsxRuntime.jsxRuntimeExports.jsx(index.Overlay, { className: clsx.clsx(dialog_module.default.dialogOverlay, overlayClassName, overlayBlur && dialog_module.default.overlayBlur), style: overlayStyle, "aria-hidden": "true", role: "presentation" }), jsxRuntime.jsxRuntimeExports.jsx(index.Content, { ref: ref, className: dialogContent({ className }), style: { width, ...props.style }, "aria-label": ariaLabel, "aria-describedby": ariaDescription ? "dialog-description" : undefined, ...props, children: children })] })));
|
|
13
14
|
DialogContent.displayName = index.Content.displayName;
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
const DialogHeader = ({ children, className, }) => (jsxRuntime.jsxRuntimeExports.jsx(flex.Flex, { justify: "between", align: "center", className: clsx.clsx(dialog_module.default.header, className), children: children }));
|
|
16
|
+
const DialogFooter = ({ children, className, }) => (jsxRuntime.jsxRuntimeExports.jsx(flex.Flex, { gap: 5, justify: "end", className: clsx.clsx(dialog_module.default.footer, className), children: children }));
|
|
17
|
+
const DialogBody = ({ children, className, }) => (jsxRuntime.jsxRuntimeExports.jsx(flex.Flex, { direction: "column", gap: 3, className: clsx.clsx(dialog_module.default.body, className), children: children }));
|
|
18
|
+
function CloseButton({ className, ...props }) {
|
|
19
|
+
return (jsxRuntime.jsxRuntimeExports.jsxs(index.Close, { className: clsx.clsx(dialog_module.default.close, className), "aria-label": "Close dialog", ...props, children: [jsxRuntime.jsxRuntimeExports.jsx(reactIcons_esm.Cross1Icon, {}), ","] }));
|
|
16
20
|
}
|
|
17
|
-
function DialogTitle({ children, ...props }) {
|
|
18
|
-
return (jsxRuntime.jsxRuntimeExports.jsx(index.Title, { ...props, role: "heading", "aria-level": 1, children: children }));
|
|
21
|
+
function DialogTitle({ children, className, ...props }) {
|
|
22
|
+
return (jsxRuntime.jsxRuntimeExports.jsx(index.Title, { ...props, role: "heading", "aria-level": 1, className: clsx.clsx(dialog_module.default.title, className), children: children }));
|
|
19
23
|
}
|
|
20
24
|
function DialogDescription({ children, className, ...props }) {
|
|
21
|
-
return (jsxRuntime.jsxRuntimeExports.jsx(index.Description, { ...props, className: className, id: "dialog-description", role: "document", children: children }));
|
|
25
|
+
return (jsxRuntime.jsxRuntimeExports.jsx(index.Description, { ...props, className: clsx.clsx(dialog_module.default.description, className), id: "dialog-description", role: "document", children: children }));
|
|
22
26
|
}
|
|
23
27
|
const Dialog = Object.assign(index.Root, {
|
|
24
28
|
Trigger: index.Trigger,
|
|
25
29
|
Content: DialogContent,
|
|
26
|
-
|
|
30
|
+
Header: DialogHeader,
|
|
31
|
+
Footer: DialogFooter,
|
|
32
|
+
Body: DialogBody,
|
|
33
|
+
Close: index.Close,
|
|
34
|
+
CloseButton: CloseButton,
|
|
27
35
|
Title: DialogTitle,
|
|
28
36
|
Description: DialogDescription,
|
|
29
37
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.cjs","sources":["../../../../v1/components/dialog/dialog.tsx"],"sourcesContent":["import * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { Cross1Icon } from \"@radix-ui/react-icons\";\nimport { cva, VariantProps } from \"class-variance-authority\";\nimport { clsx } from \"clsx\";\nimport {\n ComponentProps,\n ComponentPropsWithoutRef,\n ElementRef,\n forwardRef,\n} from \"react\";\n\nimport styles from \"./dialog.module.css\";\n\nconst dialogContent = cva(styles.dialogContent);\n\nexport interface DialogContentProps\n extends ComponentPropsWithoutRef<typeof DialogPrimitive.Content>,\n VariantProps<typeof dialogContent> {\n ariaLabel?: string;\n ariaDescription?: string;\n overlayBlur?: boolean;\n overlayClassName?: string;\n overlayStyle?: React.CSSProperties;\n width?: string | number;\n
|
|
1
|
+
{"version":3,"file":"dialog.cjs","sources":["../../../../v1/components/dialog/dialog.tsx"],"sourcesContent":["import * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { Cross1Icon } from \"@radix-ui/react-icons\";\nimport { cva, VariantProps } from \"class-variance-authority\";\nimport { clsx } from \"clsx\";\nimport {\n ComponentProps,\n ComponentPropsWithoutRef,\n ElementRef,\n forwardRef,\n} from \"react\";\nimport { Flex } from \"../flex\";\n\nimport styles from \"./dialog.module.css\";\n\nconst dialogContent = cva(styles.dialogContent);\n\nexport interface DialogContentProps\n extends ComponentPropsWithoutRef<typeof DialogPrimitive.Content>,\n VariantProps<typeof dialogContent> {\n ariaLabel?: string;\n ariaDescription?: string;\n overlayBlur?: boolean;\n overlayClassName?: string;\n overlayStyle?: React.CSSProperties;\n width?: string | number;\n}\n\nconst DialogContent = forwardRef<\n ElementRef<typeof DialogPrimitive.Content>,\n DialogContentProps\n>(\n (\n {\n className,\n children,\n ariaLabel,\n ariaDescription,\n overlayBlur = false,\n overlayClassName,\n overlayStyle,\n width,\n ...props\n },\n ref\n ) => (\n <DialogPrimitive.Portal>\n <DialogPrimitive.Overlay\n className={clsx(\n styles.dialogOverlay,\n overlayClassName,\n overlayBlur && styles.overlayBlur\n )}\n style={overlayStyle}\n aria-hidden=\"true\"\n role=\"presentation\"\n />\n <DialogPrimitive.Content\n ref={ref}\n className={dialogContent({ className })}\n style={{ width, ...props.style }}\n aria-label={ariaLabel}\n aria-describedby={ariaDescription ? \"dialog-description\" : undefined}\n {...props}\n >\n {children}\n </DialogPrimitive.Content>\n </DialogPrimitive.Portal>\n )\n);\n\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nconst DialogHeader = ({\n children,\n className,\n}: {\n children: React.ReactNode;\n className?: string;\n}) => (\n <Flex\n justify={\"between\"}\n align={\"center\"}\n className={clsx(styles.header, className)}\n >\n {children}\n </Flex>\n);\n\nconst DialogFooter = ({\n children,\n className,\n}: {\n children: React.ReactNode;\n className?: string;\n}) => (\n <Flex gap={5} justify=\"end\" className={clsx(styles.footer, className)}>\n {children}\n </Flex>\n);\n\nconst DialogBody = ({\n children,\n className,\n}: {\n children: React.ReactNode;\n className?: string;\n}) => (\n <Flex direction=\"column\" gap={3} className={clsx(styles.body, className)}>\n {children}\n </Flex>\n);\n\ntype CloseButtonProps = ComponentProps<typeof DialogPrimitive.Close>;\nexport function CloseButton({ className, ...props }: CloseButtonProps) {\n return (\n <DialogPrimitive.Close\n className={clsx(styles.close, className)}\n aria-label=\"Close dialog\"\n {...props}\n >\n <Cross1Icon />,\n </DialogPrimitive.Close>\n );\n}\n\ninterface DialogTitleProps\n extends ComponentProps<typeof DialogPrimitive.Title> {\n children: React.ReactNode;\n}\n\nfunction DialogTitle({ children, className, ...props }: DialogTitleProps) {\n return (\n <DialogPrimitive.Title\n {...props}\n role=\"heading\"\n aria-level={1}\n className={clsx(styles.title, className)}\n >\n {children}\n </DialogPrimitive.Title>\n );\n}\n\ninterface DialogDescriptionProps\n extends ComponentProps<typeof DialogPrimitive.Description> {\n children: React.ReactNode;\n className?: string;\n}\n\nfunction DialogDescription({\n children,\n className,\n ...props\n}: DialogDescriptionProps) {\n return (\n <DialogPrimitive.Description\n {...props}\n className={clsx(styles.description, className)}\n id=\"dialog-description\"\n role=\"document\"\n >\n {children}\n </DialogPrimitive.Description>\n );\n}\n\nexport const Dialog = Object.assign(DialogPrimitive.Root, {\n Trigger: DialogPrimitive.Trigger,\n Content: DialogContent,\n Header: DialogHeader,\n Footer: DialogFooter,\n Body: DialogBody,\n Close: DialogPrimitive.Close,\n CloseButton: CloseButton,\n Title: DialogTitle,\n Description: DialogDescription,\n});\n"],"names":["cva","styles","forwardRef","_jsxs","DialogPrimitive.Portal","_jsx","DialogPrimitive.Overlay","clsx","DialogPrimitive.Content","Flex","DialogPrimitive.Close","Cross1Icon","DialogPrimitive.Title","DialogPrimitive.Description","DialogPrimitive.Root","DialogPrimitive.Trigger"],"mappings":";;;;;;;;;;;AAcA,MAAM,aAAa,GAAGA,WAAG,CAACC,qBAAM,CAAC,aAAa,CAAC,CAAC;AAahD,MAAM,aAAa,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AAC,UAAU,EAAA,QAAA,EAEd,QAAQ,EAAA,CACmB,EAC9B;AACJ,CAAC;AAEY,MAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAACa,UAAoB,EAAE;IACxD,OAAO,EAAEC,aAAuB;AAChC,IAAA,OAAO,EAAE,aAAa;AACtB,IAAA,MAAM,EAAE,YAAY;AACpB,IAAA,MAAM,EAAE,YAAY;AACpB,IAAA,IAAI,EAAE,UAAU;IAChB,KAAK,EAAEL,WAAqB;AAC5B,IAAA,WAAW,EAAE,WAAW;AACxB,IAAA,KAAK,EAAE,WAAW;AAClB,IAAA,WAAW,EAAE,iBAAiB;AAC/B,CAAA;;;;;"}
|
|
@@ -9,14 +9,13 @@ export interface DialogContentProps extends ComponentPropsWithoutRef<typeof Dial
|
|
|
9
9
|
overlayClassName?: string;
|
|
10
10
|
overlayStyle?: React.CSSProperties;
|
|
11
11
|
width?: string | number;
|
|
12
|
-
close?: boolean;
|
|
13
12
|
}
|
|
14
13
|
type CloseButtonProps = ComponentProps<typeof DialogPrimitive.Close>;
|
|
15
|
-
export declare function CloseButton({
|
|
14
|
+
export declare function CloseButton({ className, ...props }: CloseButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
16
15
|
interface DialogTitleProps extends ComponentProps<typeof DialogPrimitive.Title> {
|
|
17
16
|
children: React.ReactNode;
|
|
18
17
|
}
|
|
19
|
-
declare function DialogTitle({ children, ...props }: DialogTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
declare function DialogTitle({ children, className, ...props }: DialogTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
20
19
|
interface DialogDescriptionProps extends ComponentProps<typeof DialogPrimitive.Description> {
|
|
21
20
|
children: React.ReactNode;
|
|
22
21
|
className?: string;
|
|
@@ -25,7 +24,20 @@ declare function DialogDescription({ children, className, ...props }: DialogDesc
|
|
|
25
24
|
export declare const Dialog: import("react").FC<DialogPrimitive.DialogProps> & {
|
|
26
25
|
Trigger: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
27
26
|
Content: import("react").ForwardRefExoticComponent<DialogContentProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
28
|
-
|
|
27
|
+
Header: ({ children, className, }: {
|
|
28
|
+
children: React.ReactNode;
|
|
29
|
+
className?: string | undefined;
|
|
30
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
Footer: ({ children, className, }: {
|
|
32
|
+
children: React.ReactNode;
|
|
33
|
+
className?: string | undefined;
|
|
34
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
Body: ({ children, className, }: {
|
|
36
|
+
children: React.ReactNode;
|
|
37
|
+
className?: string | undefined;
|
|
38
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
Close: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
40
|
+
CloseButton: typeof CloseButton;
|
|
29
41
|
Title: typeof DialogTitle;
|
|
30
42
|
Description: typeof DialogDescription;
|
|
31
43
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../../v1/components/dialog/dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAAO,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,EACL,cAAc,EACd,wBAAwB,EAGzB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../../v1/components/dialog/dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAAO,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,EACL,cAAc,EACd,wBAAwB,EAGzB,MAAM,OAAO,CAAC;AAKf,QAAA,MAAM,aAAa,yF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
-
import { Portal as $5d3850c4d0b4e6c7$export$602eac185826482c, Overlay as $5d3850c4d0b4e6c7$export$c6fdb837b070b4ff, Content as $5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2,
|
|
2
|
+
import { Portal as $5d3850c4d0b4e6c7$export$602eac185826482c, Overlay as $5d3850c4d0b4e6c7$export$c6fdb837b070b4ff, Content as $5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2, Root as $5d3850c4d0b4e6c7$export$be92b6f5f03c0fe9, Trigger as $5d3850c4d0b4e6c7$export$41fb9f06171c75f4, Close as $5d3850c4d0b4e6c7$export$f39c2d165cd861fe, Title as $5d3850c4d0b4e6c7$export$f99233281efd08a0, Description as $5d3850c4d0b4e6c7$export$393edc798c47379d } from '../../node_modules/.pnpm/@radix-ui_react-dialog@1.0.4_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dialog/dist/index.js';
|
|
3
3
|
import { Cross1Icon } from '../../node_modules/.pnpm/@radix-ui_react-icons@1.3.0_react@18.2.0/node_modules/@radix-ui/react-icons/dist/react-icons.esm.js';
|
|
4
4
|
import { cva } from '../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js';
|
|
5
5
|
import { clsx } from '../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js';
|
|
6
6
|
import { forwardRef } from 'react';
|
|
7
|
+
import { Flex } from '../flex/flex.js';
|
|
7
8
|
import styles from './dialog.module.css.js';
|
|
8
9
|
|
|
9
10
|
const dialogContent = cva(styles.dialogContent);
|
|
10
|
-
const DialogContent = forwardRef(({ className, children, ariaLabel, ariaDescription, overlayBlur = false, overlayClassName, overlayStyle, width,
|
|
11
|
+
const DialogContent = forwardRef(({ className, children, ariaLabel, ariaDescription, overlayBlur = false, overlayClassName, overlayStyle, width, ...props }, ref) => (jsxRuntimeExports.jsxs($5d3850c4d0b4e6c7$export$602eac185826482c, { children: [jsxRuntimeExports.jsx($5d3850c4d0b4e6c7$export$c6fdb837b070b4ff, { className: clsx(styles.dialogOverlay, overlayClassName, overlayBlur && styles.overlayBlur), style: overlayStyle, "aria-hidden": "true", role: "presentation" }), jsxRuntimeExports.jsx($5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2, { ref: ref, className: dialogContent({ className }), style: { width, ...props.style }, "aria-label": ariaLabel, "aria-describedby": ariaDescription ? "dialog-description" : undefined, ...props, children: children })] })));
|
|
11
12
|
DialogContent.displayName = $5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2.displayName;
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
const DialogHeader = ({ children, className, }) => (jsxRuntimeExports.jsx(Flex, { justify: "between", align: "center", className: clsx(styles.header, className), children: children }));
|
|
14
|
+
const DialogFooter = ({ children, className, }) => (jsxRuntimeExports.jsx(Flex, { gap: 5, justify: "end", className: clsx(styles.footer, className), children: children }));
|
|
15
|
+
const DialogBody = ({ children, className, }) => (jsxRuntimeExports.jsx(Flex, { direction: "column", gap: 3, className: clsx(styles.body, className), children: children }));
|
|
16
|
+
function CloseButton({ className, ...props }) {
|
|
17
|
+
return (jsxRuntimeExports.jsxs($5d3850c4d0b4e6c7$export$f39c2d165cd861fe, { className: clsx(styles.close, className), "aria-label": "Close dialog", ...props, children: [jsxRuntimeExports.jsx(Cross1Icon, {}), ","] }));
|
|
14
18
|
}
|
|
15
|
-
function DialogTitle({ children, ...props }) {
|
|
16
|
-
return (jsxRuntimeExports.jsx($5d3850c4d0b4e6c7$export$f99233281efd08a0, { ...props, role: "heading", "aria-level": 1, children: children }));
|
|
19
|
+
function DialogTitle({ children, className, ...props }) {
|
|
20
|
+
return (jsxRuntimeExports.jsx($5d3850c4d0b4e6c7$export$f99233281efd08a0, { ...props, role: "heading", "aria-level": 1, className: clsx(styles.title, className), children: children }));
|
|
17
21
|
}
|
|
18
22
|
function DialogDescription({ children, className, ...props }) {
|
|
19
|
-
return (jsxRuntimeExports.jsx($5d3850c4d0b4e6c7$export$393edc798c47379d, { ...props, className: className, id: "dialog-description", role: "document", children: children }));
|
|
23
|
+
return (jsxRuntimeExports.jsx($5d3850c4d0b4e6c7$export$393edc798c47379d, { ...props, className: clsx(styles.description, className), id: "dialog-description", role: "document", children: children }));
|
|
20
24
|
}
|
|
21
25
|
const Dialog = Object.assign($5d3850c4d0b4e6c7$export$be92b6f5f03c0fe9, {
|
|
22
26
|
Trigger: $5d3850c4d0b4e6c7$export$41fb9f06171c75f4,
|
|
23
27
|
Content: DialogContent,
|
|
24
|
-
|
|
28
|
+
Header: DialogHeader,
|
|
29
|
+
Footer: DialogFooter,
|
|
30
|
+
Body: DialogBody,
|
|
31
|
+
Close: $5d3850c4d0b4e6c7$export$f39c2d165cd861fe,
|
|
32
|
+
CloseButton: CloseButton,
|
|
25
33
|
Title: DialogTitle,
|
|
26
34
|
Description: DialogDescription,
|
|
27
35
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.js","sources":["../../../../v1/components/dialog/dialog.tsx"],"sourcesContent":["import * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { Cross1Icon } from \"@radix-ui/react-icons\";\nimport { cva, VariantProps } from \"class-variance-authority\";\nimport { clsx } from \"clsx\";\nimport {\n ComponentProps,\n ComponentPropsWithoutRef,\n ElementRef,\n forwardRef,\n} from \"react\";\n\nimport styles from \"./dialog.module.css\";\n\nconst dialogContent = cva(styles.dialogContent);\n\nexport interface DialogContentProps\n extends ComponentPropsWithoutRef<typeof DialogPrimitive.Content>,\n VariantProps<typeof dialogContent> {\n ariaLabel?: string;\n ariaDescription?: string;\n overlayBlur?: boolean;\n overlayClassName?: string;\n overlayStyle?: React.CSSProperties;\n width?: string | number;\n
|
|
1
|
+
{"version":3,"file":"dialog.js","sources":["../../../../v1/components/dialog/dialog.tsx"],"sourcesContent":["import * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { Cross1Icon } from \"@radix-ui/react-icons\";\nimport { cva, VariantProps } from \"class-variance-authority\";\nimport { clsx } from \"clsx\";\nimport {\n ComponentProps,\n ComponentPropsWithoutRef,\n ElementRef,\n forwardRef,\n} from \"react\";\nimport { Flex } from \"../flex\";\n\nimport styles from \"./dialog.module.css\";\n\nconst dialogContent = cva(styles.dialogContent);\n\nexport interface DialogContentProps\n extends ComponentPropsWithoutRef<typeof DialogPrimitive.Content>,\n VariantProps<typeof dialogContent> {\n ariaLabel?: string;\n ariaDescription?: string;\n overlayBlur?: boolean;\n overlayClassName?: string;\n overlayStyle?: React.CSSProperties;\n width?: string | number;\n}\n\nconst DialogContent = forwardRef<\n ElementRef<typeof DialogPrimitive.Content>,\n DialogContentProps\n>(\n (\n {\n className,\n children,\n ariaLabel,\n ariaDescription,\n overlayBlur = false,\n overlayClassName,\n overlayStyle,\n width,\n ...props\n },\n ref\n ) => (\n <DialogPrimitive.Portal>\n <DialogPrimitive.Overlay\n className={clsx(\n styles.dialogOverlay,\n overlayClassName,\n overlayBlur && styles.overlayBlur\n )}\n style={overlayStyle}\n aria-hidden=\"true\"\n role=\"presentation\"\n />\n <DialogPrimitive.Content\n ref={ref}\n className={dialogContent({ className })}\n style={{ width, ...props.style }}\n aria-label={ariaLabel}\n aria-describedby={ariaDescription ? \"dialog-description\" : undefined}\n {...props}\n >\n {children}\n </DialogPrimitive.Content>\n </DialogPrimitive.Portal>\n )\n);\n\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nconst DialogHeader = ({\n children,\n className,\n}: {\n children: React.ReactNode;\n className?: string;\n}) => (\n <Flex\n justify={\"between\"}\n align={\"center\"}\n className={clsx(styles.header, className)}\n >\n {children}\n </Flex>\n);\n\nconst DialogFooter = ({\n children,\n className,\n}: {\n children: React.ReactNode;\n className?: string;\n}) => (\n <Flex gap={5} justify=\"end\" className={clsx(styles.footer, className)}>\n {children}\n </Flex>\n);\n\nconst DialogBody = ({\n children,\n className,\n}: {\n children: React.ReactNode;\n className?: string;\n}) => (\n <Flex direction=\"column\" gap={3} className={clsx(styles.body, className)}>\n {children}\n </Flex>\n);\n\ntype CloseButtonProps = ComponentProps<typeof DialogPrimitive.Close>;\nexport function CloseButton({ className, ...props }: CloseButtonProps) {\n return (\n <DialogPrimitive.Close\n className={clsx(styles.close, className)}\n aria-label=\"Close dialog\"\n {...props}\n >\n <Cross1Icon />,\n </DialogPrimitive.Close>\n );\n}\n\ninterface DialogTitleProps\n extends ComponentProps<typeof DialogPrimitive.Title> {\n children: React.ReactNode;\n}\n\nfunction DialogTitle({ children, className, ...props }: DialogTitleProps) {\n return (\n <DialogPrimitive.Title\n {...props}\n role=\"heading\"\n aria-level={1}\n className={clsx(styles.title, className)}\n >\n {children}\n </DialogPrimitive.Title>\n );\n}\n\ninterface DialogDescriptionProps\n extends ComponentProps<typeof DialogPrimitive.Description> {\n children: React.ReactNode;\n className?: string;\n}\n\nfunction DialogDescription({\n children,\n className,\n ...props\n}: DialogDescriptionProps) {\n return (\n <DialogPrimitive.Description\n {...props}\n className={clsx(styles.description, className)}\n id=\"dialog-description\"\n role=\"document\"\n >\n {children}\n </DialogPrimitive.Description>\n );\n}\n\nexport const Dialog = Object.assign(DialogPrimitive.Root, {\n Trigger: DialogPrimitive.Trigger,\n Content: DialogContent,\n Header: DialogHeader,\n Footer: DialogFooter,\n Body: DialogBody,\n Close: DialogPrimitive.Close,\n CloseButton: CloseButton,\n Title: DialogTitle,\n Description: DialogDescription,\n});\n"],"names":["_jsxs","DialogPrimitive.Portal","_jsx","DialogPrimitive.Overlay","DialogPrimitive.Content","DialogPrimitive.Close","DialogPrimitive.Title","DialogPrimitive.Description","DialogPrimitive.Root","DialogPrimitive.Trigger"],"mappings":";;;;;;;;;AAcA,MAAM,aAAa,GAAG,GAAG,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;AAahD,MAAM,aAAa,GAAG,UAAU,CAI9B,CACE,EACE,SAAS,EACT,QAAQ,EACR,SAAS,EACT,eAAe,EACf,WAAW,GAAG,KAAK,EACnB,gBAAgB,EACh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AE;IACxD,OAAO,EAAEC,yCAAuB;AAChC,IAAA,OAAO,EAAE,aAAa;AACtB,IAAA,MAAM,EAAE,YAAY;AACpB,IAAA,MAAM,EAAE,YAAY;AACpB,IAAA,IAAI,EAAE,UAAU;IAChB,KAAK,EAAEJ,yCAAqB;AAC5B,IAAA,WAAW,EAAE,WAAW;AACxB,IAAA,KAAK,EAAE,WAAW;AAClB,IAAA,WAAW,EAAE,iBAAiB;AAC/B,CAAA;;;;"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var styles = {"dialogOverlay":"dialog-module_dialogOverlay__gtTvA","dialogContent":"dialog-module_dialogContent__DvkhU","close":"dialog-module_close__g-6GW","overlayBlur":"dialog-module_overlayBlur__5363s","fadeIn":"dialog-module_fadeIn__Yyp5s","fadeOut":"dialog-module_fadeOut__H7gVW","overlay":"dialog-module_overlay__sppBT"};
|
|
5
|
+
var styles = {"dialogOverlay":"dialog-module_dialogOverlay__gtTvA","dialogContent":"dialog-module_dialogContent__DvkhU","close":"dialog-module_close__g-6GW","overlayBlur":"dialog-module_overlayBlur__5363s","fadeIn":"dialog-module_fadeIn__Yyp5s","fadeOut":"dialog-module_fadeOut__H7gVW","overlay":"dialog-module_overlay__sppBT","header":"dialog-module_header__XyU4U","title":"dialog-module_title__vzaHe","body":"dialog-module_body__co0Jz","footer":"dialog-module_footer__qqC4q","description":"dialog-module_description__G1nfZ"};
|
|
6
6
|
|
|
7
7
|
exports.default = styles;
|
|
8
8
|
//# sourceMappingURL=dialog.module.css.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var styles = {"dialogOverlay":"dialog-module_dialogOverlay__gtTvA","dialogContent":"dialog-module_dialogContent__DvkhU","close":"dialog-module_close__g-6GW","overlayBlur":"dialog-module_overlayBlur__5363s","fadeIn":"dialog-module_fadeIn__Yyp5s","fadeOut":"dialog-module_fadeOut__H7gVW","overlay":"dialog-module_overlay__sppBT"};
|
|
1
|
+
var styles = {"dialogOverlay":"dialog-module_dialogOverlay__gtTvA","dialogContent":"dialog-module_dialogContent__DvkhU","close":"dialog-module_close__g-6GW","overlayBlur":"dialog-module_overlayBlur__5363s","fadeIn":"dialog-module_fadeIn__Yyp5s","fadeOut":"dialog-module_fadeOut__H7gVW","overlay":"dialog-module_overlay__sppBT","header":"dialog-module_header__XyU4U","title":"dialog-module_title__vzaHe","body":"dialog-module_body__co0Jz","footer":"dialog-module_footer__qqC4q","description":"dialog-module_description__G1nfZ"};
|
|
2
2
|
|
|
3
3
|
export { styles as default };
|
|
4
4
|
//# sourceMappingURL=dialog.module.css.js.map
|
|
@@ -6,7 +6,10 @@ var flex = require('../flex/flex.cjs');
|
|
|
6
6
|
var text = require('../text/text.cjs');
|
|
7
7
|
var emptyState_module = require('./empty-state.module.css.cjs');
|
|
8
8
|
|
|
9
|
-
const EmptyState = ({ icon, heading, subHeading, primaryAction, secondaryAction, classNames, }) => {
|
|
9
|
+
const EmptyState = ({ icon, heading, subHeading, primaryAction, secondaryAction, classNames, variant = "empty1", }) => {
|
|
10
|
+
if (variant === "empty2") {
|
|
11
|
+
return (jsxRuntime.jsxRuntimeExports.jsx(flex.Flex, { align: "center", justify: "center", className: emptyState_module.default.emptyStatePage, children: jsxRuntime.jsxRuntimeExports.jsxs(flex.Flex, { direction: "column", align: "start", gap: "medium", className: clsx.clsx(emptyState_module.default.emptyStateContent, classNames?.container), children: [jsxRuntime.jsxRuntimeExports.jsx("div", { className: clsx.clsx(emptyState_module.default.iconContainer, classNames?.iconContainer), children: jsxRuntime.jsxRuntimeExports.jsx("div", { className: clsx.clsx(emptyState_module.default.icon, emptyState_module.default.iconLarge, classNames?.icon), children: icon }) }), heading && (jsxRuntime.jsxRuntimeExports.jsx(text.Text, { size: 5, weight: 500, className: clsx.clsx(emptyState_module.default.headerText, classNames?.heading), children: heading })), subHeading && (jsxRuntime.jsxRuntimeExports.jsx(text.Text, { size: 4, weight: 400, className: clsx.clsx(emptyState_module.default.subHeaderText, classNames?.subHeading), children: subHeading })), jsxRuntime.jsxRuntimeExports.jsxs(flex.Flex, { gap: "medium", children: [primaryAction, secondaryAction] })] }) }));
|
|
12
|
+
}
|
|
10
13
|
return (jsxRuntime.jsxRuntimeExports.jsxs(flex.Flex, { direction: "column", align: "center", gap: "medium", className: clsx.clsx(emptyState_module.default.emptyState, classNames?.container), children: [jsxRuntime.jsxRuntimeExports.jsx("div", { className: clsx.clsx(emptyState_module.default.iconContainer, classNames?.iconContainer), children: jsxRuntime.jsxRuntimeExports.jsx("div", { className: clsx.clsx(emptyState_module.default.icon, classNames?.icon), children: icon }) }), jsxRuntime.jsxRuntimeExports.jsxs(flex.Flex, { direction: "column", gap: "small", align: "center", children: [heading && (jsxRuntime.jsxRuntimeExports.jsx(text.Text, { size: 5, weight: 500, className: clsx.clsx(emptyState_module.default.headerText, classNames?.heading), children: heading })), subHeading && (jsxRuntime.jsxRuntimeExports.jsx(text.Text, { size: 4, weight: 400, className: clsx.clsx(emptyState_module.default.subHeaderText, classNames?.subHeading), children: subHeading }))] }), primaryAction, secondaryAction] }));
|
|
11
14
|
};
|
|
12
15
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty-state.cjs","sources":["../../../../v1/components/empty-state/empty-state.tsx"],"sourcesContent":["import clsx from \"clsx\";\n\nimport { Flex } from \"../flex\";\nimport { Text } from \"../text\";\nimport styles from \"./empty-state.module.css\";\n\ntype classNameKeys =\n | \"container\"\n | \"iconContainer\"\n | \"icon\"\n | \"heading\"\n | \"subHeading\";\n\ninterface
|
|
1
|
+
{"version":3,"file":"empty-state.cjs","sources":["../../../../v1/components/empty-state/empty-state.tsx"],"sourcesContent":["import clsx from \"clsx\";\n\nimport { Flex } from \"../flex\";\nimport { Text } from \"../text\";\nimport styles from \"./empty-state.module.css\";\n\ntype classNameKeys =\n | \"container\"\n | \"iconContainer\"\n | \"icon\"\n | \"heading\"\n | \"subHeading\";\n\ninterface EmptyStateProps {\n icon: React.ReactNode;\n heading?: React.ReactNode;\n subHeading?: React.ReactNode;\n primaryAction?: React.ReactNode;\n secondaryAction?: React.ReactNode;\n classNames?: Partial<Record<classNameKeys, string>>;\n variant?: \"empty1\" | \"empty2\";\n}\n\nexport const EmptyState = ({\n icon,\n heading,\n subHeading,\n primaryAction,\n secondaryAction,\n classNames,\n variant = \"empty1\",\n}: EmptyStateProps) => {\n if (variant === \"empty2\") {\n return (\n <Flex\n align=\"center\"\n justify=\"center\"\n className={styles.emptyStatePage}\n >\n <Flex\n direction=\"column\"\n align=\"start\"\n gap=\"medium\"\n className={clsx(styles.emptyStateContent, classNames?.container)}\n >\n <div className={clsx(styles.iconContainer, classNames?.iconContainer)}>\n <div className={clsx(styles.icon, styles.iconLarge, classNames?.icon)}>{icon}</div>\n </div>\n \n {heading && (\n <Text\n size={5}\n weight={500}\n className={clsx(styles.headerText, classNames?.heading)}\n >\n {heading}\n </Text>\n )}\n\n {subHeading && (\n <Text\n size={4}\n weight={400}\n className={clsx(styles.subHeaderText, classNames?.subHeading)}\n >\n {subHeading}\n </Text>\n )}\n\n <Flex gap=\"medium\">\n {primaryAction}\n {secondaryAction}\n </Flex>\n </Flex>\n </Flex>\n );\n }\n\n\n\n return (\n <Flex\n direction=\"column\"\n align=\"center\"\n gap=\"medium\"\n className={clsx(styles.emptyState, classNames?.container)}\n >\n <div className={clsx(styles.iconContainer, classNames?.iconContainer)}>\n <div className={clsx(styles.icon, classNames?.icon)}>{icon}</div>\n </div>\n\n <Flex direction=\"column\" gap=\"small\" align=\"center\">\n {heading && (\n <Text\n size={5}\n weight={500}\n className={clsx(styles.headerText, classNames?.heading)}\n >\n {heading}\n </Text>\n )}\n\n {subHeading && (\n <Text\n size={4}\n weight={400}\n className={clsx(styles.subHeaderText, classNames?.subHeading)}\n >\n {subHeading}\n </Text>\n )}\n </Flex>\n\n {primaryAction}\n\n {secondaryAction}\n </Flex>\n );\n};\n"],"names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;AACJ;;;;"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
type classNameKeys = "container" | "iconContainer" | "icon" | "heading" | "subHeading";
|
|
2
|
-
interface
|
|
2
|
+
interface EmptyStateProps {
|
|
3
3
|
icon: React.ReactNode;
|
|
4
4
|
heading?: React.ReactNode;
|
|
5
5
|
subHeading?: React.ReactNode;
|
|
6
6
|
primaryAction?: React.ReactNode;
|
|
7
7
|
secondaryAction?: React.ReactNode;
|
|
8
8
|
classNames?: Partial<Record<classNameKeys, string>>;
|
|
9
|
+
variant?: "empty1" | "empty2";
|
|
9
10
|
}
|
|
10
|
-
export declare const EmptyState: ({ icon, heading, subHeading, primaryAction, secondaryAction, classNames, }:
|
|
11
|
+
export declare const EmptyState: ({ icon, heading, subHeading, primaryAction, secondaryAction, classNames, variant, }: EmptyStateProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
export {};
|
|
12
13
|
//# sourceMappingURL=empty-state.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty-state.d.ts","sourceRoot":"","sources":["../../../../v1/components/empty-state/empty-state.tsx"],"names":[],"mappings":"AAMA,KAAK,aAAa,GACd,WAAW,GACX,eAAe,GACf,MAAM,GACN,SAAS,GACT,YAAY,CAAC;AAEjB,UAAU,eAAe;IACvB,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAClC,UAAU,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"empty-state.d.ts","sourceRoot":"","sources":["../../../../v1/components/empty-state/empty-state.tsx"],"names":[],"mappings":"AAMA,KAAK,aAAa,GACd,WAAW,GACX,eAAe,GACf,MAAM,GACN,SAAS,GACT,YAAY,CAAC;AAEjB,UAAU,eAAe;IACvB,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAClC,UAAU,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC,CAAC;IACpD,OAAO,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;CAC/B;AAED,eAAO,MAAM,UAAU,wFAQpB,eAAe,4CAuFjB,CAAC"}
|
|
@@ -4,7 +4,10 @@ import { Flex } from '../flex/flex.js';
|
|
|
4
4
|
import { Text } from '../text/text.js';
|
|
5
5
|
import styles from './empty-state.module.css.js';
|
|
6
6
|
|
|
7
|
-
const EmptyState = ({ icon, heading, subHeading, primaryAction, secondaryAction, classNames, }) => {
|
|
7
|
+
const EmptyState = ({ icon, heading, subHeading, primaryAction, secondaryAction, classNames, variant = "empty1", }) => {
|
|
8
|
+
if (variant === "empty2") {
|
|
9
|
+
return (jsxRuntimeExports.jsx(Flex, { align: "center", justify: "center", className: styles.emptyStatePage, children: jsxRuntimeExports.jsxs(Flex, { direction: "column", align: "start", gap: "medium", className: clsx(styles.emptyStateContent, classNames?.container), children: [jsxRuntimeExports.jsx("div", { className: clsx(styles.iconContainer, classNames?.iconContainer), children: jsxRuntimeExports.jsx("div", { className: clsx(styles.icon, styles.iconLarge, classNames?.icon), children: icon }) }), heading && (jsxRuntimeExports.jsx(Text, { size: 5, weight: 500, className: clsx(styles.headerText, classNames?.heading), children: heading })), subHeading && (jsxRuntimeExports.jsx(Text, { size: 4, weight: 400, className: clsx(styles.subHeaderText, classNames?.subHeading), children: subHeading })), jsxRuntimeExports.jsxs(Flex, { gap: "medium", children: [primaryAction, secondaryAction] })] }) }));
|
|
10
|
+
}
|
|
8
11
|
return (jsxRuntimeExports.jsxs(Flex, { direction: "column", align: "center", gap: "medium", className: clsx(styles.emptyState, classNames?.container), children: [jsxRuntimeExports.jsx("div", { className: clsx(styles.iconContainer, classNames?.iconContainer), children: jsxRuntimeExports.jsx("div", { className: clsx(styles.icon, classNames?.icon), children: icon }) }), jsxRuntimeExports.jsxs(Flex, { direction: "column", gap: "small", align: "center", children: [heading && (jsxRuntimeExports.jsx(Text, { size: 5, weight: 500, className: clsx(styles.headerText, classNames?.heading), children: heading })), subHeading && (jsxRuntimeExports.jsx(Text, { size: 4, weight: 400, className: clsx(styles.subHeaderText, classNames?.subHeading), children: subHeading }))] }), primaryAction, secondaryAction] }));
|
|
9
12
|
};
|
|
10
13
|
|