@khipu/design-system 0.2.0-alpha.93 → 0.2.0-alpha.95
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/dist/beercss/khipu-beercss.css +1 -1
- package/dist/beercss/khipu-beercss.scoped.css +1 -1
- package/dist/beercss/metadata.json +5 -5
- package/dist/index.d.mts +13 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.js +27 -2
- package/dist/index.mjs +25 -2
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@khipu/design-system/beercss",
|
|
3
|
-
"version": "0.2.0-alpha.
|
|
3
|
+
"version": "0.2.0-alpha.95",
|
|
4
4
|
"description": "Khipu BeerCSS bundle with Material Design 3 and Khipu customizations",
|
|
5
|
-
"buildDate": "2026-07-
|
|
5
|
+
"buildDate": "2026-07-06T15:27:13.573Z",
|
|
6
6
|
"includes": {
|
|
7
7
|
"beercss": "4.0.1",
|
|
8
8
|
"khipu-tokens": "latest",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
},
|
|
20
20
|
"scopeClass": ".kds-theme-root",
|
|
21
21
|
"cdn": {
|
|
22
|
-
"css": "https://cdn.jsdelivr.net/npm/@khipu/design-system@0.2.0-alpha.
|
|
23
|
-
"cssScoped": "https://cdn.jsdelivr.net/npm/@khipu/design-system@0.2.0-alpha.
|
|
24
|
-
"js": "https://cdn.jsdelivr.net/npm/@khipu/design-system@0.2.0-alpha.
|
|
22
|
+
"css": "https://cdn.jsdelivr.net/npm/@khipu/design-system@0.2.0-alpha.95/dist/beercss/khipu-beercss.min.css",
|
|
23
|
+
"cssScoped": "https://cdn.jsdelivr.net/npm/@khipu/design-system@0.2.0-alpha.95/dist/beercss/khipu-beercss.scoped.min.css",
|
|
24
|
+
"js": "https://cdn.jsdelivr.net/npm/@khipu/design-system@0.2.0-alpha.95/dist/beercss/khipu-beercss.min.js"
|
|
25
25
|
}
|
|
26
26
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -3913,5 +3913,17 @@ declare function lighten(hex: string, amount: number): string;
|
|
|
3913
3913
|
* @param iso - ISO 8601 date-time, e.g. "2026-08-26T03:59:00.000Z"
|
|
3914
3914
|
*/
|
|
3915
3915
|
declare function formatDateTime(iso?: string): string;
|
|
3916
|
+
/**
|
|
3917
|
+
* Format an ISO 8601 string as "D-M-YYYY" (day/month without leading zeros, e.g. "30-8-2026")
|
|
3918
|
+
* in the browser's local timezone. Returns "" for empty or invalid input.
|
|
3919
|
+
* Compose with {@link formatTime} when the copy needs a localized connector
|
|
3920
|
+
* (e.g. "{date} a las {time}") — the connector belongs to i18n, not to this util.
|
|
3921
|
+
*/
|
|
3922
|
+
declare function formatDate(iso?: string): string;
|
|
3923
|
+
/**
|
|
3924
|
+
* Format an ISO 8601 string as "HH:mm" (24h, zero-padded) in the browser's local timezone.
|
|
3925
|
+
* Returns "" for empty or invalid input.
|
|
3926
|
+
*/
|
|
3927
|
+
declare function formatTime(iso?: string): string;
|
|
3916
3928
|
|
|
3917
|
-
export { type Colors, type ExpandPanelProps, type ExpandToggleProps, KdsAccordion, KdsAccordionDetails, type KdsAccordionDetailsProps, type KdsAccordionProps, KdsAccordionSummary, type KdsAccordionSummaryProps, KdsAlert, type KdsAlertProps, type KdsAlertSeverity, KdsBankList, type KdsBankListProps, KdsBankModal, type KdsBankModalProps, KdsBankRow, type KdsBankRowProps, KdsBillAttachment, type KdsBillAttachmentProps, KdsBillAttachments, type KdsBillAttachmentsProps, KdsBottomSheet, type KdsBottomSheetProps, KdsButton, type KdsButtonProps, type KdsButtonSize, type KdsButtonVariant, KdsCard, KdsCardBody, KdsCardFooter, KdsCardHeader, KdsCardPlan, type KdsCardPlanProps, type KdsCardProps, type KdsCardSectionProps, KdsCardSelector, type KdsCardSelectorProps, type KdsCardVariant, KdsCheckbox, type KdsCheckboxProps, KdsChip, type KdsChipColor, type KdsChipProps, KdsCopyButton, type KdsCopyButtonProps, KdsCopyRow, type KdsCopyRowProps, KdsCopyableTable, type KdsCopyableTableProps, type KdsCopyableTableRow, KdsCountdown, type KdsCountdownProps, KdsDivider, type KdsDividerProps, KdsExpandPanel, type KdsExpandPanelProps, KdsFab, type KdsFabPosition, type KdsFabProps, KdsInvoiceMerchant, type KdsInvoiceMerchantProps, KdsInvoiceSticky, type KdsInvoiceStickyProps, KdsLinearProgress, type KdsLinearProgressProps, KdsMerchantTile, type KdsMerchantTileProps, KdsMontoRow, type KdsMontoRowProps, KdsPaymentTotal, type KdsPaymentTotalProps, type KdsPaymentTotalVariant, KdsQrRow, type KdsQrRowProps, KdsRadioGroup, type KdsRadioGroupProps, type KdsRadioOption, type KdsRecapItem, KdsRecapList, type KdsRecapListProps, KdsSearchField, type KdsSearchFieldProps, KdsSectionNote, type KdsSectionNoteProps, KdsSecureFooter, type KdsSecureFooterProps, KdsSecureLoader, type KdsSecureLoaderProps, KdsSegmentedTabs, type KdsSegmentedTabsProps, KdsSelect, type KdsSelectOption, type KdsSelectProps, KdsSnackbar, type KdsSnackbarProps, type KdsSnackbarType, KdsSpinner, type KdsSpinnerProps, type KdsSpinnerSize, KdsStatusBlock, type KdsStatusBlockProps, type KdsStatusType, KdsStepper, type KdsStepperProps, KdsTab, KdsTabPanel, type KdsTabPanelProps, type KdsTabProps, KdsTabs, type KdsTabsProps, KdsTextField, type KdsTextFieldProps, KdsThemeProvider, type KdsThemeProviderProps, KdsTooltip, type KdsTooltipPlacement, type KdsTooltipProps, KdsTypography, type KdsTypographyProps, type KdsTypographyVariant, type ThemeMode, type Tokens, type TokensByMode, type Typography as TypographyTokens, type UseExpandToggleOptions, type UseExpandToggleResult, type UseHideOnScrollOptions, type UseHideOnScrollResult, type UseStickyInvoiceCollapseOptions, borderRadius, breakpoints, colors, colorsByMode, fontFamilies, fontSizes, fontWeights, formatDateTime, getContrastColor, letterSpacings, lighten, lineHeights, semanticSpacing, shadows, spacing, tokens, tokensByMode, transitions, typography, useAutoHide, useCopyToClipboard, useCountdown, useExpandToggle, useHideOnScroll, useStickyInvoiceCollapse, useTabsKeyboard, zIndex };
|
|
3929
|
+
export { type Colors, type ExpandPanelProps, type ExpandToggleProps, KdsAccordion, KdsAccordionDetails, type KdsAccordionDetailsProps, type KdsAccordionProps, KdsAccordionSummary, type KdsAccordionSummaryProps, KdsAlert, type KdsAlertProps, type KdsAlertSeverity, KdsBankList, type KdsBankListProps, KdsBankModal, type KdsBankModalProps, KdsBankRow, type KdsBankRowProps, KdsBillAttachment, type KdsBillAttachmentProps, KdsBillAttachments, type KdsBillAttachmentsProps, KdsBottomSheet, type KdsBottomSheetProps, KdsButton, type KdsButtonProps, type KdsButtonSize, type KdsButtonVariant, KdsCard, KdsCardBody, KdsCardFooter, KdsCardHeader, KdsCardPlan, type KdsCardPlanProps, type KdsCardProps, type KdsCardSectionProps, KdsCardSelector, type KdsCardSelectorProps, type KdsCardVariant, KdsCheckbox, type KdsCheckboxProps, KdsChip, type KdsChipColor, type KdsChipProps, KdsCopyButton, type KdsCopyButtonProps, KdsCopyRow, type KdsCopyRowProps, KdsCopyableTable, type KdsCopyableTableProps, type KdsCopyableTableRow, KdsCountdown, type KdsCountdownProps, KdsDivider, type KdsDividerProps, KdsExpandPanel, type KdsExpandPanelProps, KdsFab, type KdsFabPosition, type KdsFabProps, KdsInvoiceMerchant, type KdsInvoiceMerchantProps, KdsInvoiceSticky, type KdsInvoiceStickyProps, KdsLinearProgress, type KdsLinearProgressProps, KdsMerchantTile, type KdsMerchantTileProps, KdsMontoRow, type KdsMontoRowProps, KdsPaymentTotal, type KdsPaymentTotalProps, type KdsPaymentTotalVariant, KdsQrRow, type KdsQrRowProps, KdsRadioGroup, type KdsRadioGroupProps, type KdsRadioOption, type KdsRecapItem, KdsRecapList, type KdsRecapListProps, KdsSearchField, type KdsSearchFieldProps, KdsSectionNote, type KdsSectionNoteProps, KdsSecureFooter, type KdsSecureFooterProps, KdsSecureLoader, type KdsSecureLoaderProps, KdsSegmentedTabs, type KdsSegmentedTabsProps, KdsSelect, type KdsSelectOption, type KdsSelectProps, KdsSnackbar, type KdsSnackbarProps, type KdsSnackbarType, KdsSpinner, type KdsSpinnerProps, type KdsSpinnerSize, KdsStatusBlock, type KdsStatusBlockProps, type KdsStatusType, KdsStepper, type KdsStepperProps, KdsTab, KdsTabPanel, type KdsTabPanelProps, type KdsTabProps, KdsTabs, type KdsTabsProps, KdsTextField, type KdsTextFieldProps, KdsThemeProvider, type KdsThemeProviderProps, KdsTooltip, type KdsTooltipPlacement, type KdsTooltipProps, KdsTypography, type KdsTypographyProps, type KdsTypographyVariant, type ThemeMode, type Tokens, type TokensByMode, type Typography as TypographyTokens, type UseExpandToggleOptions, type UseExpandToggleResult, type UseHideOnScrollOptions, type UseHideOnScrollResult, type UseStickyInvoiceCollapseOptions, borderRadius, breakpoints, colors, colorsByMode, fontFamilies, fontSizes, fontWeights, formatDate, formatDateTime, formatTime, getContrastColor, letterSpacings, lighten, lineHeights, semanticSpacing, shadows, spacing, tokens, tokensByMode, transitions, typography, useAutoHide, useCopyToClipboard, useCountdown, useExpandToggle, useHideOnScroll, useStickyInvoiceCollapse, useTabsKeyboard, zIndex };
|
package/dist/index.d.ts
CHANGED
|
@@ -3913,5 +3913,17 @@ declare function lighten(hex: string, amount: number): string;
|
|
|
3913
3913
|
* @param iso - ISO 8601 date-time, e.g. "2026-08-26T03:59:00.000Z"
|
|
3914
3914
|
*/
|
|
3915
3915
|
declare function formatDateTime(iso?: string): string;
|
|
3916
|
+
/**
|
|
3917
|
+
* Format an ISO 8601 string as "D-M-YYYY" (day/month without leading zeros, e.g. "30-8-2026")
|
|
3918
|
+
* in the browser's local timezone. Returns "" for empty or invalid input.
|
|
3919
|
+
* Compose with {@link formatTime} when the copy needs a localized connector
|
|
3920
|
+
* (e.g. "{date} a las {time}") — the connector belongs to i18n, not to this util.
|
|
3921
|
+
*/
|
|
3922
|
+
declare function formatDate(iso?: string): string;
|
|
3923
|
+
/**
|
|
3924
|
+
* Format an ISO 8601 string as "HH:mm" (24h, zero-padded) in the browser's local timezone.
|
|
3925
|
+
* Returns "" for empty or invalid input.
|
|
3926
|
+
*/
|
|
3927
|
+
declare function formatTime(iso?: string): string;
|
|
3916
3928
|
|
|
3917
|
-
export { type Colors, type ExpandPanelProps, type ExpandToggleProps, KdsAccordion, KdsAccordionDetails, type KdsAccordionDetailsProps, type KdsAccordionProps, KdsAccordionSummary, type KdsAccordionSummaryProps, KdsAlert, type KdsAlertProps, type KdsAlertSeverity, KdsBankList, type KdsBankListProps, KdsBankModal, type KdsBankModalProps, KdsBankRow, type KdsBankRowProps, KdsBillAttachment, type KdsBillAttachmentProps, KdsBillAttachments, type KdsBillAttachmentsProps, KdsBottomSheet, type KdsBottomSheetProps, KdsButton, type KdsButtonProps, type KdsButtonSize, type KdsButtonVariant, KdsCard, KdsCardBody, KdsCardFooter, KdsCardHeader, KdsCardPlan, type KdsCardPlanProps, type KdsCardProps, type KdsCardSectionProps, KdsCardSelector, type KdsCardSelectorProps, type KdsCardVariant, KdsCheckbox, type KdsCheckboxProps, KdsChip, type KdsChipColor, type KdsChipProps, KdsCopyButton, type KdsCopyButtonProps, KdsCopyRow, type KdsCopyRowProps, KdsCopyableTable, type KdsCopyableTableProps, type KdsCopyableTableRow, KdsCountdown, type KdsCountdownProps, KdsDivider, type KdsDividerProps, KdsExpandPanel, type KdsExpandPanelProps, KdsFab, type KdsFabPosition, type KdsFabProps, KdsInvoiceMerchant, type KdsInvoiceMerchantProps, KdsInvoiceSticky, type KdsInvoiceStickyProps, KdsLinearProgress, type KdsLinearProgressProps, KdsMerchantTile, type KdsMerchantTileProps, KdsMontoRow, type KdsMontoRowProps, KdsPaymentTotal, type KdsPaymentTotalProps, type KdsPaymentTotalVariant, KdsQrRow, type KdsQrRowProps, KdsRadioGroup, type KdsRadioGroupProps, type KdsRadioOption, type KdsRecapItem, KdsRecapList, type KdsRecapListProps, KdsSearchField, type KdsSearchFieldProps, KdsSectionNote, type KdsSectionNoteProps, KdsSecureFooter, type KdsSecureFooterProps, KdsSecureLoader, type KdsSecureLoaderProps, KdsSegmentedTabs, type KdsSegmentedTabsProps, KdsSelect, type KdsSelectOption, type KdsSelectProps, KdsSnackbar, type KdsSnackbarProps, type KdsSnackbarType, KdsSpinner, type KdsSpinnerProps, type KdsSpinnerSize, KdsStatusBlock, type KdsStatusBlockProps, type KdsStatusType, KdsStepper, type KdsStepperProps, KdsTab, KdsTabPanel, type KdsTabPanelProps, type KdsTabProps, KdsTabs, type KdsTabsProps, KdsTextField, type KdsTextFieldProps, KdsThemeProvider, type KdsThemeProviderProps, KdsTooltip, type KdsTooltipPlacement, type KdsTooltipProps, KdsTypography, type KdsTypographyProps, type KdsTypographyVariant, type ThemeMode, type Tokens, type TokensByMode, type Typography as TypographyTokens, type UseExpandToggleOptions, type UseExpandToggleResult, type UseHideOnScrollOptions, type UseHideOnScrollResult, type UseStickyInvoiceCollapseOptions, borderRadius, breakpoints, colors, colorsByMode, fontFamilies, fontSizes, fontWeights, formatDateTime, getContrastColor, letterSpacings, lighten, lineHeights, semanticSpacing, shadows, spacing, tokens, tokensByMode, transitions, typography, useAutoHide, useCopyToClipboard, useCountdown, useExpandToggle, useHideOnScroll, useStickyInvoiceCollapse, useTabsKeyboard, zIndex };
|
|
3929
|
+
export { type Colors, type ExpandPanelProps, type ExpandToggleProps, KdsAccordion, KdsAccordionDetails, type KdsAccordionDetailsProps, type KdsAccordionProps, KdsAccordionSummary, type KdsAccordionSummaryProps, KdsAlert, type KdsAlertProps, type KdsAlertSeverity, KdsBankList, type KdsBankListProps, KdsBankModal, type KdsBankModalProps, KdsBankRow, type KdsBankRowProps, KdsBillAttachment, type KdsBillAttachmentProps, KdsBillAttachments, type KdsBillAttachmentsProps, KdsBottomSheet, type KdsBottomSheetProps, KdsButton, type KdsButtonProps, type KdsButtonSize, type KdsButtonVariant, KdsCard, KdsCardBody, KdsCardFooter, KdsCardHeader, KdsCardPlan, type KdsCardPlanProps, type KdsCardProps, type KdsCardSectionProps, KdsCardSelector, type KdsCardSelectorProps, type KdsCardVariant, KdsCheckbox, type KdsCheckboxProps, KdsChip, type KdsChipColor, type KdsChipProps, KdsCopyButton, type KdsCopyButtonProps, KdsCopyRow, type KdsCopyRowProps, KdsCopyableTable, type KdsCopyableTableProps, type KdsCopyableTableRow, KdsCountdown, type KdsCountdownProps, KdsDivider, type KdsDividerProps, KdsExpandPanel, type KdsExpandPanelProps, KdsFab, type KdsFabPosition, type KdsFabProps, KdsInvoiceMerchant, type KdsInvoiceMerchantProps, KdsInvoiceSticky, type KdsInvoiceStickyProps, KdsLinearProgress, type KdsLinearProgressProps, KdsMerchantTile, type KdsMerchantTileProps, KdsMontoRow, type KdsMontoRowProps, KdsPaymentTotal, type KdsPaymentTotalProps, type KdsPaymentTotalVariant, KdsQrRow, type KdsQrRowProps, KdsRadioGroup, type KdsRadioGroupProps, type KdsRadioOption, type KdsRecapItem, KdsRecapList, type KdsRecapListProps, KdsSearchField, type KdsSearchFieldProps, KdsSectionNote, type KdsSectionNoteProps, KdsSecureFooter, type KdsSecureFooterProps, KdsSecureLoader, type KdsSecureLoaderProps, KdsSegmentedTabs, type KdsSegmentedTabsProps, KdsSelect, type KdsSelectOption, type KdsSelectProps, KdsSnackbar, type KdsSnackbarProps, type KdsSnackbarType, KdsSpinner, type KdsSpinnerProps, type KdsSpinnerSize, KdsStatusBlock, type KdsStatusBlockProps, type KdsStatusType, KdsStepper, type KdsStepperProps, KdsTab, KdsTabPanel, type KdsTabPanelProps, type KdsTabProps, KdsTabs, type KdsTabsProps, KdsTextField, type KdsTextFieldProps, KdsThemeProvider, type KdsThemeProviderProps, KdsTooltip, type KdsTooltipPlacement, type KdsTooltipProps, KdsTypography, type KdsTypographyProps, type KdsTypographyVariant, type ThemeMode, type Tokens, type TokensByMode, type Typography as TypographyTokens, type UseExpandToggleOptions, type UseExpandToggleResult, type UseHideOnScrollOptions, type UseHideOnScrollResult, type UseStickyInvoiceCollapseOptions, borderRadius, breakpoints, colors, colorsByMode, fontFamilies, fontSizes, fontWeights, formatDate, formatDateTime, formatTime, getContrastColor, letterSpacings, lighten, lineHeights, semanticSpacing, shadows, spacing, tokens, tokensByMode, transitions, typography, useAutoHide, useCopyToClipboard, useCountdown, useExpandToggle, useHideOnScroll, useStickyInvoiceCollapse, useTabsKeyboard, zIndex };
|
package/dist/index.js
CHANGED
|
@@ -90,7 +90,9 @@ __export(index_exports, {
|
|
|
90
90
|
fontFamilies: () => fontFamilies,
|
|
91
91
|
fontSizes: () => fontSizes,
|
|
92
92
|
fontWeights: () => fontWeights,
|
|
93
|
+
formatDate: () => formatDate,
|
|
93
94
|
formatDateTime: () => formatDateTime,
|
|
95
|
+
formatTime: () => formatTime,
|
|
94
96
|
getContrastColor: () => getContrastColor,
|
|
95
97
|
letterSpacings: () => letterSpacings,
|
|
96
98
|
lighten: () => lighten,
|
|
@@ -162,6 +164,27 @@ function formatDateTime(iso) {
|
|
|
162
164
|
const timePart = `${pad(date.getHours())}:${pad(date.getMinutes())}`;
|
|
163
165
|
return `${datePart} ${timePart}`;
|
|
164
166
|
}
|
|
167
|
+
function formatDate(iso) {
|
|
168
|
+
if (!iso) {
|
|
169
|
+
return "";
|
|
170
|
+
}
|
|
171
|
+
const date = new Date(iso);
|
|
172
|
+
if (Number.isNaN(date.getTime())) {
|
|
173
|
+
return "";
|
|
174
|
+
}
|
|
175
|
+
return `${date.getDate()}-${date.getMonth() + 1}-${date.getFullYear()}`;
|
|
176
|
+
}
|
|
177
|
+
function formatTime(iso) {
|
|
178
|
+
if (!iso) {
|
|
179
|
+
return "";
|
|
180
|
+
}
|
|
181
|
+
const date = new Date(iso);
|
|
182
|
+
if (Number.isNaN(date.getTime())) {
|
|
183
|
+
return "";
|
|
184
|
+
}
|
|
185
|
+
const pad = (n) => n.toString().padStart(2, "0");
|
|
186
|
+
return `${pad(date.getHours())}:${pad(date.getMinutes())}`;
|
|
187
|
+
}
|
|
165
188
|
|
|
166
189
|
// src/theme/KdsThemeProvider.tsx
|
|
167
190
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -1837,7 +1860,7 @@ function KdsTooltip({
|
|
|
1837
1860
|
}) {
|
|
1838
1861
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Tooltip.Provider, { delayDuration, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Tooltip.Root, { open, defaultOpen, onOpenChange, children: [
|
|
1839
1862
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Tooltip.Trigger, { asChild: true, children }),
|
|
1840
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Tooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1863
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Tooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "kds-theme-root", style: { display: "contents" }, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1841
1864
|
Tooltip.Content,
|
|
1842
1865
|
{
|
|
1843
1866
|
className: (0, import_clsx.clsx)("kds-tooltip", className),
|
|
@@ -1849,7 +1872,7 @@ function KdsTooltip({
|
|
|
1849
1872
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Tooltip.Arrow, { className: "kds-tooltip-arrow", width: 10, height: 5 })
|
|
1850
1873
|
]
|
|
1851
1874
|
}
|
|
1852
|
-
) })
|
|
1875
|
+
) }) })
|
|
1853
1876
|
] }) });
|
|
1854
1877
|
}
|
|
1855
1878
|
|
|
@@ -2943,7 +2966,9 @@ function useHideOnScroll(options = {}) {
|
|
|
2943
2966
|
fontFamilies,
|
|
2944
2967
|
fontSizes,
|
|
2945
2968
|
fontWeights,
|
|
2969
|
+
formatDate,
|
|
2946
2970
|
formatDateTime,
|
|
2971
|
+
formatTime,
|
|
2947
2972
|
getContrastColor,
|
|
2948
2973
|
letterSpacings,
|
|
2949
2974
|
lighten,
|
package/dist/index.mjs
CHANGED
|
@@ -47,6 +47,27 @@ function formatDateTime(iso) {
|
|
|
47
47
|
const timePart = `${pad(date.getHours())}:${pad(date.getMinutes())}`;
|
|
48
48
|
return `${datePart} ${timePart}`;
|
|
49
49
|
}
|
|
50
|
+
function formatDate(iso) {
|
|
51
|
+
if (!iso) {
|
|
52
|
+
return "";
|
|
53
|
+
}
|
|
54
|
+
const date = new Date(iso);
|
|
55
|
+
if (Number.isNaN(date.getTime())) {
|
|
56
|
+
return "";
|
|
57
|
+
}
|
|
58
|
+
return `${date.getDate()}-${date.getMonth() + 1}-${date.getFullYear()}`;
|
|
59
|
+
}
|
|
60
|
+
function formatTime(iso) {
|
|
61
|
+
if (!iso) {
|
|
62
|
+
return "";
|
|
63
|
+
}
|
|
64
|
+
const date = new Date(iso);
|
|
65
|
+
if (Number.isNaN(date.getTime())) {
|
|
66
|
+
return "";
|
|
67
|
+
}
|
|
68
|
+
const pad = (n) => n.toString().padStart(2, "0");
|
|
69
|
+
return `${pad(date.getHours())}:${pad(date.getMinutes())}`;
|
|
70
|
+
}
|
|
50
71
|
|
|
51
72
|
// src/theme/KdsThemeProvider.tsx
|
|
52
73
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1722,7 +1743,7 @@ function KdsTooltip({
|
|
|
1722
1743
|
}) {
|
|
1723
1744
|
return /* @__PURE__ */ jsx18(Tooltip.Provider, { delayDuration, children: /* @__PURE__ */ jsxs13(Tooltip.Root, { open, defaultOpen, onOpenChange, children: [
|
|
1724
1745
|
/* @__PURE__ */ jsx18(Tooltip.Trigger, { asChild: true, children }),
|
|
1725
|
-
/* @__PURE__ */ jsx18(Tooltip.Portal, { children: /* @__PURE__ */ jsxs13(
|
|
1746
|
+
/* @__PURE__ */ jsx18(Tooltip.Portal, { children: /* @__PURE__ */ jsx18("div", { className: "kds-theme-root", style: { display: "contents" }, children: /* @__PURE__ */ jsxs13(
|
|
1726
1747
|
Tooltip.Content,
|
|
1727
1748
|
{
|
|
1728
1749
|
className: clsx("kds-tooltip", className),
|
|
@@ -1734,7 +1755,7 @@ function KdsTooltip({
|
|
|
1734
1755
|
/* @__PURE__ */ jsx18(Tooltip.Arrow, { className: "kds-tooltip-arrow", width: 10, height: 5 })
|
|
1735
1756
|
]
|
|
1736
1757
|
}
|
|
1737
|
-
) })
|
|
1758
|
+
) }) })
|
|
1738
1759
|
] }) });
|
|
1739
1760
|
}
|
|
1740
1761
|
|
|
@@ -2827,7 +2848,9 @@ export {
|
|
|
2827
2848
|
fontFamilies,
|
|
2828
2849
|
fontSizes,
|
|
2829
2850
|
fontWeights,
|
|
2851
|
+
formatDate,
|
|
2830
2852
|
formatDateTime,
|
|
2853
|
+
formatTime,
|
|
2831
2854
|
getContrastColor,
|
|
2832
2855
|
letterSpacings,
|
|
2833
2856
|
lighten,
|
package/package.json
CHANGED