@carto/meridian-ds 5.1.3 → 5.1.4-alpha.0cc6abf.365

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/CHANGELOG.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ - feat(dialog): export useScrollBorders hook for scroll-edge borders [sc-578988] [#564](https://github.com/CartoDB/meridian-ds/pull/564)
6
+
5
7
  ## 5.0
6
8
 
7
9
  ### 5.1.3
@@ -3676,14 +3676,52 @@ function DialogHeader({
3676
3676
  children && /* @__PURE__ */ jsxRuntime.jsx(DividerBottom, {})
3677
3677
  ] });
3678
3678
  }
3679
- function computeScrollBorders(node, hasFooterAlert) {
3679
+ function computeScrollBorders({
3680
+ node,
3681
+ keepBottomBorder
3682
+ }) {
3680
3683
  const atBottom = Math.abs(node.scrollHeight - node.clientHeight - node.scrollTop) < 1;
3681
3684
  const atTop = node.scrollTop === 0;
3682
3685
  return {
3683
3686
  showTop: !atTop,
3684
- showBottom: !atBottom || Boolean(hasFooterAlert)
3687
+ showBottom: !atBottom || Boolean(keepBottomBorder)
3685
3688
  };
3686
3689
  }
3690
+ function useScrollBorders({
3691
+ keepBottomBorder
3692
+ } = {}) {
3693
+ const theme = material.useTheme();
3694
+ const [node, setNode] = React.useState(null);
3695
+ const updateBorders = React.useCallback(
3696
+ (element) => {
3697
+ const { showTop, showBottom } = computeScrollBorders({
3698
+ node: element,
3699
+ keepBottomBorder
3700
+ });
3701
+ const borderStyle = `1px solid ${theme.palette.divider}`;
3702
+ element.style.borderTop = showTop ? borderStyle : "none";
3703
+ element.style.borderBottom = showBottom ? borderStyle : "none";
3704
+ },
3705
+ [theme.palette.divider, keepBottomBorder]
3706
+ );
3707
+ const onScroll = React.useCallback(
3708
+ (event) => updateBorders(event.currentTarget),
3709
+ [updateBorders]
3710
+ );
3711
+ React.useEffect(() => {
3712
+ if (!node) return;
3713
+ updateBorders(node);
3714
+ }, [node, updateBorders]);
3715
+ React.useEffect(() => {
3716
+ if (!node || typeof ResizeObserver === "undefined") return;
3717
+ const resizeObserver = new ResizeObserver(() => {
3718
+ updateBorders(node);
3719
+ });
3720
+ resizeObserver.observe(node);
3721
+ return () => resizeObserver.disconnect();
3722
+ }, [node, updateBorders]);
3723
+ return { ref: setNode, onScroll };
3724
+ }
3687
3725
  const Content$5 = material.styled(material.DialogContent, {
3688
3726
  shouldForwardProp: (prop) => ![
3689
3727
  "scrollableContent",
@@ -3738,45 +3776,31 @@ function _DialogContent({
3738
3776
  onScroll,
3739
3777
  ...props
3740
3778
  }, ref) {
3741
- const theme = material.useTheme();
3742
3779
  const [contentRef, setContentRef] = React.useState(null);
3743
3780
  React.useImperativeHandle(
3744
3781
  ref,
3745
3782
  () => contentRef,
3746
3783
  [contentRef]
3747
3784
  );
3748
- const updateBorders = React.useCallback(
3785
+ const { ref: scrollBordersRef, onScroll: updateScrollBorders } = useScrollBorders({ keepBottomBorder: hasFooterAlert });
3786
+ const setRefs = React.useCallback(
3749
3787
  (node) => {
3750
- const { showTop, showBottom } = computeScrollBorders(node, hasFooterAlert);
3751
- const borderStyle = `1px solid ${theme.palette.divider}`;
3752
- node.style.borderTop = showTop ? borderStyle : "none";
3753
- node.style.borderBottom = showBottom ? borderStyle : "none";
3788
+ setContentRef(node);
3789
+ scrollBordersRef(node);
3754
3790
  },
3755
- [theme.palette.divider, hasFooterAlert]
3791
+ [scrollBordersRef]
3756
3792
  );
3757
3793
  const handleScroll = React.useCallback(
3758
3794
  (event) => {
3759
- updateBorders(event.target);
3795
+ updateScrollBorders(event);
3760
3796
  onScroll == null ? void 0 : onScroll(event);
3761
3797
  },
3762
- [updateBorders, onScroll]
3798
+ [updateScrollBorders, onScroll]
3763
3799
  );
3764
- React.useEffect(() => {
3765
- if (!contentRef) return;
3766
- updateBorders(contentRef);
3767
- }, [contentRef, updateBorders]);
3768
- React.useEffect(() => {
3769
- if (!contentRef || typeof ResizeObserver === "undefined") return;
3770
- const resizeObserver = new ResizeObserver(() => {
3771
- updateBorders(contentRef);
3772
- });
3773
- resizeObserver.observe(contentRef);
3774
- return () => resizeObserver.disconnect();
3775
- }, [contentRef, updateBorders]);
3776
3800
  return /* @__PURE__ */ jsxRuntime.jsx(
3777
3801
  Content$5,
3778
3802
  {
3779
- ref: setContentRef,
3803
+ ref: setRefs,
3780
3804
  onScroll: handleScroll,
3781
3805
  scrollableContent,
3782
3806
  withGutter,
@@ -6947,8 +6971,13 @@ const TagRoot = material.styled("div", {
6947
6971
  maxWidth: "100%",
6948
6972
  height: theme.spacing(2),
6949
6973
  borderWidth: "1px",
6950
- borderStyle: "solid",
6951
- ...colorProps(color ?? "primary", variant ?? "filled", theme, disabled),
6974
+ borderStyle: variant === "dashed" ? "dashed" : "solid",
6975
+ ...colorProps(
6976
+ color ?? "primary",
6977
+ variant === "dashed" ? "outlined" : variant ?? "filled",
6978
+ theme,
6979
+ disabled
6980
+ ),
6952
6981
  '.Mui-selected &, [aria-selected="true"] &': {
6953
6982
  borderColor: theme.palette.primary.main,
6954
6983
  backgroundColor: theme.palette.primary.background,
@@ -8191,3 +8220,4 @@ exports.useAutocompleteRenderOption = useAutocompleteRenderOption;
8191
8220
  exports.useCodeAreaAutocompletion = useCodeAreaAutocompletion;
8192
8221
  exports.useCopyValue = useCopyValue;
8193
8222
  exports.useListContextProps = useListContextProps;
8223
+ exports.useScrollBorders = useScrollBorders;
@@ -3659,14 +3659,52 @@ function DialogHeader({
3659
3659
  children && /* @__PURE__ */ jsx(DividerBottom, {})
3660
3660
  ] });
3661
3661
  }
3662
- function computeScrollBorders(node, hasFooterAlert) {
3662
+ function computeScrollBorders({
3663
+ node,
3664
+ keepBottomBorder
3665
+ }) {
3663
3666
  const atBottom = Math.abs(node.scrollHeight - node.clientHeight - node.scrollTop) < 1;
3664
3667
  const atTop = node.scrollTop === 0;
3665
3668
  return {
3666
3669
  showTop: !atTop,
3667
- showBottom: !atBottom || Boolean(hasFooterAlert)
3670
+ showBottom: !atBottom || Boolean(keepBottomBorder)
3668
3671
  };
3669
3672
  }
3673
+ function useScrollBorders({
3674
+ keepBottomBorder
3675
+ } = {}) {
3676
+ const theme = useTheme();
3677
+ const [node, setNode] = useState(null);
3678
+ const updateBorders = useCallback(
3679
+ (element) => {
3680
+ const { showTop, showBottom } = computeScrollBorders({
3681
+ node: element,
3682
+ keepBottomBorder
3683
+ });
3684
+ const borderStyle = `1px solid ${theme.palette.divider}`;
3685
+ element.style.borderTop = showTop ? borderStyle : "none";
3686
+ element.style.borderBottom = showBottom ? borderStyle : "none";
3687
+ },
3688
+ [theme.palette.divider, keepBottomBorder]
3689
+ );
3690
+ const onScroll = useCallback(
3691
+ (event) => updateBorders(event.currentTarget),
3692
+ [updateBorders]
3693
+ );
3694
+ useEffect(() => {
3695
+ if (!node) return;
3696
+ updateBorders(node);
3697
+ }, [node, updateBorders]);
3698
+ useEffect(() => {
3699
+ if (!node || typeof ResizeObserver === "undefined") return;
3700
+ const resizeObserver = new ResizeObserver(() => {
3701
+ updateBorders(node);
3702
+ });
3703
+ resizeObserver.observe(node);
3704
+ return () => resizeObserver.disconnect();
3705
+ }, [node, updateBorders]);
3706
+ return { ref: setNode, onScroll };
3707
+ }
3670
3708
  const Content$5 = styled(DialogContent$1, {
3671
3709
  shouldForwardProp: (prop) => ![
3672
3710
  "scrollableContent",
@@ -3721,45 +3759,31 @@ function _DialogContent({
3721
3759
  onScroll,
3722
3760
  ...props
3723
3761
  }, ref) {
3724
- const theme = useTheme();
3725
3762
  const [contentRef, setContentRef] = useState(null);
3726
3763
  useImperativeHandle(
3727
3764
  ref,
3728
3765
  () => contentRef,
3729
3766
  [contentRef]
3730
3767
  );
3731
- const updateBorders = useCallback(
3768
+ const { ref: scrollBordersRef, onScroll: updateScrollBorders } = useScrollBorders({ keepBottomBorder: hasFooterAlert });
3769
+ const setRefs = useCallback(
3732
3770
  (node) => {
3733
- const { showTop, showBottom } = computeScrollBorders(node, hasFooterAlert);
3734
- const borderStyle = `1px solid ${theme.palette.divider}`;
3735
- node.style.borderTop = showTop ? borderStyle : "none";
3736
- node.style.borderBottom = showBottom ? borderStyle : "none";
3771
+ setContentRef(node);
3772
+ scrollBordersRef(node);
3737
3773
  },
3738
- [theme.palette.divider, hasFooterAlert]
3774
+ [scrollBordersRef]
3739
3775
  );
3740
3776
  const handleScroll = useCallback(
3741
3777
  (event) => {
3742
- updateBorders(event.target);
3778
+ updateScrollBorders(event);
3743
3779
  onScroll == null ? void 0 : onScroll(event);
3744
3780
  },
3745
- [updateBorders, onScroll]
3781
+ [updateScrollBorders, onScroll]
3746
3782
  );
3747
- useEffect(() => {
3748
- if (!contentRef) return;
3749
- updateBorders(contentRef);
3750
- }, [contentRef, updateBorders]);
3751
- useEffect(() => {
3752
- if (!contentRef || typeof ResizeObserver === "undefined") return;
3753
- const resizeObserver = new ResizeObserver(() => {
3754
- updateBorders(contentRef);
3755
- });
3756
- resizeObserver.observe(contentRef);
3757
- return () => resizeObserver.disconnect();
3758
- }, [contentRef, updateBorders]);
3759
3783
  return /* @__PURE__ */ jsx(
3760
3784
  Content$5,
3761
3785
  {
3762
- ref: setContentRef,
3786
+ ref: setRefs,
3763
3787
  onScroll: handleScroll,
3764
3788
  scrollableContent,
3765
3789
  withGutter,
@@ -6930,8 +6954,13 @@ const TagRoot = styled("div", {
6930
6954
  maxWidth: "100%",
6931
6955
  height: theme.spacing(2),
6932
6956
  borderWidth: "1px",
6933
- borderStyle: "solid",
6934
- ...colorProps(color ?? "primary", variant ?? "filled", theme, disabled),
6957
+ borderStyle: variant === "dashed" ? "dashed" : "solid",
6958
+ ...colorProps(
6959
+ color ?? "primary",
6960
+ variant === "dashed" ? "outlined" : variant ?? "filled",
6961
+ theme,
6962
+ disabled
6963
+ ),
6935
6964
  '.Mui-selected &, [aria-selected="true"] &': {
6936
6965
  borderColor: theme.palette.primary.main,
6937
6966
  backgroundColor: theme.palette.primary.background,
@@ -8168,5 +8197,6 @@ export {
8168
8197
  useAutocompleteRenderOption,
8169
8198
  useCodeAreaAutocompletion,
8170
8199
  useCopyValue,
8171
- useListContextProps
8200
+ useListContextProps,
8201
+ useScrollBorders
8172
8202
  };
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.1.3",
2
+ "version": "5.1.4-alpha.0cc6abf.365",
3
3
  "conventions": "# Meridian usage conventions (for code-generating agents)\n\nSystem-level rules an agent should apply across all components.\n\nMeridian is the source of truth: when an existing codebase pattern contradicts Meridian, follow Meridian — don't replicate the contradicting local pattern.\n\n## Choosing a component\n\n- Don't hand-roll what the design system already provides. Before writing a\n custom component, a styled wrapper, or a block of primitives (a modal,\n chip/tag, card, empty state, dropdown, tooltip, copy-to-clipboard input,\n etc.), confirm no Meridian component covers it — reuse or extend the existing one instead of rebuilding it.\n- Prefer a Meridian component over a bare MUI one whenever a Meridian wrapper\n exists — the wrappers carry CARTO theming, a11y defaults, and narrowed APIs. MUI is correct for layout primitives (`Box`/`Grid`/`Stack`/`Container`) and for gaps Meridian doesn't fill (e.g. date pickers); \"prefer Meridian\" is not \"never MUI\".\n- Resolve \"which component\" by reading each one's `description` + `keywords`,\n then confirm with its `decisionTree` (the conditions that point elsewhere) and `limitations` (what it lacks — check before you downgrade to it).\n Don't infer selection from prop lists.\n\n## Icons\n\n- Source icons from Meridian's custom-icons first, then `@mui/icons-material`;\n add a local SVG only when neither has an equivalent. Don't duplicate an icon\n the design system already ships.\n- Find the right custom icon with `meridian_list_icons` — match by name or keyword (e.g. \"warehouse\" → `Bigquery`), import it from `@carto/meridian-ds/custom-icons`, and render `<Name />`. Every icon shares one prop type, `CustomIconProps` (MUI `SvgIconProps` — `color`/`fontSize`/`sx` — plus `width`/`height`).\n- To confirm a shortlisted icon by sight (or match an icon in a design you're implementing), call `meridian_get_screenshot` with `name: 'icons'` and Read the returned image path — a labeled grid of every icon.\n- Use the standard icon sizes — small 12px, medium (default) 18px, large 24px;\n a value off this scale (e.g. 16, 20) needs design sign-off. Prefer the\n outlined variants.\n- A new SVG must inherit, not bake in: set `fill='currentColor'` so it takes\n the parent's color, and use the standard size — don't hardcode\n color/opacity/dimensions.\n- For an icon color outside the palette `color` set, pass a theme token via\n `htmlColor` (e.g. `htmlColor={theme.palette.text.secondary}`) — never a\n hardcoded hex.\n\n## Accessibility\n\n- Any icon-only control needs an accessible name: `tooltip` or `aria-label`.\n- Don't disable a control without telling the user why — pair a disabled action with a tooltip explaining the requirement.\n- An `aria-label` must be human-readable text describing the control, not a test id in disguise — use a separate test hook for that.\n- User-facing strings (labels, `aria-label`, placeholders, messages) go through the app's i18n layer, not hardcoded literals.\n\n## Props\n\n- Two sources, both pinned to the installed `@carto/meridian-ds`: **exact props / types / JSDoc** come from the package's **type declarations** — read the `<Name>.d.ts` directly — while the **`meridian-design-system` MCP** (`meridian_*` tools) covers what types can't: which component, when, gotchas, and real examples.\n- A component's curation lists the high-value inherited MUI props worth knowing (`curation.mui`, e.g. `color`/`variant`/`size`); the rest of MUI's surface is available but rarely needed.\n- Don't use `sx`/inline styles to override a Meridian component's visual design (colors, typography, borders, sizing) — use its documented props and the theme tokens. (`sx` for layout/spacing on primitives is fine — see Styling.)\n- If no prop covers the visual change you need, treat it as a design-system gap: request the variant/behavior upstream in Meridian rather than permanently overriding the component locally — a local `styled()` of a Meridian component is a smell, not a fix.\n\n## Styling\n\n- Use theme tokens, never hardcoded values: colors from the palette (`text.*`, `background.*`, `divider`, semantic `*.main`) and spacing from the theme scale (`theme.spacing(n)`, or `sx` numeric spacing like `px: 2` / `mt: 1.5`) — no raw hex/rgb or px. Margin, padding and offsets use steps `0.25, 0.5, 0.75, 1, 1.5, 2, 2.5, 3, 4, 5, 6, 7, 8, 9, 12, 15` (2–120px); `width`/`height` may use any step. Get the exact values — palette keys, spacing base, type ramp, `shape.borderRadius`, breakpoints, shadows — from `meridian_get_tokens`.\n- Text uses `<Typography variant=…>` (with the `weight` prop for emphasis), never hardcoded `fontSize`/`fontWeight`/`lineHeight`/`fontFamily`.\n- Meridian's type scale is custom and does not match MUI defaults (e.g. `body2`/`caption` differ from MUI's sizes, and there are Meridian-only variants like `code1`/`code2`/`code3` and `overlineDelicate`). Pick the variant by role from Typography's variant list (`meridian_get_examples('Typography')`) — don't assume a px size or map px → variant yourself.\n- `sx` is the right tool for one-off layout/spacing on primitives (`Box`/`Grid`/`Stack`), not the deprecated MUI system props\n (`<Box px={2}>` → `<Box sx={{ px: 2 }}>`). This is layout, distinct from restyling a Meridian component (see Props).\n\n## Examples\n\n- Never invent example code when a story exists — use the component's real story source (`meridian_get_examples`). The lead Usage story is the copy-paste starting point; the later stories are illustrative (variants, edge cases) and may carry story-arg shells, so don't copy one wholesale as your baseline.\n",
4
4
  "components": [
5
5
  {
@@ -1465,6 +1465,12 @@
1465
1465
  "kind": "util",
1466
1466
  "description": "Per-size width/min-height dimensions for a Dialog, keyed by `DialogSizes` (Small/Medium/Large/XLarge).",
1467
1467
  "import": "@carto/meridian-ds/components"
1468
+ },
1469
+ {
1470
+ "name": "useScrollBorders",
1471
+ "kind": "hook",
1472
+ "description": "DialogContent's scroll-edge dividers for any custom scroll container (e.g. a popover panel): top border once scrolled, bottom border until the end.\nSpread `{ ref, onScroll }` on the element that scrolls (bounded height + `overflow: auto`); it sets inline `borderTop`/`borderBottom`, so don't style those. Not needed inside `DialogContent`, which already applies it.",
1473
+ "import": "@carto/meridian-ds/components"
1468
1474
  }
1469
1475
  ]
1470
1476
  },
@@ -1541,6 +1547,12 @@
1541
1547
  "summary": "Only a sub-region scrolls (overflow on an inner wrapper); the rest stays static",
1542
1548
  "code": "import { Alert, Button, Dialog, DialogContent, DialogFooter, DialogHeader, DialogStepper, Typography } from '@carto/meridian-ds/components'\nimport { Box, useTheme } from '@mui/material'\nimport { useState } from 'react'\n\nconst BaseDialog = ({\n title,\n chipLabel,\n scrollableContent,\n closeButton,\n children,\n showActions,\n showStepper,\n withGutter = true,\n withBottomGutter = true,\n spacing,\n nonModal = true,\n ...dialogArgs\n}: any) => {\n const theme = useTheme()\n const [open, setOpen] = useState(false)\n\n const handleClickOpen = (): void => {\n setOpen(!open)\n }\n\n const handleClose = () => setOpen(false)\n\n return (\n <Box\n sx={{\n p: 2,\n backgroundColor: nonModal ? theme.palette.black[12] : 'transparent',\n }}\n >\n {!nonModal && (\n <Button variant='outlined' color='primary' onClick={handleClickOpen}>\n {open ? 'Close' : 'Open'} modal dialog\n </Button>\n )}\n <Dialog\n {...dialogArgs}\n open={open}\n onClose={closeButton ? handleClose : undefined}\n nonModal={nonModal}\n >\n <DialogHeader\n onClose={closeButton ? handleClose : undefined}\n chipLabel={chipLabel}\n title={title}\n >\n {showStepper && (\n <DialogStepper\n currentStep={1}\n stepsLabels={['Step 1', 'Step 2', 'Step 3']}\n />\n )}\n </DialogHeader>\n <DialogContent\n scrollableContent={scrollableContent}\n withGutter={withGutter}\n withBottomGutter={withBottomGutter}\n spacing={spacing}\n >\n {children}\n </DialogContent>\n {showActions && (\n <DialogFooter>\n <Button variant='contained' onClick={handleClose}>\n Done\n </Button>\n </DialogFooter>\n )}\n </Dialog>\n </Box>\n )\n}\n\nconst someRandomText = (\n <Typography variant='body2' color='textSecondary'>\n Numeric, string and boolean are supported. Date and timestamps will be\n encoded as strings. Learn more about tilesets in our documentation.\n </Typography>\n)\n\nconst someBigRandomLog = `2023-10-13 11:54:35.526 [info] > git config --get commit.template [8ms]\n2023-10-13 11:54:35.560 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) --ignore-case refs/heads/zbigg/server-data-export-ui refs/remotes/zbigg/server-data-export-ui [39ms]\n2023-10-13 11:54:35.651 [info] > git status -z -uall [91ms]\n2023-10-13 11:54:36.770 [info] > git ls-files --stage -- /Users/zbigg/carto/cloud-native/workspace-www/src/features/common/utils/urlUtils.ts [23ms]\n2023-10-13 11:54:36.770 [info] > git ls-files --stage -- /Users/zbigg/carto/cloud-native/workspace-www/src/features/jobs/ui/JobItem/DownloadsPart.tsx [28ms]\n2023-10-13 11:54:36.770 [info] > git ls-files --stage -- /Users/zbigg/carto/cloud-native/workspace-www/src/features/jobs/ui/JobItem/DownloadsDialog.tsx [33ms]\n2023-10-13 11:54:36.770 [info] > git ls-files --stage -- /Users/zbigg/carto/cloud-native/Makefile [52ms]\n2023-10-13 11:54:36.770 [info] > git ls-files --stage -- /Users/zbigg/carto/cloud-native/jobs-samples.md [53ms]\n2023-10-13 11:54:36.770 [info] > git ls-files --stage -- /Users/zbigg/carto/cloud-native/time-series-fixes-and-enchancements.md [54ms]\n2023-10-13 11:54:36.772 [info] > git ls-files --stage -- /Users/zbigg/carto/cloud-native/workspace-www/src/features/access-token/ui/AccessTokenForm/AccessTokenFormApi/AccessTokenFormApiOptions.tsx [25ms]\n2023-10-13 11:54:36.772 [info] > git ls-files --stage -- /Users/zbigg/carto/cloud-native/workspace-www/src/features/data-explorer/ui/Resources/Actions/Subscription/SubscriptionExportDialog/SubscriptionExportDialogContent/JobSuccessDownload.tsx [26ms]\n2023-10-13 11:54:36.773 [info] > git ls-files --stage -- /Users/zbigg/carto/cloud-native/workspace-www/src/features/common/ui/utils/CopiableComponent.tsx [28ms]\n2023-10-13 11:54:36.773 [info] > git ls-files --stage -- /Users/zbigg/carto/cloud-native/workspace-www/src/features/common/utils/dateFormat.ts [28ms]\n2023-10-13 11:54:36.775 [info] > git ls-files --stage -- /Users/zbigg/carto/cloud-native/workspace-www/src/features/jobs/ui/JobItem/ErrorDetailsDialog.tsx [34ms]\n2023-10-13 11:54:36.775 [info] > git ls-files --stage -- /Users/zbigg/carto/cloud-native/workspace-www/src/__tests__/features/jobs/mocks/processingJobs.ts [41ms]\n2023-10-13 11:54:36.781 [info] > git ls-files --stage -- /Users/zbigg/carto/cloud-native/workspace-www/src/features/jobs/state/jobsExportingSlice.ts [48ms]\n2023-10-13 11:54:36.781 [info] > git ls-files --stage -- /Users/zbigg/carto/cloud-native/workspace-www/src/features/metrics/state/metricsSagas.ts [48ms]\n2023-10-13 11:54:36.782 [info] > git ls-files --stage -- /Users/zbigg/carto/cloud-native/workspace-www/src/features/analysis/ui/NewAnalysisDialog/AnalysisCatalog/Buffer/Form/TractsDropdown.tsx [54ms]\n2023-10-13 11:54:36.783 [info] > git ls-files --stage -- /Users/zbigg/carto/cloud-native/workspace-www/src/features/jobs/models/exportsModel.ts [52ms]\n2023-10-13 11:54:36.784 [info] > git ls-files --stage -- /Users/zbigg/carto/cloud-native/workspace-www/src/features/data-explorer/ui/Resources/Actions/Subscription/SubscriptionExportDialog/useExportHooks.ts [53ms]\n2023-10-13 11:54:36.786 [info] > git ls-files --stage -- /Users/zbigg/carto/cloud-native/workspace-www/src/features/builder/ui/BuilderPrivate/BuilderHeader/BuilderHeaderActions/ExportDataDialog.tsx [63ms]\n2023-10-13 11:54:36.787 [info] > git ls-files --stage -- /Users/zbigg/carto/cloud-native/accounts-www/src/features/accounts/ui/Form/FormSelect.tsx [62ms]\n2023-10-13 11:54:36.787 [info] > git ls-files --stage -- /Users/zbigg/carto/cloud-native/workspace-www/src/features/jobs/ui/JobsPopper.tsx [67ms]\n2023-10-13 11:54:36.788 [info] > git ls-files --stage -- /Users/zbigg/carto/cloud-native/workspace-www/src/features/common/ui/AppTemplate/HeaderBase/Partials/JobsStatusIndicator.`\n\nconst someRandomLogElement = (\n <Typography variant='code3' component='pre'>\n {someBigRandomLog}\n </Typography>\n)\n\nconst InternallScroll = (args: any) => (\n <BaseDialog {...args} nonModal showActions closeButton>\n {someRandomText}\n <Box style={{ maxHeight: 'fit-content', overflowY: 'scroll' }}>\n <Alert severity='warning'>{someRandomLogElement}</Alert>\n </Box>\n </BaseDialog>\n)"
1543
1549
  },
1550
+ {
1551
+ "name": "ScrollBordersHook",
1552
+ "id": "components-dialogs-dialog--scroll-borders-hook",
1553
+ "summary": "`useScrollBorders` adds DialogContent's scroll-edge borders to any scroll container (e.g. a popover panel)",
1554
+ "code": "import { Typography, useScrollBorders } from '@carto/meridian-ds/components'\nimport { Box } from '@mui/material'\n\nconst ScrollBordersHook = () => {\n const scrollBorders = useScrollBorders()\n\n return (\n <Box {...scrollBorders} sx={{ maxHeight: 160, overflowY: 'auto', p: 2 }}>\n {Array.from({ length: 12 }, (_, i) => (\n <Typography key={i} variant='body2'>\n Item {i + 1}\n </Typography>\n ))}\n </Box>\n )\n}"
1555
+ },
1544
1556
  {
1545
1557
  "name": "CustomSpacing",
1546
1558
  "id": "components-dialogs-dialog--custom-spacing",
@@ -3603,7 +3615,7 @@
3603
3615
  },
3604
3616
  {
3605
3617
  "name": "Tag",
3606
- "description": "Compact, display-only label for surfacing a status, category, or short value. Supports semantic color variants, an optional leading icon, filled or outlined styles, and a monospaced `code` type for identifiers or snippets. Non-interactive by design — it has no click, selection, or remove behavior.",
3618
+ "description": "Compact, display-only label for surfacing a status, category, or short value. Supports semantic color variants, an optional leading icon, filled, outlined or dashed styles, and a monospaced `code` type for identifiers or snippets. Non-interactive by design — it has no click, selection, or remove behavior.",
3607
3619
  "documented": true,
3608
3620
  "curation": {
3609
3621
  "keywords": [
@@ -3663,6 +3675,12 @@
3663
3675
  "name": "WithIcons",
3664
3676
  "id": "components-tag--with-icons",
3665
3677
  "code": "import { Tag, TagProps } from '@carto/meridian-ds/components'\nimport { AddCircleOutlineOutlined, ChangeCircleOutlined, CheckCircleOutlined, CloseOutlined, DangerousOutlined, DoneOutlined } from '@mui/icons-material'\nimport { Box, Grid, Stack } from '@mui/material'\n\nconst WithIcons = ({ ...args }: TagProps) => {\n const icons = [\n { icon: <CloseOutlined />, color: 'default' },\n { icon: <CloseOutlined />, color: 'neutral' },\n { icon: <DoneOutlined />, color: 'primary' },\n { icon: <AddCircleOutlineOutlined />, color: 'secondary' },\n { icon: <CheckCircleOutlined />, color: 'success' },\n { icon: <DangerousOutlined />, color: 'error' },\n { icon: <ChangeCircleOutlined />, color: 'warning' },\n ] as const\n\n return (\n <Grid container spacing={2}>\n <Grid size={3}>\n <Stack spacing={2}>\n {icons.map(({ icon, color }, index) => (\n <Box key={index}>\n <Tag\n {...args}\n color={color}\n variant='filled'\n icon={icon}\n label={`${color} - filled`}\n />\n </Box>\n ))}\n <Box>\n <Tag\n {...args}\n color='primary'\n variant='filled'\n icon={<DoneOutlined />}\n label='Disabled - filled'\n disabled\n />\n </Box>\n </Stack>\n </Grid>\n <Grid size={3}>\n <Stack spacing={2}>\n {icons.map(({ icon, color }, index) => (\n <Box key={index}>\n <Tag\n {...args}\n color={color}\n variant='outlined'\n icon={icon}\n label={`${color} - outlined`}\n />\n </Box>\n ))}\n <Box>\n <Tag\n {...args}\n color='primary'\n variant='outlined'\n icon={<DoneOutlined />}\n label='Disabled - outlined'\n disabled\n />\n </Box>\n </Stack>\n </Grid>\n <Grid size={3}>\n <Stack spacing={2}>\n {icons.map(({ icon, color }, index) => (\n <Box key={index}>\n <Tag\n {...args}\n color={color}\n variant='filled'\n type='code'\n icon={icon}\n label={`${color} - code filled`}\n />\n </Box>\n ))}\n <Box>\n <Tag\n {...args}\n color='primary'\n variant='filled'\n type='code'\n icon={<DoneOutlined />}\n label='Disabled - filled'\n disabled\n />\n </Box>\n </Stack>\n </Grid>\n <Grid size={3}>\n <Stack spacing={2}>\n {icons.map(({ icon, color }, index) => (\n <Box key={index}>\n <Tag\n {...args}\n color={color}\n variant='outlined'\n type='code'\n icon={icon}\n label={`${color} - code outlined`}\n />\n </Box>\n ))}\n <Box>\n <Tag\n {...args}\n color='primary'\n variant='outlined'\n type='code'\n icon={<DoneOutlined />}\n label='Disabled - outlined'\n disabled\n />\n </Box>\n </Stack>\n </Grid>\n </Grid>\n )\n}"
3678
+ },
3679
+ {
3680
+ "name": "Dashed",
3681
+ "id": "components-tag--dashed",
3682
+ "summary": "`dashed` variant: outlined colors with a dashed border",
3683
+ "code": "import { Tag } from '@carto/meridian-ds/components'\nimport { Stack } from '@mui/material'\n\nconst colorsOptions = [\n { color: 'default' },\n { color: 'neutral' },\n { color: 'primary' },\n { color: 'secondary' },\n { color: 'tertiary' },\n { color: 'success' },\n { color: 'warning' },\n { color: 'error' },\n] as const\n\nconst Dashed = () => (\n <Stack direction='row' spacing={1} sx={{ flexWrap: 'wrap' }} useFlexGap>\n {colorsOptions.map(({ color }) => (\n <Tag key={color} color={color} variant='dashed' label={color} />\n ))}\n <Tag color='primary' variant='dashed' label='disabled' disabled />\n </Stack>\n )"
3666
3684
  }
3667
3685
  ]
3668
3686
  },
@@ -593,6 +593,42 @@ export declare const InternallScroll: {
593
593
  };
594
594
  };
595
595
  };
596
+ /** @summary `useScrollBorders` adds DialogContent's scroll-edge borders to any scroll container (e.g. a popover panel) */
597
+ export declare const ScrollBordersHook: {
598
+ render: () => import("react/jsx-runtime").JSX.Element;
599
+ argTypes: {
600
+ closeButton: {
601
+ table: {
602
+ disable: boolean;
603
+ };
604
+ };
605
+ chipLabel: {
606
+ table: {
607
+ disable: boolean;
608
+ };
609
+ };
610
+ title: {
611
+ table: {
612
+ disable: boolean;
613
+ };
614
+ };
615
+ scrollableContent: {
616
+ table: {
617
+ disable: boolean;
618
+ };
619
+ };
620
+ showActions: {
621
+ table: {
622
+ disable: boolean;
623
+ };
624
+ };
625
+ showStepper: {
626
+ table: {
627
+ disable: boolean;
628
+ };
629
+ };
630
+ };
631
+ };
596
632
  export declare const InteractionNonClosable: {
597
633
  render: (args: DialogStoryProps) => import("react/jsx-runtime").JSX.Element;
598
634
  tags: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Dialog/Dialog/Dialog.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAEvC,OAAO,EAEL,IAAI,EAGL,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EACL,MAAM,EAQP,MAAM,cAAc,CAAA;AASrB,UAAU,gBAAiB,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC;IACpE,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,WAAW,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;;;;;;;8BAqYhB;QAAE,aAAa,EAAE,WAAW,CAAA;KAAE;CAwB/D,CAAA;AAED,eAAO,MAAM,6BAA6B;;;;CAgBzC,CAAA;AAED,eAAO,MAAM,aAAa;mBAjbQ,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAicjD,CAAA;AA+CD,eAAO,MAAM,KAAK;;;CAuEjB,CAAA"}
@@ -1,16 +1,4 @@
1
1
  import { DialogContentProps } from '../types';
2
- /**
3
- * Decides which scroll borders to show: top appears once scrolled, bottom
4
- * hides at the end of the scroll unless a footer alert requires a separator.
5
- */
6
- export declare function computeScrollBorders(node: {
7
- scrollHeight: number;
8
- clientHeight: number;
9
- scrollTop: number;
10
- }, hasFooterAlert: boolean | undefined): {
11
- showTop: boolean;
12
- showBottom: boolean;
13
- };
14
2
  /** Dialog body region: holds the main content, with optional gutter padding and an internally scrollable area. */
15
3
  declare const DialogContent: import('react').ForwardRefExoticComponent<Omit<DialogContentProps, "ref"> & import('react').RefAttributes<HTMLDivElement | null>>;
16
4
  /** `DialogContent` with horizontal gutter padding (plus extra bottom padding via `withAlert`) — for dialog bodies that need inset content. */
@@ -1 +1 @@
1
- {"version":3,"file":"DialogContent.d.ts","sourceRoot":"","sources":["../../../../../src/components/Dialog/DialogContent/DialogContent.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAE7C;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,EACvE,cAAc,EAAE,OAAO,GAAG,SAAS,GAClC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,UAAU,EAAE,OAAO,CAAA;CAAE,CAS3C;AAwID,kHAAkH;AAClH,QAAA,MAAM,aAAa,mIAA6B,CAAA;AAEhD,8IAA8I;AAC9I,eAAO,MAAM,mBAAmB;gBAGlB,OAAO;UAOlB,CAAA;AAEH,eAAe,aAAa,CAAA"}
1
+ {"version":3,"file":"DialogContent.d.ts","sourceRoot":"","sources":["../../../../../src/components/Dialog/DialogContent/DialogContent.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAqH7C,kHAAkH;AAClH,QAAA,MAAM,aAAa,mIAA6B,CAAA;AAEhD,8IAA8I;AAC9I,eAAO,MAAM,mBAAmB;gBAGlB,OAAO;UAOlB,CAAA;AAEH,eAAe,aAAa,CAAA"}
@@ -0,0 +1,29 @@
1
+ import { UIEvent } from 'react';
2
+ export interface UseScrollBordersOptions {
3
+ /** Keep the bottom border at the end of the scroll (e.g. when an alert sits below the area). */
4
+ keepBottomBorder?: boolean;
5
+ }
6
+ /**
7
+ * Decides which scroll borders to show: top appears once scrolled, bottom
8
+ * hides at the end of the scroll unless `keepBottomBorder` is set.
9
+ */
10
+ export declare function computeScrollBorders({ node, keepBottomBorder, }: {
11
+ node: {
12
+ scrollHeight: number;
13
+ clientHeight: number;
14
+ scrollTop: number;
15
+ };
16
+ keepBottomBorder?: boolean;
17
+ }): {
18
+ showTop: boolean;
19
+ showBottom: boolean;
20
+ };
21
+ /**
22
+ * DialogContent's scroll-edge dividers for any custom scroll container (e.g. a popover panel): top border once scrolled, bottom border until the end.
23
+ * Spread `{ ref, onScroll }` on the element that scrolls (bounded height + `overflow: auto`); it sets inline `borderTop`/`borderBottom`, so don't style those. Not needed inside `DialogContent`, which already applies it.
24
+ */
25
+ export declare function useScrollBorders<T extends HTMLElement = HTMLDivElement>({ keepBottomBorder, }?: UseScrollBordersOptions): {
26
+ ref: import('react').Dispatch<import('react').SetStateAction<T | null>>;
27
+ onScroll: (event: UIEvent<T>) => void;
28
+ };
29
+ //# sourceMappingURL=useScrollBorders.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useScrollBorders.d.ts","sourceRoot":"","sources":["../../../../../src/components/Dialog/DialogContent/useScrollBorders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAoC,MAAM,OAAO,CAAA;AAGjE,MAAM,WAAW,uBAAuB;IACtC,gGAAgG;IAChG,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,IAAI,EACJ,gBAAgB,GACjB,EAAE;IACD,IAAI,EAAE;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAA;IACvE,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,GAAG;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,UAAU,EAAE,OAAO,CAAA;CAAE,CAS5C;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,WAAW,GAAG,cAAc,EAAE,EACvE,gBAAgB,GACjB,GAAE,uBAA4B;;sBAmBnB,OAAO,CAAC,CAAC,CAAC;EAuBrB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=useScrollBorders.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useScrollBorders.test.d.ts","sourceRoot":"","sources":["../../../../../src/components/Dialog/DialogContent/useScrollBorders.test.tsx"],"names":[],"mappings":""}
@@ -2,6 +2,8 @@ export { default as Dialog } from './Dialog/Dialog';
2
2
  export { default as DialogPaper, dialogDimensionsBySize, } from './DialogPaper/DialogPaper';
3
3
  export { default as DialogHeader } from './DialogHeader/DialogHeader';
4
4
  export { default as DialogContent, DialogContentPadded, } from './DialogContent/DialogContent';
5
+ export { useScrollBorders } from './DialogContent/useScrollBorders';
6
+ export type { UseScrollBordersOptions } from './DialogContent/useScrollBorders';
5
7
  export { default as DialogFooter, DialogActions, } from './DialogFooter/DialogFooter';
6
8
  export { default as DialogAlert } from './DialogAlert/DialogAlert';
7
9
  export { default as DialogConfirmation } from './DialogConfirmation/DialogConfirmation';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Dialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,EACL,OAAO,IAAI,WAAW,EACtB,sBAAsB,GACvB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,6BAA6B,CAAA;AACrE,OAAO,EACL,OAAO,IAAI,aAAa,EACxB,mBAAmB,GACpB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EACL,OAAO,IAAI,YAAY,EACvB,aAAa,GACd,MAAM,6BAA6B,CAAA;AACpC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAClE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,yCAAyC,CAAA;AACvF,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAA;AAE7D,mBAAmB,SAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Dialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,EACL,OAAO,IAAI,WAAW,EACtB,sBAAsB,GACvB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,6BAA6B,CAAA;AACrE,OAAO,EACL,OAAO,IAAI,aAAa,EACxB,mBAAmB,GACpB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AACnE,YAAY,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAA;AAC/E,OAAO,EACL,OAAO,IAAI,YAAY,EACvB,aAAa,GACd,MAAM,6BAA6B,CAAA;AACpC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAClE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,yCAAyC,CAAA;AACvF,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAA;AAE7D,mBAAmB,SAAS,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { TypographyProps } from '..';
3
3
  export type TagColor = 'primary' | 'secondary' | 'tertiary' | 'error' | 'success' | 'warning' | 'default' | 'neutral';
4
- export type TagVariant = 'filled' | 'outlined';
4
+ export type TagVariant = 'filled' | 'outlined' | 'dashed';
5
5
  export type TagType = 'default' | 'code';
6
6
  /**
7
7
  * Props for the Tag component.
@@ -44,13 +44,14 @@ export type TagProps = Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'size' | 'la
44
44
  */
45
45
  icon?: ReactNode;
46
46
  /**
47
- * Visual variant of the tag.
47
+ * Visual variant of the tag. `dashed` is `outlined` with a dashed border.
48
48
  *
49
49
  * @default 'filled'
50
50
  * @example
51
51
  * ```tsx
52
52
  * <Tag label="Outlined" variant="outlined" />
53
53
  * <Tag label="Filled" variant="filled" />
54
+ * <Tag label="Dashed" variant="dashed" />
54
55
  * ```
55
56
  */
56
57
  variant?: TagVariant;
@@ -104,7 +105,7 @@ export type TagProps = Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'size' | 'la
104
105
  */
105
106
  disabled?: boolean;
106
107
  };
107
- /** Compact, display-only label for surfacing a status, category, or short value. Supports semantic color variants, an optional leading icon, filled or outlined styles, and a monospaced `code` type for identifiers or snippets. Non-interactive by design — it has no click, selection, or remove behavior. */
108
+ /** Compact, display-only label for surfacing a status, category, or short value. Supports semantic color variants, an optional leading icon, filled, outlined or dashed styles, and a monospaced `code` type for identifiers or snippets. Non-interactive by design — it has no click, selection, or remove behavior. */
108
109
  declare const Tag: import('react').ForwardRefExoticComponent<Omit<import('react').HTMLProps<HTMLDivElement>, "size" | "label" | "ref" | "type" | "as"> & {
109
110
  /**
110
111
  * Label, main content of tag, by default displayed as `caption` type typography.
@@ -140,13 +141,14 @@ declare const Tag: import('react').ForwardRefExoticComponent<Omit<import('react'
140
141
  */
141
142
  icon?: ReactNode;
142
143
  /**
143
- * Visual variant of the tag.
144
+ * Visual variant of the tag. `dashed` is `outlined` with a dashed border.
144
145
  *
145
146
  * @default 'filled'
146
147
  * @example
147
148
  * ```tsx
148
149
  * <Tag label="Outlined" variant="outlined" />
149
150
  * <Tag label="Filled" variant="filled" />
151
+ * <Tag label="Dashed" variant="dashed" />
150
152
  * ```
151
153
  */
152
154
  variant?: TagVariant;
@@ -1 +1 @@
1
- {"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../../src/components/Tag/Tag.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA4B,MAAM,OAAO,CAAA;AAG3D,OAAO,EAAc,eAAe,EAAE,MAAM,cAAc,CAAA;AAG1D,MAAM,MAAM,QAAQ,GAChB,SAAS,GACT,WAAW,GACX,UAAU,GACV,OAAO,GACP,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,CAAA;AAEb,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,UAAU,CAAA;AAE9C,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,MAAM,CAAA;AAExC;;;;;GAKG;AAEH,MAAM,MAAM,QAAQ,GAAG,IAAI,CACzB,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,EAC/B,IAAI,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,CACzC,GAAG;IACF;;;;;;;;;OASG;IACH,KAAK,EAAE,SAAS,CAAA;IAEhB;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,QAAQ,CAAA;IAEhB;;;;;;;;;OASG;IACH,IAAI,CAAC,EAAE,SAAS,CAAA;IAEhB;;;;;;;;;OASG;IACH,OAAO,CAAC,EAAE,UAAU,CAAA;IAEpB;;;;;;;;;OASG;IACH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OASG;IACH,KAAK,CAAC,EAAE,QAAQ,CAAA;IAEhB;;;;;;;;;OASG;IACH,IAAI,CAAC,EAAE,SAAS,CAAA;IAEhB;;;;;;;;;;OAUG;IACH,OAAO,CAAC,EAAE,UAAU,CAAA;IAEpB;;;;;;;;;OASG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IAEd;;;;;;;;;;;;;;OAcG;IACH,eAAe,CAAC,EAAE,eAAe,CAAA;IAEjC;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAgPD,yTAAyT;AACzT,QAAA,MAAM,GAAG;IAtVP;;;;;;;;;OASG;WACI,SAAS;IAEhB;;;;;;;;;OASG;YACK,QAAQ;IAEhB;;;;;;;;;OASG;WACI,SAAS;IAEhB;;;;;;;;;;OAUG;cACO,UAAU;IAEpB;;;;;;;;;OASG;WACI,OAAO;IAEd;;;;;;;;;;;;;;OAcG;sBACe,eAAe;IAEjC;;;;;;;;;OASG;aACM,OAAO;IAEhB;;;;;;;;;OASG;eACQ,OAAO;kDAkPQ,CAAA;AAC5B,eAAe,GAAG,CAAA"}
@@ -86,6 +86,10 @@ export declare const CustomColor: {
86
86
  export declare const WithIcons: {
87
87
  render: ({ ...args }: TagProps) => import("react/jsx-runtime").JSX.Element;
88
88
  };
89
+ /** @summary `dashed` variant: outlined colors with a dashed border */
90
+ export declare const Dashed: {
91
+ render: () => import("react/jsx-runtime").JSX.Element;
92
+ };
89
93
  export declare const Usage: {
90
94
  render: () => import("react/jsx-runtime").JSX.Element;
91
95
  tags: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"Tag.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Tag/Tag.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAezB,OAAO,EAAO,QAAQ,EAAE,MAAM,cAAc,CAAA;AAO5C,QAAA,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ASlB,CAAA;AAED,eAAO,MAAM,KAAK;;;CAejB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carto/meridian-ds",
3
- "version": "5.1.3",
3
+ "version": "5.1.4-alpha.0cc6abf.365",
4
4
  "description": "CARTO Meridian Design System",
5
5
  "type": "module",
6
6
  "scripts": {