@prokodo/ui 0.0.52 → 0.0.53

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 (156) hide show
  1. package/README.md +81 -81
  2. package/dist/components/accordion/Accordion.client.js +3 -1
  3. package/dist/components/accordion/Accordion.view.js +100 -81
  4. package/dist/components/animated/Animated.server.js +3 -1
  5. package/dist/components/animatedText/AnimatedText.client.js +1 -7
  6. package/dist/components/animatedText/AnimatedText.view.js +4 -1
  7. package/dist/components/avatar/Avatar.view.js +2 -2
  8. package/dist/components/base-link/BaseLink.view.js +1 -1
  9. package/dist/components/button/Button.server.js +1 -8
  10. package/dist/components/calendly/Calendly.client.js +63 -54
  11. package/dist/components/calendly/Calendly.server.js +3 -1
  12. package/dist/components/card/Card.client.js +2 -1
  13. package/dist/components/card/Card.effects.client.js +5 -1
  14. package/dist/components/card/Card.view.js +19 -2
  15. package/dist/components/carousel/Carousel.client.js +36 -12
  16. package/dist/components/chip/Chip.view.js +10 -6
  17. package/dist/components/datePicker/DatePicker.client.js +53 -37
  18. package/dist/components/datePicker/DatePicker.view.js +3 -1
  19. package/dist/components/dialog/Dialog.client.js +22 -14
  20. package/dist/components/dialog/Dialog.view.js +10 -2
  21. package/dist/components/drawer/Drawer.client.js +10 -2
  22. package/dist/components/drawer/Drawer.effects.client.js +7 -2
  23. package/dist/components/dynamic-list/DynamicList.client.js +8 -7
  24. package/dist/components/dynamic-list/DynamicList.server.js +10 -4
  25. package/dist/components/dynamic-list/DynamicList.view.js +1 -1
  26. package/dist/components/form/Form.client.js +16 -13
  27. package/dist/components/form/Form.view.js +8 -4
  28. package/dist/components/form/FormField.client.js +5 -5
  29. package/dist/components/form/FormField.server.js +3 -23
  30. package/dist/components/form/FormResponse.js +5 -1
  31. package/dist/components/grid/Grid.js +7 -2
  32. package/dist/components/grid/GridRow.js +12 -2
  33. package/dist/components/headline/Headline.js +3 -1
  34. package/dist/components/icon/Icon.js +8 -4
  35. package/dist/components/image-text/ImageText.js +5 -1
  36. package/dist/components/input/Input.client.js +52 -28
  37. package/dist/components/input/Input.view.js +92 -68
  38. package/dist/components/inputOTP/InputOTP.js +107 -90
  39. package/dist/components/label/Label.js +1 -8
  40. package/dist/components/link/Link.view.js +3 -1
  41. package/dist/components/list/List.js +94 -42
  42. package/dist/components/loading/Loading.client.js +15 -2
  43. package/dist/components/loading/Loading.server.js +8 -1
  44. package/dist/components/loading/Loading.view.js +30 -7
  45. package/dist/components/post-item/PostItem.client.js +18 -0
  46. package/dist/components/post-item/PostItem.js +7 -136
  47. package/dist/components/post-item/PostItem.lazy.js +14 -0
  48. package/dist/components/post-item/PostItem.module.scss.js +3 -1
  49. package/dist/components/post-item/PostItem.server.js +15 -0
  50. package/dist/components/post-item/PostItem.view.js +238 -0
  51. package/dist/components/post-item/PostItemAuthor.js +28 -22
  52. package/dist/components/post-teaser/PostTeaser.client.js +31 -0
  53. package/dist/components/post-teaser/PostTeaser.js +9 -169
  54. package/dist/components/post-teaser/PostTeaser.lazy.js +13 -0
  55. package/dist/components/post-teaser/PostTeaser.module.scss.js +3 -0
  56. package/dist/components/post-teaser/PostTeaser.server.js +23 -0
  57. package/dist/components/post-teaser/PostTeaser.view.js +252 -0
  58. package/dist/components/post-widget/PostWidget.client.js +9 -0
  59. package/dist/components/post-widget/PostWidget.js +11 -156
  60. package/dist/components/post-widget/PostWidget.lazy.js +13 -0
  61. package/dist/components/post-widget/PostWidget.module.scss.js +1 -0
  62. package/dist/components/post-widget/PostWidget.server.js +11 -0
  63. package/dist/components/post-widget/PostWidget.view.js +263 -0
  64. package/dist/components/post-widget-carousel/PostWidgetCarousel.client.js +9 -0
  65. package/dist/components/post-widget-carousel/PostWidgetCarousel.js +9 -160
  66. package/dist/components/post-widget-carousel/PostWidgetCarousel.lazy.js +13 -0
  67. package/dist/components/post-widget-carousel/PostWidgetCarousel.module.scss.js +3 -0
  68. package/dist/components/post-widget-carousel/PostWidgetCarousel.server.js +11 -0
  69. package/dist/components/post-widget-carousel/PostWidgetCarousel.view.js +244 -0
  70. package/dist/components/rich-text/RichText.client.js +7 -2
  71. package/dist/components/select/Select.view.js +132 -116
  72. package/dist/components/sidenav/SideNav.client.js +19 -18
  73. package/dist/components/sidenav/SideNav.server.js +8 -1
  74. package/dist/components/sidenav/SideNav.view.js +21 -3
  75. package/dist/components/skeleton/Skeleton.effects.client.js +3 -1
  76. package/dist/components/slider/Slider.client.js +56 -38
  77. package/dist/components/slider/Slider.view.js +1 -7
  78. package/dist/components/snackbar/SnackbarProvider.client.js +21 -22
  79. package/dist/components/stepper/Stepper.client.js +1 -8
  80. package/dist/components/switch/Switch.client.js +1 -6
  81. package/dist/components/switch/Switch.server.js +1 -3
  82. package/dist/components/table/Table.js +3 -1
  83. package/dist/components/table/TableCell.js +13 -1
  84. package/dist/components/teaser/Teaser.js +1 -5
  85. package/dist/constants/project.js +1 -1
  86. package/dist/helpers/createIsland.js +3 -1
  87. package/dist/helpers/createLazyWrapper.js +3 -1
  88. package/dist/helpers/date.js +21 -0
  89. package/dist/tsconfig.build.tsbuildinfo +1 -1
  90. package/dist/types/components/accordion/Accordion.model.d.ts +1 -1
  91. package/dist/types/components/animated/Animated.client.d.ts +2 -2
  92. package/dist/types/components/animated/Animated.model.d.ts +1 -1
  93. package/dist/types/components/button/Button.client.d.ts +1 -1
  94. package/dist/types/components/button/Button.d.ts +1 -1
  95. package/dist/types/components/button/Button.lazy.d.ts +1 -1
  96. package/dist/types/components/button/Button.server.d.ts +1 -1
  97. package/dist/types/components/button/Button.view.d.ts +1 -1
  98. package/dist/types/components/card/Card.effects.client.d.ts +1 -1
  99. package/dist/types/components/card/index.d.ts +1 -1
  100. package/dist/types/components/carousel/Carousel.d.ts +3 -0
  101. package/dist/types/components/carousel/Carousel.lazy.d.ts +3 -0
  102. package/dist/types/components/carousel/Carousel.model.d.ts +4 -0
  103. package/dist/types/components/dialog/Dialog.client.d.ts +1 -1
  104. package/dist/types/components/dialog/Dialog.model.d.ts +4 -4
  105. package/dist/types/components/dialog/Dialog.view.d.ts +2 -2
  106. package/dist/types/components/drawer/Drawer.client.d.ts +1 -1
  107. package/dist/types/components/drawer/Drawer.d.ts +1 -1
  108. package/dist/types/components/drawer/Drawer.effects.client.d.ts +1 -1
  109. package/dist/types/components/drawer/Drawer.lazy.d.ts +1 -1
  110. package/dist/types/components/drawer/Drawer.model.d.ts +6 -6
  111. package/dist/types/components/drawer/Drawer.server.d.ts +1 -1
  112. package/dist/types/components/drawer/Drawer.view.d.ts +2 -2
  113. package/dist/types/components/drawer/index.d.ts +1 -1
  114. package/dist/types/components/icon/IconList.d.ts +1 -1
  115. package/dist/types/components/icon/index.d.ts +1 -1
  116. package/dist/types/components/image/Image.model.d.ts +2 -2
  117. package/dist/types/components/link/Link.d.ts +1 -1
  118. package/dist/types/components/link/Link.model.d.ts +1 -1
  119. package/dist/types/components/link/Link.server.d.ts +1 -1
  120. package/dist/types/components/loading/index.d.ts +1 -1
  121. package/dist/types/components/post-item/PostItem.client.d.ts +4 -0
  122. package/dist/types/components/post-item/PostItem.d.ts +3 -2
  123. package/dist/types/components/post-item/PostItem.lazy.d.ts +5 -0
  124. package/dist/types/components/post-item/PostItem.model.d.ts +46 -6
  125. package/dist/types/components/post-item/PostItem.server.d.ts +3 -0
  126. package/dist/types/components/post-item/PostItem.view.d.ts +3 -0
  127. package/dist/types/components/post-item/PostItemAuthor.model.d.ts +5 -8
  128. package/dist/types/components/post-item/index.d.ts +2 -2
  129. package/dist/types/components/post-teaser/PostTeaser.client.d.ts +4 -0
  130. package/dist/types/components/post-teaser/PostTeaser.d.ts +3 -2
  131. package/dist/types/components/post-teaser/PostTeaser.lazy.d.ts +5 -0
  132. package/dist/types/components/post-teaser/PostTeaser.model.d.ts +49 -3
  133. package/dist/types/components/post-teaser/PostTeaser.server.d.ts +3 -0
  134. package/dist/types/components/post-teaser/PostTeaser.view.d.ts +3 -0
  135. package/dist/types/components/post-teaser/index.d.ts +1 -1
  136. package/dist/types/components/post-widget/PostWidget.client.d.ts +4 -0
  137. package/dist/types/components/post-widget/PostWidget.d.ts +13 -3
  138. package/dist/types/components/post-widget/PostWidget.lazy.d.ts +14 -0
  139. package/dist/types/components/post-widget/PostWidget.model.d.ts +53 -3
  140. package/dist/types/components/post-widget/PostWidget.server.d.ts +3 -0
  141. package/dist/types/components/post-widget/PostWidget.view.d.ts +3 -0
  142. package/dist/types/components/post-widget/index.d.ts +1 -1
  143. package/dist/types/components/post-widget-carousel/PostWidgetCarousel.client.d.ts +3 -0
  144. package/dist/types/components/post-widget-carousel/PostWidgetCarousel.d.ts +11 -3
  145. package/dist/types/components/post-widget-carousel/PostWidgetCarousel.lazy.d.ts +12 -0
  146. package/dist/types/components/post-widget-carousel/PostWidgetCarousel.model.d.ts +39 -0
  147. package/dist/types/components/post-widget-carousel/PostWidgetCarousel.server.d.ts +3 -0
  148. package/dist/types/components/post-widget-carousel/PostWidgetCarousel.view.d.ts +3 -0
  149. package/dist/types/components/post-widget-carousel/index.d.ts +1 -1
  150. package/dist/types/components/sidenav/index.d.ts +1 -1
  151. package/dist/types/components/skeleton/Skeleton.effects.client.d.ts +2 -2
  152. package/dist/types/helpers/createIsland.d.ts +1 -1
  153. package/dist/types/helpers/createLazyWrapper.d.ts +1 -1
  154. package/dist/types/helpers/date.d.ts +5 -0
  155. package/dist/ui.css +116 -35
  156. package/package.json +3 -2
