@raystack/apsara 0.39.0 → 0.41.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/calendar/calendar.module.css.cjs +1 -1
- package/dist/v1/components/calendar/calendar.module.css.js +1 -1
- package/dist/v1/components/calendar/range-picker.cjs +25 -7
- package/dist/v1/components/calendar/range-picker.cjs.map +1 -1
- package/dist/v1/components/calendar/range-picker.d.ts +2 -1
- package/dist/v1/components/calendar/range-picker.d.ts.map +1 -1
- package/dist/v1/components/calendar/range-picker.js +25 -7
- package/dist/v1/components/calendar/range-picker.js.map +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 +4 -3
- package/dist/v1/components/dialog/dialog.cjs.map +1 -1
- package/dist/v1/components/dialog/dialog.d.ts +3 -2
- package/dist/v1/components/dialog/dialog.d.ts.map +1 -1
- package/dist/v1/components/dialog/dialog.js +4 -3
- package/dist/v1/components/dialog/dialog.js.map +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 +6 -5
- package/dist/v1/components/input-field/input-field.cjs.map +1 -1
- package/dist/v1/components/input-field/input-field.d.ts +1 -4
- package/dist/v1/components/input-field/input-field.d.ts.map +1 -1
- package/dist/v1/components/input-field/input-field.js +6 -5
- package/dist/v1/components/input-field/input-field.js.map +1 -1
- package/dist/v1/components/search/search.cjs +5 -4
- package/dist/v1/components/search/search.cjs.map +1 -1
- package/dist/v1/components/search/search.d.ts +3 -6
- package/dist/v1/components/search/search.d.ts.map +1 -1
- package/dist/v1/components/search/search.js +5 -4
- package/dist/v1/components/search/search.js.map +1 -1
- package/dist/v1/components/sidebar/sidebar.cjs +12 -7
- package/dist/v1/components/sidebar/sidebar.cjs.map +1 -1
- package/dist/v1/components/sidebar/sidebar.d.ts +1 -0
- package/dist/v1/components/sidebar/sidebar.d.ts.map +1 -1
- package/dist/v1/components/sidebar/sidebar.js +13 -8
- package/dist/v1/components/sidebar/sidebar.js.map +1 -1
- package/dist/v1/components/text-area/text-area.cjs +2 -2
- package/dist/v1/components/text-area/text-area.cjs.map +1 -1
- package/dist/v1/components/text-area/text-area.d.ts.map +1 -1
- package/dist/v1/components/text-area/text-area.js +2 -2
- package/dist/v1/components/text-area/text-area.js.map +1 -1
- 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/index.cjs +2 -0
- package/dist/v1/icons/index.cjs.map +1 -1
- package/dist/v1/icons/index.d.ts +1 -0
- package/dist/v1/icons/index.d.ts.map +1 -1
- package/dist/v1/icons/index.js +1 -0
- package/dist/v1/icons/index.js.map +1 -1
- package/dist/v1/style.css +1 -1
- package/package.json +1 -1
|
@@ -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;AAKf,QAAA,MAAM,aAAa,yFAA4B,CAAC;AAEhD,MAAM,WAAW,kBACf,SAAQ,wBAAwB,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,EAC9D,YAAY,CAAC,OAAO,aAAa,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAuFD,KAAK,gBAAgB,GAAG,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,CAAC;AACrE,wBAAgB,WAAW,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,yFAA4B,CAAC;AAEhD,MAAM,WAAW,kBACf,SAAQ,wBAAwB,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,EAC9D,YAAY,CAAC,OAAO,aAAa,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAuFD,KAAK,gBAAgB,GAAG,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,CAAC;AACrE,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,2CAUpE;AAED,UAAU,gBACR,SAAQ,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC;IACpD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,iBAAS,WAAW,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,2CAWvE;AAED,UAAU,sBACR,SAAQ,cAAc,CAAC,OAAO,eAAe,CAAC,WAAW,CAAC;IAC1D,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,iBAAS,iBAAiB,CAAC,EACzB,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,sBAAsB,2CAWxB;AAED,eAAO,MAAM,MAAM;;;;kBA1FP,MAAM,SAAS;;;;kBAgBf,MAAM,SAAS;;;;kBAYf,MAAM,SAAS;;;;;;;CAwEzB,CAAC"}
|
|
@@ -13,8 +13,8 @@ DialogContent.displayName = $5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2.displayNam
|
|
|
13
13
|
const DialogHeader = ({ children, className, }) => (jsxRuntimeExports.jsx(Flex, { justify: "between", align: "center", className: clsx(styles.header, className), children: children }));
|
|
14
14
|
const DialogFooter = ({ children, className, }) => (jsxRuntimeExports.jsx(Flex, { gap: 5, justify: "end", className: clsx(styles.footer, className), children: children }));
|
|
15
15
|
const DialogBody = ({ children, className, }) => (jsxRuntimeExports.jsx(Flex, { direction: "column", gap: 3, className: clsx(styles.body, className), children: children }));
|
|
16
|
-
function CloseButton({
|
|
17
|
-
return (jsxRuntimeExports.jsx($5d3850c4d0b4e6c7$export$f39c2d165cd861fe, { className: clsx(styles.close, className), "aria-label": "Close dialog", ...props, children:
|
|
16
|
+
function CloseButton({ className, ...props }) {
|
|
17
|
+
return (jsxRuntimeExports.jsx($5d3850c4d0b4e6c7$export$f39c2d165cd861fe, { className: clsx(styles.close, className), "aria-label": "Close dialog", ...props, children: jsxRuntimeExports.jsx(Cross1Icon, {}) }));
|
|
18
18
|
}
|
|
19
19
|
function DialogTitle({ children, className, ...props }) {
|
|
20
20
|
return (jsxRuntimeExports.jsx($5d3850c4d0b4e6c7$export$f99233281efd08a0, { ...props, role: "heading", "aria-level": 1, className: clsx(styles.title, className), children: children }));
|
|
@@ -28,7 +28,8 @@ const Dialog = Object.assign($5d3850c4d0b4e6c7$export$be92b6f5f03c0fe9, {
|
|
|
28
28
|
Header: DialogHeader,
|
|
29
29
|
Footer: DialogFooter,
|
|
30
30
|
Body: DialogBody,
|
|
31
|
-
Close:
|
|
31
|
+
Close: $5d3850c4d0b4e6c7$export$f39c2d165cd861fe,
|
|
32
|
+
CloseButton: CloseButton,
|
|
32
33
|
Title: DialogTitle,
|
|
33
34
|
Description: DialogDescription,
|
|
34
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\";\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({
|
|
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,CA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AA,EAEd,QAAQ,EAAA,CACmB,EAC9B;AACJ,CAAC;AAEY,MAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAACC,yCAAoB,EAAE;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;;;;"}
|
|
@@ -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":["_jsx","Flex","styles","_jsxs","clsx","Text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,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
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty-state.js","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.js","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":["_jsx","_jsxs"],"mappings":";;;;;;MAuBa,UAAU,GAAG,CAAC,EACzB,IAAI,EACJ,OAAO,EACP,UAAU,EACV,aAAa,EACb,eAAe,EACf,UAAU,EACV,OAAO,GAAG,QAAQ,GACF,KAAI;AACpB,IAAA,IAAI,OAAO,KAAK,QAAQ,EAAE;AACxB,QAAA,QACEA,qBAAC,CAAA,IAAI,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E,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,UAAU,EAAE,SAAS,CAAC,EAEzD,QAAA,EAAA,CAAAD,qBAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,UAAU,EAAE,aAAa,CAAC,EACnE,QAAA,EAAAA,qBAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,EAAA,QAAA,EAAG,IAAI,EAAA,CAAO,GAC7D,EAENC,sBAAA,CAAC,IAAI,EAAA,EAAC,SAAS,EAAC,QAAQ,EAAC,GAAG,EAAC,OAAO,EAAC,KAAK,EAAC,QAAQ,EAAA,QAAA,EAAA,CAChD,OAAO,KACND,qBAAC,CAAA,IAAI,EACH,EAAA,IAAI,EAAE,CAAC,EACP,MAAM,EAAE,GAAG,EACX,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,CAAC,EAEtD,QAAA,EAAA,OAAO,EACH,CAAA,CACR,EAEA,UAAU,KACTA,qBAAA,CAAC,IAAI,EAAA,EACH,IAAI,EAAE,CAAC,EACP,MAAM,EAAE,GAAG,EACX,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,UAAU,EAAE,UAAU,CAAC,YAE5D,UAAU,EAAA,CACN,CACR,CAAA,EAAA,CACI,EAEN,aAAa,EAEb,eAAe,CAAA,EAAA,CACX,EACP;AACJ;;;;"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var styles = {"emptyState":"empty-state-module_emptyState__3KNNK","iconContainer":"empty-state-module_iconContainer__mVbR-","icon":"empty-state-module_icon__91WkM","headerText":"empty-state-module_headerText__OiviM","subHeaderText":"empty-state-module_subHeaderText__dn22j"};
|
|
5
|
+
var styles = {"emptyState":"empty-state-module_emptyState__3KNNK","iconContainer":"empty-state-module_iconContainer__mVbR-","icon":"empty-state-module_icon__91WkM","headerText":"empty-state-module_headerText__OiviM","subHeaderText":"empty-state-module_subHeaderText__dn22j","emptyStateContent":"empty-state-module_emptyStateContent__iC-e-","emptyStateLeft":"empty-state-module_emptyStateLeft__BJODL","iconLarge":"empty-state-module_iconLarge__fxqeP","actionContainer":"empty-state-module_actionContainer__LFHrF","emptyStatePage":"empty-state-module_emptyStatePage__czPW7"};
|
|
6
6
|
|
|
7
7
|
exports.default = styles;
|
|
8
8
|
//# sourceMappingURL=empty-state.module.css.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var styles = {"emptyState":"empty-state-module_emptyState__3KNNK","iconContainer":"empty-state-module_iconContainer__mVbR-","icon":"empty-state-module_icon__91WkM","headerText":"empty-state-module_headerText__OiviM","subHeaderText":"empty-state-module_subHeaderText__dn22j"};
|
|
1
|
+
var styles = {"emptyState":"empty-state-module_emptyState__3KNNK","iconContainer":"empty-state-module_iconContainer__mVbR-","icon":"empty-state-module_icon__91WkM","headerText":"empty-state-module_headerText__OiviM","subHeaderText":"empty-state-module_subHeaderText__dn22j","emptyStateContent":"empty-state-module_emptyStateContent__iC-e-","emptyStateLeft":"empty-state-module_emptyStateLeft__BJODL","iconLarge":"empty-state-module_iconLarge__fxqeP","actionContainer":"empty-state-module_actionContainer__LFHrF","emptyStatePage":"empty-state-module_emptyStatePage__czPW7"};
|
|
2
2
|
|
|
3
3
|
export { styles as default };
|
|
4
4
|
//# sourceMappingURL=empty-state.module.css.js.map
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
var jsxRuntime = require('../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.cjs');
|
|
4
4
|
var index = require('../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.cjs');
|
|
5
5
|
var clsx = require('../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.cjs');
|
|
6
|
+
var React = require('react');
|
|
6
7
|
var reactIcons_esm = require('../../node_modules/.pnpm/@radix-ui_react-icons@1.3.0_react@18.2.0/node_modules/@radix-ui/react-icons/dist/react-icons.esm.cjs');
|
|
7
8
|
var tooltip = require('../tooltip/tooltip.cjs');
|
|
8
9
|
var chip = require('../chip/chip.cjs');
|
|
@@ -18,16 +19,16 @@ const inputWrapper = index.cva(inputField_module.default.inputWrapper, {
|
|
|
18
19
|
variant: {
|
|
19
20
|
default: inputField_module.default["variant-default"],
|
|
20
21
|
borderless: inputField_module.default["variant-borderless"],
|
|
21
|
-
}
|
|
22
|
+
},
|
|
22
23
|
},
|
|
23
24
|
defaultVariants: {
|
|
24
25
|
size: "large",
|
|
25
26
|
variant: "default",
|
|
26
|
-
}
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
const InputField = React.forwardRef(({ className, disabled, label, helperText, placeholder, error, leadingIcon, trailingIcon, optional, prefix, suffix, width, chips, maxChipsVisible = 2, size, infoTooltip, variant = "default", ...props }, ref) => {
|
|
30
|
+
return (jsxRuntime.jsxRuntimeExports.jsxs("div", { className: inputField_module.default.container, style: { width: width || "100%" }, children: [label && (jsxRuntime.jsxRuntimeExports.jsxs("div", { className: inputField_module.default.labelContainer, children: [jsxRuntime.jsxRuntimeExports.jsxs("label", { className: clsx.clsx(inputField_module.default.label, disabled && inputField_module.default["label-disabled"]), children: [label, optional && jsxRuntime.jsxRuntimeExports.jsx("span", { className: inputField_module.default.optional, children: "(optional)" })] }), infoTooltip && (jsxRuntime.jsxRuntimeExports.jsx(tooltip.Tooltip, { message: infoTooltip, side: "right", children: jsxRuntime.jsxRuntimeExports.jsx("span", { className: inputField_module.default.helpIcon, children: jsxRuntime.jsxRuntimeExports.jsx(reactIcons_esm.InfoCircledIcon, {}) }) }))] })), jsxRuntime.jsxRuntimeExports.jsxs("div", { className: clsx.clsx(inputWrapper({ size, variant, className }), error && inputField_module.default["input-error-wrapper"], disabled && inputField_module.default["input-disabled-wrapper"], chips?.length && inputField_module.default["has-chips"]), children: [leadingIcon && (jsxRuntime.jsxRuntimeExports.jsx("div", { className: inputField_module.default["leading-icon"], children: leadingIcon })), prefix && jsxRuntime.jsxRuntimeExports.jsx("div", { className: inputField_module.default.prefix, children: prefix }), jsxRuntime.jsxRuntimeExports.jsxs("div", { className: inputField_module.default["chip-input-container"], children: [chips?.slice(0, maxChipsVisible).map((chip$1, index) => (jsxRuntime.jsxRuntimeExports.jsx(chip.Chip, { variant: "outline", isDismissible: !!chip$1.onRemove, onDismiss: chip$1.onRemove, className: inputField_module.default.chip, children: chip$1.label }, index))), chips && chips.length > maxChipsVisible && (jsxRuntime.jsxRuntimeExports.jsxs("span", { className: inputField_module.default["chip-overflow"], children: ["+", chips.length - maxChipsVisible] })), jsxRuntime.jsxRuntimeExports.jsx("input", { ref: ref, className: clsx.clsx(inputField_module.default["input-field"], leadingIcon && inputField_module.default["has-leading-icon"], trailingIcon && inputField_module.default["has-trailing-icon"], prefix && inputField_module.default["has-prefix"], suffix && inputField_module.default["has-suffix"], error && inputField_module.default["input-error"], disabled && inputField_module.default["input-disabled"], className), "aria-invalid": !!error, placeholder: placeholder, disabled: disabled, ...props })] }), suffix && jsxRuntime.jsxRuntimeExports.jsx("div", { className: inputField_module.default.suffix, children: suffix }), trailingIcon && (jsxRuntime.jsxRuntimeExports.jsx("div", { className: inputField_module.default["trailing-icon"], children: trailingIcon }))] }), (error || helperText) && (jsxRuntime.jsxRuntimeExports.jsx("span", { className: clsx.clsx(inputField_module.default["helper-text"], error && inputField_module.default["helper-text-error"], disabled && inputField_module.default["helper-text-disabled"]), children: error || helperText }))] }));
|
|
27
31
|
});
|
|
28
|
-
const InputField = ({ className, disabled, label, helperText, placeholder, error, leadingIcon, trailingIcon, optional, prefix, suffix, width, chips, maxChipsVisible = 2, ref, size, infoTooltip, variant = "default", ...props }) => {
|
|
29
|
-
return (jsxRuntime.jsxRuntimeExports.jsxs("div", { className: inputField_module.default.container, style: { width: width || '100%' }, children: [label && (jsxRuntime.jsxRuntimeExports.jsxs("div", { className: inputField_module.default.labelContainer, children: [jsxRuntime.jsxRuntimeExports.jsxs("label", { className: clsx.clsx(inputField_module.default.label, disabled && inputField_module.default["label-disabled"]), children: [label, optional && jsxRuntime.jsxRuntimeExports.jsx("span", { className: inputField_module.default.optional, children: "(optional)" })] }), infoTooltip && (jsxRuntime.jsxRuntimeExports.jsx(tooltip.Tooltip, { message: infoTooltip, side: "right", children: jsxRuntime.jsxRuntimeExports.jsx("span", { className: inputField_module.default.helpIcon, children: jsxRuntime.jsxRuntimeExports.jsx(reactIcons_esm.InfoCircledIcon, {}) }) }))] })), jsxRuntime.jsxRuntimeExports.jsxs("div", { className: clsx.clsx(inputWrapper({ size, variant, className }), error && inputField_module.default['input-error-wrapper'], disabled && inputField_module.default['input-disabled-wrapper'], chips?.length && inputField_module.default['has-chips']), children: [leadingIcon && jsxRuntime.jsxRuntimeExports.jsx("div", { className: inputField_module.default['leading-icon'], children: leadingIcon }), prefix && jsxRuntime.jsxRuntimeExports.jsx("div", { className: inputField_module.default.prefix, children: prefix }), jsxRuntime.jsxRuntimeExports.jsxs("div", { className: inputField_module.default['chip-input-container'], children: [chips?.slice(0, maxChipsVisible).map((chip$1, index) => (jsxRuntime.jsxRuntimeExports.jsx(chip.Chip, { variant: "outline", isDismissible: !!chip$1.onRemove, onDismiss: chip$1.onRemove, className: inputField_module.default.chip, children: chip$1.label }, index))), chips && chips.length > maxChipsVisible && (jsxRuntime.jsxRuntimeExports.jsxs("span", { className: inputField_module.default['chip-overflow'], children: ["+", chips.length - maxChipsVisible] })), jsxRuntime.jsxRuntimeExports.jsx("input", { ref: ref, className: clsx.clsx(inputField_module.default['input-field'], leadingIcon && inputField_module.default['has-leading-icon'], trailingIcon && inputField_module.default['has-trailing-icon'], prefix && inputField_module.default['has-prefix'], suffix && inputField_module.default['has-suffix'], error && inputField_module.default['input-error'], disabled && inputField_module.default['input-disabled'], className), "aria-invalid": !!error, placeholder: placeholder, disabled: disabled, ...props })] }), suffix && jsxRuntime.jsxRuntimeExports.jsx("div", { className: inputField_module.default.suffix, children: suffix }), trailingIcon && jsxRuntime.jsxRuntimeExports.jsx("div", { className: inputField_module.default['trailing-icon'], children: trailingIcon })] }), (error || helperText) && (jsxRuntime.jsxRuntimeExports.jsx("span", { className: clsx.clsx(inputField_module.default['helper-text'], error && inputField_module.default['helper-text-error'], disabled && inputField_module.default['helper-text-disabled']), children: error || helperText }))] }));
|
|
30
|
-
};
|
|
31
32
|
InputField.displayName = "InputField";
|
|
32
33
|
|
|
33
34
|
exports.InputField = InputField;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-field.cjs","sources":["../../../../v1/components/input-field/input-field.tsx"],"sourcesContent":["import { cva, type VariantProps } from \"class-variance-authority\";\nimport clsx from \"clsx\";\nimport { ComponentPropsWithoutRef, ReactNode } from \"react\";\nimport { InfoCircledIcon } from \"@radix-ui/react-icons\";\nimport { Tooltip } from \"../tooltip\";\n\nimport { Chip } from \"../chip\";\nimport styles from \"./input-field.module.css\";\n\n// Todo: Add a dropdown support\n\nconst inputWrapper = cva(styles.inputWrapper, {\n variants: {\n size: {\n small: styles[\"size-small\"],\n large: styles[\"size-large\"],\n },\n variant: {\n default: styles[\"variant-default\"],\n borderless: styles[\"variant-borderless\"],\n }
|
|
1
|
+
{"version":3,"file":"input-field.cjs","sources":["../../../../v1/components/input-field/input-field.tsx"],"sourcesContent":["import { cva, type VariantProps } from \"class-variance-authority\";\nimport clsx from \"clsx\";\nimport { ComponentPropsWithoutRef, ReactNode, forwardRef } from \"react\";\nimport { InfoCircledIcon } from \"@radix-ui/react-icons\";\nimport { Tooltip } from \"../tooltip\";\n\nimport { Chip } from \"../chip\";\nimport styles from \"./input-field.module.css\";\n\n// Todo: Add a dropdown support\n\nconst inputWrapper = cva(styles.inputWrapper, {\n variants: {\n size: {\n small: styles[\"size-small\"],\n large: styles[\"size-large\"],\n },\n variant: {\n default: styles[\"variant-default\"],\n borderless: styles[\"variant-borderless\"],\n },\n },\n defaultVariants: {\n size: \"large\",\n variant: \"default\",\n },\n});\n\nexport interface InputFieldProps\n extends Omit<ComponentPropsWithoutRef<\"input\">, \"error\" | \"size\">,\n VariantProps<typeof inputWrapper> {\n label?: string;\n helperText?: string;\n error?: string;\n disabled?: boolean;\n leadingIcon?: ReactNode;\n trailingIcon?: ReactNode;\n optional?: boolean;\n prefix?: string;\n suffix?: string;\n width?: string | number;\n chips?: Array<{ label: string; onRemove?: () => void }>;\n maxChipsVisible?: number;\n ref?: React.RefObject<HTMLInputElement>;\n infoTooltip?: string;\n variant?: \"default\" | \"borderless\";\n}\n\nexport const InputField = forwardRef<HTMLInputElement, InputFieldProps>(\n (\n {\n className,\n disabled,\n label,\n helperText,\n placeholder,\n error,\n leadingIcon,\n trailingIcon,\n optional,\n prefix,\n suffix,\n width,\n chips,\n maxChipsVisible = 2,\n size,\n infoTooltip,\n variant = \"default\",\n ...props\n },\n ref\n ) => {\n return (\n <div className={styles.container} style={{ width: width || \"100%\" }}>\n {label && (\n <div className={styles.labelContainer}>\n <label\n className={clsx(\n styles.label,\n disabled && styles[\"label-disabled\"]\n )}\n >\n {label}\n {optional && <span className={styles.optional}>(optional)</span>}\n </label>\n {infoTooltip && (\n <Tooltip message={infoTooltip} side=\"right\">\n <span className={styles.helpIcon}>\n <InfoCircledIcon />\n </span>\n </Tooltip>\n )}\n </div>\n )}\n <div\n className={clsx(\n inputWrapper({ size, variant, className }),\n error && styles[\"input-error-wrapper\"],\n disabled && styles[\"input-disabled-wrapper\"],\n chips?.length && styles[\"has-chips\"]\n )}\n >\n {leadingIcon && (\n <div className={styles[\"leading-icon\"]}>{leadingIcon}</div>\n )}\n {prefix && <div className={styles.prefix}>{prefix}</div>}\n\n <div className={styles[\"chip-input-container\"]}>\n {chips?.slice(0, maxChipsVisible).map((chip, index) => (\n <Chip\n key={index}\n variant=\"outline\"\n isDismissible={!!chip.onRemove}\n onDismiss={chip.onRemove}\n className={styles.chip}\n >\n {chip.label}\n </Chip>\n ))}\n {chips && chips.length > maxChipsVisible && (\n <span className={styles[\"chip-overflow\"]}>\n +{chips.length - maxChipsVisible}\n </span>\n )}\n <input\n ref={ref}\n className={clsx(\n styles[\"input-field\"],\n leadingIcon && styles[\"has-leading-icon\"],\n trailingIcon && styles[\"has-trailing-icon\"],\n prefix && styles[\"has-prefix\"],\n suffix && styles[\"has-suffix\"],\n error && styles[\"input-error\"],\n disabled && styles[\"input-disabled\"],\n className\n )}\n aria-invalid={!!error}\n placeholder={placeholder}\n disabled={disabled}\n {...props}\n />\n </div>\n\n {suffix && <div className={styles.suffix}>{suffix}</div>}\n {trailingIcon && (\n <div className={styles[\"trailing-icon\"]}>{trailingIcon}</div>\n )}\n </div>\n {(error || helperText) && (\n <span\n className={clsx(\n styles[\"helper-text\"],\n error && styles[\"helper-text-error\"],\n disabled && styles[\"helper-text-disabled\"]\n )}\n >\n {error || helperText}\n </span>\n )}\n </div>\n );\n }\n);\n\nInputField.displayName = \"InputField\";\n"],"names":["cva","styles","forwardRef","_jsxs","clsx","_jsx","Tooltip","InfoCircledIcon","chip","Chip"],"mappings":";;;;;;;;;;;AASA;AAEA,MAAM,YAAY,GAAGA,SAAG,CAACC,yBAAM,CAAC,YAAY,EAAE;AAC5C,IAAA,QAAQ,EAAE;AACR,QAAA,IAAI,EAAE;AACJ,YAAA,KAAK,EAAEA,yBAAM,CAAC,YAAY,CAAC;AAC3B,YAAA,KAAK,EAAEA,yBAAM,CAAC,YAAY,CAAC;AAC5B,SAAA;AACD,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAEA,yBAAM,CAAC,iBAAiB,CAAC;AAClC,YAAA,UAAU,EAAEA,yBAAM,CAAC,oBAAoB,CAAC;AACzC,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,IAAI,EAAE,OAAO;AACb,QAAA,OAAO,EAAE,SAAS;AACnB,KAAA;AACF,CAAA,CAAC,CAAC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ACpC,SAAS,CACV,kBACa,CAAC,CAAC,KAAK,EACrB,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,KACd,KAAK,EAAA,CACT,IACE,EAEL,MAAM,IAAII,gCAAK,CAAA,KAAA,EAAA,EAAA,SAAS,EAAEJ,yBAAM,CAAC,MAAM,EAAG,QAAA,EAAA,MAAM,GAAO,EACvD,YAAY,KACXI,gCAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAEJ,yBAAM,CAAC,eAAe,CAAC,EAAA,QAAA,EAAG,YAAY,EAAO,CAAA,CAC9D,IACG,EACL,CAAC,KAAK,IAAI,UAAU,MACnBI,2CACE,SAAS,EAAED,SAAI,CACbH,yBAAM,CAAC,aAAa,CAAC,EACrB,KAAK,IAAIA,yBAAM,CAAC,mBAAmB,CAAC,EACpC,QAAQ,IAAIA,yBAAM,CAAC,sBAAsB,CAAC,CAC3C,YAEA,KAAK,IAAI,UAAU,EACf,CAAA,CACR,CACG,EAAA,CAAA,EACN;AACJ,CAAC,EACD;AAEF,UAAU,CAAC,WAAW,GAAG,YAAY;;;;"}
|
|
@@ -24,9 +24,6 @@ export interface InputFieldProps extends Omit<ComponentPropsWithoutRef<"input">,
|
|
|
24
24
|
infoTooltip?: string;
|
|
25
25
|
variant?: "default" | "borderless";
|
|
26
26
|
}
|
|
27
|
-
export declare const InputField:
|
|
28
|
-
({ className, disabled, label, helperText, placeholder, error, leadingIcon, trailingIcon, optional, prefix, suffix, width, chips, maxChipsVisible, ref, size, infoTooltip, variant, ...props }: InputFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
-
displayName: string;
|
|
30
|
-
};
|
|
27
|
+
export declare const InputField: import("react").ForwardRefExoticComponent<Omit<InputFieldProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
31
28
|
export {};
|
|
32
29
|
//# sourceMappingURL=input-field.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-field.d.ts","sourceRoot":"","sources":["../../../../v1/components/input-field/input-field.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,wBAAwB,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"input-field.d.ts","sourceRoot":"","sources":["../../../../v1/components/input-field/input-field.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,wBAAwB,EAAE,SAAS,EAAc,MAAM,OAAO,CAAC;AASxE,QAAA,MAAM,YAAY;;;mFAehB,CAAC;AAEH,MAAM,WAAW,eACf,SAAQ,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC,EAC/D,YAAY,CAAC,OAAO,YAAY,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC,CAAC;IACxD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,GAAG,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IACxC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,SAAS,GAAG,YAAY,CAAC;CACpC;AAED,eAAO,MAAM,UAAU,2HAkHtB,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { j as jsxRuntimeExports } from '../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js';
|
|
2
2
|
import { cva } from '../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js';
|
|
3
3
|
import { clsx } from '../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js';
|
|
4
|
+
import { forwardRef } from 'react';
|
|
4
5
|
import { InfoCircledIcon } 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';
|
|
5
6
|
import { Tooltip } from '../tooltip/tooltip.js';
|
|
6
7
|
import { Chip } from '../chip/chip.js';
|
|
@@ -16,16 +17,16 @@ const inputWrapper = cva(styles.inputWrapper, {
|
|
|
16
17
|
variant: {
|
|
17
18
|
default: styles["variant-default"],
|
|
18
19
|
borderless: styles["variant-borderless"],
|
|
19
|
-
}
|
|
20
|
+
},
|
|
20
21
|
},
|
|
21
22
|
defaultVariants: {
|
|
22
23
|
size: "large",
|
|
23
24
|
variant: "default",
|
|
24
|
-
}
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
const InputField = forwardRef(({ className, disabled, label, helperText, placeholder, error, leadingIcon, trailingIcon, optional, prefix, suffix, width, chips, maxChipsVisible = 2, size, infoTooltip, variant = "default", ...props }, ref) => {
|
|
28
|
+
return (jsxRuntimeExports.jsxs("div", { className: styles.container, style: { width: width || "100%" }, children: [label && (jsxRuntimeExports.jsxs("div", { className: styles.labelContainer, children: [jsxRuntimeExports.jsxs("label", { className: clsx(styles.label, disabled && styles["label-disabled"]), children: [label, optional && jsxRuntimeExports.jsx("span", { className: styles.optional, children: "(optional)" })] }), infoTooltip && (jsxRuntimeExports.jsx(Tooltip, { message: infoTooltip, side: "right", children: jsxRuntimeExports.jsx("span", { className: styles.helpIcon, children: jsxRuntimeExports.jsx(InfoCircledIcon, {}) }) }))] })), jsxRuntimeExports.jsxs("div", { className: clsx(inputWrapper({ size, variant, className }), error && styles["input-error-wrapper"], disabled && styles["input-disabled-wrapper"], chips?.length && styles["has-chips"]), children: [leadingIcon && (jsxRuntimeExports.jsx("div", { className: styles["leading-icon"], children: leadingIcon })), prefix && jsxRuntimeExports.jsx("div", { className: styles.prefix, children: prefix }), jsxRuntimeExports.jsxs("div", { className: styles["chip-input-container"], children: [chips?.slice(0, maxChipsVisible).map((chip, index) => (jsxRuntimeExports.jsx(Chip, { variant: "outline", isDismissible: !!chip.onRemove, onDismiss: chip.onRemove, className: styles.chip, children: chip.label }, index))), chips && chips.length > maxChipsVisible && (jsxRuntimeExports.jsxs("span", { className: styles["chip-overflow"], children: ["+", chips.length - maxChipsVisible] })), jsxRuntimeExports.jsx("input", { ref: ref, className: clsx(styles["input-field"], leadingIcon && styles["has-leading-icon"], trailingIcon && styles["has-trailing-icon"], prefix && styles["has-prefix"], suffix && styles["has-suffix"], error && styles["input-error"], disabled && styles["input-disabled"], className), "aria-invalid": !!error, placeholder: placeholder, disabled: disabled, ...props })] }), suffix && jsxRuntimeExports.jsx("div", { className: styles.suffix, children: suffix }), trailingIcon && (jsxRuntimeExports.jsx("div", { className: styles["trailing-icon"], children: trailingIcon }))] }), (error || helperText) && (jsxRuntimeExports.jsx("span", { className: clsx(styles["helper-text"], error && styles["helper-text-error"], disabled && styles["helper-text-disabled"]), children: error || helperText }))] }));
|
|
25
29
|
});
|
|
26
|
-
const InputField = ({ className, disabled, label, helperText, placeholder, error, leadingIcon, trailingIcon, optional, prefix, suffix, width, chips, maxChipsVisible = 2, ref, size, infoTooltip, variant = "default", ...props }) => {
|
|
27
|
-
return (jsxRuntimeExports.jsxs("div", { className: styles.container, style: { width: width || '100%' }, children: [label && (jsxRuntimeExports.jsxs("div", { className: styles.labelContainer, children: [jsxRuntimeExports.jsxs("label", { className: clsx(styles.label, disabled && styles["label-disabled"]), children: [label, optional && jsxRuntimeExports.jsx("span", { className: styles.optional, children: "(optional)" })] }), infoTooltip && (jsxRuntimeExports.jsx(Tooltip, { message: infoTooltip, side: "right", children: jsxRuntimeExports.jsx("span", { className: styles.helpIcon, children: jsxRuntimeExports.jsx(InfoCircledIcon, {}) }) }))] })), jsxRuntimeExports.jsxs("div", { className: clsx(inputWrapper({ size, variant, className }), error && styles['input-error-wrapper'], disabled && styles['input-disabled-wrapper'], chips?.length && styles['has-chips']), children: [leadingIcon && jsxRuntimeExports.jsx("div", { className: styles['leading-icon'], children: leadingIcon }), prefix && jsxRuntimeExports.jsx("div", { className: styles.prefix, children: prefix }), jsxRuntimeExports.jsxs("div", { className: styles['chip-input-container'], children: [chips?.slice(0, maxChipsVisible).map((chip, index) => (jsxRuntimeExports.jsx(Chip, { variant: "outline", isDismissible: !!chip.onRemove, onDismiss: chip.onRemove, className: styles.chip, children: chip.label }, index))), chips && chips.length > maxChipsVisible && (jsxRuntimeExports.jsxs("span", { className: styles['chip-overflow'], children: ["+", chips.length - maxChipsVisible] })), jsxRuntimeExports.jsx("input", { ref: ref, className: clsx(styles['input-field'], leadingIcon && styles['has-leading-icon'], trailingIcon && styles['has-trailing-icon'], prefix && styles['has-prefix'], suffix && styles['has-suffix'], error && styles['input-error'], disabled && styles['input-disabled'], className), "aria-invalid": !!error, placeholder: placeholder, disabled: disabled, ...props })] }), suffix && jsxRuntimeExports.jsx("div", { className: styles.suffix, children: suffix }), trailingIcon && jsxRuntimeExports.jsx("div", { className: styles['trailing-icon'], children: trailingIcon })] }), (error || helperText) && (jsxRuntimeExports.jsx("span", { className: clsx(styles['helper-text'], error && styles['helper-text-error'], disabled && styles['helper-text-disabled']), children: error || helperText }))] }));
|
|
28
|
-
};
|
|
29
30
|
InputField.displayName = "InputField";
|
|
30
31
|
|
|
31
32
|
export { InputField };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-field.js","sources":["../../../../v1/components/input-field/input-field.tsx"],"sourcesContent":["import { cva, type VariantProps } from \"class-variance-authority\";\nimport clsx from \"clsx\";\nimport { ComponentPropsWithoutRef, ReactNode } from \"react\";\nimport { InfoCircledIcon } from \"@radix-ui/react-icons\";\nimport { Tooltip } from \"../tooltip\";\n\nimport { Chip } from \"../chip\";\nimport styles from \"./input-field.module.css\";\n\n// Todo: Add a dropdown support\n\nconst inputWrapper = cva(styles.inputWrapper, {\n variants: {\n size: {\n small: styles[\"size-small\"],\n large: styles[\"size-large\"],\n },\n variant: {\n default: styles[\"variant-default\"],\n borderless: styles[\"variant-borderless\"],\n }
|
|
1
|
+
{"version":3,"file":"input-field.js","sources":["../../../../v1/components/input-field/input-field.tsx"],"sourcesContent":["import { cva, type VariantProps } from \"class-variance-authority\";\nimport clsx from \"clsx\";\nimport { ComponentPropsWithoutRef, ReactNode, forwardRef } from \"react\";\nimport { InfoCircledIcon } from \"@radix-ui/react-icons\";\nimport { Tooltip } from \"../tooltip\";\n\nimport { Chip } from \"../chip\";\nimport styles from \"./input-field.module.css\";\n\n// Todo: Add a dropdown support\n\nconst inputWrapper = cva(styles.inputWrapper, {\n variants: {\n size: {\n small: styles[\"size-small\"],\n large: styles[\"size-large\"],\n },\n variant: {\n default: styles[\"variant-default\"],\n borderless: styles[\"variant-borderless\"],\n },\n },\n defaultVariants: {\n size: \"large\",\n variant: \"default\",\n },\n});\n\nexport interface InputFieldProps\n extends Omit<ComponentPropsWithoutRef<\"input\">, \"error\" | \"size\">,\n VariantProps<typeof inputWrapper> {\n label?: string;\n helperText?: string;\n error?: string;\n disabled?: boolean;\n leadingIcon?: ReactNode;\n trailingIcon?: ReactNode;\n optional?: boolean;\n prefix?: string;\n suffix?: string;\n width?: string | number;\n chips?: Array<{ label: string; onRemove?: () => void }>;\n maxChipsVisible?: number;\n ref?: React.RefObject<HTMLInputElement>;\n infoTooltip?: string;\n variant?: \"default\" | \"borderless\";\n}\n\nexport const InputField = forwardRef<HTMLInputElement, InputFieldProps>(\n (\n {\n className,\n disabled,\n label,\n helperText,\n placeholder,\n error,\n leadingIcon,\n trailingIcon,\n optional,\n prefix,\n suffix,\n width,\n chips,\n maxChipsVisible = 2,\n size,\n infoTooltip,\n variant = \"default\",\n ...props\n },\n ref\n ) => {\n return (\n <div className={styles.container} style={{ width: width || \"100%\" }}>\n {label && (\n <div className={styles.labelContainer}>\n <label\n className={clsx(\n styles.label,\n disabled && styles[\"label-disabled\"]\n )}\n >\n {label}\n {optional && <span className={styles.optional}>(optional)</span>}\n </label>\n {infoTooltip && (\n <Tooltip message={infoTooltip} side=\"right\">\n <span className={styles.helpIcon}>\n <InfoCircledIcon />\n </span>\n </Tooltip>\n )}\n </div>\n )}\n <div\n className={clsx(\n inputWrapper({ size, variant, className }),\n error && styles[\"input-error-wrapper\"],\n disabled && styles[\"input-disabled-wrapper\"],\n chips?.length && styles[\"has-chips\"]\n )}\n >\n {leadingIcon && (\n <div className={styles[\"leading-icon\"]}>{leadingIcon}</div>\n )}\n {prefix && <div className={styles.prefix}>{prefix}</div>}\n\n <div className={styles[\"chip-input-container\"]}>\n {chips?.slice(0, maxChipsVisible).map((chip, index) => (\n <Chip\n key={index}\n variant=\"outline\"\n isDismissible={!!chip.onRemove}\n onDismiss={chip.onRemove}\n className={styles.chip}\n >\n {chip.label}\n </Chip>\n ))}\n {chips && chips.length > maxChipsVisible && (\n <span className={styles[\"chip-overflow\"]}>\n +{chips.length - maxChipsVisible}\n </span>\n )}\n <input\n ref={ref}\n className={clsx(\n styles[\"input-field\"],\n leadingIcon && styles[\"has-leading-icon\"],\n trailingIcon && styles[\"has-trailing-icon\"],\n prefix && styles[\"has-prefix\"],\n suffix && styles[\"has-suffix\"],\n error && styles[\"input-error\"],\n disabled && styles[\"input-disabled\"],\n className\n )}\n aria-invalid={!!error}\n placeholder={placeholder}\n disabled={disabled}\n {...props}\n />\n </div>\n\n {suffix && <div className={styles.suffix}>{suffix}</div>}\n {trailingIcon && (\n <div className={styles[\"trailing-icon\"]}>{trailingIcon}</div>\n )}\n </div>\n {(error || helperText) && (\n <span\n className={clsx(\n styles[\"helper-text\"],\n error && styles[\"helper-text-error\"],\n disabled && styles[\"helper-text-disabled\"]\n )}\n >\n {error || helperText}\n </span>\n )}\n </div>\n );\n }\n);\n\nInputField.displayName = \"InputField\";\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;AASA;AAEA,MAAM,YAAY,GAAG,GAAG,CAAC,MAAM,CAAC,YAAY,EAAE;AAC5C,IAAA,QAAQ,EAAE;AACR,QAAA,IAAI,EAAE;AACJ,YAAA,KAAK,EAAE,MAAM,CAAC,YAAY,CAAC;AAC3B,YAAA,KAAK,EAAE,MAAM,CAAC,YAAY,CAAC;AAC5B,SAAA;AACD,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAE,MAAM,CAAC,iBAAiB,CAAC;AAClC,YAAA,UAAU,EAAE,MAAM,CAAC,oBAAoB,CAAC;AACzC,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,IAAI,EAAE,OAAO;AACb,QAAA,OAAO,EAAE,SAAS;AACnB,KAAA;AACF,CAAA,CAAC,CAAC;AAsBU,MAAA,UAAU,GAAG,UAAU,CAClC,CACE,EACE,SAAS,EACT,QAAQ,EACR,KAAK,EACL,UAAU,EACV,WAAW,EACX,KAAK,EACL,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,MAAM,EACN,KAAK,EACL,KAAK,EACL,eAAe,GAAG,CAAC,EACnB,IAAI,EACJ,WAAW,EACX,OAAO,GAAG,SAAS,EACnB,GAAG,KAAK,EACT,EACD,GAAG,KACD;IACF,QACEA,gCAAK,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,IAAI,MAAM,EAAE,EAChE,QAAA,EAAA,CAAA,KAAK,KACJA,sBAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,MAAM,CAAC,cAAc,EAAA,QAAA,EAAA,CACnCA,kCACE,SAAS,EAAE,IAA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J,CAAC,EACD;AAEF,UAAU,CAAC,WAAW,GAAG,YAAY;;;;"}
|
|
@@ -5,16 +5,17 @@ var reactIcons_esm = require('../../node_modules/.pnpm/@radix-ui_react-icons@1.3
|
|
|
5
5
|
var inputField = require('../input-field/input-field.cjs');
|
|
6
6
|
var iconButton = require('../icon-button/icon-button.cjs');
|
|
7
7
|
var search_module = require('./search.module.css.cjs');
|
|
8
|
+
var React = require('react');
|
|
8
9
|
|
|
9
|
-
const Search = ({ className, disabled, placeholder = "Search", size, showClearButton, onClear, value, onChange, width = "100%", variant = "default", ...props }) => {
|
|
10
|
-
const trailingIconWithClear = showClearButton && value ? (jsxRuntime.jsxRuntimeExports.jsx("div", { className: search_module.default.clearButtonWrapper, children: jsxRuntime.jsxRuntimeExports.jsx(iconButton.IconButton, { size: size ===
|
|
10
|
+
const Search = React.forwardRef(({ className, disabled, placeholder = "Search", size, showClearButton, onClear, value, onChange, width = "100%", variant = "default", ...props }, ref) => {
|
|
11
|
+
const trailingIconWithClear = showClearButton && value ? (jsxRuntime.jsxRuntimeExports.jsx("div", { className: search_module.default.clearButtonWrapper, children: jsxRuntime.jsxRuntimeExports.jsx(iconButton.IconButton, { size: size === "small" ? 2 : 3, onClick: (e) => {
|
|
11
12
|
e.stopPropagation();
|
|
12
13
|
if (!disabled && onClear) {
|
|
13
14
|
onClear();
|
|
14
15
|
}
|
|
15
16
|
}, disabled: disabled, "aria-label": "Clear search", className: search_module.default.clearButton, children: jsxRuntime.jsxRuntimeExports.jsx(reactIcons_esm.CrossCircledIcon, {}) }) })) : undefined;
|
|
16
|
-
return (jsxRuntime.jsxRuntimeExports.jsx("div", { className: search_module.default.container, role: "search", style: { width }, children: jsxRuntime.jsxRuntimeExports.jsx(inputField.InputField, { leadingIcon: jsxRuntime.jsxRuntimeExports.jsx(reactIcons_esm.MagnifyingGlassIcon, {}), trailingIcon: trailingIconWithClear, placeholder: placeholder, disabled: disabled, value: value, onChange: onChange, size: size, className: className, "aria-label": placeholder, variant: variant, ...props }) }));
|
|
17
|
-
};
|
|
17
|
+
return (jsxRuntime.jsxRuntimeExports.jsx("div", { className: search_module.default.container, role: "search", style: { width }, children: jsxRuntime.jsxRuntimeExports.jsx(inputField.InputField, { leadingIcon: jsxRuntime.jsxRuntimeExports.jsx(reactIcons_esm.MagnifyingGlassIcon, {}), trailingIcon: trailingIconWithClear, placeholder: placeholder, disabled: disabled, value: value, onChange: onChange, size: size, className: className, "aria-label": placeholder, variant: variant, ref: ref, ...props }) }));
|
|
18
|
+
});
|
|
18
19
|
Search.displayName = "Search";
|
|
19
20
|
|
|
20
21
|
exports.Search = Search;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.cjs","sources":["../../../../v1/components/search/search.tsx"],"sourcesContent":["import { CrossCircledIcon, MagnifyingGlassIcon } from \"@radix-ui/react-icons\";\nimport { InputField } from \"../input-field\";\nimport { InputFieldProps } from \"../input-field/input-field\";\nimport { IconButton } from \"../icon-button\";\n\nimport styles from \"./search.module.css\";\n\nexport interface SearchProps extends Omit<InputFieldProps,
|
|
1
|
+
{"version":3,"file":"search.cjs","sources":["../../../../v1/components/search/search.tsx"],"sourcesContent":["import { CrossCircledIcon, MagnifyingGlassIcon } from \"@radix-ui/react-icons\";\nimport { InputField } from \"../input-field\";\nimport { InputFieldProps } from \"../input-field/input-field\";\nimport { IconButton } from \"../icon-button\";\n\nimport styles from \"./search.module.css\";\nimport { forwardRef } from \"react\";\n\nexport interface SearchProps extends Omit<InputFieldProps, \"leadingIcon\"> {\n showClearButton?: boolean;\n onClear?: () => void;\n variant?: \"default\" | \"borderless\";\n}\n\nexport const Search = forwardRef<HTMLInputElement, SearchProps>(\n (\n {\n className,\n disabled,\n placeholder = \"Search\",\n size,\n showClearButton,\n onClear,\n value,\n onChange,\n width = \"100%\",\n variant = \"default\",\n ...props\n }: SearchProps,\n ref\n ) => {\n const trailingIconWithClear =\n showClearButton && value ? (\n <div className={styles.clearButtonWrapper}>\n <IconButton\n size={size === \"small\" ? 2 : 3}\n onClick={(e) => {\n e.stopPropagation();\n if (!disabled && onClear) {\n onClear();\n }\n }}\n disabled={disabled}\n aria-label=\"Clear search\"\n className={styles.clearButton}\n >\n <CrossCircledIcon />\n </IconButton>\n </div>\n ) : undefined;\n\n return (\n <div className={styles.container} role=\"search\" style={{ width }}>\n <InputField\n leadingIcon={<MagnifyingGlassIcon />}\n trailingIcon={trailingIconWithClear}\n placeholder={placeholder}\n disabled={disabled}\n value={value}\n onChange={onChange}\n size={size}\n className={className}\n aria-label={placeholder}\n variant={variant}\n ref={ref}\n {...props}\n />\n </div>\n );\n }\n);\n\nSearch.displayName = \"Search\";\n"],"names":["forwardRef","_jsx","styles","IconButton","CrossCircledIcon","InputField","MagnifyingGlassIcon"],"mappings":";;;;;;;;;AAca,MAAA,MAAM,GAAGA,gBAAU,CAC9B,CACE,EACE,SAAS,EACT,QAAQ,EACR,WAAW,GAAG,QAAQ,EACtB,IAAI,EACJ,eAAe,EACf,OAAO,EACP,KAAK,EACL,QAAQ,EACR,KAAK,GAAG,MAAM,EACd,OAAO,GAAG,SAAS,EACnB,GAAG,KAAK,EACI,EACd,GAAG,KACD;AACF,IAAA,MAAM,qBAAqB,GACzB,eAAe,IAAI,KAAK,IACtBC,gCAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAEC,qBAAM,CAAC,kBAAkB,EAAA,QAAA,EACvCD,iCAACE,qBAAU,EAAA,EACT,IAAI,EAAE,IAAI,KAAK,OAAO,GAAG,CAAC,GAAG,CAAC,EAC9B,OAAO,EAAE,CAAC,CAAC,KAAI;gBACb,CAAC,CAAC,eAAe,EAAE,CAAC;AACpB,gBAAA,IAAI,CAAC,QAAQ,IAAI,OAAO,EAAE;AACxB,oBAAA,OAAO,EAAE,CAAC;iBACX;aACF,EACD,QAAQ,EAAE,QAAQ,gBACP,cAAc,EACzB,SAAS,EAAED,qBAAM,CAAC,WAAW,EAE7B,QAAA,EAAAD,gCAAA,CAACG,+BAAgB,EAAA,EAAA,CAAG,EACT,CAAA,EAAA,CACT,IACJ,SAAS,CAAC;AAEhB,IAAA,QACEH,gCAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAEC,qBAAM,CAAC,SAAS,EAAE,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAE,EAAE,KAAK,EAAE,EAAA,QAAA,EAC9DD,gCAAC,CAAAI,qBAAU,EACT,EAAA,WAAW,EAAEJ,gCAAC,CAAAK,kCAAmB,EAAG,EAAA,CAAA,EACpC,YAAY,EAAE,qBAAqB,EACnC,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,SAAS,EACR,YAAA,EAAA,WAAW,EACvB,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,GAAG,EACJ,GAAA,KAAK,EACT,CAAA,EAAA,CACE,EACN;AACJ,CAAC,EACD;AAEF,MAAM,CAAC,WAAW,GAAG,QAAQ;;;;"}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { InputFieldProps } from "../input-field/input-field";
|
|
2
|
-
export interface SearchProps extends Omit<InputFieldProps,
|
|
2
|
+
export interface SearchProps extends Omit<InputFieldProps, "leadingIcon"> {
|
|
3
3
|
showClearButton?: boolean;
|
|
4
4
|
onClear?: () => void;
|
|
5
|
-
variant?:
|
|
5
|
+
variant?: "default" | "borderless";
|
|
6
6
|
}
|
|
7
|
-
export declare const Search:
|
|
8
|
-
({ className, disabled, placeholder, size, showClearButton, onClear, value, onChange, width, variant, ...props }: SearchProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
displayName: string;
|
|
10
|
-
};
|
|
7
|
+
export declare const Search: import("react").ForwardRefExoticComponent<Omit<SearchProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
11
8
|
//# sourceMappingURL=search.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../../v1/components/search/search.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../../v1/components/search/search.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAM7D,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,eAAe,EAAE,aAAa,CAAC;IACvE,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,SAAS,GAAG,YAAY,CAAC;CACpC;AAED,eAAO,MAAM,MAAM,uHAwDlB,CAAC"}
|
|
@@ -3,16 +3,17 @@ import { CrossCircledIcon, MagnifyingGlassIcon } from '../../node_modules/.pnpm/
|
|
|
3
3
|
import { InputField } from '../input-field/input-field.js';
|
|
4
4
|
import { IconButton } from '../icon-button/icon-button.js';
|
|
5
5
|
import styles from './search.module.css.js';
|
|
6
|
+
import { forwardRef } from 'react';
|
|
6
7
|
|
|
7
|
-
const Search = ({ className, disabled, placeholder = "Search", size, showClearButton, onClear, value, onChange, width = "100%", variant = "default", ...props }) => {
|
|
8
|
-
const trailingIconWithClear = showClearButton && value ? (jsxRuntimeExports.jsx("div", { className: styles.clearButtonWrapper, children: jsxRuntimeExports.jsx(IconButton, { size: size ===
|
|
8
|
+
const Search = forwardRef(({ className, disabled, placeholder = "Search", size, showClearButton, onClear, value, onChange, width = "100%", variant = "default", ...props }, ref) => {
|
|
9
|
+
const trailingIconWithClear = showClearButton && value ? (jsxRuntimeExports.jsx("div", { className: styles.clearButtonWrapper, children: jsxRuntimeExports.jsx(IconButton, { size: size === "small" ? 2 : 3, onClick: (e) => {
|
|
9
10
|
e.stopPropagation();
|
|
10
11
|
if (!disabled && onClear) {
|
|
11
12
|
onClear();
|
|
12
13
|
}
|
|
13
14
|
}, disabled: disabled, "aria-label": "Clear search", className: styles.clearButton, children: jsxRuntimeExports.jsx(CrossCircledIcon, {}) }) })) : undefined;
|
|
14
|
-
return (jsxRuntimeExports.jsx("div", { className: styles.container, role: "search", style: { width }, children: jsxRuntimeExports.jsx(InputField, { leadingIcon: jsxRuntimeExports.jsx(MagnifyingGlassIcon, {}), trailingIcon: trailingIconWithClear, placeholder: placeholder, disabled: disabled, value: value, onChange: onChange, size: size, className: className, "aria-label": placeholder, variant: variant, ...props }) }));
|
|
15
|
-
};
|
|
15
|
+
return (jsxRuntimeExports.jsx("div", { className: styles.container, role: "search", style: { width }, children: jsxRuntimeExports.jsx(InputField, { leadingIcon: jsxRuntimeExports.jsx(MagnifyingGlassIcon, {}), trailingIcon: trailingIconWithClear, placeholder: placeholder, disabled: disabled, value: value, onChange: onChange, size: size, className: className, "aria-label": placeholder, variant: variant, ref: ref, ...props }) }));
|
|
16
|
+
});
|
|
16
17
|
Search.displayName = "Search";
|
|
17
18
|
|
|
18
19
|
export { Search };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.js","sources":["../../../../v1/components/search/search.tsx"],"sourcesContent":["import { CrossCircledIcon, MagnifyingGlassIcon } from \"@radix-ui/react-icons\";\nimport { InputField } from \"../input-field\";\nimport { InputFieldProps } from \"../input-field/input-field\";\nimport { IconButton } from \"../icon-button\";\n\nimport styles from \"./search.module.css\";\n\nexport interface SearchProps extends Omit<InputFieldProps,
|
|
1
|
+
{"version":3,"file":"search.js","sources":["../../../../v1/components/search/search.tsx"],"sourcesContent":["import { CrossCircledIcon, MagnifyingGlassIcon } from \"@radix-ui/react-icons\";\nimport { InputField } from \"../input-field\";\nimport { InputFieldProps } from \"../input-field/input-field\";\nimport { IconButton } from \"../icon-button\";\n\nimport styles from \"./search.module.css\";\nimport { forwardRef } from \"react\";\n\nexport interface SearchProps extends Omit<InputFieldProps, \"leadingIcon\"> {\n showClearButton?: boolean;\n onClear?: () => void;\n variant?: \"default\" | \"borderless\";\n}\n\nexport const Search = forwardRef<HTMLInputElement, SearchProps>(\n (\n {\n className,\n disabled,\n placeholder = \"Search\",\n size,\n showClearButton,\n onClear,\n value,\n onChange,\n width = \"100%\",\n variant = \"default\",\n ...props\n }: SearchProps,\n ref\n ) => {\n const trailingIconWithClear =\n showClearButton && value ? (\n <div className={styles.clearButtonWrapper}>\n <IconButton\n size={size === \"small\" ? 2 : 3}\n onClick={(e) => {\n e.stopPropagation();\n if (!disabled && onClear) {\n onClear();\n }\n }}\n disabled={disabled}\n aria-label=\"Clear search\"\n className={styles.clearButton}\n >\n <CrossCircledIcon />\n </IconButton>\n </div>\n ) : undefined;\n\n return (\n <div className={styles.container} role=\"search\" style={{ width }}>\n <InputField\n leadingIcon={<MagnifyingGlassIcon />}\n trailingIcon={trailingIconWithClear}\n placeholder={placeholder}\n disabled={disabled}\n value={value}\n onChange={onChange}\n size={size}\n className={className}\n aria-label={placeholder}\n variant={variant}\n ref={ref}\n {...props}\n />\n </div>\n );\n }\n);\n\nSearch.displayName = \"Search\";\n"],"names":["_jsx"],"mappings":";;;;;;;AAca,MAAA,MAAM,GAAG,UAAU,CAC9B,CACE,EACE,SAAS,EACT,QAAQ,EACR,WAAW,GAAG,QAAQ,EACtB,IAAI,EACJ,eAAe,EACf,OAAO,EACP,KAAK,EACL,QAAQ,EACR,KAAK,GAAG,MAAM,EACd,OAAO,GAAG,SAAS,EACnB,GAAG,KAAK,EACI,EACd,GAAG,KACD;AACF,IAAA,MAAM,qBAAqB,GACzB,eAAe,IAAI,KAAK,IACtBA,qBAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,MAAM,CAAC,kBAAkB,EAAA,QAAA,EACvCA,sBAAC,UAAU,EAAA,EACT,IAAI,EAAE,IAAI,KAAK,OAAO,GAAG,CAAC,GAAG,CAAC,EAC9B,OAAO,EAAE,CAAC,CAAC,KAAI;gBACb,CAAC,CAAC,eAAe,EAAE,CAAC;AACpB,gBAAA,IAAI,CA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