@bahmni/design-system 0.0.1-dev.216 → 0.0.1-dev.218
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.
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
declare const DEFAULT_DATE_FORMAT = "dd/MM/yyyy";
|
|
2
2
|
/**
|
|
3
|
-
* Detects the browser's locale date format using Intl.DateTimeFormat API
|
|
4
|
-
* Uses formatToParts() to analyze the browser's default date formatting pattern
|
|
3
|
+
* Detects the browser's locale date format using Intl.DateTimeFormat API
|
|
5
4
|
* and converts it to a date-fns compatible format string.
|
|
6
5
|
*
|
|
7
|
-
* Implementation:
|
|
8
|
-
* - Uses Intl.DateTimeFormat().formatToParts() to get locale date components
|
|
9
|
-
* - Maps date parts (day, month, year) to date-fns tokens (dd, MM, yyyy)
|
|
10
|
-
* - Preserves literal separators (/, -, ., spaces) from the locale
|
|
11
|
-
* - Falls back to DEFAULT_DATE_FORMAT (dd/MM/yyyy) if parsing fails
|
|
12
|
-
*
|
|
13
6
|
* @returns Date format string in date-fns format (e.g., 'dd/MM/yyyy', 'MM/dd/yyyy', 'yyyy-MM-dd')
|
|
7
|
+
* Falls back to DEFAULT_DATE_FORMAT (dd/MM/yyyy) if parsing fails
|
|
14
8
|
*/
|
|
15
9
|
export declare function getBrowserLocaleDateFormat(): string;
|
|
16
10
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dateFormatUtils.d.ts","sourceRoot":"","sources":["../../../src/molecules/datePicker/dateFormatUtils.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,mBAAmB,eAAe,CAAC;AA8CzC
|
|
1
|
+
{"version":3,"file":"dateFormatUtils.d.ts","sourceRoot":"","sources":["../../../src/molecules/datePicker/dateFormatUtils.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,mBAAmB,eAAe,CAAC;AA8CzC;;;;;;GAMG;AACH,wBAAgB,0BAA0B,IAAI,MAAM,CAoBnD;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAEtE;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,IAAI;IAChC,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;CACzB,CAaA;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -9,20 +9,6 @@ export interface IconProps {
|
|
|
9
9
|
padding?: ICON_PADDING;
|
|
10
10
|
testId?: string;
|
|
11
11
|
}
|
|
12
|
-
/**
|
|
13
|
-
* Icon component that renders FontAwesome icons with customizable size, color, and padding.
|
|
14
|
-
*
|
|
15
|
-
* @component
|
|
16
|
-
* @param {Object} props - Component props
|
|
17
|
-
* @param {string} props.name - Icon name in the format "fa-home", "fa-regular-user", or "far-user"
|
|
18
|
-
* @param {ICON_SIZE} [props.size] - Icon size from ICON_SIZE enum (XXS, XS, SM, LG, XL, XXL, X1-X10)
|
|
19
|
-
* @param {string} [props.color] - Icon color as CSS color value
|
|
20
|
-
* @param {string} props.id - Unique identifier for the icon (used for testing and accessibility)
|
|
21
|
-
* @param {string} [props.ariaLabel] - Accessibility label (defaults to id if not provided)
|
|
22
|
-
* @param {ICON_PADDING} [props.padding=ICON_PADDING.XXSMALL] - Padding around the icon from ICON_PADDING enum
|
|
23
|
-
* @param {string} [props.testId] - Test identifier for testing purposes
|
|
24
|
-
* @returns {React.ReactElement} React component
|
|
25
|
-
*/
|
|
26
12
|
export declare const Icon: React.FC<IconProps>;
|
|
27
13
|
export default Icon;
|
|
28
14
|
//# sourceMappingURL=Icon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../src/molecules/icon/Icon.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGtD,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;
|
|
1
|
+
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../src/molecules/icon/Icon.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGtD,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAiCD,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CA8BpC,CAAC;AAEF,eAAe,IAAI,CAAC"}
|