@salt-ds/core 1.18.1 → 1.20.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/css/salt-core.css +351 -10
- package/dist-cjs/avatar/Avatar.css.js +1 -1
- package/dist-cjs/badge/Badge.css.js +1 -1
- package/dist-cjs/banner/Banner.css.js +1 -1
- package/dist-cjs/button/Button.css.js +1 -1
- package/dist-cjs/card/Card.css.js +1 -1
- package/dist-cjs/card/InteractableCard.css.js +1 -1
- package/dist-cjs/checkbox/CheckboxIcon.css.js +1 -1
- package/dist-cjs/dialog/Dialog.css.js +6 -0
- package/dist-cjs/dialog/Dialog.css.js.map +1 -0
- package/dist-cjs/dialog/Dialog.js +120 -0
- package/dist-cjs/dialog/Dialog.js.map +1 -0
- package/dist-cjs/dialog/DialogActions.css.js +6 -0
- package/dist-cjs/dialog/DialogActions.css.js.map +1 -0
- package/dist-cjs/dialog/DialogActions.js +37 -0
- package/dist-cjs/dialog/DialogActions.js.map +1 -0
- package/dist-cjs/dialog/DialogCloseButton.css.js +6 -0
- package/dist-cjs/dialog/DialogCloseButton.css.js.map +1 -0
- package/dist-cjs/dialog/DialogCloseButton.js +44 -0
- package/dist-cjs/dialog/DialogCloseButton.js.map +1 -0
- package/dist-cjs/dialog/DialogContent.css.js +6 -0
- package/dist-cjs/dialog/DialogContent.css.js.map +1 -0
- package/dist-cjs/dialog/DialogContent.js +49 -0
- package/dist-cjs/dialog/DialogContent.js.map +1 -0
- package/dist-cjs/dialog/DialogContext.js +17 -0
- package/dist-cjs/dialog/DialogContext.js.map +1 -0
- package/dist-cjs/dialog/DialogHeader.css.js +6 -0
- package/dist-cjs/dialog/DialogHeader.css.js.map +1 -0
- package/dist-cjs/dialog/DialogHeader.js +79 -0
- package/dist-cjs/dialog/DialogHeader.js.map +1 -0
- package/dist-cjs/drawer/Drawer.css.js +6 -0
- package/dist-cjs/drawer/Drawer.css.js.map +1 -0
- package/dist-cjs/drawer/Drawer.js +110 -0
- package/dist-cjs/drawer/Drawer.js.map +1 -0
- package/dist-cjs/drawer/DrawerCloseButton.css.js +6 -0
- package/dist-cjs/drawer/DrawerCloseButton.css.js.map +1 -0
- package/dist-cjs/drawer/DrawerCloseButton.js +49 -0
- package/dist-cjs/drawer/DrawerCloseButton.js.map +1 -0
- package/dist-cjs/file-drop-zone/FileDropZone.css.js +1 -1
- package/dist-cjs/index.js +23 -0
- package/dist-cjs/index.js.map +1 -1
- package/dist-cjs/link/Link.css.js +1 -1
- package/dist-cjs/link-card/LinkCard.css.js +6 -0
- package/dist-cjs/link-card/LinkCard.css.js.map +1 -0
- package/dist-cjs/link-card/LinkCard.js +54 -0
- package/dist-cjs/link-card/LinkCard.js.map +1 -0
- package/dist-cjs/multiline-input/MultilineInput.css.js +1 -1
- package/dist-cjs/navigation-item/NavigationItem.css.js +1 -1
- package/dist-cjs/panel/Panel.css.js +1 -1
- package/dist-cjs/pill/Pill.css.js +1 -1
- package/dist-cjs/salt-provider/SaltProvider.js +80 -14
- package/dist-cjs/salt-provider/SaltProvider.js.map +1 -1
- package/dist-cjs/switch/Switch.css.js +1 -1
- package/dist-cjs/theme/Corner.js +8 -0
- package/dist-cjs/theme/Corner.js.map +1 -0
- package/dist-cjs/toast/Toast.css.js +1 -1
- package/dist-cjs/toggle-button/ToggleButton.css.js +1 -1
- package/dist-cjs/toggle-button-group/ToggleButtonGroup.css.js +1 -1
- package/dist-cjs/tooltip/Tooltip.css.js +1 -1
- package/dist-cjs/tooltip/useTooltip.js +5 -2
- package/dist-cjs/tooltip/useTooltip.js.map +1 -1
- package/dist-cjs/utils/useFloatingUI/useFloatingUI.js +4 -2
- package/dist-cjs/utils/useFloatingUI/useFloatingUI.js.map +1 -1
- package/dist-es/avatar/Avatar.css.js +1 -1
- package/dist-es/badge/Badge.css.js +1 -1
- package/dist-es/banner/Banner.css.js +1 -1
- package/dist-es/button/Button.css.js +1 -1
- package/dist-es/card/Card.css.js +1 -1
- package/dist-es/card/InteractableCard.css.js +1 -1
- package/dist-es/checkbox/CheckboxIcon.css.js +1 -1
- package/dist-es/dialog/Dialog.css.js +4 -0
- package/dist-es/dialog/Dialog.css.js.map +1 -0
- package/dist-es/dialog/Dialog.js +115 -0
- package/dist-es/dialog/Dialog.js.map +1 -0
- package/dist-es/dialog/DialogActions.css.js +4 -0
- package/dist-es/dialog/DialogActions.css.js.map +1 -0
- package/dist-es/dialog/DialogActions.js +33 -0
- package/dist-es/dialog/DialogActions.js.map +1 -0
- package/dist-es/dialog/DialogCloseButton.css.js +4 -0
- package/dist-es/dialog/DialogCloseButton.css.js.map +1 -0
- package/dist-es/dialog/DialogCloseButton.js +36 -0
- package/dist-es/dialog/DialogCloseButton.js.map +1 -0
- package/dist-es/dialog/DialogContent.css.js +4 -0
- package/dist-es/dialog/DialogContent.css.js.map +1 -0
- package/dist-es/dialog/DialogContent.js +45 -0
- package/dist-es/dialog/DialogContent.js.map +1 -0
- package/dist-es/dialog/DialogContext.js +12 -0
- package/dist-es/dialog/DialogContext.js.map +1 -0
- package/dist-es/dialog/DialogHeader.css.js +4 -0
- package/dist-es/dialog/DialogHeader.css.js.map +1 -0
- package/dist-es/dialog/DialogHeader.js +71 -0
- package/dist-es/dialog/DialogHeader.js.map +1 -0
- package/dist-es/drawer/Drawer.css.js +4 -0
- package/dist-es/drawer/Drawer.css.js.map +1 -0
- package/dist-es/drawer/Drawer.js +106 -0
- package/dist-es/drawer/Drawer.js.map +1 -0
- package/dist-es/drawer/DrawerCloseButton.css.js +4 -0
- package/dist-es/drawer/DrawerCloseButton.css.js.map +1 -0
- package/dist-es/drawer/DrawerCloseButton.js +41 -0
- package/dist-es/drawer/DrawerCloseButton.js.map +1 -0
- package/dist-es/file-drop-zone/FileDropZone.css.js +1 -1
- package/dist-es/index.js +11 -1
- package/dist-es/index.js.map +1 -1
- package/dist-es/link/Link.css.js +1 -1
- package/dist-es/link-card/LinkCard.css.js +4 -0
- package/dist-es/link-card/LinkCard.css.js.map +1 -0
- package/dist-es/link-card/LinkCard.js +50 -0
- package/dist-es/link-card/LinkCard.js.map +1 -0
- package/dist-es/multiline-input/MultilineInput.css.js +1 -1
- package/dist-es/navigation-item/NavigationItem.css.js +1 -1
- package/dist-es/panel/Panel.css.js +1 -1
- package/dist-es/pill/Pill.css.js +1 -1
- package/dist-es/salt-provider/SaltProvider.js +80 -15
- package/dist-es/salt-provider/SaltProvider.js.map +1 -1
- package/dist-es/switch/Switch.css.js +1 -1
- package/dist-es/theme/Corner.js +4 -0
- package/dist-es/theme/Corner.js.map +1 -0
- package/dist-es/toast/Toast.css.js +1 -1
- package/dist-es/toggle-button/ToggleButton.css.js +1 -1
- package/dist-es/toggle-button-group/ToggleButtonGroup.css.js +1 -1
- package/dist-es/tooltip/Tooltip.css.js +1 -1
- package/dist-es/tooltip/useTooltip.js +6 -3
- package/dist-es/tooltip/useTooltip.js.map +1 -1
- package/dist-es/utils/useFloatingUI/useFloatingUI.js +5 -3
- package/dist-es/utils/useFloatingUI/useFloatingUI.js.map +1 -1
- package/dist-types/dialog/Dialog.d.ts +46 -0
- package/dist-types/dialog/DialogActions.d.ts +8 -0
- package/dist-types/dialog/DialogCloseButton.d.ts +2 -0
- package/dist-types/dialog/DialogContent.d.ts +8 -0
- package/dist-types/dialog/DialogContext.d.ts +8 -0
- package/dist-types/dialog/DialogHeader.d.ts +22 -0
- package/dist-types/dialog/index.d.ts +6 -0
- package/dist-types/drawer/Drawer.d.ts +28 -0
- package/dist-types/drawer/DrawerCloseButton.d.ts +2 -0
- package/dist-types/drawer/index.d.ts +2 -0
- package/dist-types/index.d.ts +3 -0
- package/dist-types/link-card/LinkCard.d.ts +12 -0
- package/dist-types/link-card/index.d.ts +1 -0
- package/dist-types/salt-provider/SaltProvider.d.ts +9 -0
- package/dist-types/theme/Corner.d.ts +2 -0
- package/dist-types/theme/index.d.ts +1 -0
- package/dist-types/utils/useFloatingUI/useFloatingUI.d.ts +2 -3
- package/package.json +1 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { Button } from '../button/Button.js';
|
|
5
|
+
import { makePrefixer } from '../utils/makePrefixer.js';
|
|
6
|
+
import '../utils/useFloatingUI/useFloatingUI.js';
|
|
7
|
+
import '../utils/useId.js';
|
|
8
|
+
import '../salt-provider/SaltProvider.js';
|
|
9
|
+
import '../viewport/ViewportProvider.js';
|
|
10
|
+
import { useWindow } from '@salt-ds/window';
|
|
11
|
+
import { useComponentCssInjection } from '@salt-ds/styles';
|
|
12
|
+
import { CloseIcon } from '@salt-ds/icons';
|
|
13
|
+
import css_248z from './DialogCloseButton.css.js';
|
|
14
|
+
|
|
15
|
+
const withBaseName = makePrefixer("saltDialogCloseButton");
|
|
16
|
+
const DialogCloseButton = forwardRef(
|
|
17
|
+
function DialogCloseButton2({ className, ...rest }, ref) {
|
|
18
|
+
const targetWindow = useWindow();
|
|
19
|
+
useComponentCssInjection({
|
|
20
|
+
testId: "salt-dialog-close-button",
|
|
21
|
+
css: css_248z,
|
|
22
|
+
window: targetWindow
|
|
23
|
+
});
|
|
24
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
25
|
+
ref,
|
|
26
|
+
"aria-label": "Close dialog",
|
|
27
|
+
variant: "secondary",
|
|
28
|
+
className: clsx(withBaseName(), className),
|
|
29
|
+
...rest,
|
|
30
|
+
children: /* @__PURE__ */ jsx(CloseIcon, {})
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
export { DialogCloseButton };
|
|
36
|
+
//# sourceMappingURL=DialogCloseButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DialogCloseButton.js","sources":["../src/dialog/DialogCloseButton.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport clsx from \"clsx\";\nimport { Button, ButtonProps } from \"../button\";\nimport { makePrefixer } from \"../utils\";\nimport { useWindow } from \"@salt-ds/window\";\nimport { useComponentCssInjection } from \"@salt-ds/styles\";\nimport { CloseIcon } from \"@salt-ds/icons\";\n\nimport dialogCloseButtonCss from \"./DialogCloseButton.css\";\n\nconst withBaseName = makePrefixer(\"saltDialogCloseButton\");\n\nexport const DialogCloseButton = forwardRef<HTMLButtonElement, ButtonProps>(\n function DialogCloseButton({ className, ...rest }, ref) {\n const targetWindow = useWindow();\n useComponentCssInjection({\n testId: \"salt-dialog-close-button\",\n css: dialogCloseButtonCss,\n window: targetWindow,\n });\n\n return (\n <Button\n ref={ref}\n aria-label=\"Close dialog\"\n variant=\"secondary\"\n className={clsx(withBaseName(), className)}\n {...rest}\n >\n <CloseIcon />\n </Button>\n );\n }\n);\n"],"names":["DialogCloseButton","dialogCloseButtonCss"],"mappings":";;;;;;;;;;;;;;AAUA,MAAM,YAAA,GAAe,aAAa,uBAAuB,CAAA,CAAA;AAElD,MAAM,iBAAoB,GAAA,UAAA;AAAA,EAC/B,SAASA,kBAAkB,CAAA,EAAE,SAAc,EAAA,GAAA,IAAA,IAAQ,GAAK,EAAA;AACtD,IAAA,MAAM,eAAe,SAAU,EAAA,CAAA;AAC/B,IAAyB,wBAAA,CAAA;AAAA,MACvB,MAAQ,EAAA,0BAAA;AAAA,MACR,GAAK,EAAAC,QAAA;AAAA,MACL,MAAQ,EAAA,YAAA;AAAA,KACT,CAAA,CAAA;AAED,IAAA,uBACG,GAAA,CAAA,MAAA,EAAA;AAAA,MACC,GAAA;AAAA,MACA,YAAW,EAAA,cAAA;AAAA,MACX,OAAQ,EAAA,WAAA;AAAA,MACR,SAAW,EAAA,IAAA,CAAK,YAAa,EAAA,EAAG,SAAS,CAAA;AAAA,MACxC,GAAG,IAAA;AAAA,MAEJ,8BAAC,SAAU,EAAA,EAAA,CAAA;AAAA,KACb,CAAA,CAAA;AAAA,GAEJ;AACF;;;;"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var css_248z = ".saltDialogContent {\n color: var(--salt-content-primary-foreground);\n min-height: var(--salt-text-lineHeight);\n overflow-y: auto;\n background: var(--salt-container-primary-background);\n padding-bottom: var(--salt-spacing-50);\n\n margin-left: var(--salt-spacing-200);\n margin-right: var(--salt-spacing-300);\n padding-right: var(--salt-spacing-300);\n padding-left: var(--salt-spacing-100);\n border-bottom: var(--salt-size-border) var(--salt-separable-borderStyle) transparent;\n box-shadow: none;\n}\n\n.saltDialogContent-scroll {\n border-bottom: var(--salt-size-border) var(--salt-separable-borderStyle) var(--salt-separable-tertiary-borderColor);\n box-shadow: var(--salt-overlayable-shadow-scroll);\n}\n";
|
|
2
|
+
|
|
3
|
+
export { css_248z as default };
|
|
4
|
+
//# sourceMappingURL=DialogContent.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DialogContent.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef, useState } from 'react';
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
|
+
import { makePrefixer } from '../utils/makePrefixer.js';
|
|
5
|
+
import '../utils/useFloatingUI/useFloatingUI.js';
|
|
6
|
+
import '../utils/useId.js';
|
|
7
|
+
import '../salt-provider/SaltProvider.js';
|
|
8
|
+
import '../viewport/ViewportProvider.js';
|
|
9
|
+
import { useWindow } from '@salt-ds/window';
|
|
10
|
+
import { useComponentCssInjection } from '@salt-ds/styles';
|
|
11
|
+
import css_248z from './DialogContent.css.js';
|
|
12
|
+
|
|
13
|
+
const withBaseName = makePrefixer("saltDialogContent");
|
|
14
|
+
const DialogContent = forwardRef(
|
|
15
|
+
function DialogContent2(props, ref) {
|
|
16
|
+
const { children, className, ...rest } = props;
|
|
17
|
+
const [scrollTop, setScrollTop] = useState(0);
|
|
18
|
+
const handleScroll = (event) => {
|
|
19
|
+
setScrollTop(event.currentTarget.scrollTop);
|
|
20
|
+
};
|
|
21
|
+
const targetWindow = useWindow();
|
|
22
|
+
useComponentCssInjection({
|
|
23
|
+
testId: "salt-dialog-content",
|
|
24
|
+
css: css_248z,
|
|
25
|
+
window: targetWindow
|
|
26
|
+
});
|
|
27
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
28
|
+
children: [
|
|
29
|
+
/* @__PURE__ */ jsx("div", {
|
|
30
|
+
className: clsx({ [withBaseName("scroll")]: scrollTop > 0 })
|
|
31
|
+
}),
|
|
32
|
+
/* @__PURE__ */ jsx("div", {
|
|
33
|
+
className: clsx(withBaseName(), className),
|
|
34
|
+
onScroll: handleScroll,
|
|
35
|
+
...rest,
|
|
36
|
+
ref,
|
|
37
|
+
children
|
|
38
|
+
})
|
|
39
|
+
]
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
export { DialogContent };
|
|
45
|
+
//# sourceMappingURL=DialogContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DialogContent.js","sources":["../src/dialog/DialogContent.tsx"],"sourcesContent":["import { forwardRef, HTMLAttributes, ReactNode, useState } from \"react\";\nimport { clsx } from \"clsx\";\nimport { makePrefixer } from \"../utils\";\nimport { useWindow } from \"@salt-ds/window\";\nimport { useComponentCssInjection } from \"@salt-ds/styles\";\n\nimport dialogContentCss from \"./DialogContent.css\";\n\nconst withBaseName = makePrefixer(\"saltDialogContent\");\n\nexport interface DialogContentProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * The content of Dialog Content\n */\n children?: ReactNode;\n}\n\nexport const DialogContent = forwardRef<HTMLDivElement, DialogContentProps>(\n function DialogContent(props, ref) {\n const { children, className, ...rest } = props;\n const [scrollTop, setScrollTop] = useState(0);\n\n const handleScroll = (event: React.UIEvent<HTMLElement>) => {\n setScrollTop(event.currentTarget.scrollTop);\n };\n\n const targetWindow = useWindow();\n useComponentCssInjection({\n testId: \"salt-dialog-content\",\n css: dialogContentCss,\n window: targetWindow,\n });\n\n return (\n <>\n <div className={clsx({ [withBaseName(\"scroll\")]: scrollTop > 0 })} />\n <div\n className={clsx(withBaseName(), className)}\n onScroll={handleScroll}\n {...rest}\n ref={ref}\n >\n {children}\n </div>\n </>\n );\n }\n);\n"],"names":["DialogContent","dialogContentCss"],"mappings":";;;;;;;;;;;;AAQA,MAAM,YAAA,GAAe,aAAa,mBAAmB,CAAA,CAAA;AAS9C,MAAM,aAAgB,GAAA,UAAA;AAAA,EAC3B,SAASA,cAAc,CAAA,KAAA,EAAO,GAAK,EAAA;AACjC,IAAA,MAAM,EAAE,QAAA,EAAU,SAAc,EAAA,GAAA,IAAA,EAAS,GAAA,KAAA,CAAA;AACzC,IAAA,MAAM,CAAC,SAAA,EAAW,YAAY,CAAA,GAAI,SAAS,CAAC,CAAA,CAAA;AAE5C,IAAM,MAAA,YAAA,GAAe,CAAC,KAAsC,KAAA;AAC1D,MAAa,YAAA,CAAA,KAAA,CAAM,cAAc,SAAS,CAAA,CAAA;AAAA,KAC5C,CAAA;AAEA,IAAA,MAAM,eAAe,SAAU,EAAA,CAAA;AAC/B,IAAyB,wBAAA,CAAA;AAAA,MACvB,MAAQ,EAAA,qBAAA;AAAA,MACR,GAAK,EAAAC,QAAA;AAAA,MACL,MAAQ,EAAA,YAAA;AAAA,KACT,CAAA,CAAA;AAED,IACE,uBAAA,IAAA,CAAA,QAAA,EAAA;AAAA,MACE,QAAA,EAAA;AAAA,wBAAC,GAAA,CAAA,KAAA,EAAA;AAAA,UAAI,SAAA,EAAW,KAAK,EAAE,CAAC,aAAa,QAAQ,CAAA,GAAI,SAAY,GAAA,CAAA,EAAG,CAAA;AAAA,SAAG,CAAA;AAAA,wBAClE,GAAA,CAAA,KAAA,EAAA;AAAA,UACC,SAAW,EAAA,IAAA,CAAK,YAAa,EAAA,EAAG,SAAS,CAAA;AAAA,UACzC,QAAU,EAAA,YAAA;AAAA,UACT,GAAG,IAAA;AAAA,UACJ,GAAA;AAAA,UAEC,QAAA;AAAA,SACH,CAAA;AAAA,OAAA;AAAA,KACF,CAAA,CAAA;AAAA,GAEJ;AACF;;;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
|
|
3
|
+
const DialogContext = createContext({
|
|
4
|
+
status: void 0,
|
|
5
|
+
id: ""
|
|
6
|
+
});
|
|
7
|
+
const useDialogContext = () => {
|
|
8
|
+
return useContext(DialogContext);
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export { DialogContext, useDialogContext };
|
|
12
|
+
//# sourceMappingURL=DialogContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DialogContext.js","sources":["../src/dialog/DialogContext.tsx"],"sourcesContent":["import { createContext, useContext } from \"react\";\nimport { ValidationStatus } from \"../status-indicator\";\n\nexport const DialogContext = createContext<{\n status?: ValidationStatus;\n id: string | undefined;\n}>({\n status: undefined,\n id: \"\",\n});\n\nexport const useDialogContext = () => {\n return useContext(DialogContext);\n};\n"],"names":[],"mappings":";;AAGO,MAAM,gBAAgB,aAG1B,CAAA;AAAA,EACD,MAAQ,EAAA,KAAA,CAAA;AAAA,EACR,EAAI,EAAA,EAAA;AACN,CAAC,EAAA;AAEM,MAAM,mBAAmB,MAAM;AACpC,EAAA,OAAO,WAAW,aAAa,CAAA,CAAA;AACjC;;;;"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var css_248z = "/* Styles applied to the root element */\n.saltDialogHeader {\n padding-bottom: var(--salt-spacing-100);\n padding-left: var(--salt-spacing-300);\n padding-right: var(--salt-spacing-300);\n align-items: center;\n display: flex;\n flex-direction: row;\n gap: var(--salt-spacing-100);\n box-sizing: border-box;\n}\n\n.saltDialogHeader-header {\n margin: 0;\n}\n\n/* Styles applied to the status indicator icon overriding its default size */\n.saltDialogHeader .saltStatusIndicator.saltIcon {\n --icon-size: var(--salt-text-h2-lineHeight);\n}\n\n/* Styles applied to DialogTitle when accent={true} */\n.saltDialogHeader-withAccent {\n position: relative;\n}\n\n.saltDialogHeader-withAccent::before {\n content: \"\";\n position: absolute;\n top: 0;\n left: 0;\n bottom: var(--salt-spacing-100);\n width: var(--salt-size-accent);\n background: var(--salt-accent-background);\n}\n\n.saltDialogHeader-error::before {\n background: var(--salt-status-error-borderColor);\n}\n\n.saltDialogHeader-info::before {\n background: var(--salt-status-info-borderColor);\n}\n\n.saltDialogHeader-success::before {\n background: var(--salt-status-success-borderColor);\n}\n\n.saltDialogHeader-warning::before {\n background: var(--salt-status-warning-borderColor);\n}\n";
|
|
2
|
+
|
|
3
|
+
export { css_248z as default };
|
|
4
|
+
//# sourceMappingURL=DialogHeader.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DialogHeader.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { StatusIndicator } from '../status-indicator/StatusIndicator.js';
|
|
4
|
+
import { Text } from '../text/Text.js';
|
|
5
|
+
import '../text/Display.js';
|
|
6
|
+
import { H2 } from '../text/Headings.js';
|
|
7
|
+
import '../text/Label.js';
|
|
8
|
+
import '../text/TextNotation.js';
|
|
9
|
+
import '../text/TextAction.js';
|
|
10
|
+
import 'react';
|
|
11
|
+
import { makePrefixer } from '../utils/makePrefixer.js';
|
|
12
|
+
import '../utils/useFloatingUI/useFloatingUI.js';
|
|
13
|
+
import '../utils/useId.js';
|
|
14
|
+
import '../salt-provider/SaltProvider.js';
|
|
15
|
+
import '../viewport/ViewportProvider.js';
|
|
16
|
+
import { useDialogContext } from './DialogContext.js';
|
|
17
|
+
import { useWindow } from '@salt-ds/window';
|
|
18
|
+
import { useComponentCssInjection } from '@salt-ds/styles';
|
|
19
|
+
import css_248z from './DialogHeader.css.js';
|
|
20
|
+
|
|
21
|
+
const withBaseName = makePrefixer("saltDialogHeader");
|
|
22
|
+
const DialogHeader = ({
|
|
23
|
+
className,
|
|
24
|
+
header,
|
|
25
|
+
preheader,
|
|
26
|
+
disableAccent,
|
|
27
|
+
status: statusProp,
|
|
28
|
+
...rest
|
|
29
|
+
}) => {
|
|
30
|
+
const { status: statusContext, id } = useDialogContext();
|
|
31
|
+
const targetWindow = useWindow();
|
|
32
|
+
useComponentCssInjection({
|
|
33
|
+
testId: "salt-dialog-header",
|
|
34
|
+
css: css_248z,
|
|
35
|
+
window: targetWindow
|
|
36
|
+
});
|
|
37
|
+
const status = statusProp != null ? statusProp : statusContext;
|
|
38
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
39
|
+
id,
|
|
40
|
+
className: clsx(
|
|
41
|
+
withBaseName(),
|
|
42
|
+
{
|
|
43
|
+
[withBaseName("withAccent")]: !disableAccent && !status,
|
|
44
|
+
[withBaseName(status)]: !!status
|
|
45
|
+
},
|
|
46
|
+
className
|
|
47
|
+
),
|
|
48
|
+
...rest,
|
|
49
|
+
children: [
|
|
50
|
+
status && /* @__PURE__ */ jsx(StatusIndicator, {
|
|
51
|
+
status
|
|
52
|
+
}),
|
|
53
|
+
/* @__PURE__ */ jsxs(H2, {
|
|
54
|
+
className: withBaseName("header"),
|
|
55
|
+
children: [
|
|
56
|
+
preheader && /* @__PURE__ */ jsx(Text, {
|
|
57
|
+
variant: "secondary",
|
|
58
|
+
className: withBaseName("preheader"),
|
|
59
|
+
children: preheader
|
|
60
|
+
}),
|
|
61
|
+
/* @__PURE__ */ jsx("div", {
|
|
62
|
+
children: header
|
|
63
|
+
})
|
|
64
|
+
]
|
|
65
|
+
})
|
|
66
|
+
]
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export { DialogHeader };
|
|
71
|
+
//# sourceMappingURL=DialogHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DialogHeader.js","sources":["../src/dialog/DialogHeader.tsx"],"sourcesContent":["import { ReactNode, ComponentPropsWithoutRef } from \"react\";\nimport clsx from \"clsx\";\nimport { ValidationStatus, StatusIndicator } from \"../status-indicator\";\nimport { H2, Text } from \"../text\";\nimport { makePrefixer } from \"../utils\";\nimport { useDialogContext } from \"./DialogContext\";\nimport { useWindow } from \"@salt-ds/window\";\nimport { useComponentCssInjection } from \"@salt-ds/styles\";\nimport dialogTitleCss from \"./DialogHeader.css\";\n\nconst withBaseName = makePrefixer(\"saltDialogHeader\");\n\ninterface DialogTitleProps extends ComponentPropsWithoutRef<\"div\"> {\n /**\n * The status of the Dialog\n */\n status?: ValidationStatus | undefined;\n /**\n * Displays the accent bar in the Dialog Title */\n disableAccent?: boolean;\n /**\n * Displays the header at the top of the Dialog\n */\n header: ReactNode;\n /**\n * Displays the preheader just above the header\n **/\n preheader?: ReactNode;\n\n className?: string;\n}\n\nexport const DialogHeader = ({\n className,\n header,\n preheader,\n disableAccent,\n status: statusProp,\n ...rest\n}: DialogTitleProps) => {\n const { status: statusContext, id } = useDialogContext();\n const targetWindow = useWindow();\n useComponentCssInjection({\n testId: \"salt-dialog-header\",\n css: dialogTitleCss,\n window: targetWindow,\n });\n\n const status = statusProp ?? (statusContext as ValidationStatus);\n\n return (\n <div\n id={id}\n className={clsx(\n withBaseName(),\n {\n [withBaseName(\"withAccent\")]: !disableAccent && !status,\n [withBaseName(status)]: !!status,\n },\n className\n )}\n {...rest}\n >\n {status && <StatusIndicator status={status} />}\n <H2 className={withBaseName(\"header\")}>\n {preheader && (\n <Text variant=\"secondary\" className={withBaseName(\"preheader\")}>\n {preheader}\n </Text>\n )}\n <div>{header}</div>\n </H2>\n </div>\n );\n};\n"],"names":["dialogTitleCss"],"mappings":";;;;;;;;;;;;;;;;;;;;AAUA,MAAM,YAAA,GAAe,aAAa,kBAAkB,CAAA,CAAA;AAsB7C,MAAM,eAAe,CAAC;AAAA,EAC3B,SAAA;AAAA,EACA,MAAA;AAAA,EACA,SAAA;AAAA,EACA,aAAA;AAAA,EACA,MAAQ,EAAA,UAAA;AAAA,EACL,GAAA,IAAA;AACL,CAAwB,KAAA;AACtB,EAAA,MAAM,EAAE,MAAA,EAAQ,aAAe,EAAA,EAAA,KAAO,gBAAiB,EAAA,CAAA;AACvD,EAAA,MAAM,eAAe,SAAU,EAAA,CAAA;AAC/B,EAAyB,wBAAA,CAAA;AAAA,IACvB,MAAQ,EAAA,oBAAA;AAAA,IACR,GAAK,EAAAA,QAAA;AAAA,IACL,MAAQ,EAAA,YAAA;AAAA,GACT,CAAA,CAAA;AAED,EAAA,MAAM,SAAS,UAAe,IAAA,IAAA,GAAA,UAAA,GAAA,aAAA,CAAA;AAE9B,EAAA,uBACG,IAAA,CAAA,KAAA,EAAA;AAAA,IACC,EAAA;AAAA,IACA,SAAW,EAAA,IAAA;AAAA,MACT,YAAa,EAAA;AAAA,MACb;AAAA,QACE,CAAC,YAAa,CAAA,YAAY,CAAI,GAAA,CAAC,iBAAiB,CAAC,MAAA;AAAA,QACjD,CAAC,YAAA,CAAa,MAAM,CAAA,GAAI,CAAC,CAAC,MAAA;AAAA,OAC5B;AAAA,MACA,SAAA;AAAA,KACF;AAAA,IACC,GAAG,IAAA;AAAA,IAEH,QAAA,EAAA;AAAA,MAAA,MAAA,oBAAW,GAAA,CAAA,eAAA,EAAA;AAAA,QAAgB,MAAA;AAAA,OAAgB,CAAA;AAAA,sBAC3C,IAAA,CAAA,EAAA,EAAA;AAAA,QAAG,SAAA,EAAW,aAAa,QAAQ,CAAA;AAAA,QACjC,QAAA,EAAA;AAAA,UAAA,SAAA,oBACE,GAAA,CAAA,IAAA,EAAA;AAAA,YAAK,OAAQ,EAAA,WAAA;AAAA,YAAY,SAAA,EAAW,aAAa,WAAW,CAAA;AAAA,YAC1D,QAAA,EAAA,SAAA;AAAA,WACH,CAAA;AAAA,0BAED,GAAA,CAAA,KAAA,EAAA;AAAA,YAAK,QAAA,EAAA,MAAA;AAAA,WAAO,CAAA;AAAA,SAAA;AAAA,OACf,CAAA;AAAA,KAAA;AAAA,GACF,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var css_248z = "/* Styles applied to Drawer component */\n.saltDrawer {\n background: var(--drawer-background);\n display: flex;\n flex-direction: column;\n max-height: 100%;\n max-width: 100%;\n overflow: auto;\n padding: var(--salt-spacing-300);\n box-shadow: var(--salt-overlayable-shadow-modal);\n z-index: var(--salt-zIndex-drawer);\n position: fixed;\n top: 0;\n box-sizing: border-box;\n}\n\n/* Styles applied when variant = \"primary\" */\n.saltDrawer-primary {\n --drawer-background: var(--salt-container-primary-background);\n}\n\n/* Styles applied when variant = \"secondary\" */\n.saltDrawer-secondary {\n --drawer-background: var(--salt-container-secondary-background);\n}\n\n/* Styles applied when position = \"top\" */\n.saltDrawer-top {\n left: 0;\n right: 0;\n bottom: auto;\n}\n\n/* Styles applied when position = \"top\" and the component mounts */\n.saltDrawer-top.saltDrawer-enterAnimation {\n animation: var(--salt-animation-slide-in-bottom);\n}\n\n/* Styles applied when position = \"top\" and the component unmounts */\n.saltDrawer-top.saltDrawer-exitAnimation {\n animation: var(--salt-animation-slide-out-bottom);\n}\n\n/* Styles applied when position = \"right\" */\n.saltDrawer-right {\n left: auto;\n right: 0;\n height: 100%;\n}\n\n/* Styles applied when position = \"right\" and the component mounts */\n.saltDrawer-right.saltDrawer-enterAnimation {\n animation: var(--salt-animation-slide-in-right);\n}\n\n/* Styles applied when position = \"right\" and the component unmounts */\n.saltDrawer-right.saltDrawer-exitAnimation {\n animation: var(--salt-animation-slide-out-right);\n}\n\n/* Styles applied when position = \"left\" */\n.saltDrawer-left {\n left: 0;\n right: auto;\n height: 100%;\n}\n\n/* Styles applied when position = \"left\" and the component mounts */\n.saltDrawer-left.saltDrawer-enterAnimation {\n animation: var(--salt-animation-slide-in-left);\n}\n\n/* Styles applied when position = \"left\" and the component unmounts */\n.saltDrawer-left.saltDrawer-exitAnimation {\n animation: var(--salt-animation-slide-out-left);\n}\n\n/* Styles applied when position = \"bottom\" */\n.saltDrawer-bottom {\n left: 0;\n right: 0;\n bottom: 0;\n top: auto;\n}\n\n/* Styles applied when position = \"bottom\" and the component mounts */\n.saltDrawer-bottom.saltDrawer-enterAnimation {\n animation: var(--salt-animation-slide-in-top);\n}\n\n/* Styles applied when position = \"bottom\" and the component unmounts */\n.saltDrawer-bottom.saltDrawer-exitAnimation {\n animation: var(--salt-animation-slide-out-top);\n}\n";
|
|
2
|
+
|
|
3
|
+
export { css_248z as default };
|
|
4
|
+
//# sourceMappingURL=Drawer.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Drawer.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef, useState, useEffect } from 'react';
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
|
+
import { useInteractions, useClick, useDismiss } from '@floating-ui/react';
|
|
5
|
+
import { makePrefixer } from '../utils/makePrefixer.js';
|
|
6
|
+
import { useFloatingComponent, useFloatingUI } from '../utils/useFloatingUI/useFloatingUI.js';
|
|
7
|
+
import { useForkRef } from '../utils/useForkRef.js';
|
|
8
|
+
import '../utils/useId.js';
|
|
9
|
+
import '../salt-provider/SaltProvider.js';
|
|
10
|
+
import '../viewport/ViewportProvider.js';
|
|
11
|
+
import { Scrim } from '../scrim/Scrim.js';
|
|
12
|
+
import { useWindow } from '@salt-ds/window';
|
|
13
|
+
import { useComponentCssInjection } from '@salt-ds/styles';
|
|
14
|
+
import css_248z from './Drawer.css.js';
|
|
15
|
+
|
|
16
|
+
const ConditionalScrimWrapper = ({
|
|
17
|
+
condition,
|
|
18
|
+
children
|
|
19
|
+
}) => {
|
|
20
|
+
return condition ? /* @__PURE__ */ jsxs(Scrim, {
|
|
21
|
+
fixed: true,
|
|
22
|
+
children: [
|
|
23
|
+
" ",
|
|
24
|
+
children,
|
|
25
|
+
" "
|
|
26
|
+
]
|
|
27
|
+
}) : /* @__PURE__ */ jsxs(Fragment, {
|
|
28
|
+
children: [
|
|
29
|
+
children,
|
|
30
|
+
" "
|
|
31
|
+
]
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
const withBaseName = makePrefixer("saltDrawer");
|
|
35
|
+
const Drawer = forwardRef(function Drawer2(props, ref) {
|
|
36
|
+
var _a, _b;
|
|
37
|
+
const {
|
|
38
|
+
children,
|
|
39
|
+
className,
|
|
40
|
+
position = "left",
|
|
41
|
+
open = false,
|
|
42
|
+
onOpenChange,
|
|
43
|
+
variant = "primary",
|
|
44
|
+
disableDismiss,
|
|
45
|
+
disableScrim,
|
|
46
|
+
...rest
|
|
47
|
+
} = props;
|
|
48
|
+
const targetWindow = useWindow();
|
|
49
|
+
useComponentCssInjection({
|
|
50
|
+
testId: "salt-drawer",
|
|
51
|
+
css: css_248z,
|
|
52
|
+
window: targetWindow
|
|
53
|
+
});
|
|
54
|
+
const [showComponent, setShowComponent] = useState(false);
|
|
55
|
+
const { Component: FloatingComponent } = useFloatingComponent();
|
|
56
|
+
const { context, floating, elements } = useFloatingUI({
|
|
57
|
+
open,
|
|
58
|
+
onOpenChange
|
|
59
|
+
});
|
|
60
|
+
const { getFloatingProps } = useInteractions([
|
|
61
|
+
useClick(context),
|
|
62
|
+
useDismiss(context, { enabled: !disableDismiss })
|
|
63
|
+
]);
|
|
64
|
+
const handleRef = useForkRef(floating, ref);
|
|
65
|
+
useEffect(() => {
|
|
66
|
+
if (open && !showComponent) {
|
|
67
|
+
setShowComponent(true);
|
|
68
|
+
}
|
|
69
|
+
if (!open && showComponent) {
|
|
70
|
+
const animate = setTimeout(() => {
|
|
71
|
+
setShowComponent(false);
|
|
72
|
+
}, 300);
|
|
73
|
+
return () => clearTimeout(animate);
|
|
74
|
+
}
|
|
75
|
+
}, [open, showComponent, setShowComponent]);
|
|
76
|
+
return /* @__PURE__ */ jsx(ConditionalScrimWrapper, {
|
|
77
|
+
condition: open && !disableScrim,
|
|
78
|
+
children: /* @__PURE__ */ jsx(FloatingComponent, {
|
|
79
|
+
open: showComponent,
|
|
80
|
+
ref: handleRef,
|
|
81
|
+
role: "dialog",
|
|
82
|
+
width: (_a = elements.floating) == null ? void 0 : _a.offsetWidth,
|
|
83
|
+
height: (_b = elements.floating) == null ? void 0 : _b.offsetHeight,
|
|
84
|
+
"aria-modal": "true",
|
|
85
|
+
focusManagerProps: {
|
|
86
|
+
context
|
|
87
|
+
},
|
|
88
|
+
className: clsx(
|
|
89
|
+
withBaseName(),
|
|
90
|
+
withBaseName(position),
|
|
91
|
+
{
|
|
92
|
+
[withBaseName("enterAnimation")]: open,
|
|
93
|
+
[withBaseName("exitAnimation")]: !open,
|
|
94
|
+
[withBaseName(variant)]: variant
|
|
95
|
+
},
|
|
96
|
+
className
|
|
97
|
+
),
|
|
98
|
+
...getFloatingProps(),
|
|
99
|
+
...rest,
|
|
100
|
+
children
|
|
101
|
+
})
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
export { Drawer };
|
|
106
|
+
//# sourceMappingURL=Drawer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Drawer.js","sources":["../src/drawer/Drawer.tsx"],"sourcesContent":["import {\n ComponentPropsWithoutRef,\n forwardRef,\n useEffect,\n useState,\n PropsWithChildren,\n} from \"react\";\nimport { clsx } from \"clsx\";\nimport { useClick, useDismiss, useInteractions } from \"@floating-ui/react\";\nimport {\n makePrefixer,\n useFloatingComponent,\n useFloatingUI,\n useForkRef,\n} from \"../utils\";\nimport { Scrim } from \"../scrim\";\nimport { useWindow } from \"@salt-ds/window\";\nimport { useComponentCssInjection } from \"@salt-ds/styles\";\nimport drawerCss from \"./Drawer.css\";\n\ninterface ConditionalScrimWrapperProps extends PropsWithChildren {\n condition: boolean;\n}\n\nconst ConditionalScrimWrapper = ({\n condition,\n children,\n}: ConditionalScrimWrapperProps) => {\n return condition ? <Scrim fixed> {children} </Scrim> : <>{children} </>;\n};\n\nexport interface DrawerProps extends ComponentPropsWithoutRef<\"div\"> {\n /**\n * Defines the drawer position within the screen. Defaults to `left`.\n */\n position?: \"left\" | \"top\" | \"right\" | \"bottom\";\n /**\n * Display or hide the component.\n */\n open?: boolean;\n /**\n * Callback function triggered when open state changes.\n */\n onOpenChange?: (newOpen: boolean) => void;\n /**\n * Change background color palette\n */\n variant?: \"primary\" | \"secondary\";\n /**\n * Prevent the dialog closing on click away\n * */\n disableDismiss?: boolean;\n /**\n * Prevent Scrim from rendering\n * */\n disableScrim?: boolean;\n}\n\nconst withBaseName = makePrefixer(\"saltDrawer\");\n\nexport const Drawer = forwardRef<HTMLDivElement, DrawerProps>(function Drawer(\n props,\n ref\n) {\n const {\n children,\n className,\n position = \"left\",\n open = false,\n onOpenChange,\n variant = \"primary\",\n disableDismiss,\n disableScrim,\n ...rest\n } = props;\n\n const targetWindow = useWindow();\n useComponentCssInjection({\n testId: \"salt-drawer\",\n css: drawerCss,\n window: targetWindow,\n });\n\n const [showComponent, setShowComponent] = useState(false);\n const { Component: FloatingComponent } = useFloatingComponent();\n\n const { context, floating, elements } = useFloatingUI({\n open,\n onOpenChange,\n });\n\n const { getFloatingProps } = useInteractions([\n useClick(context),\n useDismiss(context, { enabled: !disableDismiss }),\n ]);\n\n const handleRef = useForkRef<HTMLDivElement>(floating, ref);\n\n useEffect(() => {\n if (open && !showComponent) {\n setShowComponent(true);\n }\n\n if (!open && showComponent) {\n const animate = setTimeout(() => {\n setShowComponent(false);\n }, 300); // var(--salt-duration-perceptible)\n return () => clearTimeout(animate);\n }\n }, [open, showComponent, setShowComponent]);\n\n return (\n <ConditionalScrimWrapper condition={open && !disableScrim}>\n <FloatingComponent\n open={showComponent}\n ref={handleRef}\n role={\"dialog\"}\n width={elements.floating?.offsetWidth}\n height={elements.floating?.offsetHeight}\n aria-modal=\"true\"\n focusManagerProps={{\n context: context,\n }}\n className={clsx(\n withBaseName(),\n withBaseName(position),\n {\n [withBaseName(\"enterAnimation\")]: open,\n [withBaseName(\"exitAnimation\")]: !open,\n [withBaseName(variant)]: variant,\n },\n className\n )}\n {...getFloatingProps()}\n {...rest}\n >\n {children}\n </FloatingComponent>\n </ConditionalScrimWrapper>\n );\n});\n"],"names":["Drawer","drawerCss"],"mappings":";;;;;;;;;;;;;;;AAwBA,MAAM,0BAA0B,CAAC;AAAA,EAC/B,SAAA;AAAA,EACA,QAAA;AACF,CAAoC,KAAA;AAClC,EAAA,OAAO,4BAAa,IAAA,CAAA,KAAA,EAAA;AAAA,IAAM,KAAK,EAAA,IAAA;AAAA,IAAC,QAAA,EAAA;AAAA,MAAA,GAAA;AAAA,MAAE,QAAA;AAAA,MAAS,GAAA;AAAA,KAAA;AAAA,GAAC,CAAW,mBAAA,IAAA,CAAA,QAAA,EAAA;AAAA,IAAG,QAAA,EAAA;AAAA,MAAA,QAAA;AAAA,MAAS,GAAA;AAAA,KAAA;AAAA,GAAC,CAAA,CAAA;AACtE,CAAA,CAAA;AA6BA,MAAM,YAAA,GAAe,aAAa,YAAY,CAAA,CAAA;AAEvC,MAAM,MAAS,GAAA,UAAA,CAAwC,SAASA,OAAAA,CACrE,OACA,GACA,EAAA;AA/DF,EAAA,IAAA,EAAA,EAAA,EAAA,CAAA;AAgEE,EAAM,MAAA;AAAA,IACJ,QAAA;AAAA,IACA,SAAA;AAAA,IACA,QAAW,GAAA,MAAA;AAAA,IACX,IAAO,GAAA,KAAA;AAAA,IACP,YAAA;AAAA,IACA,OAAU,GAAA,SAAA;AAAA,IACV,cAAA;AAAA,IACA,YAAA;AAAA,IACG,GAAA,IAAA;AAAA,GACD,GAAA,KAAA,CAAA;AAEJ,EAAA,MAAM,eAAe,SAAU,EAAA,CAAA;AAC/B,EAAyB,wBAAA,CAAA;AAAA,IACvB,MAAQ,EAAA,aAAA;AAAA,IACR,GAAK,EAAAC,QAAA;AAAA,IACL,MAAQ,EAAA,YAAA;AAAA,GACT,CAAA,CAAA;AAED,EAAA,MAAM,CAAC,aAAA,EAAe,gBAAgB,CAAA,GAAI,SAAS,KAAK,CAAA,CAAA;AACxD,EAAA,MAAM,EAAE,SAAA,EAAW,iBAAkB,EAAA,GAAI,oBAAqB,EAAA,CAAA;AAE9D,EAAA,MAAM,EAAE,OAAA,EAAS,QAAU,EAAA,QAAA,KAAa,aAAc,CAAA;AAAA,IACpD,IAAA;AAAA,IACA,YAAA;AAAA,GACD,CAAA,CAAA;AAED,EAAM,MAAA,EAAE,gBAAiB,EAAA,GAAI,eAAgB,CAAA;AAAA,IAC3C,SAAS,OAAO,CAAA;AAAA,IAChB,WAAW,OAAS,EAAA,EAAE,OAAS,EAAA,CAAC,gBAAgB,CAAA;AAAA,GACjD,CAAA,CAAA;AAED,EAAM,MAAA,SAAA,GAAY,UAA2B,CAAA,QAAA,EAAU,GAAG,CAAA,CAAA;AAE1D,EAAA,SAAA,CAAU,MAAM;AACd,IAAI,IAAA,IAAA,IAAQ,CAAC,aAAe,EAAA;AAC1B,MAAA,gBAAA,CAAiB,IAAI,CAAA,CAAA;AAAA,KACvB;AAEA,IAAI,IAAA,CAAC,QAAQ,aAAe,EAAA;AAC1B,MAAM,MAAA,OAAA,GAAU,WAAW,MAAM;AAC/B,QAAA,gBAAA,CAAiB,KAAK,CAAA,CAAA;AAAA,SACrB,GAAG,CAAA,CAAA;AACN,MAAO,OAAA,MAAM,aAAa,OAAO,CAAA,CAAA;AAAA,KACnC;AAAA,GACC,EAAA,CAAC,IAAM,EAAA,aAAA,EAAe,gBAAgB,CAAC,CAAA,CAAA;AAE1C,EAAA,uBACG,GAAA,CAAA,uBAAA,EAAA;AAAA,IAAwB,SAAA,EAAW,QAAQ,CAAC,YAAA;AAAA,IAC3C,QAAC,kBAAA,GAAA,CAAA,iBAAA,EAAA;AAAA,MACC,IAAM,EAAA,aAAA;AAAA,MACN,GAAK,EAAA,SAAA;AAAA,MACL,IAAM,EAAA,QAAA;AAAA,MACN,KAAA,EAAA,CAAO,EAAS,GAAA,QAAA,CAAA,QAAA,KAAT,IAAmB,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,WAAA;AAAA,MAC1B,MAAA,EAAA,CAAQ,EAAS,GAAA,QAAA,CAAA,QAAA,KAAT,IAAmB,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,YAAA;AAAA,MAC3B,YAAW,EAAA,MAAA;AAAA,MACX,iBAAmB,EAAA;AAAA,QACjB,OAAA;AAAA,OACF;AAAA,MACA,SAAW,EAAA,IAAA;AAAA,QACT,YAAa,EAAA;AAAA,QACb,aAAa,QAAQ,CAAA;AAAA,QACrB;AAAA,UACE,CAAC,YAAa,CAAA,gBAAgB,CAAI,GAAA,IAAA;AAAA,UAClC,CAAC,YAAA,CAAa,eAAe,CAAA,GAAI,CAAC,IAAA;AAAA,UAClC,CAAC,YAAa,CAAA,OAAO,CAAI,GAAA,OAAA;AAAA,SAC3B;AAAA,QACA,SAAA;AAAA,OACF;AAAA,MACC,GAAG,gBAAiB,EAAA;AAAA,MACpB,GAAG,IAAA;AAAA,MAEH,QAAA;AAAA,KACH,CAAA;AAAA,GACF,CAAA,CAAA;AAEJ,CAAC;;;;"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var css_248z = ".saltDrawerCloseButton-container {\n position: relative;\n display: flex;\n justify-content: flex-end;\n}\n\n.saltButton-secondary.saltDrawerCloseButton {\n position: fixed;\n margin-top: calc(var(--salt-spacing-300) * -1);\n margin-right: calc(var(--salt-spacing-300) * -1);\n}\n";
|
|
2
|
+
|
|
3
|
+
export { css_248z as default };
|
|
4
|
+
//# sourceMappingURL=DrawerCloseButton.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DrawerCloseButton.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { Button } from '../button/Button.js';
|
|
5
|
+
import { makePrefixer } from '../utils/makePrefixer.js';
|
|
6
|
+
import '../utils/useFloatingUI/useFloatingUI.js';
|
|
7
|
+
import '../utils/useId.js';
|
|
8
|
+
import '../salt-provider/SaltProvider.js';
|
|
9
|
+
import '../viewport/ViewportProvider.js';
|
|
10
|
+
import { useWindow } from '@salt-ds/window';
|
|
11
|
+
import { useComponentCssInjection } from '@salt-ds/styles';
|
|
12
|
+
import { CloseIcon } from '@salt-ds/icons';
|
|
13
|
+
import css_248z from './DrawerCloseButton.css.js';
|
|
14
|
+
|
|
15
|
+
const withBaseName = makePrefixer("saltDrawerCloseButton");
|
|
16
|
+
const DrawerCloseButton = forwardRef(
|
|
17
|
+
function DrawerCloseButton2({ className, ...rest }, ref) {
|
|
18
|
+
const targetWindow = useWindow();
|
|
19
|
+
useComponentCssInjection({
|
|
20
|
+
testId: "salt-drawer-close-button",
|
|
21
|
+
css: css_248z,
|
|
22
|
+
window: targetWindow
|
|
23
|
+
});
|
|
24
|
+
return /* @__PURE__ */ jsx("div", {
|
|
25
|
+
className: withBaseName("container"),
|
|
26
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
27
|
+
ref,
|
|
28
|
+
"aria-label": "Close Drawer",
|
|
29
|
+
variant: "secondary",
|
|
30
|
+
className: clsx(withBaseName(), className),
|
|
31
|
+
...rest,
|
|
32
|
+
children: /* @__PURE__ */ jsx(CloseIcon, {
|
|
33
|
+
"aria-hidden": true
|
|
34
|
+
})
|
|
35
|
+
})
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
export { DrawerCloseButton };
|
|
41
|
+
//# sourceMappingURL=DrawerCloseButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DrawerCloseButton.js","sources":["../src/drawer/DrawerCloseButton.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport clsx from \"clsx\";\nimport { Button, ButtonProps } from \"../button\";\nimport { makePrefixer } from \"../utils\";\nimport { useWindow } from \"@salt-ds/window\";\nimport { useComponentCssInjection } from \"@salt-ds/styles\";\nimport { CloseIcon } from \"@salt-ds/icons\";\n\nimport drawerCloseButtonCss from \"./DrawerCloseButton.css\";\n\nconst withBaseName = makePrefixer(\"saltDrawerCloseButton\");\n\nexport const DrawerCloseButton = forwardRef<HTMLButtonElement, ButtonProps>(\n function DrawerCloseButton({ className, ...rest }, ref) {\n const targetWindow = useWindow();\n useComponentCssInjection({\n testId: \"salt-drawer-close-button\",\n css: drawerCloseButtonCss,\n window: targetWindow,\n });\n\n return (\n <div className={withBaseName(\"container\")}>\n <Button\n ref={ref}\n aria-label=\"Close Drawer\"\n variant=\"secondary\"\n className={clsx(withBaseName(), className)}\n {...rest}\n >\n <CloseIcon aria-hidden />\n </Button>\n </div>\n );\n }\n);\n"],"names":["DrawerCloseButton","drawerCloseButtonCss"],"mappings":";;;;;;;;;;;;;;AAUA,MAAM,YAAA,GAAe,aAAa,uBAAuB,CAAA,CAAA;AAElD,MAAM,iBAAoB,GAAA,UAAA;AAAA,EAC/B,SAASA,kBAAkB,CAAA,EAAE,SAAc,EAAA,GAAA,IAAA,IAAQ,GAAK,EAAA;AACtD,IAAA,MAAM,eAAe,SAAU,EAAA,CAAA;AAC/B,IAAyB,wBAAA,CAAA;AAAA,MACvB,MAAQ,EAAA,0BAAA;AAAA,MACR,GAAK,EAAAC,QAAA;AAAA,MACL,MAAQ,EAAA,YAAA;AAAA,KACT,CAAA,CAAA;AAED,IAAA,uBACG,GAAA,CAAA,KAAA,EAAA;AAAA,MAAI,SAAA,EAAW,aAAa,WAAW,CAAA;AAAA,MACtC,QAAC,kBAAA,GAAA,CAAA,MAAA,EAAA;AAAA,QACC,GAAA;AAAA,QACA,YAAW,EAAA,cAAA;AAAA,QACX,OAAQ,EAAA,WAAA;AAAA,QACR,SAAW,EAAA,IAAA,CAAK,YAAa,EAAA,EAAG,SAAS,CAAA;AAAA,QACxC,GAAG,IAAA;AAAA,QAEJ,QAAC,kBAAA,GAAA,CAAA,SAAA,EAAA;AAAA,UAAU,aAAW,EAAA,IAAA;AAAA,SAAC,CAAA;AAAA,OACzB,CAAA;AAAA,KACF,CAAA,CAAA;AAAA,GAEJ;AACF;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var css_248z = ".saltFileDropZone {\n color: var(--saltFileDropZone-text-color, var(--salt-text-primary-foreground));\n display: inline-flex;\n background: var(--saltFileDropZone-background, var(--salt-container-primary-background));\n text-align: center;\n align-items: center;\n justify-content: center;\n border: var(--saltFileDropZone-border, var(--salt-size-border-strong) var(--salt-target-borderStyle) var(--salt-container-primary-borderColor));\n flex-direction: column;\n padding: var(--salt-spacing-200);\n gap: var(--salt-spacing-200);\n width: 100%;\n font-size: var(--saltFileDropZone-fontSize, var(--salt-text-fontSize));\n font-family: var(--saltFileDropZone-fontFamily, var(--salt-text-fontFamily));\n line-height: var(--saltFileDropZone-lineHeight, var(--salt-text-lineHeight));\n box-sizing: border-box;\n}\n\n.saltFileDropZone-active {\n background: var(--salt-target-background-hover);\n border: var(--salt-size-border-strong) var(--salt-target-borderStyle-hover) var(--salt-target-borderColor-hover);\n}\n\n/* Styles applied if `status=\"error\" */\n.saltFileDropZone-error {\n border: var(--salt-size-border-strong) var(--salt-target-borderStyle) var(--salt-status-error-borderColor);\n}\n\n/* Styles applied if `status=\"success\" */\n.saltFileDropZone-success {\n border: var(--salt-size-border-strong) var(--salt-target-borderStyle) var(--salt-status-success-borderColor);\n}\n\n.saltFileDropZone .input-hidden {\n display: none;\n}\n\n/* Styles applied if `disabled={true}` */\n.saltFileDropZone-disabled {\n background: var(--salt-container-primary-background-disabled);\n border: var(--salt-size-border-strong) var(--salt-target-borderStyle) var(--salt-container-primary-borderColor-disabled);\n cursor: var(--salt-target-cursor-disabled);\n color: var(--salt-content-primary-foreground-disabled);\n}\n";
|
|
1
|
+
var css_248z = ".saltFileDropZone {\n color: var(--saltFileDropZone-text-color, var(--salt-text-primary-foreground));\n display: inline-flex;\n background: var(--saltFileDropZone-background, var(--salt-container-primary-background));\n text-align: center;\n align-items: center;\n justify-content: center;\n border: var(--saltFileDropZone-border, var(--salt-size-border-strong) var(--salt-target-borderStyle) var(--salt-container-primary-borderColor));\n border-radius: var(--saltFileDropZone-borderRadius, var(--salt-palette-corner, 0));\n flex-direction: column;\n padding: var(--salt-spacing-200);\n gap: var(--salt-spacing-200);\n width: 100%;\n font-size: var(--saltFileDropZone-fontSize, var(--salt-text-fontSize));\n font-family: var(--saltFileDropZone-fontFamily, var(--salt-text-fontFamily));\n line-height: var(--saltFileDropZone-lineHeight, var(--salt-text-lineHeight));\n box-sizing: border-box;\n}\n\n.saltFileDropZone-active {\n background: var(--salt-target-background-hover);\n border: var(--salt-size-border-strong) var(--salt-target-borderStyle-hover) var(--salt-target-borderColor-hover);\n}\n\n/* Styles applied if `status=\"error\" */\n.saltFileDropZone-error {\n border: var(--salt-size-border-strong) var(--salt-target-borderStyle) var(--salt-status-error-borderColor);\n}\n\n/* Styles applied if `status=\"success\" */\n.saltFileDropZone-success {\n border: var(--salt-size-border-strong) var(--salt-target-borderStyle) var(--salt-status-success-borderColor);\n}\n\n.saltFileDropZone .input-hidden {\n display: none;\n}\n\n/* Styles applied if `disabled={true}` */\n.saltFileDropZone-disabled {\n background: var(--salt-container-primary-background-disabled);\n border: var(--salt-size-border-strong) var(--salt-target-borderStyle) var(--salt-container-primary-borderColor-disabled);\n cursor: var(--salt-target-cursor-disabled);\n color: var(--salt-content-primary-foreground-disabled);\n}\n";
|
|
2
2
|
|
|
3
3
|
export { css_248z as default };
|
|
4
4
|
//# sourceMappingURL=FileDropZone.css.js.map
|
package/dist-es/index.js
CHANGED
|
@@ -22,6 +22,14 @@ export { InteractableCard } from './card/InteractableCard.js';
|
|
|
22
22
|
export { Checkbox } from './checkbox/Checkbox.js';
|
|
23
23
|
export { CheckboxGroup } from './checkbox/CheckboxGroup.js';
|
|
24
24
|
export { CheckboxIcon } from './checkbox/CheckboxIcon.js';
|
|
25
|
+
export { ConditionalScrimWrapper, Dialog } from './dialog/Dialog.js';
|
|
26
|
+
export { DialogHeader } from './dialog/DialogHeader.js';
|
|
27
|
+
export { DialogActions } from './dialog/DialogActions.js';
|
|
28
|
+
export { DialogContent } from './dialog/DialogContent.js';
|
|
29
|
+
export { DialogContext, useDialogContext } from './dialog/DialogContext.js';
|
|
30
|
+
export { DialogCloseButton } from './dialog/DialogCloseButton.js';
|
|
31
|
+
export { Drawer } from './drawer/Drawer.js';
|
|
32
|
+
export { DrawerCloseButton } from './drawer/DrawerCloseButton.js';
|
|
25
33
|
export { FileDropZone } from './file-drop-zone/FileDropZone.js';
|
|
26
34
|
export { FileDropZoneIcon } from './file-drop-zone/FileDropZoneIcon.js';
|
|
27
35
|
export { FileDropZoneTrigger } from './file-drop-zone/FileDropZoneTrigger.js';
|
|
@@ -37,6 +45,7 @@ export { GRID_ALIGNMENT_BASE, GridItem } from './grid-item/GridItem.js';
|
|
|
37
45
|
export { GridLayout } from './grid-layout/GridLayout.js';
|
|
38
46
|
export { Input } from './input/Input.js';
|
|
39
47
|
export { Link } from './link/Link.js';
|
|
48
|
+
export { LinkCard } from './link-card/LinkCard.js';
|
|
40
49
|
export { MultilineInput } from './multiline-input/MultilineInput.js';
|
|
41
50
|
export { NavigationItem } from './navigation-item/NavigationItem.js';
|
|
42
51
|
export { Pagination } from './pagination/Pagination.js';
|
|
@@ -66,9 +75,10 @@ export { TextAction } from './text/TextAction.js';
|
|
|
66
75
|
export { DensityValues } from './theme/Density.js';
|
|
67
76
|
export { getCharacteristicValue } from './theme/Theme.js';
|
|
68
77
|
export { ModeValues } from './theme/Mode.js';
|
|
78
|
+
export { UNSTABLE_CornerValues } from './theme/Corner.js';
|
|
69
79
|
export { Toast } from './toast/Toast.js';
|
|
70
80
|
export { ToastContent } from './toast/ToastContent.js';
|
|
71
|
-
export { BreakpointContext, DEFAULT_DENSITY, DensityContext, SaltProvider, ThemeContext, useBreakpoints, useDensity, useTheme } from './salt-provider/SaltProvider.js';
|
|
81
|
+
export { BreakpointContext, DEFAULT_DENSITY, DensityContext, SaltProvider, ThemeContext, UNSTABLE_SaltProviderNext, useBreakpoints, useDensity, useTheme } from './salt-provider/SaltProvider.js';
|
|
72
82
|
export { SplitLayout } from './split-layout/SplitLayout.js';
|
|
73
83
|
export { Switch } from './switch/Switch.js';
|
|
74
84
|
export { ToggleButton } from './toggle-button/ToggleButton.js';
|
package/dist-es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist-es/link/Link.css.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var css_248z = ".saltLink {\n --link-color-hover: var(--saltLink-color-hover, var(--salt-content-foreground-hover));\n --link-color-active: var(--saltLink-color-active, var(--salt-content-foreground-active));\n --link-color-visited: var(--saltLink-color-visited, var(--salt-content-foreground-visited));\n /* When focused, we also want hover style */\n --link-color-focus: var(--saltLink-color-focus, var(--link-color-hover));\n\n --link-textDecoration: var(--salt-navigable-textDecoration);\n --link-textDecoration-hover: var(--salt-navigable-textDecoration-hover);\n\n --link-fontFamily: var(--salt-text-fontFamily);\n --link-focus-outline: var(--salt-focused-outline);\n}\n\n/* Main css class */\n.saltLink {\n color: var(--link-color);\n letter-spacing:
|
|
1
|
+
var css_248z = ".saltLink {\n --link-color-hover: var(--saltLink-color-hover, var(--salt-content-foreground-hover));\n --link-color-active: var(--saltLink-color-active, var(--salt-content-foreground-active));\n --link-color-visited: var(--saltLink-color-visited, var(--salt-content-foreground-visited));\n /* When focused, we also want hover style */\n --link-color-focus: var(--saltLink-color-focus, var(--link-color-hover));\n\n --link-textDecoration: var(--salt-navigable-textDecoration);\n --link-textDecoration-hover: var(--salt-navigable-textDecoration-hover);\n\n --link-fontFamily: var(--salt-text-fontFamily);\n --link-focus-outline: var(--salt-focused-outline);\n}\n\n/* Main css class */\n.saltLink {\n color: var(--link-color);\n letter-spacing: var(--salt-text-letterSpacing);\n text-decoration: var(--link-textDecoration);\n font-family: var(--link-fontFamily);\n}\n\n/* Primary variant */\n.saltText-primary {\n --link-color: var(--salt-content-primary-foreground);\n}\n\n/* Secondary variant */\n.saltText-secondary {\n --link-color: var(--salt-content-secondary-foreground);\n}\n\n/* External link's icon */\n.saltLink .saltLink-icon {\n margin-left: var(--salt-spacing-75);\n margin-bottom: -2px;\n}\n\n/* Set color for visited link */\n.saltLink:visited {\n color: var(--link-color-visited);\n}\n\n/* Set color for hovered link */\n.saltLink:hover {\n color: var(--link-color-hover);\n text-decoration: var(--link-textDecoration-hover);\n}\n\n/* Set color for active link */\n.saltLink:active {\n color: var(--link-color-active);\n}\n\n/* Set color for focused link */\n.saltLink:focus {\n outline: var(--link-focus-outline);\n color: var(--link-color-focus);\n text-decoration: var(--link-textDecoration-hover);\n}\n\n/* Class for ADA content */\n.saltLink-externalLinkADA {\n display: block;\n position: absolute;\n width: 1px;\n height: 1px;\n overflow: hidden;\n top: 0px;\n left: 0px;\n opacity: 0;\n}\n";
|
|
2
2
|
|
|
3
3
|
export { css_248z as default };
|
|
4
4
|
//# sourceMappingURL=Link.css.js.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var css_248z = "/* Styles applied to LinkCard */\n.saltLinkCard {\n border-width: var(--saltLinkCard-borderWidth, var(--salt-size-border));\n border-style: var(--saltLinkCard-borderStyle, var(--salt-container-borderStyle));\n border-radius: var(--saltLinkCard-borderRadius, 0);\n display: block;\n padding: var(--saltLinkCard-padding, var(--salt-spacing-200));\n position: relative;\n text-decoration: none;\n transition: box-shadow var(--salt-duration-instant) ease-in-out;\n}\n\n/* Styles applied to LinkCard when variant=\"primary\" */\n.saltLinkCard-primary {\n background: var(--saltLinkCard-background, var(--salt-container-primary-background));\n border-color: var(--salt-container-primary-borderColor);\n --linkCard-accent-color: var(--salt-container-primary-borderColor);\n}\n\n/* Styles applied to LinkCard when variant=\"secondary\" */\n.saltLinkCard-secondary {\n background: var(--saltLinkCard-background, var(--salt-container-secondary-background));\n border-color: var(--salt-container-secondary-borderColor);\n --linkCard-accent-color: var(--salt-container-secondary-borderColor);\n}\n\n/* Styles applied to create accent */\n.saltLinkCard-accent::after {\n content: \"\";\n position: absolute;\n background-color: var(--saltLinkCard-accent-color, var(--linkCard-accent-color));\n}\n\n/* Styles applied to LinkCard if `accent=\"bottom\"` (default) */\n.saltLinkCard-accentBottom::after {\n left: calc(-1 * var(--salt-size-border));\n bottom: calc(-1 * var(--salt-size-border));\n height: var(--salt-size-accent);\n width: calc(100% + calc(2 * var(--salt-size-border)));\n}\n\n/* Styles applied to LinkCard if `accent=\"left\"` */\n.saltLinkCard-accentLeft::after {\n left: calc(-1 * var(--salt-size-border));\n top: calc(-1 * var(--salt-size-border));\n height: calc(100% + calc(2 * var(--salt-size-border)));\n width: var(--salt-size-accent);\n}\n\n/* Styles applied to LinkCard if `accent=\"top\"` */\n.saltLinkCard-accentTop::after {\n left: calc(-1 * var(--salt-size-border));\n top: calc(-1 * var(--salt-size-border));\n height: var(--salt-size-accent);\n width: calc(100% + calc(2 * var(--salt-size-border)));\n}\n\n/* Styles applied to LinkCard if `accent=\"right\"` */\n.saltLinkCard-accentRight::after {\n right: calc(-1 * var(--salt-size-border));\n top: calc(-1 * var(--salt-size-border));\n height: calc(100% + calc(2 * var(--salt-size-border)));\n width: var(--salt-size-accent);\n}\n\n/* Styles applied to LinkCard on focus */\n.saltLinkCard:focus-visible {\n cursor: var(--salt-selectable-cursor-hover);\n box-shadow: var(--salt-overlayable-shadow-hover);\n outline-color: var(--salt-focused-outlineColor);\n outline-style: var(--salt-focused-outlineStyle);\n outline-width: var(--salt-focused-outlineWidth);\n outline-offset: var(--salt-focused-outlineOffset);\n --linkCard-accent-color: var(--salt-selectable-foreground-hover);\n}\n\n/* Styles applied on hover state to LinkCard */\n.saltLinkCard:hover {\n cursor: var(--salt-selectable-cursor-hover);\n box-shadow: var(--salt-overlayable-shadow-hover);\n --linkCard-accent-color: var(--salt-selectable-foreground-hover);\n}\n\n/* Styles applied on active state to LinkCard */\n.saltLinkCard:active {\n cursor: var(--salt-selectable-cursor-active);\n border-color: var(--salt-selectable-borderColor-selected);\n box-shadow: var(--salt-overlayable-shadow);\n --linkCard-accent-color: var(--salt-selectable-foreground-selected);\n}\n";
|
|
2
|
+
|
|
3
|
+
export { css_248z as default };
|
|
4
|
+
//# sourceMappingURL=LinkCard.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LinkCard.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { useWindow } from '@salt-ds/window';
|
|
5
|
+
import { useComponentCssInjection } from '@salt-ds/styles';
|
|
6
|
+
import { capitalize } from '../utils/capitalize.js';
|
|
7
|
+
import { makePrefixer } from '../utils/makePrefixer.js';
|
|
8
|
+
import '../utils/useFloatingUI/useFloatingUI.js';
|
|
9
|
+
import '../utils/useId.js';
|
|
10
|
+
import '../salt-provider/SaltProvider.js';
|
|
11
|
+
import '../viewport/ViewportProvider.js';
|
|
12
|
+
import css_248z from './LinkCard.css.js';
|
|
13
|
+
|
|
14
|
+
const withBaseName = makePrefixer("saltLinkCard");
|
|
15
|
+
const LinkCard = forwardRef(
|
|
16
|
+
function LinkCard2(props, ref) {
|
|
17
|
+
const {
|
|
18
|
+
accent,
|
|
19
|
+
children,
|
|
20
|
+
className,
|
|
21
|
+
href,
|
|
22
|
+
variant = "primary",
|
|
23
|
+
...rest
|
|
24
|
+
} = props;
|
|
25
|
+
const targetWindow = useWindow();
|
|
26
|
+
useComponentCssInjection({
|
|
27
|
+
testId: "salt-link-card",
|
|
28
|
+
css: css_248z,
|
|
29
|
+
window: targetWindow
|
|
30
|
+
});
|
|
31
|
+
return /* @__PURE__ */ jsx("a", {
|
|
32
|
+
className: clsx(
|
|
33
|
+
withBaseName(),
|
|
34
|
+
withBaseName(variant),
|
|
35
|
+
{
|
|
36
|
+
[withBaseName("accent")]: accent,
|
|
37
|
+
[withBaseName(`accent${capitalize(accent != null ? accent : "")}`)]: accent
|
|
38
|
+
},
|
|
39
|
+
className
|
|
40
|
+
),
|
|
41
|
+
href,
|
|
42
|
+
...rest,
|
|
43
|
+
ref,
|
|
44
|
+
children
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
export { LinkCard };
|
|
50
|
+
//# sourceMappingURL=LinkCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LinkCard.js","sources":["../src/link-card/LinkCard.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { ComponentPropsWithoutRef, forwardRef } from \"react\";\nimport { useWindow } from \"@salt-ds/window\";\nimport { useComponentCssInjection } from \"@salt-ds/styles\";\n\nimport { capitalize, makePrefixer } from \"../utils\";\n\nimport linkCardCss from \"./LinkCard.css\";\n\nconst withBaseName = makePrefixer(\"saltLinkCard\");\n\nexport interface LinkCardProps extends ComponentPropsWithoutRef<\"a\"> {\n /**\n * If provided an accent is shown in the specified position.\n */\n accent?: \"bottom\" | \"top\" | \"left\" | \"right\";\n /**\n * Styling variant; defaults to \"primary\".\n */\n variant?: \"primary\" | \"secondary\";\n}\n\nexport const LinkCard = forwardRef<HTMLAnchorElement, LinkCardProps>(\n function LinkCard(props, ref) {\n const {\n accent,\n children,\n className,\n href,\n variant = \"primary\",\n ...rest\n } = props;\n\n const targetWindow = useWindow();\n useComponentCssInjection({\n testId: \"salt-link-card\",\n css: linkCardCss,\n window: targetWindow,\n });\n\n return (\n <a\n className={clsx(\n withBaseName(),\n withBaseName(variant),\n {\n [withBaseName(\"accent\")]: accent,\n [withBaseName(`accent${capitalize(accent ?? \"\")}`)]: accent,\n },\n className\n )}\n href={href}\n {...rest}\n ref={ref}\n >\n {children}\n </a>\n );\n }\n);\n"],"names":["LinkCard","linkCardCss"],"mappings":";;;;;;;;;;;;;AASA,MAAM,YAAA,GAAe,aAAa,cAAc,CAAA,CAAA;AAazC,MAAM,QAAW,GAAA,UAAA;AAAA,EACtB,SAASA,SAAS,CAAA,KAAA,EAAO,GAAK,EAAA;AAC5B,IAAM,MAAA;AAAA,MACJ,MAAA;AAAA,MACA,QAAA;AAAA,MACA,SAAA;AAAA,MACA,IAAA;AAAA,MACA,OAAU,GAAA,SAAA;AAAA,MACP,GAAA,IAAA;AAAA,KACD,GAAA,KAAA,CAAA;AAEJ,IAAA,MAAM,eAAe,SAAU,EAAA,CAAA;AAC/B,IAAyB,wBAAA,CAAA;AAAA,MACvB,MAAQ,EAAA,gBAAA;AAAA,MACR,GAAK,EAAAC,QAAA;AAAA,MACL,MAAQ,EAAA,YAAA;AAAA,KACT,CAAA,CAAA;AAED,IAAA,uBACG,GAAA,CAAA,GAAA,EAAA;AAAA,MACC,SAAW,EAAA,IAAA;AAAA,QACT,YAAa,EAAA;AAAA,QACb,aAAa,OAAO,CAAA;AAAA,QACpB;AAAA,UACE,CAAC,YAAa,CAAA,QAAQ,CAAI,GAAA,MAAA;AAAA,UAC1B,CAAC,YAAa,CAAA,CAAA,MAAA,EAAS,WAAW,MAAU,IAAA,IAAA,GAAA,MAAA,GAAA,EAAE,GAAG,CAAI,GAAA,MAAA;AAAA,SACvD;AAAA,QACA,SAAA;AAAA,OACF;AAAA,MACA,IAAA;AAAA,MACC,GAAG,IAAA;AAAA,MACJ,GAAA;AAAA,MAEC,QAAA;AAAA,KACH,CAAA,CAAA;AAAA,GAEJ;AACF;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var css_248z = "/* Style applied to the root element */\n.saltMultilineInput {\n --multilineInput-borderColor: var(--salt-editable-borderColor);\n --multilineInput-borderStyle: var(--salt-editable-borderStyle);\n --multilineInput-outlineColor: var(--salt-focused-outlineColor);\n --multilineInput-border: none;\n --multilineInput-activationIndicator-borderWidth: var(--salt-size-border);\n\n align-items: center;\n background: var(--multilineInput-background);\n border: var(--multilineInput-border);\n color: var(--salt-content-primary-foreground);\n display: inline-flex;\n font-family: var(--salt-text-fontFamily);\n font-size: var(--salt-text-fontSize);\n height: auto;\n line-height: var(--salt-text-lineHeight);\n min-height: var(--salt-size-base);\n min-width: 4em;\n padding-left: var(--salt-spacing-100);\n padding-right: var(--salt-spacing-100);\n position: relative;\n width: 100%;\n}\n\n/* Style applied on hover */\n.saltMultilineInput:hover {\n --multilineInput-borderStyle: var(--salt-editable-borderStyle-hover);\n --multilineInput-borderColor: var(--salt-editable-borderColor-hover);\n\n background: var(--multilineInput-background-hover);\n cursor: var(--salt-editable-cursor-hover);\n}\n\n/* Style applied when active */\n.saltMultilineInput:active {\n --multilineInput-borderColor: var(--salt-editable-borderColor-active);\n --multilineInput-borderStyle: var(--salt-editable-borderStyle-active);\n --multilineInput-activationIndicator-borderWidth: var(--salt-editable-borderWidth-active);\n\n background: var(--multilineInput-background-active);\n cursor: var(--salt-editable-cursor-active);\n}\n\n/* Class applied if `variant=\"primary\"` */\n.saltMultilineInput-primary {\n --multilineInput-background: var(--salt-editable-primary-background);\n --multilineInput-background-active: var(--salt-editable-primary-background-active);\n --multilineInput-background-hover: var(--salt-editable-primary-background-hover);\n --multilineInput-background-disabled: var(--salt-editable-primary-background-disabled);\n --multilineInput-background-readonly: var(--salt-editable-primary-background-readonly);\n}\n\n/* Class applied if `variant=\"secondary\"` */\n.saltMultilineInput-secondary {\n --multilineInput-background: var(--salt-editable-secondary-background);\n --multilineInput-background-active: var(--salt-editable-secondary-background-active);\n --multilineInput-background-hover: var(--salt-editable-secondary-background-active);\n --multilineInput-background-disabled: var(--salt-editable-secondary-background-disabled);\n --multilineInput-background-readonly: var(--salt-editable-secondary-background-readonly);\n}\n\n/* Style applied to input if `validationState=\"error\"` */\n.saltMultilineInput-error,\n.saltMultilineInput-error:hover {\n --multilineInput-background: var(--salt-status-error-background);\n --multilineInput-background-active: var(--salt-status-error-background);\n --multilineInput-background-hover: var(--salt-status-error-background);\n --multilineInput-borderColor: var(--salt-status-error-borderColor);\n --multilineInput-outlineColor: var(--salt-status-error-borderColor);\n}\n\n/* Style applied to input if `validationState=\"warning\"` */\n.saltMultilineInput-warning,\n.saltMultilineInput-warning:hover {\n --multilineInput-background: var(--salt-status-warning-background);\n --multilineInput-background-active: var(--salt-status-warning-background);\n --multilineInput-background-hover: var(--salt-status-warning-background);\n --multilineInput-borderColor: var(--salt-status-warning-borderColor);\n --multilineInput-outlineColor: var(--salt-status-warning-borderColor);\n}\n\n/* Style applied to input if `validationState=\"success\"` */\n.saltMultilineInput-success,\n.saltMultilineInput-success:hover {\n --multilineInput-background: var(--salt-status-success-background);\n --multilineInput-background-active: var(--salt-status-success-background);\n --multilineInput-background-hover: var(--salt-status-success-background);\n --multilineInput-borderColor: var(--salt-status-success-borderColor);\n --multilineInput-outlineColor: var(--salt-status-success-borderColor);\n}\n\n.saltMultilineInput.saltMultilineInput-withAdornmentRow {\n display: flex;\n flex-wrap: wrap;\n}\n\n/* Style applied to inner textarea element */\n.saltMultilineInput-textarea {\n background: none;\n border: none;\n box-sizing: border-box;\n color: inherit;\n cursor: inherit;\n flex-grow: 1;\n font: inherit;\n letter-spacing: 0;\n line-height: var(--salt-text-lineHeight);\n margin: var(--salt-spacing-75) 0;\n min-width: 0;\n min-height: 0;\n resize: vertical;\n padding: 0;\n}\n\n/* Style applied to placeholder */\n.saltMultilineInput-textarea::placeholder {\n font-weight: var(--salt-text-fontWeight-small);\n}\n\n/* Reset in the class */\n.saltMultilineInput-textarea:focus {\n outline: none;\n}\n\n/* Style applied to selected input */\n.saltMultilineInput-textarea::selection {\n background: var(--salt-content-foreground-highlight);\n}\n\n/* Styling when focused */\n.saltMultilineInput-focused {\n --multilineInput-borderColor: var(--multilineInput-outlineColor);\n --multilineInput-activationIndicator-borderWidth: var(--salt-editable-borderWidth-active);\n\n outline: var(--salt-focused-outlineWidth) var(--salt-focused-outlineStyle) var(--multilineInput-outlineColor);\n}\n\n/* Style applied if `readOnly={true}` */\n.saltMultilineInput-readOnly,\n.saltMultilineInput-readOnly:active,\n.saltMultilineInput-readOnly:hover {\n --multilineInput-borderColor: var(--salt-editable-borderColor-readonly);\n --multilineInput-borderStyle: var(--salt-editable-borderStyle-readonly);\n --multilineInput-activationIndicator-borderWidth: var(--salt-size-border);\n\n background: var(--multilineInput-background-readonly);\n cursor: var(--salt-editable-cursor-readonly);\n}\n\n/* Style applied to selected text if `disabled={true}` */\n.saltMultilineInput-disabled .saltMultilineInput-textarea::selection {\n background: none;\n}\n\n/* Style applied when `disabled={true}` */\n.saltMultilineInput-disabled,\n.saltMultilineInput-disabled:hover,\n.saltMultilineInput-disabled:active {\n --multilineInput-borderColor: var(--salt-editable-borderColor-disabled);\n --multilineInput-borderStyle: var(--salt-editable-borderStyle-disabled);\n --multilineInput-activationIndicator-borderWidth: var(--salt-size-border);\n\n background: var(--multilineInput-background-disabled);\n cursor: var(--salt-editable-cursor-disabled);\n color: var(--salt-content-primary-foreground-disabled);\n}\n\n/* Style for activation indicator */\n.saltMultilineInput-activationIndicator {\n left: 0;\n bottom: 0;\n width: 100%;\n position: absolute;\n border-bottom: var(--multilineInput-activationIndicator-borderWidth) var(--multilineInput-borderStyle) var(--multilineInput-borderColor);\n}\n\n/* Style applied if `bordered={true}` */\n.saltMultilineInput.saltMultilineInput-bordered {\n --multilineInput-border: var(--salt-size-border) var(--salt-container-borderStyle) var(--multilineInput-borderColor);\n --multilineInput-activationIndicator-borderWidth: 0;\n}\n\n/* Style applied if active or focused when `bordered={true}` */\n.saltMultilineInput-bordered:active,\n.saltMultilineInput-bordered.saltMultilineInput-focused {\n --multilineInput-activationIndicator-borderWidth: var(--salt-editable-borderWidth-active);\n}\n\n/* Styling when focused if `disabled={true}` or `readOnly={true}` when `bordered={true}` */\n.saltMultilineInput-bordered.saltMultilineInput-readOnly:hover,\n.saltMultilineInput-bordered.saltMultilineInput-disabled:hover {\n --multilineInput-activationIndicator-borderWidth: 0;\n}\n\n/* Style applied to adornment containers */\n.saltMultilineInput-endAdornmentContainer,\n.saltMultilineInput-startAdornmentContainer {\n align-items: center;\n display: inline-flex;\n min-height: var(--salt-size-base);\n column-gap: var(--salt-spacing-100);\n}\n\n/* Style applied to start adornment container */\n.saltMultilineInput-startAdornmentContainer {\n align-self: self-start;\n padding-right: var(--salt-spacing-100);\n}\n\n/* Style applied to suffix adornment container */\n.saltMultilineInput-suffixAdornments {\n align-self: self-end;\n}\n\n/* Style applied to suffix adornment container when end adornments are provided */\n.saltMultilineInput-withAdornmentRow .saltMultilineInput-suffixAdornments {\n display: inline-flex;\n flex-basis: 100%;\n justify-content: flex-end;\n}\n\n/* Style applied to end adornment container */\n.saltMultilineInput-endAdornmentContainer {\n padding-left: var(--salt-spacing-100);\n}\n\n/* Style applied to status adornment container */\n.saltMultilineInput-statusAdornmentContainer {\n align-self: self-end;\n display: inline-flex;\n min-height: var(--salt-size-base);\n}\n\n/* Style applied to button start adornment if first child */\n.saltMultilineInput-startAdornmentContainer .saltButton:first-child {\n margin-left: calc(var(--salt-spacing-50) * -1);\n}\n\n/* Style applied to button end adornment if last child */\n.saltMultilineInput-endAdornmentContainer .saltButton:last-child {\n margin-right: calc(var(--salt-spacing-50) * -1);\n}\n\n/* Style applied to button end adornment if last child */\n.saltMultilineInput-readOnly .saltMultilineInput-endAdornmentContainer .saltButton:last-child {\n margin-right: 0;\n}\n\n/* Styles for button adornment */\n.saltMultilineInput-startAdornmentContainer > .saltButton,\n.saltMultilineInput-endAdornmentContainer > .saltButton {\n --saltButton-padding: var(--salt-spacing-50);\n --saltButton-height: calc(var(--salt-size-base) - var(--salt-spacing-100));\n}\n";
|
|
1
|
+
var css_248z = "/* Style applied to the root element */\n.saltMultilineInput {\n --multilineInput-borderColor: var(--salt-editable-borderColor);\n --multilineInput-borderStyle: var(--salt-editable-borderStyle);\n --multilineInput-outlineColor: var(--salt-focused-outlineColor);\n --multilineInput-border: none;\n --multilineInput-activationIndicator-borderWidth: var(--salt-size-border);\n\n align-items: center;\n background: var(--multilineInput-background);\n border: var(--multilineInput-border);\n color: var(--salt-content-primary-foreground);\n display: inline-flex;\n font-family: var(--salt-text-fontFamily);\n font-size: var(--salt-text-fontSize);\n height: auto;\n line-height: var(--salt-text-lineHeight);\n min-height: var(--salt-size-base);\n min-width: 4em;\n padding-left: var(--salt-spacing-100);\n padding-right: var(--salt-spacing-100);\n position: relative;\n width: 100%;\n box-sizing: border-box;\n}\n\n/* Style applied on hover */\n.saltMultilineInput:hover {\n --multilineInput-borderStyle: var(--salt-editable-borderStyle-hover);\n --multilineInput-borderColor: var(--salt-editable-borderColor-hover);\n\n background: var(--multilineInput-background-hover);\n cursor: var(--salt-editable-cursor-hover);\n}\n\n/* Style applied when active */\n.saltMultilineInput:active {\n --multilineInput-borderColor: var(--salt-editable-borderColor-active);\n --multilineInput-borderStyle: var(--salt-editable-borderStyle-active);\n --multilineInput-activationIndicator-borderWidth: var(--salt-editable-borderWidth-active);\n\n background: var(--multilineInput-background-active);\n cursor: var(--salt-editable-cursor-active);\n}\n\n/* Class applied if `variant=\"primary\"` */\n.saltMultilineInput-primary {\n --multilineInput-background: var(--salt-editable-primary-background);\n --multilineInput-background-active: var(--salt-editable-primary-background-active);\n --multilineInput-background-hover: var(--salt-editable-primary-background-hover);\n --multilineInput-background-disabled: var(--salt-editable-primary-background-disabled);\n --multilineInput-background-readonly: var(--salt-editable-primary-background-readonly);\n}\n\n/* Class applied if `variant=\"secondary\"` */\n.saltMultilineInput-secondary {\n --multilineInput-background: var(--salt-editable-secondary-background);\n --multilineInput-background-active: var(--salt-editable-secondary-background-active);\n --multilineInput-background-hover: var(--salt-editable-secondary-background-active);\n --multilineInput-background-disabled: var(--salt-editable-secondary-background-disabled);\n --multilineInput-background-readonly: var(--salt-editable-secondary-background-readonly);\n}\n\n/* Style applied to input if `validationState=\"error\"` */\n.saltMultilineInput-error,\n.saltMultilineInput-error:hover {\n --multilineInput-background: var(--salt-status-error-background);\n --multilineInput-background-active: var(--salt-status-error-background);\n --multilineInput-background-hover: var(--salt-status-error-background);\n --multilineInput-borderColor: var(--salt-status-error-borderColor);\n --multilineInput-outlineColor: var(--salt-status-error-borderColor);\n}\n\n/* Style applied to input if `validationState=\"warning\"` */\n.saltMultilineInput-warning,\n.saltMultilineInput-warning:hover {\n --multilineInput-background: var(--salt-status-warning-background);\n --multilineInput-background-active: var(--salt-status-warning-background);\n --multilineInput-background-hover: var(--salt-status-warning-background);\n --multilineInput-borderColor: var(--salt-status-warning-borderColor);\n --multilineInput-outlineColor: var(--salt-status-warning-borderColor);\n}\n\n/* Style applied to input if `validationState=\"success\"` */\n.saltMultilineInput-success,\n.saltMultilineInput-success:hover {\n --multilineInput-background: var(--salt-status-success-background);\n --multilineInput-background-active: var(--salt-status-success-background);\n --multilineInput-background-hover: var(--salt-status-success-background);\n --multilineInput-borderColor: var(--salt-status-success-borderColor);\n --multilineInput-outlineColor: var(--salt-status-success-borderColor);\n}\n\n.saltMultilineInput.saltMultilineInput-withAdornmentRow {\n display: flex;\n flex-wrap: wrap;\n}\n\n/* Style applied to inner textarea element */\n.saltMultilineInput-textarea {\n background: none;\n border: none;\n box-sizing: border-box;\n color: inherit;\n cursor: inherit;\n flex-grow: 1;\n font: inherit;\n letter-spacing: 0;\n line-height: var(--salt-text-lineHeight);\n margin: var(--salt-spacing-75) 0;\n min-width: 0;\n min-height: 0;\n resize: vertical;\n padding: 0;\n}\n\n/* Style applied to placeholder */\n.saltMultilineInput-textarea::placeholder {\n font-weight: var(--salt-text-fontWeight-small);\n}\n\n/* Reset in the class */\n.saltMultilineInput-textarea:focus {\n outline: none;\n}\n\n/* Style applied to selected input */\n.saltMultilineInput-textarea::selection {\n background: var(--salt-content-foreground-highlight);\n}\n\n/* Styling when focused */\n.saltMultilineInput-focused {\n --multilineInput-borderColor: var(--multilineInput-outlineColor);\n --multilineInput-activationIndicator-borderWidth: var(--salt-editable-borderWidth-active);\n\n outline: var(--salt-focused-outlineWidth) var(--salt-focused-outlineStyle) var(--multilineInput-outlineColor);\n}\n\n/* Style applied if `readOnly={true}` */\n.saltMultilineInput-readOnly,\n.saltMultilineInput-readOnly:active,\n.saltMultilineInput-readOnly:hover {\n --multilineInput-borderColor: var(--salt-editable-borderColor-readonly);\n --multilineInput-borderStyle: var(--salt-editable-borderStyle-readonly);\n --multilineInput-activationIndicator-borderWidth: var(--salt-size-border);\n\n background: var(--multilineInput-background-readonly);\n cursor: var(--salt-editable-cursor-readonly);\n}\n\n/* Style applied to selected text if `disabled={true}` */\n.saltMultilineInput-disabled .saltMultilineInput-textarea::selection {\n background: none;\n}\n\n/* Style applied when `disabled={true}` */\n.saltMultilineInput-disabled,\n.saltMultilineInput-disabled:hover,\n.saltMultilineInput-disabled:active {\n --multilineInput-borderColor: var(--salt-editable-borderColor-disabled);\n --multilineInput-borderStyle: var(--salt-editable-borderStyle-disabled);\n --multilineInput-activationIndicator-borderWidth: var(--salt-size-border);\n\n background: var(--multilineInput-background-disabled);\n cursor: var(--salt-editable-cursor-disabled);\n color: var(--salt-content-primary-foreground-disabled);\n}\n\n/* Style for activation indicator */\n.saltMultilineInput-activationIndicator {\n left: 0;\n bottom: 0;\n width: 100%;\n position: absolute;\n border-bottom: var(--multilineInput-activationIndicator-borderWidth) var(--multilineInput-borderStyle) var(--multilineInput-borderColor);\n}\n\n/* Style applied if `bordered={true}` */\n.saltMultilineInput.saltMultilineInput-bordered {\n --multilineInput-border: var(--salt-size-border) var(--salt-container-borderStyle) var(--multilineInput-borderColor);\n --multilineInput-activationIndicator-borderWidth: 0;\n}\n\n/* Style applied if active or focused when `bordered={true}` */\n.saltMultilineInput-bordered:active,\n.saltMultilineInput-bordered.saltMultilineInput-focused {\n --multilineInput-activationIndicator-borderWidth: var(--salt-editable-borderWidth-active);\n}\n\n/* Styling when focused if `disabled={true}` or `readOnly={true}` when `bordered={true}` */\n.saltMultilineInput-bordered.saltMultilineInput-readOnly:hover,\n.saltMultilineInput-bordered.saltMultilineInput-disabled:hover {\n --multilineInput-activationIndicator-borderWidth: 0;\n}\n\n/* Style applied to adornment containers */\n.saltMultilineInput-endAdornmentContainer,\n.saltMultilineInput-startAdornmentContainer {\n align-items: center;\n display: inline-flex;\n min-height: var(--salt-size-base);\n column-gap: var(--salt-spacing-100);\n}\n\n/* Style applied to start adornment container */\n.saltMultilineInput-startAdornmentContainer {\n align-self: self-start;\n padding-right: var(--salt-spacing-100);\n}\n\n/* Style applied to suffix adornment container */\n.saltMultilineInput-suffixAdornments {\n align-self: self-end;\n}\n\n/* Style applied to suffix adornment container when end adornments are provided */\n.saltMultilineInput-withAdornmentRow .saltMultilineInput-suffixAdornments {\n display: inline-flex;\n flex-basis: 100%;\n justify-content: flex-end;\n}\n\n/* Style applied to end adornment container */\n.saltMultilineInput-endAdornmentContainer {\n padding-left: var(--salt-spacing-100);\n}\n\n/* Style applied to status adornment container */\n.saltMultilineInput-statusAdornmentContainer {\n align-self: self-end;\n display: inline-flex;\n min-height: var(--salt-size-base);\n}\n\n/* Style applied to button start adornment if first child */\n.saltMultilineInput-startAdornmentContainer .saltButton:first-child {\n margin-left: calc(var(--salt-spacing-50) * -1);\n}\n\n/* Style applied to button end adornment if last child */\n.saltMultilineInput-endAdornmentContainer .saltButton:last-child {\n margin-right: calc(var(--salt-spacing-50) * -1);\n}\n\n/* Style applied to button end adornment if last child */\n.saltMultilineInput-readOnly .saltMultilineInput-endAdornmentContainer .saltButton:last-child {\n margin-right: 0;\n}\n\n/* Styles for button adornment */\n.saltMultilineInput-startAdornmentContainer > .saltButton,\n.saltMultilineInput-endAdornmentContainer > .saltButton {\n --saltButton-padding: var(--salt-spacing-50);\n --saltButton-height: calc(var(--salt-size-base) - var(--salt-spacing-100));\n}\n";
|
|
2
2
|
|
|
3
3
|
export { css_248z as default };
|
|
4
4
|
//# sourceMappingURL=MultilineInput.css.js.map
|