@salt-ds/lab 1.0.0-alpha.27 → 1.0.0-alpha.29

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.
Files changed (186) hide show
  1. package/css/salt-lab.css +33 -309
  2. package/dist-cjs/color-chooser/ColorChooser.css.js +1 -1
  3. package/dist-cjs/color-chooser/ColorChooser.js +52 -55
  4. package/dist-cjs/color-chooser/ColorChooser.js.map +1 -1
  5. package/dist-cjs/index.js +4 -22
  6. package/dist-cjs/index.js.map +1 -1
  7. package/dist-cjs/layer-layout/LayerLayout.js +1 -2
  8. package/dist-cjs/layer-layout/LayerLayout.js.map +1 -1
  9. package/dist-cjs/overlay/Overlay.css.js +1 -1
  10. package/dist-cjs/overlay/Overlay.js +89 -60
  11. package/dist-cjs/overlay/Overlay.js.map +1 -1
  12. package/dist-cjs/overlay/OverlayContext.js +43 -0
  13. package/dist-cjs/overlay/OverlayContext.js.map +1 -0
  14. package/dist-cjs/overlay/OverlayPanel.js +64 -0
  15. package/dist-cjs/overlay/OverlayPanel.js.map +1 -0
  16. package/dist-cjs/overlay/OverlayPanelBase.js +65 -0
  17. package/dist-cjs/overlay/OverlayPanelBase.js.map +1 -0
  18. package/dist-cjs/overlay/OverlayTrigger.js +40 -0
  19. package/dist-cjs/overlay/OverlayTrigger.js.map +1 -0
  20. package/dist-es/color-chooser/ColorChooser.css.js +1 -1
  21. package/dist-es/color-chooser/ColorChooser.js +53 -56
  22. package/dist-es/color-chooser/ColorChooser.js.map +1 -1
  23. package/dist-es/index.js +2 -11
  24. package/dist-es/index.js.map +1 -1
  25. package/dist-es/layer-layout/LayerLayout.js +1 -2
  26. package/dist-es/layer-layout/LayerLayout.js.map +1 -1
  27. package/dist-es/overlay/Overlay.css.js +1 -1
  28. package/dist-es/overlay/Overlay.js +91 -62
  29. package/dist-es/overlay/Overlay.js.map +1 -1
  30. package/dist-es/overlay/OverlayContext.js +38 -0
  31. package/dist-es/overlay/OverlayContext.js.map +1 -0
  32. package/dist-es/overlay/OverlayPanel.js +60 -0
  33. package/dist-es/overlay/OverlayPanel.js.map +1 -0
  34. package/dist-es/overlay/OverlayPanelBase.js +57 -0
  35. package/dist-es/overlay/OverlayPanelBase.js.map +1 -0
  36. package/dist-es/overlay/OverlayTrigger.js +36 -0
  37. package/dist-es/overlay/OverlayTrigger.js.map +1 -0
  38. package/dist-types/index.d.ts +0 -4
  39. package/dist-types/layer-layout/LayerLayout.d.ts +1 -1
  40. package/dist-types/overlay/Overlay.d.ts +6 -14
  41. package/dist-types/overlay/OverlayContext.d.ts +26 -0
  42. package/dist-types/overlay/OverlayPanel.d.ts +4 -0
  43. package/dist-types/overlay/OverlayPanelBase.d.ts +2 -0
  44. package/dist-types/overlay/OverlayTrigger.d.ts +5 -0
  45. package/dist-types/overlay/index.d.ts +2 -1
  46. package/package.json +2 -2
  47. package/dist-cjs/file-drop-zone/FileDropZone.css.js +0 -6
  48. package/dist-cjs/file-drop-zone/FileDropZone.css.js.map +0 -1
  49. package/dist-cjs/file-drop-zone/FileDropZone.js +0 -94
  50. package/dist-cjs/file-drop-zone/FileDropZone.js.map +0 -1
  51. package/dist-cjs/file-drop-zone/FileDropZoneIcon.js +0 -25
  52. package/dist-cjs/file-drop-zone/FileDropZoneIcon.js.map +0 -1
  53. package/dist-cjs/file-drop-zone/FileDropZoneTrigger.js +0 -52
  54. package/dist-cjs/file-drop-zone/FileDropZoneTrigger.js.map +0 -1
  55. package/dist-cjs/file-drop-zone/internal/utils.js +0 -30
  56. package/dist-cjs/file-drop-zone/internal/utils.js.map +0 -1
  57. package/dist-cjs/navigation-item/ConditionalWrapper.js +0 -35
  58. package/dist-cjs/navigation-item/ConditionalWrapper.js.map +0 -1
  59. package/dist-cjs/navigation-item/ExpansionIcon.js +0 -29
  60. package/dist-cjs/navigation-item/ExpansionIcon.js.map +0 -1
  61. package/dist-cjs/navigation-item/NavigationItem.css.js +0 -6
  62. package/dist-cjs/navigation-item/NavigationItem.css.js.map +0 -1
  63. package/dist-cjs/navigation-item/NavigationItem.js +0 -78
  64. package/dist-cjs/navigation-item/NavigationItem.js.map +0 -1
  65. package/dist-cjs/overlay/useOverlay.js +0 -97
  66. package/dist-cjs/overlay/useOverlay.js.map +0 -1
  67. package/dist-cjs/pagination/CompactInput.css.js +0 -6
  68. package/dist-cjs/pagination/CompactInput.css.js.map +0 -1
  69. package/dist-cjs/pagination/CompactInput.js +0 -62
  70. package/dist-cjs/pagination/CompactInput.js.map +0 -1
  71. package/dist-cjs/pagination/CompactPaginator.css.js +0 -6
  72. package/dist-cjs/pagination/CompactPaginator.css.js.map +0 -1
  73. package/dist-cjs/pagination/CompactPaginator.js +0 -76
  74. package/dist-cjs/pagination/CompactPaginator.js.map +0 -1
  75. package/dist-cjs/pagination/GoToInput.css.js +0 -6
  76. package/dist-cjs/pagination/GoToInput.css.js.map +0 -1
  77. package/dist-cjs/pagination/GoToInput.js +0 -77
  78. package/dist-cjs/pagination/GoToInput.js.map +0 -1
  79. package/dist-cjs/pagination/PageButton.css.js +0 -6
  80. package/dist-cjs/pagination/PageButton.css.js.map +0 -1
  81. package/dist-cjs/pagination/PageButton.js +0 -44
  82. package/dist-cjs/pagination/PageButton.js.map +0 -1
  83. package/dist-cjs/pagination/PageRanges.css.js +0 -6
  84. package/dist-cjs/pagination/PageRanges.css.js.map +0 -1
  85. package/dist-cjs/pagination/PageRanges.js +0 -73
  86. package/dist-cjs/pagination/PageRanges.js.map +0 -1
  87. package/dist-cjs/pagination/Pagination.css.js +0 -6
  88. package/dist-cjs/pagination/Pagination.css.js.map +0 -1
  89. package/dist-cjs/pagination/Pagination.js +0 -78
  90. package/dist-cjs/pagination/Pagination.js.map +0 -1
  91. package/dist-cjs/pagination/PaginationContext.js +0 -17
  92. package/dist-cjs/pagination/PaginationContext.js.map +0 -1
  93. package/dist-cjs/pagination/Paginator.css.js +0 -6
  94. package/dist-cjs/pagination/Paginator.css.js.map +0 -1
  95. package/dist-cjs/pagination/Paginator.js +0 -69
  96. package/dist-cjs/pagination/Paginator.js.map +0 -1
  97. package/dist-cjs/pagination/usePagination.js +0 -27
  98. package/dist-cjs/pagination/usePagination.js.map +0 -1
  99. package/dist-cjs/pagination/usePaginationContext.js +0 -19
  100. package/dist-cjs/pagination/usePaginationContext.js.map +0 -1
  101. package/dist-cjs/scrim/Scrim.css.js +0 -6
  102. package/dist-cjs/scrim/Scrim.css.js.map +0 -1
  103. package/dist-cjs/scrim/Scrim.js +0 -40
  104. package/dist-cjs/scrim/Scrim.js.map +0 -1
  105. package/dist-es/file-drop-zone/FileDropZone.css.js +0 -4
  106. package/dist-es/file-drop-zone/FileDropZone.css.js.map +0 -1
  107. package/dist-es/file-drop-zone/FileDropZone.js +0 -90
  108. package/dist-es/file-drop-zone/FileDropZone.js.map +0 -1
  109. package/dist-es/file-drop-zone/FileDropZoneIcon.js +0 -21
  110. package/dist-es/file-drop-zone/FileDropZoneIcon.js.map +0 -1
  111. package/dist-es/file-drop-zone/FileDropZoneTrigger.js +0 -48
  112. package/dist-es/file-drop-zone/FileDropZoneTrigger.js.map +0 -1
  113. package/dist-es/file-drop-zone/internal/utils.js +0 -25
  114. package/dist-es/file-drop-zone/internal/utils.js.map +0 -1
  115. package/dist-es/navigation-item/ConditionalWrapper.js +0 -31
  116. package/dist-es/navigation-item/ConditionalWrapper.js.map +0 -1
  117. package/dist-es/navigation-item/ExpansionIcon.js +0 -25
  118. package/dist-es/navigation-item/ExpansionIcon.js.map +0 -1
  119. package/dist-es/navigation-item/NavigationItem.css.js +0 -4
  120. package/dist-es/navigation-item/NavigationItem.css.js.map +0 -1
  121. package/dist-es/navigation-item/NavigationItem.js +0 -74
  122. package/dist-es/navigation-item/NavigationItem.js.map +0 -1
  123. package/dist-es/overlay/useOverlay.js +0 -93
  124. package/dist-es/overlay/useOverlay.js.map +0 -1
  125. package/dist-es/pagination/CompactInput.css.js +0 -4
  126. package/dist-es/pagination/CompactInput.css.js.map +0 -1
  127. package/dist-es/pagination/CompactInput.js +0 -58
  128. package/dist-es/pagination/CompactInput.js.map +0 -1
  129. package/dist-es/pagination/CompactPaginator.css.js +0 -4
  130. package/dist-es/pagination/CompactPaginator.css.js.map +0 -1
  131. package/dist-es/pagination/CompactPaginator.js +0 -72
  132. package/dist-es/pagination/CompactPaginator.js.map +0 -1
  133. package/dist-es/pagination/GoToInput.css.js +0 -4
  134. package/dist-es/pagination/GoToInput.css.js.map +0 -1
  135. package/dist-es/pagination/GoToInput.js +0 -73
  136. package/dist-es/pagination/GoToInput.js.map +0 -1
  137. package/dist-es/pagination/PageButton.css.js +0 -4
  138. package/dist-es/pagination/PageButton.css.js.map +0 -1
  139. package/dist-es/pagination/PageButton.js +0 -40
  140. package/dist-es/pagination/PageButton.js.map +0 -1
  141. package/dist-es/pagination/PageRanges.css.js +0 -4
  142. package/dist-es/pagination/PageRanges.css.js.map +0 -1
  143. package/dist-es/pagination/PageRanges.js +0 -69
  144. package/dist-es/pagination/PageRanges.js.map +0 -1
  145. package/dist-es/pagination/Pagination.css.js +0 -4
  146. package/dist-es/pagination/Pagination.css.js.map +0 -1
  147. package/dist-es/pagination/Pagination.js +0 -74
  148. package/dist-es/pagination/Pagination.js.map +0 -1
  149. package/dist-es/pagination/PaginationContext.js +0 -13
  150. package/dist-es/pagination/PaginationContext.js.map +0 -1
  151. package/dist-es/pagination/Paginator.css.js +0 -4
  152. package/dist-es/pagination/Paginator.css.js.map +0 -1
  153. package/dist-es/pagination/Paginator.js +0 -65
  154. package/dist-es/pagination/Paginator.js.map +0 -1
  155. package/dist-es/pagination/usePagination.js +0 -23
  156. package/dist-es/pagination/usePagination.js.map +0 -1
  157. package/dist-es/pagination/usePaginationContext.js +0 -15
  158. package/dist-es/pagination/usePaginationContext.js.map +0 -1
  159. package/dist-es/scrim/Scrim.css.js +0 -4
  160. package/dist-es/scrim/Scrim.css.js.map +0 -1
  161. package/dist-es/scrim/Scrim.js +0 -36
  162. package/dist-es/scrim/Scrim.js.map +0 -1
  163. package/dist-types/file-drop-zone/FileDropZone.d.ts +0 -17
  164. package/dist-types/file-drop-zone/FileDropZoneIcon.d.ts +0 -9
  165. package/dist-types/file-drop-zone/FileDropZoneTrigger.d.ts +0 -22
  166. package/dist-types/file-drop-zone/index.d.ts +0 -3
  167. package/dist-types/file-drop-zone/internal/utils.d.ts +0 -3
  168. package/dist-types/navigation-item/ConditionalWrapper.d.ts +0 -8
  169. package/dist-types/navigation-item/ExpansionIcon.d.ts +0 -2
  170. package/dist-types/navigation-item/NavigationItem.d.ts +0 -36
  171. package/dist-types/navigation-item/index.d.ts +0 -1
  172. package/dist-types/overlay/useOverlay.d.ts +0 -8
  173. package/dist-types/pagination/CompactInput.d.ts +0 -2
  174. package/dist-types/pagination/CompactPaginator.d.ts +0 -1
  175. package/dist-types/pagination/GoToInput.d.ts +0 -16
  176. package/dist-types/pagination/PageButton.d.ts +0 -6
  177. package/dist-types/pagination/PageRanges.d.ts +0 -5
  178. package/dist-types/pagination/Pagination.d.ts +0 -20
  179. package/dist-types/pagination/PaginationContext.d.ts +0 -7
  180. package/dist-types/pagination/Paginator.d.ts +0 -12
  181. package/dist-types/pagination/index.d.ts +0 -5
  182. package/dist-types/pagination/usePagination.d.ts +0 -2
  183. package/dist-types/pagination/usePaginationContext.d.ts +0 -1
  184. package/dist-types/scrim/Scrim.d.ts +0 -13
  185. package/dist-types/scrim/index.d.ts +0 -1
  186. package/dist-types/scrim/internal/PreventFocus.d.ts +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OverlayPanel.js","sources":["../src/overlay/OverlayPanel.tsx"],"sourcesContent":["import {\n ComponentPropsWithoutRef,\n ForwardedRef,\n forwardRef,\n HTMLProps,\n} from \"react\";\nimport { makePrefixer, useFloatingComponent, useForkRef } from \"@salt-ds/core\";\nimport { clsx } from \"clsx\";\nimport { useOverlayContext } from \"./OverlayContext\";\nimport { FloatingOverlay } from \"@floating-ui/react\";\nimport { OverlayPanelBase } from \"./OverlayPanelBase\";\n\nconst withBaseName = makePrefixer(\"saltOverlayPanel\");\n\nexport interface OverlayPanelProps extends ComponentPropsWithoutRef<\"div\"> {}\n\nexport const OverlayPanel = forwardRef<HTMLDivElement, OverlayPanelProps>(\n function OverlayPanel(props, ref: ForwardedRef<HTMLDivElement>) {\n const { className, ...rest } = props;\n\n const { Component: FloatingComponent } = useFloatingComponent();\n\n const {\n id,\n openState,\n floatingStyles,\n placement,\n context,\n getFloatingProps,\n floating,\n } = useOverlayContext();\n\n const handleRef = useForkRef<HTMLDivElement>(floating, ref);\n\n const { top, left, width, height, position } = floatingStyles;\n\n const getOverlayProps = (): HTMLProps<HTMLDivElement> => {\n return getFloatingProps({\n // @ts-ignore data-placement does not exist\n \"data-placement\": placement,\n ref: floating,\n id: `${id}-panel`,\n });\n };\n\n if (!openState) return <></>;\n\n return (\n <FloatingOverlay>\n <FloatingComponent\n open={openState}\n className={clsx(withBaseName(), className)}\n aria-modal=\"true\"\n aria-labelledby={`${id}-header`}\n aria-describedby={`${id}-content`}\n {...getOverlayProps()}\n ref={handleRef}\n width={width}\n height={height}\n top={top}\n left={left}\n position={position}\n focusManagerProps={{\n context: context,\n }}\n >\n <OverlayPanelBase {...rest} />\n </FloatingComponent>\n </FloatingOverlay>\n );\n }\n);\n"],"names":["OverlayPanel"],"mappings":";;;;;;;;AAYA,MAAM,YAAA,GAAe,aAAa,kBAAkB,CAAA,CAAA;AAI7C,MAAM,YAAe,GAAA,UAAA;AAAA,EAC1B,SAASA,aAAa,CAAA,KAAA,EAAO,GAAmC,EAAA;AAC9D,IAAM,MAAA,EAAE,SAAc,EAAA,GAAA,IAAA,EAAS,GAAA,KAAA,CAAA;AAE/B,IAAA,MAAM,EAAE,SAAA,EAAW,iBAAkB,EAAA,GAAI,oBAAqB,EAAA,CAAA;AAE9D,IAAM,MAAA;AAAA,MACJ,EAAA;AAAA,MACA,SAAA;AAAA,MACA,cAAA;AAAA,MACA,SAAA;AAAA,MACA,OAAA;AAAA,MACA,gBAAA;AAAA,MACA,QAAA;AAAA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sxs, Fragment, jsx } from 'react/jsx-runtime';
