@synertech/ui 0.46.3 → 0.47.1

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 (116) hide show
  1. package/.claude/skills/use-synertech-ui/SKILL.md +102 -3
  2. package/README.md +50 -0
  3. package/dist/components/area-chart/AreaChart.cjs +1 -1
  4. package/dist/components/area-chart/AreaChart.js +1 -1
  5. package/dist/components/badge/Badge.cjs +1 -1
  6. package/dist/components/badge/Badge.js +1 -1
  7. package/dist/components/bar-chart/BarChart.cjs +1 -1
  8. package/dist/components/bar-chart/BarChart.js +1 -1
  9. package/dist/components/box-plot/BoxPlot.cjs +1 -1
  10. package/dist/components/box-plot/BoxPlot.js +1 -1
  11. package/dist/components/breadcrumb/Breadcrumb.cjs +1 -1
  12. package/dist/components/breadcrumb/Breadcrumb.js +1 -1
  13. package/dist/components/bullet-chart/BulletChart.cjs +1 -1
  14. package/dist/components/bullet-chart/BulletChart.js +1 -1
  15. package/dist/components/button/Button.cjs +1 -1
  16. package/dist/components/button/Button.js +1 -1
  17. package/dist/components/calendar/Calendar.cjs +1 -1
  18. package/dist/components/calendar/Calendar.js +1 -1
  19. package/dist/components/candlestick-chart/CandlestickChart.cjs +1 -1
  20. package/dist/components/candlestick-chart/CandlestickChart.js +1 -1
  21. package/dist/components/chart/ChartBrush.cjs +1 -1
  22. package/dist/components/chart/ChartBrush.js +1 -1
  23. package/dist/components/chart/ChartContainer.cjs +1 -1
  24. package/dist/components/chart/ChartContainer.js +1 -1
  25. package/dist/components/chart/ChartExportButton.cjs +1 -1
  26. package/dist/components/chart/ChartExportButton.js +1 -1
  27. package/dist/components/chart/ChartLegend.cjs +1 -1
  28. package/dist/components/chart/ChartLegend.js +1 -1
  29. package/dist/components/chart/ChartPeriodPicker.cjs +1 -1
  30. package/dist/components/chart/ChartPeriodPicker.js +1 -1
  31. package/dist/components/checkbox/Checkbox.cjs +1 -1
  32. package/dist/components/checkbox/Checkbox.js +1 -1
  33. package/dist/components/checkbox/CheckboxGroup.cjs +1 -1
  34. package/dist/components/checkbox/CheckboxGroup.js +1 -1
  35. package/dist/components/chip/Chip.cjs +1 -1
  36. package/dist/components/chip/Chip.js +1 -1
  37. package/dist/components/circular-progress/CircularProgress.cjs +1 -1
  38. package/dist/components/circular-progress/CircularProgress.js +1 -1
  39. package/dist/components/datagrid/DataGrid.cjs +1 -1
  40. package/dist/components/datagrid/DataGrid.js +1 -1
  41. package/dist/components/dropdown/DropdownCheckboxItem.cjs +1 -1
  42. package/dist/components/dropdown/DropdownCheckboxItem.js +1 -1
  43. package/dist/components/dropdown/DropdownRadio.cjs +1 -1
  44. package/dist/components/dropdown/DropdownRadio.js +1 -1
  45. package/dist/components/dropdown/DropdownTrigger.cjs +1 -1
  46. package/dist/components/dropdown/DropdownTrigger.js +1 -1
  47. package/dist/components/dumbbell-chart/DumbbellChart.cjs +1 -1
  48. package/dist/components/dumbbell-chart/DumbbellChart.js +1 -1
  49. package/dist/components/file-selector/FileSelector.cjs +1 -1
  50. package/dist/components/file-selector/FileSelector.js +1 -1
  51. package/dist/components/footer/FooterLink.cjs +1 -1
  52. package/dist/components/footer/FooterLink.js +1 -1
  53. package/dist/components/footer/FooterSocial.cjs +1 -1
  54. package/dist/components/footer/FooterSocial.js +1 -1
  55. package/dist/components/form/number-input/NumberInput.cjs +1 -1
  56. package/dist/components/form/number-input/NumberInput.js +1 -1
  57. package/dist/components/funnel-chart/FunnelChart.cjs +1 -1
  58. package/dist/components/funnel-chart/FunnelChart.js +1 -1
  59. package/dist/components/gantt-chart/GanttChart.cjs +1 -1
  60. package/dist/components/gantt-chart/GanttChart.js +1 -1
  61. package/dist/components/header/Header.cjs +1 -1
  62. package/dist/components/header/Header.js +1 -1
  63. package/dist/components/heat-map/Heatmap.cjs +1 -1
  64. package/dist/components/heat-map/Heatmap.js +1 -1
  65. package/dist/components/help-button/HelpButton.cjs +6 -6
  66. package/dist/components/help-button/HelpButton.js +7 -7
  67. package/dist/components/help-button/sanitize-html.cjs +1 -0
  68. package/dist/components/help-button/sanitize-html.js +1 -0
  69. package/dist/components/image-uploader/ImageUploader.cjs +1 -1
  70. package/dist/components/image-uploader/ImageUploader.js +1 -1
  71. package/dist/components/indicator/Indicator.cjs +1 -1
  72. package/dist/components/indicator/Indicator.js +1 -1
  73. package/dist/components/label/Label.cjs +1 -1
  74. package/dist/components/label/Label.js +1 -1
  75. package/dist/components/line-chart/LineChart.cjs +1 -1
  76. package/dist/components/line-chart/LineChart.js +1 -1
  77. package/dist/components/modal/Modal.cjs +1 -1
  78. package/dist/components/modal/Modal.js +1 -1
  79. package/dist/components/pagination/Pagination.cjs +1 -1
  80. package/dist/components/pagination/Pagination.js +1 -1
  81. package/dist/components/pie-chart/PieChart.cjs +1 -1
  82. package/dist/components/pie-chart/PieChart.js +1 -1
  83. package/dist/components/progress-bar/ProgressBar.cjs +1 -1
  84. package/dist/components/progress-bar/ProgressBar.js +1 -1
  85. package/dist/components/radio-button/RadioButton.cjs +1 -1
  86. package/dist/components/radio-button/RadioButton.js +1 -1
  87. package/dist/components/scatter-chart/ScatterChart.cjs +1 -1
  88. package/dist/components/scatter-chart/ScatterChart.js +1 -1
  89. package/dist/components/schema-editor/SchemaEditor.cjs +1 -1
  90. package/dist/components/schema-editor/SchemaEditor.js +1 -1
  91. package/dist/components/schema-editor/tables/SchemaTableRenderer.cjs +1 -1
  92. package/dist/components/schema-editor/tables/SchemaTableRenderer.js +1 -1
  93. package/dist/components/select/Select.cjs +1 -1
  94. package/dist/components/select/Select.js +1 -1
  95. package/dist/components/sidebar/Sidebar.cjs +1 -1
  96. package/dist/components/sidebar/Sidebar.js +1 -1
  97. package/dist/components/slider/Slider.cjs +1 -1
  98. package/dist/components/slider/Slider.js +1 -1
  99. package/dist/components/tabs/TabsContent.cjs +1 -1
  100. package/dist/components/tabs/TabsContent.js +1 -1
  101. package/dist/components/tabs/TabsTrigger.cjs +1 -1
  102. package/dist/components/tabs/TabsTrigger.js +1 -1
  103. package/dist/components/waterfall-chart/WaterfallChart.cjs +1 -1
  104. package/dist/components/waterfall-chart/WaterfallChart.js +1 -1
  105. package/dist/components/wizard/Wizard.cjs +1 -1
  106. package/dist/components/wizard/Wizard.js +1 -1
  107. package/dist/components/workflow-editor/edges/WorkflowEdgeRenderer.cjs +1 -1
  108. package/dist/components/workflow-editor/edges/WorkflowEdgeRenderer.js +1 -1
  109. package/dist/components/workflow-editor/nodes/WorkflowNodeRenderer.cjs +1 -1
  110. package/dist/components/workflow-editor/nodes/WorkflowNodeRenderer.js +1 -1
  111. package/dist/index.d.cts +170 -12
  112. package/dist/index.d.ts +170 -12
  113. package/dist/lib/safe-href.cjs +1 -0
  114. package/dist/lib/safe-href.js +1 -0
  115. package/dist/styles.css +618 -249
  116. package/package.json +2 -2
