@khipu/design-system 0.2.0-alpha.88 → 0.2.0-alpha.89
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 +20 -1
- package/dist/beercss/khipu-beercss.min.css +1 -1
- package/dist/beercss/khipu-beercss.scoped.css +20 -1
- package/dist/beercss/khipu-beercss.scoped.min.css +1 -1
- package/dist/beercss/metadata.json +5 -5
- package/dist/index.d.mts +14 -3
- package/dist/index.d.ts +14 -3
- package/dist/index.js +15 -0
- package/dist/index.mjs +14 -0
- 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.89",
|
|
4
4
|
"description": "Khipu BeerCSS bundle with Material Design 3 and Khipu customizations",
|
|
5
|
-
"buildDate": "2026-07-
|
|
5
|
+
"buildDate": "2026-07-02T20:44:17.820Z",
|
|
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.89/dist/beercss/khipu-beercss.min.css",
|
|
23
|
+
"cssScoped": "https://cdn.jsdelivr.net/npm/@khipu/design-system@0.2.0-alpha.89/dist/beercss/khipu-beercss.scoped.min.css",
|
|
24
|
+
"js": "https://cdn.jsdelivr.net/npm/@khipu/design-system@0.2.0-alpha.89/dist/beercss/khipu-beercss.min.js"
|
|
25
25
|
}
|
|
26
26
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -3325,13 +3325,17 @@ declare const KdsSegmentedTabs: React$1.ForwardRefExoticComponent<KdsTabsProps &
|
|
|
3325
3325
|
* hide-on-scroll behavior.
|
|
3326
3326
|
*/
|
|
3327
3327
|
|
|
3328
|
-
type KdsFabPosition = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'none';
|
|
3328
|
+
type KdsFabPosition = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'corner' | 'none';
|
|
3329
3329
|
interface KdsFabProps extends React__default.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3330
3330
|
/** Material Symbols icon name, e.g. "close". */
|
|
3331
3331
|
icon: string;
|
|
3332
3332
|
/** Accessible label — required, since the button is icon-only. */
|
|
3333
3333
|
'aria-label': string;
|
|
3334
|
-
/**
|
|
3334
|
+
/**
|
|
3335
|
+
* Corner to pin to (fixed). `corner` mounts it centered OVER the top-right corner of the
|
|
3336
|
+
* content column (`--kds-fab-column-width`), overlapping outward; `top-right` insets inside it.
|
|
3337
|
+
* Use `none` to leave positioning to the consumer. Default `top-right`.
|
|
3338
|
+
*/
|
|
3335
3339
|
position?: KdsFabPosition;
|
|
3336
3340
|
/** When true, animates the button out (fade + slight move) and disables interaction. */
|
|
3337
3341
|
hidden?: boolean;
|
|
@@ -3902,5 +3906,12 @@ declare function getContrastColor(hex: string): string;
|
|
|
3902
3906
|
* @param amount - 0 = original, 1 = white. Typical: 0.85 for container colors.
|
|
3903
3907
|
*/
|
|
3904
3908
|
declare function lighten(hex: string, amount: number): string;
|
|
3909
|
+
/**
|
|
3910
|
+
* Format an ISO 8601 string as "DD-MM-YYYY HH:mm" (24h) in the browser's local timezone.
|
|
3911
|
+
* Returns "" for empty or invalid input. Numeric (not `Intl` locale-aware) so the 24h + numeric
|
|
3912
|
+
* output matches server-side (ICU/Java) formatting regardless of locale.
|
|
3913
|
+
* @param iso - ISO 8601 date-time, e.g. "2026-08-26T03:59:00.000Z"
|
|
3914
|
+
*/
|
|
3915
|
+
declare function formatDateTime(iso?: string): string;
|
|
3905
3916
|
|
|
3906
|
-
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, getContrastColor, letterSpacings, lighten, lineHeights, semanticSpacing, shadows, spacing, tokens, tokensByMode, transitions, typography, useAutoHide, useCopyToClipboard, useCountdown, useExpandToggle, useHideOnScroll, useStickyInvoiceCollapse, useTabsKeyboard, zIndex };
|
|
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -3325,13 +3325,17 @@ declare const KdsSegmentedTabs: React$1.ForwardRefExoticComponent<KdsTabsProps &
|
|
|
3325
3325
|
* hide-on-scroll behavior.
|
|
3326
3326
|
*/
|
|
3327
3327
|
|
|
3328
|
-
type KdsFabPosition = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'none';
|
|
3328
|
+
type KdsFabPosition = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'corner' | 'none';
|
|
3329
3329
|
interface KdsFabProps extends React__default.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3330
3330
|
/** Material Symbols icon name, e.g. "close". */
|
|
3331
3331
|
icon: string;
|
|
3332
3332
|
/** Accessible label — required, since the button is icon-only. */
|
|
3333
3333
|
'aria-label': string;
|
|
3334
|
-
/**
|
|
3334
|
+
/**
|
|
3335
|
+
* Corner to pin to (fixed). `corner` mounts it centered OVER the top-right corner of the
|
|
3336
|
+
* content column (`--kds-fab-column-width`), overlapping outward; `top-right` insets inside it.
|
|
3337
|
+
* Use `none` to leave positioning to the consumer. Default `top-right`.
|
|
3338
|
+
*/
|
|
3335
3339
|
position?: KdsFabPosition;
|
|
3336
3340
|
/** When true, animates the button out (fade + slight move) and disables interaction. */
|
|
3337
3341
|
hidden?: boolean;
|
|
@@ -3902,5 +3906,12 @@ declare function getContrastColor(hex: string): string;
|
|
|
3902
3906
|
* @param amount - 0 = original, 1 = white. Typical: 0.85 for container colors.
|
|
3903
3907
|
*/
|
|
3904
3908
|
declare function lighten(hex: string, amount: number): string;
|
|
3909
|
+
/**
|
|
3910
|
+
* Format an ISO 8601 string as "DD-MM-YYYY HH:mm" (24h) in the browser's local timezone.
|
|
3911
|
+
* Returns "" for empty or invalid input. Numeric (not `Intl` locale-aware) so the 24h + numeric
|
|
3912
|
+
* output matches server-side (ICU/Java) formatting regardless of locale.
|
|
3913
|
+
* @param iso - ISO 8601 date-time, e.g. "2026-08-26T03:59:00.000Z"
|
|
3914
|
+
*/
|
|
3915
|
+
declare function formatDateTime(iso?: string): string;
|
|
3905
3916
|
|
|
3906
|
-
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, getContrastColor, letterSpacings, lighten, lineHeights, semanticSpacing, shadows, spacing, tokens, tokensByMode, transitions, typography, useAutoHide, useCopyToClipboard, useCountdown, useExpandToggle, useHideOnScroll, useStickyInvoiceCollapse, useTabsKeyboard, zIndex };
|
|
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 };
|
package/dist/index.js
CHANGED
|
@@ -90,6 +90,7 @@ __export(index_exports, {
|
|
|
90
90
|
fontFamilies: () => fontFamilies,
|
|
91
91
|
fontSizes: () => fontSizes,
|
|
92
92
|
fontWeights: () => fontWeights,
|
|
93
|
+
formatDateTime: () => formatDateTime,
|
|
93
94
|
getContrastColor: () => getContrastColor,
|
|
94
95
|
letterSpacings: () => letterSpacings,
|
|
95
96
|
lighten: () => lighten,
|
|
@@ -148,6 +149,19 @@ function lighten(hex, amount) {
|
|
|
148
149
|
b + (255 - b) * amount
|
|
149
150
|
);
|
|
150
151
|
}
|
|
152
|
+
function formatDateTime(iso) {
|
|
153
|
+
if (!iso) {
|
|
154
|
+
return "";
|
|
155
|
+
}
|
|
156
|
+
const date = new Date(iso);
|
|
157
|
+
if (Number.isNaN(date.getTime())) {
|
|
158
|
+
return "";
|
|
159
|
+
}
|
|
160
|
+
const pad = (n) => n.toString().padStart(2, "0");
|
|
161
|
+
const datePart = `${pad(date.getDate())}-${pad(date.getMonth() + 1)}-${date.getFullYear()}`;
|
|
162
|
+
const timePart = `${pad(date.getHours())}:${pad(date.getMinutes())}`;
|
|
163
|
+
return `${datePart} ${timePart}`;
|
|
164
|
+
}
|
|
151
165
|
|
|
152
166
|
// src/theme/KdsThemeProvider.tsx
|
|
153
167
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -2929,6 +2943,7 @@ function useHideOnScroll(options = {}) {
|
|
|
2929
2943
|
fontFamilies,
|
|
2930
2944
|
fontSizes,
|
|
2931
2945
|
fontWeights,
|
|
2946
|
+
formatDateTime,
|
|
2932
2947
|
getContrastColor,
|
|
2933
2948
|
letterSpacings,
|
|
2934
2949
|
lighten,
|
package/dist/index.mjs
CHANGED
|
@@ -34,6 +34,19 @@ function lighten(hex, amount) {
|
|
|
34
34
|
b + (255 - b) * amount
|
|
35
35
|
);
|
|
36
36
|
}
|
|
37
|
+
function formatDateTime(iso) {
|
|
38
|
+
if (!iso) {
|
|
39
|
+
return "";
|
|
40
|
+
}
|
|
41
|
+
const date = new Date(iso);
|
|
42
|
+
if (Number.isNaN(date.getTime())) {
|
|
43
|
+
return "";
|
|
44
|
+
}
|
|
45
|
+
const pad = (n) => n.toString().padStart(2, "0");
|
|
46
|
+
const datePart = `${pad(date.getDate())}-${pad(date.getMonth() + 1)}-${date.getFullYear()}`;
|
|
47
|
+
const timePart = `${pad(date.getHours())}:${pad(date.getMinutes())}`;
|
|
48
|
+
return `${datePart} ${timePart}`;
|
|
49
|
+
}
|
|
37
50
|
|
|
38
51
|
// src/theme/KdsThemeProvider.tsx
|
|
39
52
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -2814,6 +2827,7 @@ export {
|
|
|
2814
2827
|
fontFamilies,
|
|
2815
2828
|
fontSizes,
|
|
2816
2829
|
fontWeights,
|
|
2830
|
+
formatDateTime,
|
|
2817
2831
|
getContrastColor,
|
|
2818
2832
|
letterSpacings,
|
|
2819
2833
|
lighten,
|
package/package.json
CHANGED