2
+ import { FloatingArrow } from '@floating-ui/react';
3
+ import css_248z from './Overlay.css.js';
4
+ import { useWindow } from '@salt-ds/window';
5
+ import { useComponentCssInjection } from '@salt-ds/styles';
6
+ import { makePrefixer, Button } from '@salt-ds/core';
7
+ import { CloseIcon } from '@salt-ds/icons';
8
+ import { useOverlayContext } from './OverlayContext.js';
9
+ import clsx from 'clsx';
10
+
11
+ const withBaseName = makePrefixer("saltOverlayPanelBase");
12
+ const OverlayPanelBase = (props) => {
13
+ const targetWindow = useWindow();
14
+ useComponentCssInjection({
15
+ testId: "salt-overlay",
16
+ css: css_248z,
17
+ window: targetWindow
18
+ });
19
+ const { arrowProps, handleCloseButton } = useOverlayContext();
20
+ const { children, className, ...rest } = props;
21
+ return /* @__PURE__ */ jsxs(Fragment, {
22
+ children: [
23
+ /* @__PURE__ */ jsxs("div", {
24
+ className: clsx(withBaseName("container"), className),
25
+ ...rest,
26
+ children: [
27
+ /* @__PURE__ */ jsx(Button, {
28
+ onClick: handleCloseButton,
29
+ variant: "secondary",
30
+ className: withBaseName("closeButton"),
31
+ "aria-label": "Close Overlay",
32
+ children: /* @__PURE__ */ jsx(CloseIcon, {
33
+ "aria-hidden": true
34
+ })
35
+ }),
36
+ /* @__PURE__ */ jsx("div", {
37
+ className: withBaseName("content"),
38
+ children
39
+ })
40
+ ]
41
+ }),
42
+ /* @__PURE__ */ jsx(FloatingArrow, {
43
+ ...arrowProps,
44
+ strokeWidth: 1,
45
+ fill: "var(--overlay-background)",
46
+ stroke: "var(--overlay-borderColor)",
47
+ style: {
48
+ height: "calc(var(--salt-size-adornment) + 6px)",
49
+ width: "calc(var(--salt-size-adornment) + 8px)"
50
+ }
51
+ })
52
+ ]
53
+ });
54
+ };
55
+
56
+ export { OverlayPanelBase };
57
+ //# sourceMappingURL=OverlayPanelBase.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OverlayPanelBase.js","sources":["../src/overlay/OverlayPanelBase.tsx"],"sourcesContent":["import { FloatingArrow } from \"@floating-ui/react\";\n\nimport overlayCss from \"./Overlay.css\";\nimport { useWindow } from \"@salt-ds/window\";\nimport { useComponentCssInjection } from \"@salt-ds/styles\";\nimport { Button, makePrefixer } from \"@salt-ds/core\";\nimport { CloseIcon } from \"@salt-ds/icons\";\nimport { ComponentPropsWithoutRef } from \"react\";\nimport { useOverlayContext } from \"./OverlayContext\";\nimport clsx from \"clsx\";\n\nconst withBaseName = makePrefixer(\"saltOverlayPanelBase\");\n\n// OverlayPanelBase component needed for CSS style injection\nexport const OverlayPanelBase = (props: ComponentPropsWithoutRef<\"div\">) => {\n const targetWindow = useWindow();\n useComponentCssInjection({\n testId: \"salt-overlay\",\n css: overlayCss,\n window: targetWindow,\n });\n\n const { arrowProps, handleCloseButton } = useOverlayContext();\n const { children, className, ...rest } = props;\n\n return (\n <>\n <div className={clsx(withBaseName(\"container\"), className)} {...rest}>\n <Button\n onClick={handleCloseButton}\n variant=\"secondary\"\n className={withBaseName(\"closeButton\")}\n aria-label=\"Close Overlay\"\n >\n <CloseIcon aria-hidden />\n </Button>\n <div className={withBaseName(\"content\")}>{children}</div>\n </div>\n\n <FloatingArrow\n {...arrowProps}\n strokeWidth={1}\n fill=\"var(--overlay-background)\"\n stroke=\"var(--overlay-borderColor)\"\n style={{\n height: \"calc(var(--salt-size-adornment) + 6px)\", // FIXME: +6px to account for Floating UI's FloatingArrow positioning calculation\n width: \"calc(var(--salt-size-adornment) + 8px)\", // FIXME: +8px to account for Floating UI's FloatingArrow positioning calculation\n }}\n />\n </>\n );\n};\n"],"names":["overlayCss"],"mappings":";;;;;;;;;;AAWA,MAAM,YAAA,GAAe,aAAa,sBAAsB,CAAA,CAAA;AAG3C,MAAA,gBAAA,GAAmB,CAAC,KAA2C,KAAA;AAC1E,EAAA,MAAM,eAAe,SAAU,EAAA,CAAA;AAC/B,EAAyB,wBAAA,CAAA;AAAA,IACvB,MAAQ,EAAA,cAAA;AAAA,IACR,GAA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from 'react/jsx-runtime';
2
+ import { isValidElement, cloneElement } from 'react';
3
+ import { useForkRef, mergeProps } from '@salt-ds/core';
4
+ import { useOverlayContext } from './OverlayContext.js';
5
+
6
+ function OverlayTrigger(props) {
7
+ const { children } = props;
8
+ const { setOpen, reference, getReferenceProps, id } = useOverlayContext();
9
+ const triggerRef = useForkRef(
10
+ isValidElement(children) ? children.ref : null,
11
+ reference
12
+ );
13
+ if (!children || !isValidElement(children)) {
14
+ return /* @__PURE__ */ jsx(Fragment, {
15
+ children
16
+ });
17
+ }
18
+ const handleClick = (event) => {
19
+ setOpen(event, true);
20
+ };
21
+ const getTriggerProps = () => getReferenceProps({
22
+ ref: reference,
23
+ onClick: handleClick,
24
+ id: `${id}-trigger`,
25
+ "aria-controls": `${id}-panel`
26
+ });
27
+ return /* @__PURE__ */ jsx(Fragment, {
28
+ children: cloneElement(children, {
29
+ ...mergeProps(getTriggerProps(), children.props),
30
+ ref: triggerRef
31
+ })
32
+ });
33
+ }
34
+
35
+ export { OverlayTrigger };
36
+ //# sourceMappingURL=OverlayTrigger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OverlayTrigger.js","sources":["../src/overlay/OverlayTrigger.tsx"],"sourcesContent":["import { cloneElement, isValidElement, ReactNode, MouseEvent } from \"react\";\nimport { mergeProps, useForkRef } from \"@salt-ds/core\";\nimport { useOverlayContext } from \"./OverlayContext\";\n\nexport interface OverlayTriggerProps {\n children?: ReactNode;\n}\n\nexport function OverlayTrigger(props: OverlayTriggerProps) {\n const { children } = props;\n\n const { setOpen, reference, getReferenceProps, id } = useOverlayContext();\n\n const triggerRef = useForkRef(\n // @ts-ignore error TS2339 missing property ref\n isValidElement(children) ? children.ref : null,\n reference\n );\n\n if (!children || !isValidElement(children)) {\n return <>{children}</>;\n }\n const handleClick = (event: MouseEvent) => {\n setOpen(event, true);\n };\n\n const getTriggerProps = () =>\n getReferenceProps({\n ref: reference,\n onClick: handleClick,\n id: `${id}-trigger`,\n \"aria-controls\": `${id}-panel`,\n });\n\n return (\n <>\n {cloneElement(children, {\n ...mergeProps(getTriggerProps(), children.props),\n ref: triggerRef,\n })}\n </>\n );\n}\n"],"names":[],"mappings":";;;;;AAQO,SAAS,eAAe,KAA4B,EAAA;AACzD,EAAM,MAAA,EAAE,UAAa,GAAA,KAAA,CAAA;AAErB,EAAA,MAAM,EAAE,OAAS,EAAA,SAAA,EAAW,iBAAmB,EAAA,EAAA,KAAO,iBAAkB,EAAA,CAAA;AAExE,EAAA,MAAM,UAAa,GAAA,UAAA;AAAA,IAEjB,cAAe,CAAA,QAAQ,CAAI,GAAA,QAAA,CAAS,GAAM,GAAA,IAAA;AAAA,IAC1C,SAAA;AAAA,GACF,CAAA;AAEA,EAAA,IAAI,CAAC,QAAA,IAAY,CAAC,cAAA,CAAe,QAAQ,CAAG,EAAA;AAC1C,IAAO,uBAAA,GAAA,CAAA,QAAA,EAAA;AAAA,MAAG,QAAA;AAAA,KAAS,CAAA,CAAA;AAAA,GACrB;AACA,EAAM,MAAA,WAAA,GAAc,CAAC,KAAsB,KAAA;AACzC,IAAA,OAAA,CAAQ,OAAO,IAAI,CAAA,CAAA;AAAA,GACrB,CAAA;AAEA,EAAM,MAAA,eAAA,GAAkB,MACtB,iBAAkB,CAAA;AAAA,IAChB,GAAK,EAAA,SAAA;AAAA,IACL,OAAS,EAAA,WAAA;AAAA,IACT,IAAI,CAAG,EAAA,EAAA,CAAA,QAAA,CAAA;AAAA,IACP,iBAAiB,CAAG,EAAA,EAAA,CAAA,MAAA,CAAA;AAAA,GACrB,CAAA,CAAA;AAEH,EACE,uBAAA,GAAA,CAAA,QAAA,EAAA;AAAA,IACG,uBAAa,QAAU,EAAA;AAAA,MACtB,GAAG,UAAA,CAAW,eAAgB,EAAA,EAAG,SAAS,KAAK,CAAA;AAAA,MAC/C,GAAK,EAAA,UAAA;AAAA,KACN,CAAA;AAAA,GACH,CAAA,CAAA;AAEJ;;;;"}
@@ -20,7 +20,6 @@ export * from "./drawer";
20
20
  export * from "./dropdown";