package/dist/index.d.ts CHANGED
@@ -895,6 +895,11 @@ declare namespace Banner {
895
895
 
896
896
  interface BreadcrumbItem {
897
897
  label: string;
898
+ /**
899
+ * Where it leads. An `http:`, `https:`, `mailto:`, `tel:` or relative address
900
+ * makes a link; any other (`javascript:`, `data:`…) leaves it without one,
901
+ * and the console says so once.
902
+ */
898
903
  href?: string;
899
904
  icon?: ReactNode;
900
905
  onClick?: () => void;
@@ -1010,6 +1015,11 @@ interface ButtonProps extends ComponentPropsWithoutRef<"button"> {
1010
1015
  fullWidth?: boolean;
1011
1016
  rounded?: "none" | "sm" | "md" | "lg" | "full";
1012
1017
  bgColor?: string;
1018
+ /**
1019
+ * Classes of the text. Left out, it is the colour the brand is written in
1020
+ * (`text-synertech-on-primary`) on the default fill, and `text-white` on a
1021
+ * fill passed as `bgColor`.
1022
+ */
1013
1023
  textColor?: string;
1014
1024
  focusColor?: string;
1015
1025
  selected?: boolean;
@@ -2977,6 +2987,12 @@ interface CheckboxProps extends Omit<ComponentPropsWithoutRef<"input">, "size" |
2977
2987
  borderColor?: string;
2978
2988
  labelColor?: string;
2979
2989
  errorColor?: string;
2990
+ /**
2991
+ * Classes of the check mark. Left out, it is the colour the brand is
2992
+ * written in (`text-synertech-on-primary`) on the default fill, and
2993
+ * `text-white` on a fill passed as `checkedColor`. The `outlined` variant
2994
+ * has no fill: its mark is drawn in the colour of its outline.
2995
+ */
2980
2996
  checkmarkColor?: string;
2981
2997
  hoverColor?: string;
2982
2998
  focusRingColor?: string;
@@ -2997,6 +3013,12 @@ interface CheckboxGroupProps extends Omit<ComponentPropsWithoutRef<"div">, "onCh
2997
3013
  value?: string[];
2998
3014
  defaultValue?: string[];
2999
3015
  onChange?: (values: string[]) => void;
3016
+ /**
3017
+ * The name the checked items are submitted under, each with its own
3018
+ * `value`: a form gets one entry per checked item. The `name` of an item
3019
+ * wins over it.
3020
+ */
3021
+ name?: string;
3000
3022
  orientation?: "horizontal" | "vertical";
3001
3023
  spacing?: "sm" | "md" | "lg";
3002
3024
  disabled?: boolean;
@@ -3008,7 +3030,7 @@ interface CheckboxGroupProps extends Omit<ComponentPropsWithoutRef<"div">, "onCh
3008
3030
  labelClassName?: string;
3009
3031
  }
3010
3032
  declare const CheckboxGroup: {
3011
- ({ label, description, value: controlledValue, defaultValue, onChange, orientation, spacing, disabled, size, error, required, children, className, labelClassName, ...rest }: CheckboxGroupProps): react_jsx_runtime.JSX.Element;
3033
+ ({ label, description, value: controlledValue, defaultValue, onChange, name, orientation, spacing, disabled, size, error, required, children, className, labelClassName, ...rest }: CheckboxGroupProps): react_jsx_runtime.JSX.Element;
3012
3034
  displayName: string;
3013
3035
  };
3014
3036
  interface CheckboxGroupItemProps extends Omit<CheckboxProps, "checked" | "onChange"> {
@@ -4445,7 +4467,7 @@ interface MentionInputProps extends InputStyleProps {
4445
4467
  }
4446
4468
  declare const MentionInput: react.ForwardRefExoticComponent<MentionInputProps & react.RefAttributes<HTMLDivElement>>;
4447
4469
 
4448
- interface NumberInputProps extends Omit<React.ComponentPropsWithoutRef<"input">, "size" | "type" | "onChange" | "value">, InputStyleProps {
4470
+ interface NumberInputProps extends Omit<React.ComponentPropsWithoutRef<"input">, "size" | "type" | "onChange" | "value" | "defaultValue">, InputStyleProps {
4449
4471
  label?: string;
4450
4472
  inline?: boolean;
4451
4473
  labelColor?: string;
@@ -4455,6 +4477,11 @@ interface NumberInputProps extends Omit<React.ComponentPropsWithoutRef<"input">,
4455
4477
  error?: boolean;
4456
4478
  hideLabel?: boolean;
4457
4479
  value?: number | null;
4480
+ /**
4481
+ * The value the field starts with when `value` is not passed. The field
4482
+ * then keeps what is typed in it by itself; `onChange` still reports it.
4483
+ */
4484
+ defaultValue?: number | null;
4458
4485
  onChange?: (value: number | null) => void;
4459
4486
  format?: "number" | "currency" | "percentage" | "decimal";
4460
4487
  currency?: string;
@@ -4462,6 +4489,10 @@ interface NumberInputProps extends Omit<React.ComponentPropsWithoutRef<"input">,
4462
4489
  decimals?: number;
4463
4490
  min?: number;
4464
4491
  max?: number;
4492
+ /**
4493
+ * How much the up and down arrow keys add or take away, within `min` and
4494
+ * `max`.
4495
+ */
4465
4496
  step?: number;
4466
4497
  prefix?: string;
4467
4498
  suffix?: string;
@@ -4472,6 +4503,11 @@ declare const NumberInput: react.ForwardRefExoticComponent<NumberInputProps & re
4472
4503
 
4473
4504
  interface NavItem {
4474
4505
  label: string;
4506
+ /**
4507
+ * Where it leads. An `http:`, `https:`, `mailto:`, `tel:` or relative address
4508
+ * makes a link; any other (`javascript:`, `data:`…) leaves it without one,
4509
+ * and the console says so once.
4510
+ */
4475
4511
  href?: string;
4476
4512
  icon?: ReactNode;
4477
4513
  badge?: string | number;
@@ -4482,6 +4518,11 @@ interface NavItem {
4482
4518
  }
4483
4519
  interface HeaderProps {
4484
4520
  logo?: ReactNode;
4521
+ /**
4522
+ * Where the logo leads. Any other address than an `http:`, `https:`,
4523
+ * `mailto:`, `tel:` or relative one (`javascript:`…) leaves the logo
4524
+ * without a link.
4525
+ */
4485
4526
  logoHref?: string;
4486
4527
  onLogoClick?: () => void;
4487
4528
  navItems?: NavItem[];
@@ -4509,6 +4550,15 @@ interface HeaderProps {
4509
4550
  declare function Header({ logo, logoHref, onLogoClick, navItems, actions, rightContent, variant, size, backgroundColor, textColor, hoverColor, navItemTextColor, navItemHoverColor, navItemBgHover, navItemActiveColor, sticky, fixed, showSearch, onSearch, searchPlaceholder: searchPlaceholderProp, menuLabel, className, containerClassName, }: HeaderProps): react_jsx_runtime.JSX.Element;
4510
4551
 
4511
4552
  interface HelpButtonProps {
4553
+ /**
4554
+ * What the bubble shows: a node as it is, a string as Markdown under
4555
+ * `markdown`, and as HTML otherwise. That HTML keeps the formatting Markdown
4556
+ * produces — headings, paragraphs, lists, links, code, quotes, tables — and
4557
+ * nothing else: `<style>`, forms and their fields, images and frames are
4558
+ * dropped, and so are `class`, `style`, `id` and `name`. A link keeps an
4559
+ * `http:`, `https:`, `mailto:`, `tel:` or relative address. Neither mode
4560
+ * shows an image: a help that needs one is given as a node.
4561
+ */
4512
4562
  content: string | ReactNode;
4513
4563
  markdown?: boolean;
4514
4564
  position?: "top" | "bottom" | "left" | "right";
@@ -4797,20 +4847,72 @@ interface LineChartProps extends CartesianChartBaseProps, Omit<ComponentPropsWit
4797
4847
  declare function LineChart({ data, series, x, y, height, width, size, grid, legend, tooltip, tableView, emphasis, title, description, loading, emptyState, error, errorState, onRetry, actions, onPointClick, curve, forecastFrom, forecastLabel, markers, connectNulls, referenceLines, annotations, overlay, legendToggle, maxPoints, brush, onBrush, brushLabel, sync, margin, locale, plotLabel, className, ...props }: LineChartProps): react_jsx_runtime.JSX.Element;
4798
4848
 
4799
4849
  interface ModalProps {
4800
- isOpen: boolean;
4850
+ /**
4851
+ * Whether the modal is shown. `open` is the same prop under the name `Drawer`
4852
+ * gives it: pass one of the two, a modal given neither stays closed.
4853
+ */
4854
+ isOpen?: boolean;
4855
+ /** Whether the modal is shown, under the name `Drawer` uses. Wins over `isOpen` when both are passed. */
4856
+ open?: boolean;
4857
+ /**
4858
+ * Called when the modal asks to be closed: the close button, Escape, and a
4859
+ * footer button once its handler has let it.
4860
+ */
4801
4861
  onClose: () => void;
4862
+ /**
4863
+ * Title of the dialog, and its accessible name. `title=""` renders none: name
4864
+ * the dialog with `aria-label` then. Left out with no `aria-label` either, a
4865
+ * placeholder is shown in its place and a warning says so once.
4866
+ */
4802
4867
  title?: string;
4803
4868
  children?: ReactNode;
4804
4869
  buttonLabel?: string;
4805
- onButtonClick?: () => void | Promise<void>;
4870
+ /** The older name of `onSubmitClick`. Wins over it when both are passed. */
4871
+ onButtonClick?: () => void | boolean | Promise<void | boolean>;
4872
+ /**
4873
+ * Classes of the backdrop, the layer that covers the page. The dialog itself
4874
+ * takes `panelClassName`.
4875
+ */
4806
4876
  className?: string;
4877
+ /**
4878
+ * Classes of the dialog panel: a height, a border, a shadow. The width stays
4879
+ * on `size`; for another one, `size="full"` and a `max-w-*` with `mx-auto`
4880
+ * here.
4881
+ */
4882
+ panelClassName?: string;
4807
4883
  allowFullScreen?: boolean;
4884
+ /**
4885
+ * Show the confirm button. Default `true`: a modal given no footer prop has a
4886
+ * Confirm button, which closes it. `false` on a modal that brings its own
4887
+ * buttons.
4888
+ */
4808
4889
  showSubmit?: boolean;
4809
4890
  submitLabel?: string;
4810
- onSubmitClick?: () => void | Promise<void>;
4891
+ /**
4892
+ * Called by the confirm button. A promise is awaited: both footer buttons
4893
+ * are disabled meanwhile and the one that was pressed is `aria-busy`. The
4894
+ * modal then closes, unless the handler returns or resolves `false`, or
4895
+ * throws — a form that did not validate, a request the server refused.
4896
+ */
4897
+ onSubmitClick?: () => void | boolean | Promise<void | boolean>;
4898
+ /**
4899
+ * Close the modal once the confirm handler is done. Default `true`. `false`
4900
+ * leaves closing to the application, whatever the handler returns.
4901
+ */
4902
+ closeOnSubmit?: boolean;
4903
+ /**
4904
+ * Receives what the confirm handler threw, or what its promise rejected
4905
+ * with. The modal stays open. Without it the error is not caught: it reaches
4906
+ * the page as it would from any event handler.
4907
+ */
4908
+ onSubmitError?: (error: unknown) => void;
4811
4909
  showCancel?: boolean;
4812
4910
  cancelLabel?: string;
4813
- onCancelClick?: () => void | Promise<void>;
4911
+ /**
4912
+ * Called by the cancel button, with the rules of `onSubmitClick`: awaited,
4913
+ * and the modal stays open on `false` or on an error.
4914
+ */
4915
+ onCancelClick?: () => void | boolean | Promise<void | boolean>;
4814
4916
  buttonsPosition?: "left" | "center" | "right";
4815
4917
  showHeaderDivider?: boolean;
4816
4918
  showFooterDivider?: boolean;
@@ -4835,8 +4937,9 @@ interface ModalProps {
4835
4937
  /** Accessible name of the "collapse" button. Defaults to the `exitFullScreen` label. */
4836
4938
  exitFullScreenLabel?: string;
4837
4939
  /**
4838
- * Accessible name of the dialog when no visible `title` is rendered
4839
- * (`title=""`). Ignored otherwise: the title labels the dialog.
4940
+ * Accessible name of the dialog when no visible `title` is rendered:
4941
+ * `title=""`, or no `title` at all. Ignored otherwise: the title labels the
4942
+ * dialog.
4840
4943
  */
4841
4944
  "aria-label"?: string;
4842
4945
  /** Close the modal when Escape is pressed. Default `true`. */
@@ -4956,12 +5059,42 @@ interface ProgressBarProps extends Omit<ComponentPropsWithoutRef<"div">, "childr
4956
5059
  size?: ProgressBarSize;
4957
5060
  color?: ProgressBarColor;
4958
5061
  variant?: ProgressBarVariant;
5062
+ /**
5063
+ * Classes that colour the fill, in place of the ones `color` and `variant`
5064
+ * pick: `"bg-orange-600"`, or a gradient. The same prop as on
5065
+ * `CircularProgress`.
5066
+ */
5067
+ progressColor?: string;
5068
+ /** Classes that colour the track behind the fill, in place of the grey one. */
5069
+ trackColor?: string;
4959
5070
  showValue?: boolean;
4960
5071
  valueFormat?: (value: number) => string;
5072
+ /**
5073
+ * Text shown above the bar, which also names it. A page that already shows a
5074
+ * label of its own names the bar with `aria-labelledby` or `aria-label`
5075
+ * instead.
5076
+ */
4961
5077
  label?: string;
4962
5078
  animated?: boolean;
5079
+ /**
5080
+ * Accessible name of the bar. Goes to the element that holds the
5081
+ * `progressbar` role, not to the wrapper, and wins over `label`.
5082
+ */
5083
+ "aria-label"?: string;
5084
+ /**
5085
+ * Id of the element that names the bar: a label the page already shows.
5086
+ * Goes to the element that holds the `progressbar` role.
5087
+ */
5088
+ "aria-labelledby"?: string;
5089
+ /** Id of the element that describes the bar. Goes to the element that holds the `progressbar` role. */
5090
+ "aria-describedby"?: string;
5091
+ /**
5092
+ * The value as a reader should hear it, when a percentage is not it:
5093
+ * `"3 of 10 files"`. Goes to the element that holds the `progressbar` role.
5094
+ */
5095
+ "aria-valuetext"?: string;
4963
5096
  }
4964
- declare function ProgressBar({ value, indeterminate, size, color, variant, showValue, valueFormat, label, animated, className, ...props }: ProgressBarProps): react_jsx_runtime.JSX.Element;
5097
+ declare function ProgressBar({ value, indeterminate, size, color, variant, progressColor, trackColor, showValue, valueFormat, label, animated, className, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-valuetext": ariaValueText, ...props }: ProgressBarProps): react_jsx_runtime.JSX.Element;
4965
5098
  declare namespace ProgressBar {
4966
5099
  var displayName: string;
4967
5100
  }
@@ -5115,7 +5248,11 @@ interface SidebarItemProps {
5115
5248
  active?: boolean;
5116
5249
  /** Disabled state */
5117
5250
  disabled?: boolean;
5118
- /** Link href (renders as <a>) */
5251
+ /**
5252
+ * Where the item leads, rendered as a link. Any other address than an
5253
+ * `http:`, `https:`, `mailto:`, `tel:` or relative one (`javascript:`…)
5254
+ * leaves it a button, and the console says so once.
5255
+ */
5119
5256
  href?: string;
5120
5257
  /** Click handler */
5121
5258
  onClick?: () => void;
@@ -5483,9 +5620,19 @@ declare namespace FooterColumn {
5483
5620
  }
5484
5621
 
5485
5622
  interface FooterLinkProps extends ComponentPropsWithoutRef<"a"> {
5623
+ /**
5624
+ * Where it leads. An `http:`, `https:`, `mailto:`, `tel:` or relative address
5625
+ * makes a link; any other (`javascript:`, `data:`…) leaves it without one,
5626
+ * and the console says so once.
5627
+ */
5628
+ href?: string;
5629
+ /**
5630
+ * Opens the link in a new tab, with `noopener noreferrer` added to the
5631
+ * `rel` it is given.
5632
+ */
5486
5633
  external?: boolean;
5487
5634
  }
5488
- declare function FooterLink({ external, className, children, ...props }: FooterLinkProps): react_jsx_runtime.JSX.Element;
5635
+ declare function FooterLink({ external, href, rel, className, children, ...props }: FooterLinkProps): react_jsx_runtime.JSX.Element;
5489
5636
  declare namespace FooterLink {
5490
5637
  var displayName: string;
5491
5638
  }
@@ -5503,6 +5650,17 @@ interface FooterSocialProps extends ComponentPropsWithoutRef<"div"> {
5503
5650
  children?: ReactNode;
5504
5651
  }
5505
5652
  interface FooterSocialLinkProps extends ComponentPropsWithoutRef<"a"> {
5653
+ /**
5654
+ * Where it leads. An `http:`, `https:`, `mailto:`, `tel:` or relative address
5655
+ * makes a link; any other (`javascript:`, `data:`…) leaves it without one,
5656
+ * and the console says so once.
5657
+ */
5658
+ href?: string;
5659
+ /**
5660
+ * Added to `noopener noreferrer`, which the link always carries: it opens
5661
+ * in a new tab.
5662
+ */
5663
+ rel?: string;
5506
5664
  icon: ReactNode;
5507
5665
  label: string;
5508
5666
  }
@@ -5510,7 +5668,7 @@ declare function FooterSocial({ className, children, ...props }: FooterSocialPro
5510
5668
  declare namespace FooterSocial {
5511
5669
  var displayName: string;
5512
5670
  }
5513
- declare function FooterSocialLink({ icon, label, className, ...props }: FooterSocialLinkProps): react_jsx_runtime.JSX.Element;
5671
+ declare function FooterSocialLink({ icon, label, href, rel, className, ...props }: FooterSocialLinkProps): react_jsx_runtime.JSX.Element;
5514
5672
  declare namespace FooterSocialLink {
5515
5673
  var displayName: string;
5516
5674
  }
@@ -0,0 +1 @@
1
+ "use strict";var r=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var l=(n,e)=>{for(var t in e)r(n,t,{get:e[t],enumerable:!0})},a=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of f(e))!c.call(n,s)&&s!==t&&r(n,s,{get:()=>e[s],enumerable:!(i=d(e,s))||i.enumerable});return n};var h=n=>a(r({},"__esModule",{value:!0}),n);var C={};l(C,{componentHref:()=>S,mergeRel:()=>E,safeHref:()=>w});module.exports=h(C);var g=new Set(["http","https","mailto","tel"]),p=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g,m=/^([a-z][a-z\d+.-]*):/i;function w(n){return n==null?void 0:o(n)===void 0?n:void 0}function o(n){let e=m.exec(n.replace(p,""));if(!e)return;let t=e[1].toLowerCase();return g.has(t)?void 0:t}var u=new Set;function S(n,e){if(e==null)return;let t=o(e);if(t===void 0)return e;let i=`${n} ${t}`;u.has(i)||(u.add(i),console.warn(`[@synertech/ui] ${n} renders no link for a "${t}:" address. Only http:, https:, mailto:, tel: and addresses without a scheme are followed; the text is shown without its link.`))}function E(n,e){let t=(n??"").split(/\s+/).filter(Boolean),i=new Set(t.map(s=>s.toLowerCase()));for(let s of e.split(" "))i.has(s)||t.push(s);return t.join(" ")}0&&(module.exports={componentHref,mergeRel,safeHref});
@@ -0,0 +1 @@
1
+ var o=new Set(["http","https","mailto","tel"]),d=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g,f=/^([a-z][a-z\d+.-]*):/i;function c(e){return e==null?void 0:u(e)===void 0?e:void 0}function u(e){let t=f.exec(e.replace(d,""));if(!t)return;let n=t[1].toLowerCase();return o.has(n)?void 0:n}var r=new Set;function l(e,t){if(t==null)return;let n=u(t);if(n===void 0)return t;let s=`${e} ${n}`;r.has(s)||(r.add(s),console.warn(`[@synertech/ui] ${e} renders no link for a "${n}:" address. Only http:, https:, mailto:, tel: and addresses without a scheme are followed; the text is shown without its link.`))}function a(e,t){let n=(e??"").split(/\s+/).filter(Boolean),s=new Set(n.map(i=>i.toLowerCase()));for(let i of t.split(" "))s.has(i)||n.push(i);return n.join(" ")}export{l as componentHref,a as mergeRel,c as safeHref};