@@ -16,7 +16,10 @@ function SliderClient(props) {
16
16
  marks = false,
17
17
  snap = "none"
18
18
  } = props;
19
- const clamp = useCallback((v) => Math.min(Math.max(v, min), max), [min, max]);
19
+ const clamp = useCallback(
20
+ (v) => Math.min(Math.max(v, min), max),
21
+ [min, max]
22
+ );
20
23
  const markValues = useMemo(() => {
21
24
  if (Array.isArray(marks)) {
22
25
  return [...new Set(marks.map((m) => m.value))].filter((v) => typeof v === "number").sort((a, b) => a - b);
@@ -35,30 +38,36 @@ function SliderClient(props) {
35
38
  (v) => clamp(step > 0 ? Math.round((v - min) / step) * step + min : v),
36
39
  [clamp, step, min]
37
40
  );
38
- const snapToMarks = useCallback((v) => {
39
- const c = clamp(v);
40
- const arr = markValues;
41
- if (arr.length === 0) return snapToStep(c);
42
- let best = c, bestD = Infinity;
43
- for (const mv of arr) {
44
- const d = Math.abs(c - mv);
45
- if (d < bestD) {
46
- best = mv;
47
- bestD = d;
41
+ const snapToMarks = useCallback(
42
+ (v) => {
43
+ const c = clamp(v);
44
+ const arr = markValues;
45
+ if (arr.length === 0) return snapToStep(c);
46
+ let best = c, bestD = Infinity;
47
+ for (const mv of arr) {
48
+ const d = Math.abs(c - mv);
49
+ if (d < bestD) {
50
+ best = mv;
51
+ bestD = d;
52
+ }
48
53
  }
49
- }
50
- return clamp(best);
51
- }, [clamp, markValues, snapToStep]);
52
- const quantize = useCallback((v) => {
53
- switch (snap) {
54
- case "step":
55
- return snapToStep(v);
56
- case "marks":
57
- return snapToMarks(v);
58
- default:
59
- return clamp(v);
60
- }
61
- }, [snap, snapToMarks, snapToStep, clamp]);
54
+ return clamp(best);
55
+ },
56
+ [clamp, markValues, snapToStep]
57
+ );
58
+ const quantize = useCallback(
59
+ (v) => {
60
+ switch (snap) {
61
+ case "step":
62
+ return snapToStep(v);
63
+ case "marks":
64
+ return snapToMarks(v);
65
+ default:
66
+ return clamp(v);
67
+ }
68
+ },
69
+ [snap, snapToMarks, snapToStep, clamp]
70
+ );
62
71
  const initial = useMemo(() => {
63
72
  const numeric = typeof controlledValue === "number" ? controlledValue : typeof controlledValue === "string" ? Number(controlledValue) : min;
64
73
  return quantize(numeric);
@@ -72,20 +81,29 @@ function SliderClient(props) {
72
81
  }
73
82
  }, [controlledValue, min, quantize]);
74
83
  const [isFocused, setIsFocused] = useState(false);
75
- const handleFocus = useCallback((e) => {
76
- setIsFocused(true);
77
- onFocus == null ? void 0 : onFocus(e);
78
- }, [onFocus]);
79
- const handleBlur = useCallback((e) => {
80
- setIsFocused(false);
81
- onBlur == null ? void 0 : onBlur(e);
82
- }, [onBlur]);
83
- const handleChange = useCallback((e) => {
84
- const raw = Number(e.currentTarget.value);
85
- const q = quantize(raw);
86
- setInternalValue((prev) => prev === q ? prev : q);
87
- onChange == null ? void 0 : onChange(e, q);
88
- }, [onChange, quantize]);
84
+ const handleFocus = useCallback(
85
+ (e) => {
86
+ setIsFocused(true);
87
+ onFocus == null ? void 0 : onFocus(e);
88
+ },
89
+ [onFocus]
90
+ );
91
+ const handleBlur = useCallback(
92
+ (e) => {
93
+ setIsFocused(false);
94
+ onBlur == null ? void 0 : onBlur(e);
95
+ },
96
+ [onBlur]
97
+ );
98
+ const handleChange = useCallback(
99
+ (e) => {
100
+ const raw = Number(e.currentTarget.value);
101
+ const q = quantize(raw);
102
+ setInternalValue((prev) => prev === q ? prev : q);
103
+ onChange == null ? void 0 : onChange(e, q);
104
+ },
105
+ [onChange, quantize]
106
+ );
89
107
  return /* @__PURE__ */ jsx(
90
108
  SliderView,
91
109
  {
@@ -59,13 +59,7 @@ const SliderView = /* @__PURE__ */ __name(({
59
59
  ),
60
60
  /* @__PURE__ */ jsxs("div", { className: bem("root", { disabled: Boolean(disabled) }), children: [
61
61
  /* @__PURE__ */ jsx("div", { className: bem("rail") }),
62
- /* @__PURE__ */ jsx(
63
- "div",
64
- {
65
- className: bem("track"),
66
- style: { width: `${pct}%` }
67
- }
68
- ),
62
+ /* @__PURE__ */ jsx("div", { className: bem("track"), style: { width: `${pct}%` } }),
69
63
  markPoints.map((m) => {
70
64
  const leftPct = max > min ? ((m.value < min ? min : m.value > max ? max : m.value) - min) / (max - min) * 100 : 0;
71
65
  return /* @__PURE__ */ jsx(
@@ -36,13 +36,19 @@ function SnackbarProvider({
36
36
  const close = useCallback((id) => {
37
37
  setQueue((q) => q.filter((s) => s.id !== id));
38
38
  }, []);
39
- const ctx = useMemo(() => ({ enqueue, close }), [enqueue, close]);
40
- const grouped = useMemo(() => queue.reduce((acc, s) => {
41
- var _a, _b;
42
- const key = `${(_a = s.anchorOrigin) == null ? void 0 : _a.vertical}-${(_b = s.anchorOrigin) == null ? void 0 : _b.horizontal}`;
43
- (acc[key] ?? (acc[key] = [])).push(s);
44
- return acc;
45
- }, {}), [queue]);
39
+ const ctx = useMemo(
40
+ () => ({ enqueue, close }),
41
+ [enqueue, close]
42
+ );
43
+ const grouped = useMemo(
44
+ () => queue.reduce((acc, s) => {
45
+ var _a, _b;
46
+ const key = `${(_a = s.anchorOrigin) == null ? void 0 : _a.vertical}-${(_b = s.anchorOrigin) == null ? void 0 : _b.horizontal}`;
47
+ (acc[key] ?? (acc[key] = [])).push(s);
48
+ return acc;
49
+ }, {}),
50
+ [queue]
51
+ );
46
52
  return /* @__PURE__ */ jsxs(SnackbarCtx.Provider, { value: ctx, children: [
47
53
  children,
48
54
  Object.entries(grouped).map(([key, snacks]) => {
@@ -52,23 +58,16 @@ function SnackbarProvider({
52
58
  [`is-${vertical}`]: true,
53
59
  [`is-${horizontal}`]: true
54
60
  };
55
- return /* @__PURE__ */ jsx(
56
- "div",
61
+ return /* @__PURE__ */ jsx("div", { className: bem(void 0, mod, className), children: snacks.map((snk) => /* @__PURE__ */ jsx(
62
+ Snackbar,
57
63
  {
58
- className: bem(void 0, mod, className),
59
- children: snacks.map((snk) => /* @__PURE__ */ jsx(
60
- Snackbar,
61
- {
62
- ...snk,
63
- open: true,
64
- className: bem("snackbar", mod, snk.className),
65
- onClose: /* @__PURE__ */ __name(() => close(snk.id), "onClose")
66
- },
67
- snk.id
68
- ))
64
+ ...snk,
65
+ open: true,
66
+ className: bem("snackbar", mod, snk.className),
67
+ onClose: /* @__PURE__ */ __name(() => close(snk.id), "onClose")
69
68
  },
70
- key
71
- );
69
+ snk.id
70
+ )) }, key);
72
71
  })
73
72
  ] });
74
73
  }
@@ -104,14 +104,7 @@ const StepperClient = forwardRef((props, ref) => {
104
104
  }
105
105
  };
106
106
  }),
107
- [
108
- steps,
109
- activeStep,
110
- handleStepClick,
111
- handleStepKeyDown,
112
- onFocus,
113
- onBlur
114
- ]
107
+ [steps, activeStep, handleStepClick, handleStepKeyDown, onFocus, onBlur]
115
108
  );
116
109
  return /* @__PURE__ */ jsx(
117
110
  StepperView,
@@ -5,12 +5,7 @@ import { jsx } from "react/jsx-runtime";
5
5
  import { memo, useState, useEffect, useCallback } from "react";
6
6
  import { SwitchView } from "./Switch.view.js";
7
7
  function SwitchClient(props) {
8
- const {
9
- checked: controlledChecked,
10
- onChange,
11
- onFocus,
12
- onBlur
13
- } = props;
8
+ const { checked: controlledChecked, onChange, onFocus, onBlur } = props;
14
9
  const [isChecked, setIsChecked] = useState(
15
10
  controlledChecked ?? false
16
11
  );
@@ -3,9 +3,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  import { SwitchView } from "./Switch.view.js";
5
5
  function SwitchServer(props) {
6
- const {
7
- checked: controlledChecked
8
- } = props;
6
+ const { checked: controlledChecked } = props;
9
7
  const isChecked = typeof controlledChecked === "boolean" ? controlledChecked : false;
10
8
  return /* @__PURE__ */ jsx(
11
9
  SwitchView,
@@ -50,7 +50,9 @@ const Table = /* @__PURE__ */ __name(({
50
50
  return /* @__PURE__ */ jsx(
51
51
  "tr",
52
52
  {
53
- className: bem("body__row", { "has-link": isString((_a = row == null ? void 0 : row.redirect) == null ? void 0 : _a.href) }),
53
+ className: bem("body__row", {
54
+ "has-link": isString((_a = row == null ? void 0 : row.redirect) == null ? void 0 : _a.href)
55
+ }),
54
56
  children: row == null ? void 0 : row.cells.filter((el) => el !== null).map((cell, b) => /* @__PURE__ */ createElement(
55
57
  TableCell,
56
58
  {
@@ -36,7 +36,19 @@ const TableCell = /* @__PURE__ */ __name(({
36
36
  ...cellProps,
37
37
  className: bem(void 0, { "has-icon": Boolean(icon) }, className),
38
38
  id,
39
- children: (redirect == null ? void 0 : redirect.href) !== void 0 ? /* @__PURE__ */ jsx(Link, { priority: true, ...redirect, className: bem("inner", { "has-link": true }, (redirect == null ? void 0 : redirect.className) ?? classNameInner), children: renderCellContent() }) : /* @__PURE__ */ jsx("span", { className: bem("inner", void 0, classNameInner), children: renderCellContent() })
39
+ children: (redirect == null ? void 0 : redirect.href) !== void 0 ? /* @__PURE__ */ jsx(
40
+ Link,
41
+ {
42
+ priority: true,
43
+ ...redirect,
44
+ className: bem(
45
+ "inner",
46
+ { "has-link": true },
47
+ (redirect == null ? void 0 : redirect.className) ?? classNameInner
48
+ ),
49
+ children: renderCellContent()
50
+ }
51
+ ) : /* @__PURE__ */ jsx("span", { className: bem("inner", void 0, classNameInner), children: renderCellContent() })
40
52
  }
41
53
  );
42
54
  }, "TableCell");
@@ -80,11 +80,7 @@ const Teaser = /* @__PURE__ */ __name(({
80
80
  name: "ArrowRight01Icon",
81
81
  size: "xs",
82
82
  ...redirect == null ? void 0 : redirect.icon,
83
- className: bem(
84
- "link__icon",
85
- void 0,
86
- (_a = redirect == null ? void 0 : redirect.icon) == null ? void 0 : _a.className
87
- )
83
+ className: bem("link__icon", void 0, (_a = redirect == null ? void 0 : redirect.icon) == null ? void 0 : _a.className)
88
84
  }
89
85
  ),
90
86
  redirect == null ? void 0 : redirect.label
@@ -1,4 +1,4 @@
1
- const PROKODO_UI_VERSION = "0.0.52";
1
+ const PROKODO_UI_VERSION = "0.0.53";
2
2
  export {
3
3
  PROKODO_UI_VERSION
4
4
  };
@@ -22,7 +22,9 @@ function createIsland({
22
22
  )}`
23
23
  );
24
24
  }
25
- const extra = { "data-island": islandName };
25
+ const extra = {
26
+ "data-island": islandName
27
+ };
26
28
  if (Boolean(priority)) {
27
29
  extra.priority = priority;
28
30
  }
@@ -35,7 +35,9 @@ function createLazyWrapper({
35
35
  )}, visible=${visible})`
36
36
  );
37
37
  }
38
- const extra = { "data-island": islandName };
38
+ const extra = {
39
+ "data-island": islandName
40
+ };
39
41
  if (priority) {
40
42
  extra.priority = priority;
41
43
  }
@@ -0,0 +1,21 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+ import { isString } from "./validations.js";
4
+ const localizeDate = /* @__PURE__ */ __name((locale, date) => {
5
+ if (!isString(date)) return void 0;
6
+ const newDate = new Date(date);
7
+ const year = newDate.getFullYear();
8
+ const month = String(newDate.getMonth() + 1).padStart(2, "0");
9
+ const day = String(newDate.getDate()).padStart(2, "0");
10
+ return {
11
+ locale: newDate.toLocaleDateString(locale, {
12
+ year: "numeric",
13
+ month: "long",
14
+ day: "numeric"
15
+ }),
16
+ meta: `${year}-${month}-${day}`
17
+ };
18
+ }, "localizeDate");
19
+ export {
20
+ localizeDate
21
+ };