21
21
  export * from "./dropdown-next";
22
22
  export * from "./editable-label";
23
- export * from "./file-drop-zone";
24
23
  export { FormFieldLegacy as FormField, type FormFieldLegacyProps as FormFieldProps, FormLabel, } from "./form-field-legacy";
25
24
  export * from "./form-field-context-legacy";
26
25
  export * from "./form-group";
@@ -32,17 +31,14 @@ export * from "./list-next";
32
31
  export * from "./logo";
33
32
  export * from "./menu-button";
34
33
  export * from "./metric";
35
- export * from "./navigation-item";
36
34
  export * from "./option";
37
35
  export * from "./overlay";
38
- export * from "./pagination";
39
36
  export * from "./parent-child-item";
40
37
  export * from "./parent-child-layout";
41
38
  export * from "./portal";
42
39
  export * from "./progress";
43
40
  export * from "./query-input";
44
41
  export * from "./responsive";
45
- export * from "./scrim";
46
42
  export * from "./search-input";
47
43
  export * from "./skip-link";
48
44
  export * from "./slider";
@@ -1,5 +1,5 @@
1
1
  import { HTMLAttributes } from "react";
2
- import { ScrimProps } from "../scrim";
2
+ import { ScrimProps } from "@salt-ds/core";
3
3
  import { Breakpoints } from "@salt-ds/core";
4
4
  export declare const LAYER_POSITIONS: readonly ["center", "left", "top", "right", "bottom"];
5
5
  export declare type LayerPositions = (typeof LAYER_POSITIONS)[number];
@@ -1,16 +1,8 @@
1
- import { UseFloatingUIProps } from "@salt-ds/core";
2
- import { ComponentProps, ComponentPropsWithoutRef } from "react";
3
- interface ADAExceptions {
4
- showClose?: boolean;
5
- }
6
- export interface OverlayProps extends ComponentPropsWithoutRef<"div">, Partial<Pick<UseFloatingUIProps, "onOpenChange" | "open">> {
7
- /**
8
- * object that houses ada related props.
9
- * adaExceptions.showClose defaults to true. It can be removed at the risk of ADA compliance
10
- */
11
- adaExceptions?: ADAExceptions;
12
- arrowProps?: ComponentProps<"div">;
13
- variant?: "primary" | "secondary";
1
+ import { ComponentPropsWithoutRef, SyntheticEvent } from "react";
2
+ export interface OverlayProps extends ComponentPropsWithoutRef<"div"> {
3
+ open?: boolean;
4
+ onOpenChange?: (event: SyntheticEvent, newOpen: boolean) => void;
5
+ placement?: "top" | "bottom" | "left" | "right";
6
+ onClose?: (event: SyntheticEvent) => void;
14
7
  }
15
8
  export declare const Overlay: import("react").ForwardRefExoticComponent<OverlayProps & import("react").RefAttributes<HTMLDivElement>>;
16
- export {};
@@ -0,0 +1,26 @@
1
+ import { FloatingArrowProps, FloatingContext, Placement, ReferenceType, Strategy } from "@floating-ui/react";
2
+ import { SyntheticEvent } from "react";
3
+ declare type FloatingStyleProps = {
4
+ top: number;
5
+ left: number;
6
+ position: Strategy;
7
+ width?: number;
8
+ height?: number;
9
+ };
10
+ export interface OverlayContextValue {
11
+ id: string;
12
+ openState: boolean;
13
+ setOpen: (event: SyntheticEvent, newOpen: boolean) => void;
14
+ floatingStyles: FloatingStyleProps;
15
+ placement: Placement;
16
+ arrowProps: FloatingArrowProps;
17
+ context: FloatingContext;
18
+ reference?: (node: ReferenceType | null) => void;
19
+ floating?: (node: HTMLElement | null) => void;
20
+ handleCloseButton: (event: SyntheticEvent) => void;
21
+ getFloatingProps: (userProps?: React.HTMLProps<HTMLElement> | undefined) => Record<string, unknown>;
22
+ getReferenceProps: (userProps?: React.HTMLProps<Element> | undefined) => Record<string, unknown>;
23
+ }
24
+ export declare const OverlayContext: import("react").Context<OverlayContextValue>;
25
+ export declare function useOverlayContext(): OverlayContextValue;
26
+ export {};
@@ -0,0 +1,4 @@
1
+ import { ComponentPropsWithoutRef } from "react";
2
+ export interface OverlayPanelProps extends ComponentPropsWithoutRef<"div"> {
3
+ }
4
+ export declare const OverlayPanel: import("react").ForwardRefExoticComponent<OverlayPanelProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,2 @@
1
+ import { ComponentPropsWithoutRef } from "react";
2
+ export declare const OverlayPanelBase: (props: ComponentPropsWithoutRef<"div">) => JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { ReactNode } from "react";
2
+ export interface OverlayTriggerProps {
3
+ children?: ReactNode;
4
+ }
5
+ export declare function OverlayTrigger(props: OverlayTriggerProps): JSX.Element;
@@ -1,2 +1,3 @@
1
1
  export * from "./Overlay";
2
- export * from "./useOverlay";
2
+ export * from "./OverlayTrigger";
3
+ export * from "./OverlayPanel";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salt-ds/lab",
3
- "version": "1.0.0-alpha.27",
3
+ "version": "1.0.0-alpha.29",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -26,7 +26,7 @@
26
26
  "react-window": "^1.8.6",
27
27
  "rifm": "^0.12.0",
28
28
  "tinycolor2": "^1.4.2",
29
- "@salt-ds/core": "^1.14.0",
29
+ "@salt-ds/core": "^1.16.0",
30
30
  "@salt-ds/window": "^0.1.1",
31
31
  "@salt-ds/styles": "^0.2.1",
32
32
  "@salt-ds/icons": "^1.9.1"
@@ -1,6 +0,0 @@
1
- 'use strict';
2
-
3
- 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}\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";
4
-
5
- module.exports = css_248z;
6
- //# sourceMappingURL=FileDropZone.css.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FileDropZone.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -1,94 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var jsxRuntime = require('react/jsx-runtime');
6
- var core = require('@salt-ds/core');
7
- var clsx = require('clsx');
8
- var React = require('react');
9
- var utils = require('./internal/utils.js');
10
- var window = require('@salt-ds/window');
11
- var styles = require('@salt-ds/styles');
12
- var FileDropZone$1 = require('./FileDropZone.css.js');
13
-
14
- const withBaseName = core.makePrefixer("saltFileDropZone");
15
- const FileDropZone = React.forwardRef(
16
- function FileDropZone2({
17
- status,
18
- className,
19
- children,
20
- disabled,
21
- onDragOver,
22
- onDragLeave,
23
- onDrop,
24
- ...restProps
25
- }, ref) {
26
- const targetWindow = window.useWindow();
27
- styles.useComponentCssInjection({
28
- testId: "salt-file-drop-zone",
29
- css: FileDropZone$1,
30
- window: targetWindow
31
- });
32
- const [isActive, setActive] = React.useState(false);
33
- const regionRef = React.useRef(null);
34
- const handleRef = core.useForkRef(ref, regionRef);
35
- const handleDragOver = (event) => {
36
- event.preventDefault();
37
- event.stopPropagation();
38
- if (disabled) {
39
- if (event.dataTransfer) {
40
- event.dataTransfer.dropEffect = "none";
41
- }
42
- return;
43
- }
44
- if (event.dataTransfer) {
45
- event.dataTransfer.dropEffect = "copy";
46
- }
47
- if (!isActive && utils.containsFiles(event)) {
48
- setActive(true);
49
- }
50
- onDragOver == null ? void 0 : onDragOver(event);
51
- };
52
- const handleDragLeave = (event) => {
53
- if (disabled) {
54
- return;
55
- }
56
- const region = regionRef == null ? void 0 : regionRef.current;
57
- const eventTarget = event.relatedTarget;
58
- if (eventTarget !== region && !(region == null ? void 0 : region.contains(eventTarget))) {
59
- setActive(false);
60
- }
61
- onDragLeave == null ? void 0 : onDragLeave(event);
62
- };
63
- const handleDrop = (event) => {
64
- if (disabled) {
65
- return;
66
- }
67
- event.preventDefault();
68
- const files = utils.extractFiles(event);
69
- setActive(false);
70
- onDrop == null ? void 0 : onDrop(event, files);
71
- };
72
- return /* @__PURE__ */ jsxRuntime.jsx("div", {
73
- className: clsx.clsx(
74
- withBaseName(),
75
- {
76
- [withBaseName(status)]: status,
77
- [withBaseName("active")]: isActive,
78
- [withBaseName("disabled")]: disabled
79
- },
80
- className
81
- ),
82
- "aria-disabled": disabled,
83
- onDragLeave: handleDragLeave,
84
- onDragOver: handleDragOver,
85
- onDrop: handleDrop,
86
- ref: handleRef,
87
- ...restProps,
88
- children
89
- });
90
- }
91
- );
92
-
93
- exports.FileDropZone = FileDropZone;
94
- //# sourceMappingURL=FileDropZone.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FileDropZone.js","sources":["../src/file-drop-zone/FileDropZone.tsx"],"sourcesContent":["import { makePrefixer, useForkRef, ValidationStatus } from \"@salt-ds/core\";\nimport { clsx } from \"clsx\";\nimport {\n DragEventHandler,\n forwardRef,\n DragEvent,\n useRef,\n useState,\n ComponentPropsWithoutRef,\n} from \"react\";\nimport { containsFiles, extractFiles } from \"./internal/utils\";\n\nimport { useWindow } from \"@salt-ds/window\";\nimport { useComponentCssInjection } from \"@salt-ds/styles\";\n\nimport fileDropZoneCss from \"./FileDropZone.css\";\n\nexport interface FileDropZoneProps\n extends Omit<ComponentPropsWithoutRef<\"div\">, \"onDrop\"> {\n /**\n * If `true`, the file drop zone will be disabled.\n */\n disabled?: boolean;\n /**\n * Status indicator to be displayed.\n */\n status?: Omit<ValidationStatus, \"info\" | \"warning\">;\n /**\n * Callback for on drop event\n */\n onDrop?: (event: DragEvent<HTMLDivElement>, files: File[]) => void;\n}\n\nconst withBaseName = makePrefixer(\"saltFileDropZone\");\n\nexport const FileDropZone = forwardRef<HTMLDivElement, FileDropZoneProps>(\n function FileDropZone(\n {\n status,\n className,\n children,\n disabled,\n onDragOver,\n onDragLeave,\n onDrop,\n ...restProps\n },\n ref\n ) {\n const targetWindow = useWindow();\n useComponentCssInjection({\n testId: \"salt-file-drop-zone\",\n css: fileDropZoneCss,\n window: targetWindow,\n });\n const [isActive, setActive] = useState(false);\n\n const regionRef = useRef<HTMLDivElement>(null);\n const handleRef = useForkRef(ref, regionRef);\n\n const handleDragOver: DragEventHandler<HTMLDivElement> = (event) => {\n // Need to cancel the default events to allow drop\n // https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API/Drag_operations#droptargets\n\n event.preventDefault();\n event.stopPropagation();\n\n if (disabled) {\n if (event.dataTransfer) {\n event.dataTransfer.dropEffect = \"none\";\n }\n return;\n }\n if (event.dataTransfer) {\n event.dataTransfer.dropEffect = \"copy\";\n }\n if (!isActive && containsFiles(event)) {\n setActive(true);\n }\n onDragOver?.(event);\n };\n\n const handleDragLeave: DragEventHandler<HTMLDivElement> = (event) => {\n if (disabled) {\n return;\n }\n const region = regionRef?.current;\n const eventTarget = event.relatedTarget;\n if (eventTarget !== region && !region?.contains(eventTarget as Node)) {\n setActive(false);\n }\n onDragLeave?.(event);\n };\n\n const handleDrop: DragEventHandler<HTMLDivElement> = (event) => {\n if (disabled) {\n return;\n }\n event.preventDefault();\n const files = extractFiles(event);\n setActive(false);\n onDrop?.(event, files);\n };\n\n return (\n <div\n className={clsx(\n withBaseName(),\n {\n [withBaseName(status as string)]: status,\n [withBaseName(\"active\")]: isActive,\n [withBaseName(\"disabled\")]: disabled,\n },\n className\n )}\n aria-disabled={disabled}\n onDragLeave={handleDragLeave}\n onDragOver={handleDragOver}\n onDrop={handleDrop}\n ref={handleRef}\n {...restProps}\n >\n {children}\n </div>\n );\n }\n);\n"],"names":["makePrefixer","forwardRef","FileDropZone","useWindow","useComponentCssInjection","fileDropZoneCss","useState","useRef","useForkRef","containsFiles","extractFiles","jsx","clsx"],"mappings":";;;;;;;;;;;;;AAiCA,MAAM,YAAA,GAAeA,kBAAa,kBAAkB,CAAA,CAAA;AAE7C,MAAM,YAAe,GAAAC,gBAAA;AAAA,EAC1B,SAASC,aACP,CAAA;AAAA,IACE,MAAA;AAAA,IACA,SAAA;AAAA,IACA,QAAA;AAAA,IACA,QAAA;AAAA,IACA,UAAA;AAAA,IACA,WAAA;AAAA,IACA,MAAA;AAAA,IACG,GAAA,SAAA;AAAA,KAEL,GACA,EAAA;AACA,IAAA,MAAM,eAAeC,gBAAU,EAAA,CAAA;AAC/B,IAAyBC,+BAAA,CAAA;AAAA,MACvB,MAAQ,EAAA,qBAAA;AAAA,MACR,GAAK,EAAAC,cAAA;AAAA,MACL,MAAQ,EAAA,YAAA;AAAA,KACT,CAAA,CAAA;AACD,IAAA,MAAM,CAAC,QAAA,EAAU,SAAS,CAAA,GAAIC,eAAS,KAAK,CAAA,CAAA;AAE5C,IAAM,MAAA,SAAA,GAAYC,aAAuB,IAAI,CAAA,CAAA;AAC7C,IAAM,MAAA,SAAA,GAAYC,eAAW,CAAA,GAAA,EAAK,SAAS,CAAA,CAAA;AAE3C,IAAM,MAAA,cAAA,GAAmD,CAAC,KAAU,KAAA;AAIlE,MAAA,KAAA,CAAM,cAAe,EAAA,CAAA;AACrB,MAAA,KAAA,CAAM,eAAgB,EAAA,CAAA;AAEtB,MAAA,IAAI,QAAU,EAAA;AACZ,QAAA,IAAI,MAAM,YAAc,EAAA;AACtB,UAAA,KAAA,CAAM,aAAa,UAAa,GAAA,MAAA,CAAA;AAAA,SAClC;AACA,QAAA,OAAA;AAAA,OACF;AACA,MAAA,IAAI,MAAM,YAAc,EAA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A;AAAA,MACC,SAAW,EAAAC,SAAA;AAAA,QACT,YAAa,EAAA;AAAA,QACb;AAAA,UACE,CAAC,YAAa,CAAA,MAAgB,CAAI,GAAA,MAAA;AAAA,UAClC,CAAC,YAAa,CAAA,QAAQ,CAAI,GAAA,QAAA;AAAA,UAC1B,CAAC,YAAa,CAAA,UAAU,CAAI,GAAA,QAAA;AAAA,SAC9B;AAAA,QACA,SAAA;AAAA,OACF;AAAA,MACA,eAAe,EAAA,QAAA;AAAA,MACf,WAAa,EAAA,eAAA;AAAA,MACb,UAAY,EAAA,cAAA;AAAA,MACZ,MAAQ,EAAA,UAAA;AAAA,MACR,GAAK,EAAA,SAAA;AAAA,MACJ,GAAG,SAAA;AAAA,MAEH,QAAA;AAAA,KACH,CAAA,CAAA;AAAA,GAEJ;AACF;;;;"}
@@ -1,25 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var jsxRuntime = require('react/jsx-runtime');
6
- var core = require('@salt-ds/core');
7
- var React = require('react');
8
- var icons = require('@salt-ds/icons');
9
-
10
- const FileDropZoneIcon = React.forwardRef(function FileDropZoneIcon2({ status, size = 2, ...rest }, ref) {
11
- const iconProps = {
12
- ref,
13
- size,
14
- ...rest
15
- };
16
- return status ? /* @__PURE__ */ jsxRuntime.jsx(core.StatusIndicator, {
17
- status,
18
- ...iconProps
19
- }) : /* @__PURE__ */ jsxRuntime.jsx(icons.UploadIcon, {
20
- ...iconProps
21
- });
22
- });
23
-
24
- exports.FileDropZoneIcon = FileDropZoneIcon;
25
- //# sourceMappingURL=FileDropZoneIcon.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FileDropZoneIcon.js","sources":["../src/file-drop-zone/FileDropZoneIcon.tsx"],"sourcesContent":["import { StatusIndicator, ValidationStatus } from \"@salt-ds/core\";\nimport { forwardRef } from \"react\";\nimport { IconProps, UploadIcon } from \"@salt-ds/icons\";\n\nexport interface FileDropZoneIconProps extends IconProps {\n /**\n * Status indicator to be displayed.\n */\n status?: ValidationStatus;\n}\n\nexport const FileDropZoneIcon = forwardRef<\n SVGSVGElement,\n FileDropZoneIconProps\n>(function FileDropZoneIcon({ status, size = 2, ...rest }, ref) {\n const iconProps = {\n ref,\n size,\n ...rest,\n };\n return status ? (\n <StatusIndicator status={status} {...iconProps} />\n ) : (\n <UploadIcon {...iconProps} />\n );\n});\n"],"names":["forwardRef","FileDropZoneIcon","jsx","StatusIndicator","UploadIcon"],"mappings":";;;;;;;;;AAWa,MAAA,gBAAA,GAAmBA,gBAG9B,CAAA,SAASC,iBAAiB,CAAA,EAAE,QAAQ,IAAO,GAAA,CAAA,EAAA,GAAM,IAAK,EAAA,EAAG,GAAK,EAAA;AAC9D,EAAA,MAAM,SAAY,GAAA;AAAA,IAChB,GAAA;AAAA,IACA,IAAA;AAAA,IACA,GAAG,IAAA;AAAA,GACL,CAAA;AACA,EAAA,OAAO,yBACJC,cAAA,CAAAC,oBAAA,EAAA;AAAA,IAAgB,MAAA;AAAA,IAAiB,GAAG,SAAA;AAAA,GAAW,oBAE/CD,cAAA,CAAAE,gBAAA,EAAA;AAAA,IAAY,GAAG,SAAA;AAAA,GAAW,CAAA,CAAA;AAE/B,CAAC;;;;"}
@@ -1,52 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var jsxRuntime = require('react/jsx-runtime');
6
- var core = require('@salt-ds/core');
7
- var React = require('react');
8
-
9
- const FileDropZoneTrigger = React.forwardRef(function FileDropZoneTrigger2({ accept, children, disabled, multiple = false, onChange, ...rest }, ref) {
10
- const buttonRef = React.useRef(null);
11
- const fileInputRef = React.useRef(null);
12
- const triggerRef = core.useForkRef(ref, buttonRef);
13
- const handleFocus = (event) => {
14
- var _a;
15
- event.stopPropagation();
16
- (_a = buttonRef.current) == null ? void 0 : _a.focus();
17
- };
18
- const handleClick = (event) => {
19
- var _a;
20
- event.stopPropagation();
21
- (_a = fileInputRef.current) == null ? void 0 : _a.click();
22
- };
23
- const handleChange = (event) => {
24
- var _a;
25
- const files = Array.from((_a = event.target.files) != null ? _a : []);
26
- onChange == null ? void 0 : onChange(event, files);
27
- };
28
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
29
- children: [
30
- /* @__PURE__ */ jsxRuntime.jsx(core.Button, {
31
- onClick: handleClick,
32
- disabled,
33
- ref: triggerRef,
34
- ...rest,
35
- children: children != null ? children : "Browse files"
36
- }),
37
- /* @__PURE__ */ jsxRuntime.jsx("input", {
38
- accept,
39
- className: "input-hidden",
40
- disabled,
41
- multiple,
42
- onChange: handleChange,
43
- onFocus: handleFocus,
44
- ref: fileInputRef,
45
- type: "file"
46
- })
47
- ]
48
- });
49
- });
50
-
51
- exports.FileDropZoneTrigger = FileDropZoneTrigger;
52
- //# sourceMappingURL=FileDropZoneTrigger.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FileDropZoneTrigger.js","sources":["../src/file-drop-zone/FileDropZoneTrigger.tsx"],"sourcesContent":["import { Button, useForkRef } from \"@salt-ds/core\";\nimport {\n FocusEvent,\n forwardRef,\n HTMLAttributes,\n SyntheticEvent,\n useRef,\n} from \"react\";\n\nexport interface FileDropZoneTriggerProps\n extends Omit<HTMLAttributes<HTMLButtonElement>, \"onChange\"> {\n /**\n * `accept` attribute for HTML <input>.\n *\n * A comma separated list of file types the user can pick from the file input dialog box.\n */\n accept?: string;\n /**\n * Disable all trigger elements.\n */\n disabled?: boolean;\n /**\n * Allows multiple files to be uploaded.\n */\n multiple?: boolean;\n /**\n * Callback for input change event\n */\n onChange?: (event: SyntheticEvent<HTMLInputElement>, files: File[]) => void;\n}\n\nexport const FileDropZoneTrigger = forwardRef<\n HTMLButtonElement,\n FileDropZoneTriggerProps\n>(function FileDropZoneTrigger(\n { accept, children, disabled, multiple = false, onChange, ...rest },\n ref\n) {\n const buttonRef = useRef<HTMLButtonElement>(null);\n const fileInputRef = useRef<HTMLInputElement>(null);\n const triggerRef = useForkRef(ref, buttonRef);\n\n // As an ADA requirement when dialog is closed and the focus is returned to the input, we need to\n // move focus back on the button element so that all labels can be announced correctly\n const handleFocus = (event: FocusEvent<HTMLInputElement>) => {\n event.stopPropagation();\n buttonRef.current?.focus();\n };\n\n const handleClick = (event: SyntheticEvent<HTMLButtonElement>) => {\n event.stopPropagation();\n fileInputRef.current?.click();\n };\n\n const handleChange = (event: SyntheticEvent<HTMLInputElement>) => {\n const files = Array.from((event.target as HTMLInputElement).files ?? []);\n onChange?.(event, files);\n };\n return (\n <>\n <Button\n onClick={handleClick}\n disabled={disabled}\n ref={triggerRef}\n {...rest}\n >\n {children ?? \"Browse files\"}\n </Button>\n <input\n accept={accept}\n className=\"input-hidden\"\n disabled={disabled}\n multiple={multiple}\n onChange={handleChange}\n onFocus={handleFocus}\n ref={fileInputRef}\n type=\"file\"\n />\n </>\n );\n});\n"],"names":["forwardRef","FileDropZoneTrigger","useRef","useForkRef","jsxs","Fragment","jsx","Button"],"mappings":";;;;;;;;AA+BO,MAAM,mBAAsB,GAAAA,gBAAA,CAGjC,SAASC,oBAAAA,CACT,EAAE,MAAA,EAAQ,QAAU,EAAA,QAAA,EAAU,QAAW,GAAA,KAAA,EAAO,QAAa,EAAA,GAAA,IAAA,IAC7D,GACA,EAAA;AACA,EAAM,MAAA,SAAA,GAAYC,aAA0B,IAAI,CAAA,CAAA;AAChD,EAAM,MAAA,YAAA,GAAeA,aAAyB,IAAI,CAAA,CAAA;AAClD,EAAM,MAAA,UAAA,GAAaC,eAAW,CAAA,GAAA,EAAK,SAAS,CAAA,CAAA;AAI5C,EAAM,MAAA,WAAA,GAAc,CAAC,KAAwC,KAAA;AA5C/D,IAAA,IAAA,EAAA,CAAA;AA6CI,IAAA,KAAA,CAAM,eAAgB,EAAA,CAAA;AACtB,IAAA,CAAA,EAAA,GAAA,SAAA,CAAU,YAAV,IAAmB,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,KAAA,EAAA,CAAA;AAAA,GACrB,CA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.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const containsFiles = (e) => {
6
- if (!e.dataTransfer) {
7
- const target = e.target;
8
- return target == null ? void 0 : target.files;
9
- }
10
- return Array.prototype.some.call(
11
- e.dataTransfer.types,
12
- (type) => type === "Files"
13
- );
14
- };
15
- const extractFiles = (e) => {
16
- var _a;
17
- if (containsFiles(e)) {
18
- if (e.dataTransfer) {
19
- return Array.from(e.dataTransfer.files);
20
- }
21
- if (e.target) {
22
- return Array.from((_a = e.target.files) != null ? _a : []);
23
- }
24
- }
25
- return [];
26
- };
27
-
28
- exports.containsFiles = containsFiles;
29
- exports.extractFiles = extractFiles;
30
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sources":["../src/file-drop-zone/internal/utils.ts"],"sourcesContent":["import { DragEvent } from \"react\";\n\nexport const containsFiles = (e: DragEvent) => {\n if (!e.dataTransfer) {\n const target = e.target as HTMLInputElement;\n return target?.files;\n }\n\n return Array.prototype.some.call(\n e.dataTransfer.types,\n (type) => type === \"Files\"\n );\n};\n\nexport const extractFiles = (e: DragEvent): File[] => {\n if (containsFiles(e)) {\n if (e.dataTransfer) {\n return Array.from(e.dataTransfer.files);\n }\n\n if (e.target) {\n return Array.from((e.target as HTMLInputElement).files ?? []);\n }\n }\n\n return [];\n};\n"],"names":[],"mappings":";;;;AAEa,MAAA,aAAA,GAAgB,CAAC,CAAiB,KAAA;AAC7C,EAAI,IAAA,CAAC,EAAE,YAAc,EAAA;AACnB,IAAA,MAAM,SAAS,CAAE,CAAA,MAAA,CAAA;AACjB,IAAA,OAAO,MAAQ,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,MAAA,CAAA,KAAA,CAAA;AAAA,GACjB;AAEA,EAAO,OAAA,KAAA,CAAM,UAAU,IAAK,CAAA,IAAA;AAAA,IAC1B,EAAE,YAAa,CAAA,KAAA;AAAA,IACf,CAAC,SAAS,IAAS,KAAA,OAAA;AAAA,GACrB,CAAA;AACF,EAAA;AAEa,MAAA,YAAA,GAAe,CAAC,CAAyB,KAAA;AAdtD,EAAA,IAAA,EAAA,CAAA;AAeE,EAAI,IAAA,aAAA,CAAc,CAAC,CAAG,EAAA;AACpB,IAAA,IAAI,EAAE,YAAc,EAAA;AAClB,MAAA,OAAO,KAAM,CAAA,IAAA,CAAK,CAAE,CAAA,YAAA,CAAa,KAAK,CAAA,CAAA;AAAA,KACxC;AAEA,IAAA,IAAI,EAAE,MAAQ,EAAA;AACZ,MAAA,OAAO,MAAM,IAAM,CAAA,CAAA,EAAA,GAAA,CAAA,CAAE,OAA4B,KAA9B,KAAA,IAAA,GAAA,EAAA,GAAuC,EAAE,CAAA,CAAA;AAAA,KAC9D;AAAA,GACF;AAEA,EAAA,OAAO,EAAC,CAAA;AACV;;;;;"}
@@ -1,35 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var jsxRuntime = require('react/jsx-runtime');
6
-
7
- const ConditionalWrapper = ({
8
- children,
9
- className,
10
- parent,
11
- expanded,
12
- onExpand,
13
- active,
14
- href
15
- }) => {
16
- const handleExpand = (event) => {
17
- event.stopPropagation();
18
- onExpand == null ? void 0 : onExpand(event);
19
- };
20
- return parent || href === void 0 ? /* @__PURE__ */ jsxRuntime.jsx("button", {
21
- "aria-label": "expand",
22
- "aria-expanded": expanded,
23
- className,
24
- onClick: handleExpand,
25
- children
26
- }) : /* @__PURE__ */ jsxRuntime.jsx("a", {
27
- "aria-current": active ? "page" : void 0,
28
- href,
29
- className,
30
- children
31
- });
32
- };
33
-
34
- exports.ConditionalWrapper = ConditionalWrapper;
35
- //# sourceMappingURL=ConditionalWrapper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ConditionalWrapper.js","sources":["../src/navigation-item/ConditionalWrapper.tsx"],"sourcesContent":["import { MouseEvent, ReactNode } from \"react\";\nimport { NavigationItemProps } from \"./NavigationItem\";\n\ninterface ConditionalWrapperProps\n extends Pick<\n NavigationItemProps,\n \"parent\" | \"expanded\" | \"onExpand\" | \"active\" | \"href\" | \"onClick\"\n > {\n children: ReactNode;\n className: string;\n}\n\nexport const ConditionalWrapper = ({\n children,\n className,\n parent,\n expanded,\n onExpand,\n active,\n href,\n}: ConditionalWrapperProps) => {\n const handleExpand = (event: MouseEvent<HTMLButtonElement>) => {\n event.stopPropagation();\n onExpand?.(event);\n };\n\n return parent || href === undefined ? (\n <button\n aria-label=\"expand\"\n aria-expanded={expanded}\n className={className}\n onClick={handleExpand}\n >\n {children}\n </button>\n ) : (\n <a\n aria-current={active ? \"page\" : undefined}\n href={href}\n className={className}\n >\n {children}\n </a>\n );\n};\n"],"names":["jsx"],"mappings":";;;;;;AAYO,MAAM,qBAAqB,CAAC;AAAA,EACjC,QAAA;AAAA,EACA,SAAA;AAAA,EACA,MAAA;AAAA,EACA,QAAA;AAAA,EACA,QAAA;AAAA,EACA,MAAA;AAAA,EACA,IAAA;AACF,CAA+B,KAAA;AAC7B,EAAM,MAAA,YAAA,GAAe,CAAC,KAAyC,KAAA;AAC7D,IAAA,KAAA,CAAM,eAAgB,EAAA,CAAA;AACtB,IAAW,QAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,QAAA,CAAA,KAAA,CAAA,CAAA;AAAA,GACb,CAAA;AAEA,EAAO,OAAA,MAAA,IAAU,IAAS,KAAA,KAAA,CAAA,mBACvBA,cAAA,CAAA,QAAA,EAAA;AAAA,IACC,YAAW,EAAA,QAAA;AAAA,IACX,eAAe,EAAA,QAAA;AAAA,IACf,SAAA;AAAA,IACA,OAAS,EAAA,YAAA;AAAA,IAER,QAAA;AAAA,GACH,oBAECA,cAAA,CAAA,GAAA,EAAA;AAAA,IACC,cAAA,EAAc,SAAS,MAAS,GAAA,KAAA,CAAA;AAAA,IAChC,IAAA;AAAA,IACA,SAAA;AAAA,IAEC,QAAA;AAAA,GACH,CAAA,CAAA;AAEJ;;;;"}
@@ -1,29 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var jsxRuntime = require('react/jsx-runtime');
6
- var icons = require('@salt-ds/icons');
7
-
8
- const iconExpansionMap = {
9
- vertical: {
10
- expanded: icons.ChevronDownIcon,
11
- collapsed: icons.ChevronRightIcon
12
- },
13
- horizontal: {
14
- expanded: icons.ChevronDownIcon,
15
- collapsed: icons.ChevronDownIcon
16
- }
17
- };
18
- function ExpansionIcon({
19
- expanded = false,
20
- orientation = "horizontal"
21
- }) {
22
- const Icon = iconExpansionMap[orientation][expanded ? "expanded" : "collapsed"];
23
- return /* @__PURE__ */ jsxRuntime.jsx(Icon, {
24
- "aria-hidden": "true"
25
- });
26
- }
27
-
28
- exports.ExpansionIcon = ExpansionIcon;
29
- //# sourceMappingURL=ExpansionIcon.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExpansionIcon.js","sources":["../src/navigation-item/ExpansionIcon.tsx"],"sourcesContent":["import { ChevronDownIcon, ChevronRightIcon } from \"@salt-ds/icons\";\nimport { NavigationItemProps } from \"./NavigationItem\";\n\nconst iconExpansionMap = {\n vertical: {\n expanded: ChevronDownIcon,\n collapsed: ChevronRightIcon,\n },\n horizontal: {\n expanded: ChevronDownIcon,\n collapsed: ChevronDownIcon,\n },\n};\n\nexport function ExpansionIcon({\n expanded = false,\n orientation = \"horizontal\",\n}: Pick<NavigationItemProps, \"expanded\" | \"orientation\" | \"className\">) {\n const Icon =\n iconExpansionMap[orientation][expanded ? \"expanded\" : \"collapsed\"];\n return <Icon aria-hidden=\"true\" />;\n}\n"],"names":["ChevronDownIcon","ChevronRightIcon","jsx"],"mappings":";;;;;;;AAGA,MAAM,gBAAmB,GAAA;AAAA,EACvB,QAAU,EAAA;AAAA,IACR,QAAU,EAAAA,qBAAA;AAAA,IACV,SAAW,EAAAC,sBAAA;AAAA,GACb;AAAA,EACA,UAAY,EAAA;AAAA,IACV,QAAU,EAAAD,qBAAA;AAAA,IACV,SAAW,EAAAA,qBAAA;AAAA,GACb;AACF,CAAA,CAAA;AAEO,SAAS,aAAc,CAAA;AAAA,EAC5B,QAAW,GAAA,KAAA;AAAA,EACX,WAAc,GAAA,YAAA;AAChB,CAAwE,EAAA;AACtE,EAAA,MAAM,IACJ,GAAA,gBAAA,CAAiB,WAAa,CAAA,CAAA,QAAA,GAAW,UAAa,GAAA,WAAA,CAAA,CAAA;AACxD,EAAA,uBAAQE,cAAA,CAAA,IAAA,EAAA;AAAA,IAAK,aAAY,EAAA,MAAA;AAAA,GAAO,CAAA,CAAA;AAClC;;;;"}
@@ -1,6 +0,0 @@
1
- 'use strict';
2
-
3
- var css_248z = "/* Vars applied to root NavigationItem component */\n.saltNavigationItem-wrapper {\n display: flex;\n gap: var(--salt-spacing-100);\n align-items: center;\n position: relative;\n background: none;\n border: none;\n font-size: var(--salt-text-fontSize);\n text-decoration: none;\n cursor: var(--salt-selectable-cursor-hover);\n /* Hover off animation */\n transition: all var(--salt-duration-instant) ease-in-out;\n}\n\n/* Vars applied to NavigationItem component when root */\n.saltNavigationItem-rootItem {\n font-weight: var(--salt-text-fontWeight-strong);\n}\n\n/* Styles applied to NavigationItem icon */\n.saltNavigationItem-label .saltIcon {\n top: var(--salt-spacing-25);\n}\n\n/* Styles applied when orientation = \"horizontal\" */\n.saltNavigationItem-horizontal {\n min-height: calc(var(--salt-size-base) + var(--salt-spacing-100) * 2);\n padding: 0 var(--salt-spacing-100);\n width: fit-content;\n}\n\n/* Styles applied when orientation = \"vertical\" */\n.saltNavigationItem-vertical {\n min-height: calc(var(--salt-size-base) + var(--salt-spacing-50) * 2);\n padding-top: 0;\n padding-bottom: 0;\n padding-right: var(--salt-spacing-100);\n padding-left: calc(var(--salt-spacing-300) * (min(var(--saltNavigationItem-level, 0) + 1, 2)));\n width: 100%;\n}\n\n/* Styles applied to NavigationItem label */\n.saltNavigationItem-label {\n color: var(--salt-content-primary-foreground);\n line-height: var(--salt-text-lineHeight);\n font-family: var(--salt-text-fontFamily);\n padding-left: calc(var(--saltNavigationItem-level, 0) * var(--salt-spacing-100));\n flex: 1;\n text-align: left;\n display: flex;\n align-items: baseline;\n gap: var(--salt-spacing-100);\n}\n\n/* Styles applied to NavigationItem Badge */\n.saltNavigationItem-label .saltBadge {\n margin-left: auto;\n}\n\n/* Styles applied to NavigationItem when focus is visible */\n.saltNavigationItem-wrapper:focus-visible {\n outline: var(--salt-focused-outline);\n}\n\n/* Styles applied to NavigationItem for non-keyboard focus */\n.saltNavigationItem-wrapper:focus:not(:focus-visible) {\n outline: 0;\n}\n\n/* Styles applied to activation line */\n.saltNavigationItem-wrapper::after {\n content: \"\";\n position: absolute;\n top: var(--salt-spacing-25);\n left: 0;\n display: block;\n}\n\n/* Styles applied to activation line when orientation = \"horizontal\" */\n.saltNavigationItem-horizontal::after {\n width: 100%;\n height: var(--salt-size-indicator);\n}\n\n/* Styles applied to activation line when orientation = \"vertical\" */\n.saltNavigationItem-vertical::after {\n width: var(--salt-size-indicator);\n left: var(--salt-spacing-25);\n height: calc(100% - var(--salt-spacing-50));\n}\n\n/* Styles applied to activation line on hover */\n.saltNavigationItem-wrapper:hover::after,\n.saltNavigationItem-wrapper:focus-visible::after {\n background: var(--salt-navigable-indicator-hover);\n /* Hover on animation */\n transition: all var(--salt-duration-perceptible) ease-in-out;\n}\n\n/* Styles applied to activation line when item is active */\n.saltNavigationItem-active::after,\n.saltNavigationItem-active:hover::after,\n.saltNavigationItem-active:focus::after {\n background: var(--salt-navigable-indicator-active);\n /* Hover on animation */\n transition: all var(--salt-duration-perceptible) ease-in-out;\n}\n";
4
-
5
- module.exports = css_248z;
6
- //# sourceMappingURL=NavigationItem.css.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NavigationItem.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}