@danske/sapphire-react-lab 0.89.0 → 0.90.2
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/build/cjs/index.js +296 -3054
- package/build/cjs/index.js.map +1 -1
- package/build/esm/Accordion/index.js.map +1 -1
- package/build/esm/Accordion/src/Accordion.js +2 -2
- package/build/esm/Accordion/src/Accordion.js.map +1 -1
- package/build/esm/Accordion/src/AccordionHeading.js +1 -1
- package/build/esm/Accordion/src/AccordionHeading.js.map +1 -1
- package/build/esm/Accordion/src/AccordionItem.js.map +1 -1
- package/build/esm/FileDropzone/src/FileDropzone.js +3 -4
- package/build/esm/FileDropzone/src/FileDropzone.js.map +1 -1
- package/build/esm/Filtering/src/FilterDropdown.js +9 -8
- package/build/esm/Filtering/src/FilterDropdown.js.map +1 -1
- package/build/esm/LabeledValue/src/LabeledValue.js +2 -2
- package/build/esm/LabeledValue/src/LabeledValue.js.map +1 -1
- package/build/esm/NumberField/src/NumberField.js +11 -11
- package/build/esm/NumberField/src/NumberField.js.map +1 -1
- package/build/esm/NumberField/src/StepperButton.js +1 -1
- package/build/esm/NumberField/src/StepperButton.js.map +1 -1
- package/build/esm/TagGroup/src/Tag.js +2 -2
- package/build/esm/TagGroup/src/Tag.js.map +1 -1
- package/build/esm/TagGroup/src/TagGroup.js.map +1 -1
- package/build/esm/index.js +0 -17
- package/build/esm/index.js.map +1 -1
- package/build/index.d.ts +28 -756
- package/package.json +5 -13
- package/build/esm/AlertDialog/src/AlertDialog.js +0 -75
- package/build/esm/AlertDialog/src/AlertDialog.js.map +0 -1
- package/build/esm/Avatar/src/Avatar.js +0 -76
- package/build/esm/Avatar/src/Avatar.js.map +0 -1
- package/build/esm/Calendar/i18n/da-DK.js +0 -9
- package/build/esm/Calendar/i18n/da-DK.js.map +0 -1
- package/build/esm/Calendar/i18n/de-DE.js +0 -9
- package/build/esm/Calendar/i18n/de-DE.js.map +0 -1
- package/build/esm/Calendar/i18n/en-US.js +0 -9
- package/build/esm/Calendar/i18n/en-US.js.map +0 -1
- package/build/esm/Calendar/i18n/fi-FI.js +0 -9
- package/build/esm/Calendar/i18n/fi-FI.js.map +0 -1
- package/build/esm/Calendar/i18n/index.js +0 -20
- package/build/esm/Calendar/i18n/index.js.map +0 -1
- package/build/esm/Calendar/i18n/nb-NO.js +0 -9
- package/build/esm/Calendar/i18n/nb-NO.js.map +0 -1
- package/build/esm/Calendar/i18n/pl-PL.js +0 -9
- package/build/esm/Calendar/i18n/pl-PL.js.map +0 -1
- package/build/esm/Calendar/i18n/sv-SE.js +0 -9
- package/build/esm/Calendar/i18n/sv-SE.js.map +0 -1
- package/build/esm/Calendar/src/Calendar.js +0 -121
- package/build/esm/Calendar/src/Calendar.js.map +0 -1
- package/build/esm/Calendar/src/CalendarButtons.js +0 -96
- package/build/esm/Calendar/src/CalendarButtons.js.map +0 -1
- package/build/esm/Calendar/src/CalendarDaysGrid.js +0 -169
- package/build/esm/Calendar/src/CalendarDaysGrid.js.map +0 -1
- package/build/esm/Calendar/src/CalendarHeader.js +0 -58
- package/build/esm/Calendar/src/CalendarHeader.js.map +0 -1
- package/build/esm/Calendar/src/CalendarMonthOrYearCell.js +0 -79
- package/build/esm/Calendar/src/CalendarMonthOrYearCell.js.map +0 -1
- package/build/esm/Calendar/src/CalendarMonthsGrid.js +0 -58
- package/build/esm/Calendar/src/CalendarMonthsGrid.js.map +0 -1
- package/build/esm/Calendar/src/CalendarPageAnimation.js +0 -67
- package/build/esm/Calendar/src/CalendarPageAnimation.js.map +0 -1
- package/build/esm/Calendar/src/CalendarYearsGrid.js +0 -52
- package/build/esm/Calendar/src/CalendarYearsGrid.js.map +0 -1
- package/build/esm/Calendar/src/RangeCalendar.js +0 -119
- package/build/esm/Calendar/src/RangeCalendar.js.map +0 -1
- package/build/esm/Calendar/src/useCustomDurationCalendarGrid.js +0 -57
- package/build/esm/Calendar/src/useCustomDurationCalendarGrid.js.map +0 -1
- package/build/esm/Calendar/src/useRangeCalendarState.js +0 -57
- package/build/esm/Calendar/src/useRangeCalendarState.js.map +0 -1
- package/build/esm/Calendar/src/useSapphireCalendarState.js +0 -86
- package/build/esm/Calendar/src/useSapphireCalendarState.js.map +0 -1
- package/build/esm/Calendar/src/utils.js +0 -12
- package/build/esm/Calendar/src/utils.js.map +0 -1
- package/build/esm/DateField/i18n/da-DK.js +0 -7
- package/build/esm/DateField/i18n/da-DK.js.map +0 -1
- package/build/esm/DateField/i18n/de-DE.js +0 -7
- package/build/esm/DateField/i18n/de-DE.js.map +0 -1
- package/build/esm/DateField/i18n/en-US.js +0 -7
- package/build/esm/DateField/i18n/en-US.js.map +0 -1
- package/build/esm/DateField/i18n/fi-FI.js +0 -7
- package/build/esm/DateField/i18n/fi-FI.js.map +0 -1
- package/build/esm/DateField/i18n/index.js +0 -20
- package/build/esm/DateField/i18n/index.js.map +0 -1
- package/build/esm/DateField/i18n/nb-NO.js +0 -7
- package/build/esm/DateField/i18n/nb-NO.js.map +0 -1
- package/build/esm/DateField/i18n/pl-PL.js +0 -7
- package/build/esm/DateField/i18n/pl-PL.js.map +0 -1
- package/build/esm/DateField/i18n/sv-SE.js +0 -7
- package/build/esm/DateField/i18n/sv-SE.js.map +0 -1
- package/build/esm/DateField/src/DateField.js +0 -129
- package/build/esm/DateField/src/DateField.js.map +0 -1
- package/build/esm/DateField/src/DateFieldButton.js +0 -44
- package/build/esm/DateField/src/DateFieldButton.js.map +0 -1
- package/build/esm/DateField/src/DateInput.js +0 -81
- package/build/esm/DateField/src/DateInput.js.map +0 -1
- package/build/esm/DateField/src/DateRangeField.js +0 -154
- package/build/esm/DateField/src/DateRangeField.js.map +0 -1
- package/build/esm/DateField/src/DateRangeInput.js +0 -90
- package/build/esm/DateField/src/DateRangeInput.js.map +0 -1
- package/build/esm/DateField/src/DateSegment.js +0 -52
- package/build/esm/DateField/src/DateSegment.js.map +0 -1
- package/build/esm/DateField/src/helpers.js +0 -14
- package/build/esm/DateField/src/helpers.js.map +0 -1
- package/build/esm/DateField/src/useDateRangePickerState.js +0 -57
- package/build/esm/DateField/src/useDateRangePickerState.js.map +0 -1
- package/build/esm/DateField/src/utils/placeholders.js +0 -91
- package/build/esm/DateField/src/utils/placeholders.js.map +0 -1
- package/build/esm/DateField/src/utils/segments.js +0 -46
- package/build/esm/DateField/src/utils/segments.js.map +0 -1
- package/build/esm/FeedbackMessage/src/FeedbackMessage.js +0 -87
- package/build/esm/FeedbackMessage/src/FeedbackMessage.js.map +0 -1
- package/build/esm/Fieldset/src/Fieldset.js +0 -81
- package/build/esm/Fieldset/src/Fieldset.js.map +0 -1
- package/build/esm/NotificationBadge/src/NotificationBadge.js +0 -74
- package/build/esm/NotificationBadge/src/NotificationBadge.js.map +0 -1
- package/build/esm/SearchField/src/SearchField.js +0 -130
- package/build/esm/SearchField/src/SearchField.js.map +0 -1
- package/build/esm/SearchField/src/useComboBoxState.js +0 -42
- package/build/esm/SearchField/src/useComboBoxState.js.map +0 -1
- package/build/esm/Toast/src/Toast.js +0 -77
- package/build/esm/Toast/src/Toast.js.map +0 -1
- package/build/esm/Toast/src/ToastCloseButton.js +0 -50
- package/build/esm/Toast/src/ToastCloseButton.js.map +0 -1
- package/build/esm/Toast/src/ToastProvider.js +0 -60
- package/build/esm/Toast/src/ToastProvider.js.map +0 -1
- package/build/esm/Toast/src/ToastRegion.js +0 -66
- package/build/esm/Toast/src/ToastRegion.js.map +0 -1
- package/build/esm/Toast/src/context.js +0 -10
- package/build/esm/Toast/src/context.js.map +0 -1
- package/build/esm/Toast/src/useShowToast.js +0 -25
- package/build/esm/Toast/src/useShowToast.js.map +0 -1
- package/build/esm/ToggleButton/src/ToggleButton.js +0 -85
- package/build/esm/ToggleButton/src/ToggleButton.js.map +0 -1
- package/build/esm/Typography/index.js +0 -14
- package/build/esm/Typography/index.js.map +0 -1
- package/build/esm/Typography/src/Body.js +0 -66
- package/build/esm/Typography/src/Body.js.map +0 -1
- package/build/esm/Typography/src/Caption.js +0 -59
- package/build/esm/Typography/src/Caption.js.map +0 -1
- package/build/esm/Typography/src/Heading.js +0 -53
- package/build/esm/Typography/src/Heading.js.map +0 -1
- package/build/esm/Typography/src/Subheading.js +0 -63
- package/build/esm/Typography/src/Subheading.js.map +0 -1
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { LocalizedStringDictionary } from '@internationalized/string';
|
|
2
|
-
|
|
3
|
-
const placeholders = new LocalizedStringDictionary({
|
|
4
|
-
ach: { year: "mwaka", month: "dwe", day: "nino" },
|
|
5
|
-
af: { year: "jjjj", month: "mm", day: "dd" },
|
|
6
|
-
am: { year: "\u12D3\u12D3\u12D3\u12D3", month: "\u121A\u121C", day: "\u1240\u1240" },
|
|
7
|
-
an: { year: "aaaa", month: "mm", day: "dd" },
|
|
8
|
-
ar: { year: "\u0633\u0646\u0629", month: "\u0634\u0647\u0631", day: "\u064A\u0648\u0645" },
|
|
9
|
-
ast: { year: "aaaa", month: "mm", day: "dd" },
|
|
10
|
-
az: { year: "iiii", month: "aa", day: "gg" },
|
|
11
|
-
be: { year: "\u0433\u0433\u0433\u0433", month: "\u043C\u043C", day: "\u0434\u0434" },
|
|
12
|
-
bg: { year: "\u0433\u0433\u0433\u0433", month: "\u043C\u043C", day: "\u0434\u0434" },
|
|
13
|
-
bn: { year: "yyyy", month: "\u09AE\u09BF\u09AE\u09BF", day: "dd" },
|
|
14
|
-
br: { year: "bbbb", month: "mm", day: "dd" },
|
|
15
|
-
bs: { year: "gggg", month: "mm", day: "dd" },
|
|
16
|
-
ca: { year: "aaaa", month: "mm", day: "dd" },
|
|
17
|
-
cak: { year: "jjjj", month: "ii", day: "q'q'" },
|
|
18
|
-
ckb: { year: "\u0633\u0627\u06B5", month: "\u0645\u0627\u0646\u06AF", day: "\u0695\u06C6\u0698" },
|
|
19
|
-
cs: { year: "rrrr", month: "mm", day: "dd" },
|
|
20
|
-
cy: { year: "bbbb", month: "mm", day: "dd" },
|
|
21
|
-
da: { year: "\xE5\xE5\xE5\xE5", month: "mm", day: "dd" },
|
|
22
|
-
de: { year: "jjjj", month: "mm", day: "tt" },
|
|
23
|
-
dsb: { year: "llll", month: "mm", day: "\u017A\u017A" },
|
|
24
|
-
el: { year: "\u03B5\u03B5\u03B5\u03B5", month: "\u03BC\u03BC", day: "\u03B7\u03B7" },
|
|
25
|
-
en: { year: "yyyy", month: "mm", day: "dd" },
|
|
26
|
-
eo: { year: "jjjj", month: "mm", day: "tt" },
|
|
27
|
-
es: { year: "aaaa", month: "mm", day: "dd" },
|
|
28
|
-
et: { year: "aaaa", month: "kk", day: "pp" },
|
|
29
|
-
eu: { year: "uuuu", month: "hh", day: "ee" },
|
|
30
|
-
fa: { year: "\u0633\u0627\u0644", month: "\u0645\u0627\u0647", day: "\u0631\u0648\u0632" },
|
|
31
|
-
ff: { year: "hhhh", month: "ll", day: "\xF1\xF1" },
|
|
32
|
-
fi: { year: "vvvv", month: "kk", day: "pp" },
|
|
33
|
-
fr: { year: "aaaa", month: "mm", day: "jj" },
|
|
34
|
-
fy: { year: "jjjj", month: "mm", day: "dd" },
|
|
35
|
-
ga: { year: "bbbb", month: "mm", day: "ll" },
|
|
36
|
-
gd: { year: "bbbb", month: "mm", day: "ll" },
|
|
37
|
-
gl: { year: "aaaa", month: "mm", day: "dd" },
|
|
38
|
-
he: { year: "\u05E9\u05E0\u05D4", month: "\u05D7\u05D5\u05D3\u05E9", day: "\u05D9\u05D5\u05DD" },
|
|
39
|
-
hr: { year: "gggg", month: "mm", day: "dd" },
|
|
40
|
-
hsb: { year: "llll", month: "mm", day: "dd" },
|
|
41
|
-
hu: { year: "\xE9\xE9\xE9\xE9", month: "hh", day: "nn" },
|
|
42
|
-
ia: { year: "aaaa", month: "mm", day: "dd" },
|
|
43
|
-
id: { year: "tttt", month: "bb", day: "hh" },
|
|
44
|
-
it: { year: "aaaa", month: "mm", day: "gg" },
|
|
45
|
-
ja: { year: " \u5E74 ", month: "\u6708", day: "\u65E5" },
|
|
46
|
-
ka: { year: "\u10EC\u10EC\u10EC\u10EC", month: "\u10D7\u10D7", day: "\u10E0\u10E0" },
|
|
47
|
-
kk: { year: "\u0436\u0436\u0436\u0436", month: "\u0430\u0430", day: "\u043A\u043A" },
|
|
48
|
-
kn: { year: "\u0CB5\u0CB5\u0CB5\u0CB5", month: "\u0CAE\u0CBF\u0CAE\u0CC0", day: "\u0CA6\u0CBF\u0CA6\u0CBF" },
|
|
49
|
-
ko: { year: "\uC5F0\uB3C4", month: "\uC6D4", day: "\uC77C" },
|
|
50
|
-
lb: { year: "jjjj", month: "mm", day: "dd" },
|
|
51
|
-
lo: { year: "\u0E9B\u0E9B\u0E9B\u0E9B", month: "\u0E94\u0E94", day: "\u0EA7\u0EA7" },
|
|
52
|
-
lt: { year: "mmmm", month: "mm", day: "dd" },
|
|
53
|
-
lv: { year: "gggg", month: "mm", day: "dd" },
|
|
54
|
-
meh: { year: "aaaa", month: "mm", day: "dd" },
|
|
55
|
-
ml: { year: "\u0D35\u0D7C\u0D37\u0D02", month: "\u0D2E\u0D3E\u0D38\u0D02", day: "\u0D24\u0D40\u0D2F\u0D24\u0D3F" },
|
|
56
|
-
ms: { year: "tttt", month: "mm", day: "hh" },
|
|
57
|
-
nl: { year: "jjjj", month: "mm", day: "dd" },
|
|
58
|
-
nn: { year: "\xE5\xE5\xE5\xE5", month: "mm", day: "dd" },
|
|
59
|
-
no: { year: "\xE5\xE5\xE5\xE5", month: "mm", day: "dd" },
|
|
60
|
-
oc: { year: "aaaa", month: "mm", day: "jj" },
|
|
61
|
-
pl: { year: "rrrr", month: "mm", day: "dd" },
|
|
62
|
-
pt: { year: "aaaa", month: "mm", day: "dd" },
|
|
63
|
-
rm: { year: "oooo", month: "mm", day: "dd" },
|
|
64
|
-
ro: { year: "aaaa", month: "ll", day: "zz" },
|
|
65
|
-
ru: { year: "\u0433\u0433\u0433\u0433", month: "\u043C\u043C", day: "\u0434\u0434" },
|
|
66
|
-
sc: { year: "aaaa", month: "mm", day: "dd" },
|
|
67
|
-
scn: { year: "aaaa", month: "mm", day: "jj" },
|
|
68
|
-
sk: { year: "rrrr", month: "mm", day: "dd" },
|
|
69
|
-
sl: { year: "llll", month: "mm", day: "dd" },
|
|
70
|
-
sr: { year: "\u0433\u0433\u0433\u0433", month: "\u043C\u043C", day: "\u0434\u0434" },
|
|
71
|
-
sv: { year: "\xE5\xE5\xE5\xE5", month: "mm", day: "dd" },
|
|
72
|
-
szl: { year: "rrrr", month: "mm", day: "dd" },
|
|
73
|
-
tg: { year: "\u0441\u0441\u0441\u0441", month: "\u043C\u043C", day: "\u0440\u0440" },
|
|
74
|
-
th: { year: "\u0E1B\u0E1B\u0E1B\u0E1B", month: "\u0E14\u0E14", day: "\u0E27\u0E27" },
|
|
75
|
-
tr: { year: "yyyy", month: "aa", day: "gg" },
|
|
76
|
-
uk: { year: "\u0440\u0440\u0440\u0440", month: "\u043C\u043C", day: "\u0434\u0434" },
|
|
77
|
-
"zh-CN": { year: "\u5E74", month: "\u6708", day: "\u65E5" },
|
|
78
|
-
"zh-TW": { year: "\u5E74", month: "\u6708", day: "\u65E5" }
|
|
79
|
-
}, "en");
|
|
80
|
-
function getPlaceholder(field, value, locale) {
|
|
81
|
-
if (field === "era" || field === "dayPeriod") {
|
|
82
|
-
return value;
|
|
83
|
-
}
|
|
84
|
-
if (field === "year" || field === "month" || field === "day") {
|
|
85
|
-
return placeholders.getStringForLocale(field, locale);
|
|
86
|
-
}
|
|
87
|
-
return "\u2013\u2013";
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export { getPlaceholder };
|
|
91
|
-
//# sourceMappingURL=placeholders.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"placeholders.js","sources":["../../../../../src/DateField/src/utils/placeholders.ts"],"sourcesContent":["/**\n * This file is a copy of this private file from react-stately.\n * https://github.com/adobe/react-spectrum/blob/main/packages/%40react-stately/datepicker/src/placeholders.ts\n *\n * It represents the placeholder values used in date and date range\n * fields when they are empty. The placeholders from here are then\n * formatted according to the locale.\n *\n * We need this because we have a requirement not supported by react-aria.\n * We need to be able to format a date based on a locale which is different\n * than the app's locale. This means that our placeholders can be in \"danish\"\n * while the actual date format is in \"swedish\".\n *\n * Examples:\n * - UI locale: sv-SE. Date format locale: sv-SE: 'ÅÅÅÅ-MM-DD'.\n * - UI locale: en. Date formate locale: sv-SE: 'YYYY-MM-DD'\n * - UI locale: sv-SE. Date format locale: en-US: 'MM/DD/ÅÅÅÅ'\n *\n * This is arguably counter-intuitive. But sapphire is used in some apps\n * where the user can decide the language and the date format separately.\n * It is up to the app to allow sane combinations.\n */\n\nimport { LocalizedStringDictionary } from '@internationalized/string';\n\n// These placeholders are based on the strings used by the <input type=\"date\">\n// implementations in Chrome and Firefox. Additional languages are supported\n// here than React Spectrum's typical translations.\nconst placeholders = new LocalizedStringDictionary(\n {\n ach: { year: 'mwaka', month: 'dwe', day: 'nino' },\n af: { year: 'jjjj', month: 'mm', day: 'dd' },\n am: { year: 'ዓዓዓዓ', month: 'ሚሜ', day: 'ቀቀ' },\n an: { year: 'aaaa', month: 'mm', day: 'dd' },\n ar: { year: 'سنة', month: 'شهر', day: 'يوم' },\n ast: { year: 'aaaa', month: 'mm', day: 'dd' },\n az: { year: 'iiii', month: 'aa', day: 'gg' },\n be: { year: 'гггг', month: 'мм', day: 'дд' },\n bg: { year: 'гггг', month: 'мм', day: 'дд' },\n bn: { year: 'yyyy', month: 'মিমি', day: 'dd' },\n br: { year: 'bbbb', month: 'mm', day: 'dd' },\n bs: { year: 'gggg', month: 'mm', day: 'dd' },\n ca: { year: 'aaaa', month: 'mm', day: 'dd' },\n cak: { year: 'jjjj', month: 'ii', day: \"q'q'\" },\n ckb: { year: 'ساڵ', month: 'مانگ', day: 'ڕۆژ' },\n cs: { year: 'rrrr', month: 'mm', day: 'dd' },\n cy: { year: 'bbbb', month: 'mm', day: 'dd' },\n da: { year: 'åååå', month: 'mm', day: 'dd' },\n de: { year: 'jjjj', month: 'mm', day: 'tt' },\n dsb: { year: 'llll', month: 'mm', day: 'źź' },\n el: { year: 'εεεε', month: 'μμ', day: 'ηη' },\n en: { year: 'yyyy', month: 'mm', day: 'dd' },\n eo: { year: 'jjjj', month: 'mm', day: 'tt' },\n es: { year: 'aaaa', month: 'mm', day: 'dd' },\n et: { year: 'aaaa', month: 'kk', day: 'pp' },\n eu: { year: 'uuuu', month: 'hh', day: 'ee' },\n fa: { year: 'سال', month: 'ماه', day: 'روز' },\n ff: { year: 'hhhh', month: 'll', day: 'ññ' },\n fi: { year: 'vvvv', month: 'kk', day: 'pp' },\n fr: { year: 'aaaa', month: 'mm', day: 'jj' },\n fy: { year: 'jjjj', month: 'mm', day: 'dd' },\n ga: { year: 'bbbb', month: 'mm', day: 'll' },\n gd: { year: 'bbbb', month: 'mm', day: 'll' },\n gl: { year: 'aaaa', month: 'mm', day: 'dd' },\n he: { year: 'שנה', month: 'חודש', day: 'יום' },\n hr: { year: 'gggg', month: 'mm', day: 'dd' },\n hsb: { year: 'llll', month: 'mm', day: 'dd' },\n hu: { year: 'éééé', month: 'hh', day: 'nn' },\n ia: { year: 'aaaa', month: 'mm', day: 'dd' },\n id: { year: 'tttt', month: 'bb', day: 'hh' },\n it: { year: 'aaaa', month: 'mm', day: 'gg' },\n ja: { year: ' 年 ', month: '月', day: '日' },\n ka: { year: 'წწწწ', month: 'თთ', day: 'რრ' },\n kk: { year: 'жжжж', month: 'аа', day: 'кк' },\n kn: { year: 'ವವವವ', month: 'ಮಿಮೀ', day: 'ದಿದಿ' },\n ko: { year: '연도', month: '월', day: '일' },\n lb: { year: 'jjjj', month: 'mm', day: 'dd' },\n lo: { year: 'ປປປປ', month: 'ດດ', day: 'ວວ' },\n lt: { year: 'mmmm', month: 'mm', day: 'dd' },\n lv: { year: 'gggg', month: 'mm', day: 'dd' },\n meh: { year: 'aaaa', month: 'mm', day: 'dd' },\n ml: { year: 'വർഷം', month: 'മാസം', day: 'തീയതി' },\n ms: { year: 'tttt', month: 'mm', day: 'hh' },\n nl: { year: 'jjjj', month: 'mm', day: 'dd' },\n nn: { year: 'åååå', month: 'mm', day: 'dd' },\n no: { year: 'åååå', month: 'mm', day: 'dd' },\n oc: { year: 'aaaa', month: 'mm', day: 'jj' },\n pl: { year: 'rrrr', month: 'mm', day: 'dd' },\n pt: { year: 'aaaa', month: 'mm', day: 'dd' },\n rm: { year: 'oooo', month: 'mm', day: 'dd' },\n ro: { year: 'aaaa', month: 'll', day: 'zz' },\n ru: { year: 'гггг', month: 'мм', day: 'дд' },\n sc: { year: 'aaaa', month: 'mm', day: 'dd' },\n scn: { year: 'aaaa', month: 'mm', day: 'jj' },\n sk: { year: 'rrrr', month: 'mm', day: 'dd' },\n sl: { year: 'llll', month: 'mm', day: 'dd' },\n sr: { year: 'гггг', month: 'мм', day: 'дд' },\n sv: { year: 'åååå', month: 'mm', day: 'dd' },\n szl: { year: 'rrrr', month: 'mm', day: 'dd' },\n tg: { year: 'сссс', month: 'мм', day: 'рр' },\n th: { year: 'ปปปป', month: 'ดด', day: 'วว' },\n tr: { year: 'yyyy', month: 'aa', day: 'gg' },\n uk: { year: 'рррр', month: 'мм', day: 'дд' },\n 'zh-CN': { year: '年', month: '月', day: '日' },\n 'zh-TW': { year: '年', month: '月', day: '日' },\n },\n 'en'\n);\n\nexport function getPlaceholder(field: string, value: string, locale: string) {\n // Use the actual placeholder value for the era and day period fields.\n if (field === 'era' || field === 'dayPeriod') {\n return value;\n }\n\n if (field === 'year' || field === 'month' || field === 'day') {\n return placeholders.getStringForLocale(field, locale);\n }\n\n // For time fields (e.g. hour, minute, etc.), use two dashes as the placeholder.\n return '––';\n}\n"],"names":[],"mappings":";;AA4BA,MAAM,YAAA,GAAe,IAAI,yBACvB,CAAA;AAAA,EACE,KAAK,EAAE,IAAA,EAAM,OAAS,EAAA,KAAA,EAAO,OAAO,GAAK,EAAA,MAAA,EAAA;AAAA,EACzC,IAAI,EAAE,IAAA,EAAM,MAAQ,EAAA,KAAA,EAAO,MAAM,GAAK,EAAA,IAAA,EAAA;A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A,IAAA,EAAA;AAAA,EACvC,IAAI,EAAE,IAAA,EAAM,0BAAQ,EAAA,KAAA,EAAO,gBAAM,GAAK,EAAA,cAAA,EAAA;AAAA,EACtC,IAAI,EAAE,IAAA,EAAM,0BAAQ,EAAA,KAAA,EAAO,gBAAM,GAAK,EAAA,cAAA,EAAA;AAAA,EACtC,IAAI,EAAE,IAAA,EAAM,MAAQ,EAAA,KAAA,EAAO,MAAM,GAAK,EAAA,IAAA,EAAA;AAAA,EACtC,IAAI,EAAE,IAAA,EAAM,0BAAQ,EAAA,KAAA,EAAO,gBAAM,GAAK,EAAA,cAAA,EAAA;AAAA,EACtC,SAAS,EAAE,IAAA,EAAM,QAAK,EAAA,KAAA,EAAO,UAAK,GAAK,EAAA,QAAA,EAAA;AAAA,EACvC,SAAS,EAAE,IAAA,EAAM,QAAK,EAAA,KAAA,EAAO,UAAK,GAAK,EAAA,QAAA,EAAA;AAAA,CAEzC,EAAA,IAAA,CAAA,CAAA;AAG6B,SAAA,cAAA,CAAA,KAAA,EAAe,OAAe,MAAgB,EAAA;AAE3E,EAAI,IAAA,KAAA,KAAU,KAAS,IAAA,KAAA,KAAU,WAAa,EAAA;AAC5C,IAAO,OAAA,KAAA,CAAA;AAAA,GAAA;AAGT,EAAA,IAAI,KAAU,KAAA,MAAA,IAAU,KAAU,KAAA,OAAA,IAAW,UAAU,KAAO,EAAA;AAC5D,IAAO,OAAA,YAAA,CAAa,mBAAmB,KAAO,EAAA,MAAA,CAAA,CAAA;AAAA,GAAA;AAIhD,EAAO,OAAA,cAAA,CAAA;AAAA;;;;"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { getPlaceholder } from './placeholders.js';
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __defProps = Object.defineProperties;
|
|
5
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
-
var __spreadValues = (a, b) => {
|
|
11
|
-
for (var prop in b || (b = {}))
|
|
12
|
-
if (__hasOwnProp.call(b, prop))
|
|
13
|
-
__defNormalProp(a, prop, b[prop]);
|
|
14
|
-
if (__getOwnPropSymbols)
|
|
15
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
16
|
-
if (__propIsEnum.call(b, prop))
|
|
17
|
-
__defNormalProp(a, prop, b[prop]);
|
|
18
|
-
}
|
|
19
|
-
return a;
|
|
20
|
-
};
|
|
21
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
22
|
-
const segmentTypes = [
|
|
23
|
-
"day",
|
|
24
|
-
"hour",
|
|
25
|
-
"minute",
|
|
26
|
-
"second",
|
|
27
|
-
"era",
|
|
28
|
-
"year",
|
|
29
|
-
"month",
|
|
30
|
-
"dayPeriod",
|
|
31
|
-
"literal",
|
|
32
|
-
"timeZoneName"
|
|
33
|
-
];
|
|
34
|
-
const isAnyModified = (segments) => segments.map(({ type, isPlaceholder }) => {
|
|
35
|
-
return type !== "literal" && !isPlaceholder;
|
|
36
|
-
}).some((isModified) => isModified);
|
|
37
|
-
const setPlaceholderLanguage = (segment, locale) => {
|
|
38
|
-
const placeholder = getPlaceholder(segment.type, segment.text, locale);
|
|
39
|
-
return __spreadProps(__spreadValues({}, segment), {
|
|
40
|
-
text: segment.isPlaceholder ? placeholder : segment.text,
|
|
41
|
-
placeholder
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
export { isAnyModified, segmentTypes, setPlaceholderLanguage };
|
|
46
|
-
//# sourceMappingURL=segments.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"segments.js","sources":["../../../../../src/DateField/src/utils/segments.ts"],"sourcesContent":["/**\n * The helpers in this file are meant for internal use.\n */\nimport {\n SegmentType,\n DateSegment as DateSegmentType,\n} from '@react-stately/datepicker';\nimport { getPlaceholder } from './placeholders';\n\n/**\n * The interface from `useDateFieldState` to clear the input is not ideal. We\n * have to manually clear each segment type.\n */\nexport const segmentTypes: SegmentType[] = [\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'era',\n 'year',\n 'month',\n 'dayPeriod',\n 'literal',\n 'timeZoneName',\n];\n\nexport const isAnyModified = (segments: DateSegmentType[]) =>\n segments\n .map(({ type, isPlaceholder }) => {\n // type \"literal\" refers to the segment containing the non-editable separator\n return type !== 'literal' && !isPlaceholder;\n })\n .some((isModified) => isModified);\n\n/**\n * Check out the `getPlaceholder` function's description for\n * an explanation.\n */\nexport const setPlaceholderLanguage = (\n segment: DateSegmentType,\n locale: string\n): DateSegmentType => {\n const placeholder = getPlaceholder(segment.type, segment.text, locale);\n\n return {\n ...segment,\n text: segment.isPlaceholder ? placeholder : segment.text,\n placeholder,\n };\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAaO,MAAM,YAA8B,GAAA;AAAA,EACzC,KAAA;AAAA,EACA,MAAA;AAAA,EACA,QAAA;AAAA,EACA,QAAA;AAAA,EACA,KAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA;AAAA,EACA,WAAA;AAAA,EACA,SAAA;AAAA,EACA,cAAA;AAAA,EAAA;AAGW,MAAA,aAAA,GAAgB,CAAC,QAC5B,KAAA,QAAA,CACG,IAAI,CAAC,EAAE,MAAM,aAAoB,EAAA,KAAA;AAEhC,EAAO,OAAA,IAAA,KAAS,aAAa,CAAC,aAAA,CAAA;AAAA,CAE/B,CAAA,CAAA,IAAA,CAAK,CAAC,UAAe,KAAA,UAAA,EAAA;AAMb,MAAA,sBAAA,GAAyB,CACpC,OAAA,EACA,MACoB,KAAA;AACpB,EAAA,MAAM,WAAc,GAAA,cAAA,CAAe,OAAQ,CAAA,IAAA,EAAM,QAAQ,IAAM,EAAA,MAAA,CAAA,CAAA;AAE/D,EAAA,OAAO,iCACF,OADE,CAAA,EAAA;AAAA,IAEL,IAAM,EAAA,OAAA,CAAQ,aAAgB,GAAA,WAAA,GAAc,OAAQ,CAAA,IAAA;AAAA,IACpD,WAAA;AAAA,GAAA,CAAA,CAAA;AAAA;;;;"}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import clsx from 'clsx';
|
|
3
|
-
import { Bell, AlertTriangle, AlertCircle, CheckMarkCircle } from '@danske/sapphire-icons/react';
|
|
4
|
-
import { useThemeCheck, useSapphireStyleProps, Heading } from '@danske/sapphire-react';
|
|
5
|
-
import styles from '@danske/sapphire-css/components/feedbackMessage/feedbackMessage.module.css';
|
|
6
|
-
import { Avatar } from '../../Avatar/src/Avatar.js';
|
|
7
|
-
|
|
8
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
-
var __objRest = (source, exclude) => {
|
|
12
|
-
var target = {};
|
|
13
|
-
for (var prop in source)
|
|
14
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
15
|
-
target[prop] = source[prop];
|
|
16
|
-
if (source != null && __getOwnPropSymbols)
|
|
17
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
18
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
19
|
-
target[prop] = source[prop];
|
|
20
|
-
}
|
|
21
|
-
return target;
|
|
22
|
-
};
|
|
23
|
-
const getColor = (variant) => {
|
|
24
|
-
switch (variant) {
|
|
25
|
-
case "success":
|
|
26
|
-
return "positive";
|
|
27
|
-
case "error":
|
|
28
|
-
return "negative";
|
|
29
|
-
case "neutral":
|
|
30
|
-
return "passive";
|
|
31
|
-
default:
|
|
32
|
-
return variant;
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
const getIcon = (variant, icon) => {
|
|
36
|
-
if (icon) {
|
|
37
|
-
return icon;
|
|
38
|
-
}
|
|
39
|
-
switch (variant) {
|
|
40
|
-
case "success":
|
|
41
|
-
return /* @__PURE__ */ React.createElement(CheckMarkCircle, null);
|
|
42
|
-
case "error":
|
|
43
|
-
return /* @__PURE__ */ React.createElement(AlertCircle, null);
|
|
44
|
-
case "warning":
|
|
45
|
-
return /* @__PURE__ */ React.createElement(AlertTriangle, null);
|
|
46
|
-
case "informative":
|
|
47
|
-
return /* @__PURE__ */ React.createElement(Bell, null);
|
|
48
|
-
default:
|
|
49
|
-
return null;
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
const FeedbackMessage = (_a) => {
|
|
53
|
-
var _b = _a, {
|
|
54
|
-
heading,
|
|
55
|
-
body,
|
|
56
|
-
actions,
|
|
57
|
-
variant = "neutral",
|
|
58
|
-
icon
|
|
59
|
-
} = _b, otherProps = __objRest(_b, [
|
|
60
|
-
"heading",
|
|
61
|
-
"body",
|
|
62
|
-
"actions",
|
|
63
|
-
"variant",
|
|
64
|
-
"icon"
|
|
65
|
-
]);
|
|
66
|
-
useThemeCheck();
|
|
67
|
-
const {
|
|
68
|
-
styleProps: { style, className }
|
|
69
|
-
} = useSapphireStyleProps(otherProps);
|
|
70
|
-
return /* @__PURE__ */ React.createElement("div", {
|
|
71
|
-
className: clsx(styles["sapphire-feedback-message"], className),
|
|
72
|
-
style
|
|
73
|
-
}, variant !== "neutral" && /* @__PURE__ */ React.createElement(Avatar, {
|
|
74
|
-
color: getColor(variant),
|
|
75
|
-
size: "extraLarge",
|
|
76
|
-
icon: getIcon(variant, icon)
|
|
77
|
-
}), /* @__PURE__ */ React.createElement("div", {
|
|
78
|
-
className: styles["sapphire-feedback-message__content"]
|
|
79
|
-
}, typeof heading === "string" ? /* @__PURE__ */ React.createElement(Heading, {
|
|
80
|
-
level: 6
|
|
81
|
-
}, heading) : heading, /* @__PURE__ */ React.createElement("section", {
|
|
82
|
-
className: styles["sapphire-feedback-message__body"]
|
|
83
|
-
}, body)), actions);
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
export { FeedbackMessage };
|
|
87
|
-
//# sourceMappingURL=FeedbackMessage.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FeedbackMessage.js","sources":["../../../../src/FeedbackMessage/src/FeedbackMessage.tsx"],"sourcesContent":["import React from 'react';\nimport clsx from 'clsx';\nimport {\n AlertCircle,\n AlertTriangle,\n Bell,\n CheckMarkCircle,\n} from '@danske/sapphire-icons/react';\nimport {\n Heading,\n SapphireStyleProps,\n useSapphireStyleProps,\n useThemeCheck,\n} from '@danske/sapphire-react';\nimport styles from '@danske/sapphire-css/components/feedbackMessage/feedbackMessage.module.css';\nimport { Avatar } from '../../Avatar';\n\nexport type FeedbackMessageVariant =\n | 'success'\n | 'error'\n | 'warning'\n | 'informative'\n | 'neutral';\n\nexport interface SapphireFeedbackMessageProps extends SapphireStyleProps {\n /**\n * Heading content, rendered in a sapphire Heading component.\n */\n heading: React.ReactNode | string;\n /**\n * The type of message.\n * The 'error' and 'success' are meant to attract more attention.\n *\n * @default 'neutral'\n */\n variant?: FeedbackMessageVariant;\n /**\n * Optional icon to override the default icon for the message type.\n */\n icon?: React.ReactNode;\n /**\n * Optional description, rendered as a section below heading.\n */\n body?: React.ReactNode;\n /**\n * Optional actions, rendered at the bottom. Use {@link ButtonGroup}\n * for the content.\n */\n actions?: React.ReactNode;\n}\n\nconst getColor = (variant: FeedbackMessageVariant) => {\n switch (variant) {\n case 'success':\n return 'positive';\n case 'error':\n return 'negative';\n case 'neutral':\n return 'passive';\n default:\n return variant;\n }\n};\n\nconst getIcon = (variant: FeedbackMessageVariant, icon?: React.ReactNode) => {\n if (icon) {\n return icon;\n }\n\n switch (variant) {\n case 'success':\n return <CheckMarkCircle />;\n case 'error':\n return <AlertCircle />;\n case 'warning':\n return <AlertTriangle />;\n case 'informative':\n return <Bell />;\n default:\n return null;\n }\n};\n\n/**\n * Implements layout and style of a feedback message.\n */\nexport const FeedbackMessage = ({\n heading,\n body,\n actions,\n variant = 'neutral',\n icon,\n ...otherProps\n}: SapphireFeedbackMessageProps): JSX.Element => {\n useThemeCheck();\n const {\n styleProps: { style, className },\n } = useSapphireStyleProps(otherProps);\n\n return (\n <div\n className={clsx(styles['sapphire-feedback-message'], className)}\n style={style}\n >\n {variant !== 'neutral' && (\n <Avatar\n color={getColor(variant)}\n size=\"extraLarge\"\n icon={getIcon(variant, icon)}\n />\n )}\n <div className={styles['sapphire-feedback-message__content']}>\n {typeof heading === 'string' ? (\n <Heading level={6}>{heading}</Heading>\n ) : (\n heading\n )}\n <section className={styles['sapphire-feedback-message__body']}>\n {body}\n </section>\n </div>\n {actions}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAmDA,MAAM,QAAA,GAAW,CAAC,OAAoC,KAAA;AACpD,EAAQ,QAAA,OAAA;AAAA,IACD,KAAA,SAAA;AACH,MAAO,OAAA,UAAA,CAAA;AAAA,IACJ,KAAA,OAAA;AACH,MAAO,OAAA,UAAA,CAAA;AAAA,IACJ,KAAA,SAAA;AACH,MAAO,OAAA,SAAA,CAAA;AAAA,IAAA;AAEP,MAAO,OAAA,OAAA,CAAA;AAAA,GAAA;AAAA,CAAA,CAAA;AAIb,MAAM,OAAA,GAAU,CAAC,OAAA,EAAiC,IAA2B,KAAA;AAC3E,EAAA,IAAI,IAAM,EAAA;AACR,IAAO,OAAA,IAAA,CAAA;AAAA,GAAA;AAGT,EAAQ,QAAA,OAAA;AAAA,IACD,KAAA,SAAA;AACH,MAAA,2CAAQ,eAAD,EAAA,IAAA,CAAA,CAAA;AAAA,IACJ,KAAA,OAAA;AACH,MAAA,2CAAQ,WAAD,EAAA,IAAA,CAAA,CAAA;AAAA,IACJ,KAAA,SAAA;AACH,MAAA,2CAAQ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CAAA,GAEpB,OAEF,kBAAA,KAAA,CAAA,aAAA,CAAC,SAAD,EAAA;AAAA,IAAS,WAAW,MAAO,CAAA,iCAAA,CAAA;AAAA,GAAA,EACxB,IAGJ,CAAA,CAAA,EAAA,OAAA,CAAA,CAAA;AAAA;;;;"}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { useThemeCheck, Field, Label } from '@danske/sapphire-react';
|
|
3
|
-
import { useField } from '@react-aria/label';
|
|
4
|
-
import { mergeProps } from '@react-aria/utils';
|
|
5
|
-
|
|
6
|
-
var __defProp = Object.defineProperty;
|
|
7
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
-
var __spreadValues = (a, b) => {
|
|
12
|
-
for (var prop in b || (b = {}))
|
|
13
|
-
if (__hasOwnProp.call(b, prop))
|
|
14
|
-
__defNormalProp(a, prop, b[prop]);
|
|
15
|
-
if (__getOwnPropSymbols)
|
|
16
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
17
|
-
if (__propIsEnum.call(b, prop))
|
|
18
|
-
__defNormalProp(a, prop, b[prop]);
|
|
19
|
-
}
|
|
20
|
-
return a;
|
|
21
|
-
};
|
|
22
|
-
var __objRest = (source, exclude) => {
|
|
23
|
-
var target = {};
|
|
24
|
-
for (var prop in source)
|
|
25
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
26
|
-
target[prop] = source[prop];
|
|
27
|
-
if (source != null && __getOwnPropSymbols)
|
|
28
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
29
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
30
|
-
target[prop] = source[prop];
|
|
31
|
-
}
|
|
32
|
-
return target;
|
|
33
|
-
};
|
|
34
|
-
const Fieldset = (_a) => {
|
|
35
|
-
var _b = _a, {
|
|
36
|
-
label,
|
|
37
|
-
contextualHelp,
|
|
38
|
-
note,
|
|
39
|
-
error,
|
|
40
|
-
isDisabled,
|
|
41
|
-
isRequired,
|
|
42
|
-
necessityIndicator,
|
|
43
|
-
children,
|
|
44
|
-
size = "large",
|
|
45
|
-
labelPlacement = "above"
|
|
46
|
-
} = _b, props = __objRest(_b, [
|
|
47
|
-
"label",
|
|
48
|
-
"contextualHelp",
|
|
49
|
-
"note",
|
|
50
|
-
"error",
|
|
51
|
-
"isDisabled",
|
|
52
|
-
"isRequired",
|
|
53
|
-
"necessityIndicator",
|
|
54
|
-
"children",
|
|
55
|
-
"size",
|
|
56
|
-
"labelPlacement"
|
|
57
|
-
]);
|
|
58
|
-
useThemeCheck();
|
|
59
|
-
const { fieldProps, descriptionProps, errorMessageProps } = useField({
|
|
60
|
-
isInvalid: !!error,
|
|
61
|
-
label
|
|
62
|
-
});
|
|
63
|
-
return /* @__PURE__ */ React.createElement(Field, __spreadValues({
|
|
64
|
-
elementType: "fieldset",
|
|
65
|
-
error: !!error,
|
|
66
|
-
isDisabled,
|
|
67
|
-
size,
|
|
68
|
-
labelPlacement
|
|
69
|
-
}, mergeProps(props, fieldProps)), /* @__PURE__ */ React.createElement(Field.Label, {
|
|
70
|
-
elementType: "legend"
|
|
71
|
-
}, /* @__PURE__ */ React.createElement(Label, {
|
|
72
|
-
size,
|
|
73
|
-
necessityIndicator: isRequired && necessityIndicator ? "required" : !isRequired && necessityIndicator ? "optional" : void 0,
|
|
74
|
-
contextualHelp
|
|
75
|
-
}, label)), /* @__PURE__ */ React.createElement(Field.Control, {
|
|
76
|
-
isGroup: true
|
|
77
|
-
}, children), (error || note) && /* @__PURE__ */ React.createElement(Field.Footer, null, error ? /* @__PURE__ */ React.createElement(Field.Note, __spreadValues({}, errorMessageProps), error) : note ? /* @__PURE__ */ React.createElement(Field.Note, __spreadValues({}, descriptionProps), note) : /* @__PURE__ */ React.createElement(React.Fragment, null)));
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
export { Fieldset };
|
|
81
|
-
//# sourceMappingURL=Fieldset.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Fieldset.js","sources":["../../../../src/Fieldset/src/Fieldset.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\n\nimport {\n SapphireStyleProps,\n useThemeCheck,\n Field,\n Label,\n} from '@danske/sapphire-react';\nimport { useField } from '@react-aria/label';\nimport { mergeProps } from '@react-aria/utils';\n\nexport type FieldsetProps = SapphireStyleProps & {\n /**\n * A label that describes the groups of fields.\n * The label is required because a fieldset that is not labelled is not\n * better than separate labelled fields.\n */\n label: ReactNode;\n /**\n * Whether the input is disabled.\n * */\n isDisabled?: boolean;\n /**\n * Whether the input is disabled.\n * */\n isRequired?: boolean;\n /**\n * Whether the input should render as having an error and an error message.\n * This also sets the appropriate `aria` attributes on the input.\n *\n * A `boolean` sets the error state.\n * A `string` sets the error state with an additional error message.\n *\n * **An error message is strongly recommended because an error should\n * always have an explanation about how to fix it.**\n */\n error?: boolean | string;\n /**\n * A note to show below the input.\n * If the input has an error message, this note will be replaced by that.\n */\n note?: ReactNode;\n /**\n * A ContextualHelp to render next to the label.\n */\n contextualHelp?: ReactNode;\n /**\n * @default 'large'\n */\n size?: 'large' | 'medium';\n /**\n * To visually indicate if this field is required or optional.\n * @default false\n */\n necessityIndicator?: boolean;\n /**\n * Children should be two or more form controls without labels, notes or\n * error messages.\n *\n * We recommend you only use these fields inside: `<TextField>`, `<Select> `,\n * `<SearchableSelect>`, `<MultiSelect>`, `<SearchableMultiSelect>`,\n * `<DateField>` or `<DateRangeField>`.\n *\n * Example:\n * ```jsx\n * <Fieldset label=\"Phone Number\">\n * <Select aria-label=\"Country code\" placeholder=\"+00\" width={90}>\n * <SelectItem>+40</SelectItem>\n * <SelectItem>+42</SelectItem>\n * <SelectItem>+45</SelectItem>\n * </Select>\n * <TextField\n * aria-label=\"Phone number\"\n * placeholder=\"000-000-0000\"\n * ></TextField>\n * </Fieldset>\n * ```\n */\n children: ReactNode;\n\n /**\n * Places the label either above (default) or on the side of the control.\n * @default 'above'\n */\n labelPlacement?: 'side' | 'above';\n};\n\n/**\n * Sapphire search input field.\n */\nexport const Fieldset = ({\n label,\n contextualHelp,\n note,\n error,\n isDisabled,\n isRequired,\n necessityIndicator,\n children,\n size = 'large',\n labelPlacement = 'above',\n ...props\n}: FieldsetProps) => {\n useThemeCheck();\n\n const { fieldProps, descriptionProps, errorMessageProps } = useField({\n isInvalid: !!error,\n label,\n });\n\n return (\n <Field\n elementType=\"fieldset\"\n error={!!error}\n isDisabled={isDisabled}\n size={size}\n labelPlacement={labelPlacement}\n {...mergeProps(props, fieldProps)}\n >\n <Field.Label elementType=\"legend\">\n <Label\n size={size}\n necessityIndicator={\n isRequired && necessityIndicator\n ? 'required'\n : !isRequired && necessityIndicator\n ? 'optional'\n : undefined\n }\n contextualHelp={contextualHelp}\n >\n {label}\n </Label>\n </Field.Label>\n <Field.Control isGroup>{children}</Field.Control>\n {(error || note) && (\n <Field.Footer>\n {error ? (\n <Field.Note {...errorMessageProps}>{error}</Field.Note>\n ) : note ? (\n <Field.Note {...descriptionProps}>{note}</Field.Note>\n ) : (\n <></>\n )}\n </Field.Footer>\n )}\n </Field>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0Fa,MAAA,QAAA,GAAW,CAAC,EAYJ,KAAA;AAZI,EACvB,IAAA,EAAA,GAAA,EAAA,EAAA;AAAA,IAAA,KAAA;AAAA,IACA,cAAA;AAAA,IACA,IAAA;AAAA,IACA,KAAA;AAAA,IACA,UAAA;AAAA,IACA,UAAA;AAAA,IACA,kBAAA;AAAA,IACA,QAAA;AAAA,IACA,IAAO,GAAA,OAAA;AAAA,IACP,cAAiB,GAAA,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AAoB,SAClC,IACF,mBAAA,KAAA,CAAA,aAAA,CAAC,MAAM,IAAP,EAAA,cAAA,CAAA,EAAA,EAAgB,mBAAmB,IAEnC,CAAA,mBAAA,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,CAAA,CAAA,CAAA,CAAA;AAAA;;;;"}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import clsx from 'clsx';
|
|
3
|
-
import styles from '@danske/sapphire-css/components/notificationBadge/notificationBadge.module.css';
|
|
4
|
-
import { useThemeCheck, useSapphireStyleProps } from '@danske/sapphire-react';
|
|
5
|
-
|
|
6
|
-
var __defProp = Object.defineProperty;
|
|
7
|
-
var __defProps = Object.defineProperties;
|
|
8
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
9
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
10
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
-
var __spreadValues = (a, b) => {
|
|
14
|
-
for (var prop in b || (b = {}))
|
|
15
|
-
if (__hasOwnProp.call(b, prop))
|
|
16
|
-
__defNormalProp(a, prop, b[prop]);
|
|
17
|
-
if (__getOwnPropSymbols)
|
|
18
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
-
if (__propIsEnum.call(b, prop))
|
|
20
|
-
__defNormalProp(a, prop, b[prop]);
|
|
21
|
-
}
|
|
22
|
-
return a;
|
|
23
|
-
};
|
|
24
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
|
-
var __objRest = (source, exclude) => {
|
|
26
|
-
var target = {};
|
|
27
|
-
for (var prop in source)
|
|
28
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
29
|
-
target[prop] = source[prop];
|
|
30
|
-
if (source != null && __getOwnPropSymbols)
|
|
31
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
32
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
33
|
-
target[prop] = source[prop];
|
|
34
|
-
}
|
|
35
|
-
return target;
|
|
36
|
-
};
|
|
37
|
-
const NotificationBadge = (props) => {
|
|
38
|
-
useThemeCheck();
|
|
39
|
-
const _a = props, {
|
|
40
|
-
animate = true,
|
|
41
|
-
children,
|
|
42
|
-
count,
|
|
43
|
-
containerType = "circle",
|
|
44
|
-
variant = "primary",
|
|
45
|
-
size = "medium",
|
|
46
|
-
show = true
|
|
47
|
-
} = _a, otherProps = __objRest(_a, [
|
|
48
|
-
"animate",
|
|
49
|
-
"children",
|
|
50
|
-
"count",
|
|
51
|
-
"containerType",
|
|
52
|
-
"variant",
|
|
53
|
-
"size",
|
|
54
|
-
"show"
|
|
55
|
-
]);
|
|
56
|
-
const { styleProps } = useSapphireStyleProps(props);
|
|
57
|
-
const badge = () => show || animate ? /* @__PURE__ */ React.createElement("span", __spreadProps(__spreadValues({}, otherProps), {
|
|
58
|
-
role: "status",
|
|
59
|
-
className: clsx(styleProps.className, styles["sapphire-notification-badge"], styles[`sapphire-notification-badge--${size}`], styles[`sapphire-notification-badge--${variant}`], {
|
|
60
|
-
[styles[`sapphire-notification-badge--pop-in`]]: show && animate,
|
|
61
|
-
[styles[`sapphire-notification-badge--pop-out`]]: !show && animate
|
|
62
|
-
}),
|
|
63
|
-
style: styleProps.style
|
|
64
|
-
}), size !== "small" && displayCount) : /* @__PURE__ */ React.createElement(React.Fragment, null);
|
|
65
|
-
const displayCount = count.toString().length > 2 ? `99+` : count;
|
|
66
|
-
return children ? /* @__PURE__ */ React.createElement("span", {
|
|
67
|
-
className: clsx(styles["sapphire-notification-badge-container"], {
|
|
68
|
-
[styles["sapphire-notification-badge-container--rectangle"]]: containerType === "rectangle"
|
|
69
|
-
})
|
|
70
|
-
}, children, badge()) : badge();
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
export { NotificationBadge };
|
|
74
|
-
//# sourceMappingURL=NotificationBadge.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationBadge.js","sources":["../../../../src/NotificationBadge/src/NotificationBadge.tsx"],"sourcesContent":["import React from 'react';\nimport clsx from 'clsx';\nimport styles from '@danske/sapphire-css/components/notificationBadge/notificationBadge.module.css';\nimport {\n useThemeCheck,\n SapphireStyleProps,\n useSapphireStyleProps,\n} from '@danske/sapphire-react';\n\nexport type NotificationBadgeProps = {\n /**\n * Boolean to perform or not perform the animation\n * @default 'true'\n */\n animate?: boolean;\n /**\n * Badge will be added relative to the children. It is rendered inline if there is no children provided\n * */\n children?: React.ReactNode;\n /**\n * The shape of the container, based on which badge should be positioned. Badge is positioned on the border of the container\n * @default 'circle'\n * */\n containerType?: 'circle' | 'rectangle';\n /**\n * Number to show in badge\n * */\n count: number;\n /**\n * The variation of badge which determines the badge's color.\n *\n * @default 'primary'\n */\n variant?: 'primary' | 'secondary';\n /**\n * @default 'medium'\n */\n size?: 'large' | 'medium' | 'small';\n /**\n * Boolean to show/hide the badge\n *\n * @default true\n */\n show?: boolean;\n} & SapphireStyleProps &\n ({ 'aria-labelledby': string } | { 'aria-label': string });\n\nexport const NotificationBadge = (\n props: NotificationBadgeProps\n): JSX.Element => {\n useThemeCheck();\n\n const {\n animate = true,\n children,\n count,\n containerType = 'circle',\n variant = 'primary',\n size = 'medium',\n show = true,\n ...otherProps\n } = props;\n const { styleProps } = useSapphireStyleProps(props);\n\n const badge = () =>\n show || animate ? (\n <span\n {...otherProps}\n role=\"status\"\n className={clsx(\n styleProps.className,\n styles['sapphire-notification-badge'],\n styles[`sapphire-notification-badge--${size}` as const],\n styles[`sapphire-notification-badge--${variant}` as const],\n {\n [styles[`sapphire-notification-badge--pop-in`]]: show && animate,\n [styles[`sapphire-notification-badge--pop-out`]]: !show && animate,\n }\n )}\n style={styleProps.style}\n >\n {size !== 'small' && displayCount}\n </span>\n ) : (\n <></>\n );\n\n const displayCount = count.toString().length > 2 ? `99+` : count;\n return children ? (\n <span\n className={clsx(styles['sapphire-notification-badge-container'], {\n [styles['sapphire-notification-badge-container--rectangle']]:\n containerType === 'rectangle',\n })}\n >\n {children}\n {badge()}\n </span>\n ) : (\n badge()\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+Ca,MAAA,iBAAA,GAAoB,CAC/B,KACgB,KAAA;AAChB,EAAA,aAAA,EAAA,CAAA;AAEA,EAAA,MASI,EARF,GAAA,KAAA,EAAA;AAAA,IAAU,OAAA,GAAA,IAAA;AAAA,IACV,QAAA;AAAA,IACA,KAAA;AAAA,IACA,aAAgB,GAAA,QAAA;AAAA,IAChB,OAAU,GAAA,SAAA;AAAA,IACV,IAAO,GAAA,QAAA;AAAA,IACP,IAAO,GAAA,IAAA;AAAA,GAEL,GAAA,EAAA,EADC,uBACD,EADC,EAAA;AAAA,IAPH,SAAA;AAAA,IACA,UAAA;AAAA,IACA,OAAA;AAAA,IACA,eAAA;AAAA,IACA,SAAA;AAAA,IACA,MAAA;AAAA,IACA,MAAA;AAAA,GAAA,CAAA,CAAA;AAGF,EAAM,MAAA,EAAE,eAAe,qBAAsB,CAAA,KAAA,CAAA,CAAA;AAE7C,EAAA,MAAM,QAAQ,MACZ,IAAA,IAAQ,0BACL,KAAA,CAAA,aAAA,CAAA,MAAA,EAAD,iCACM,UADN,CAAA,EAAA;AAAA,IAEE,IAAK,EAAA,QAAA;AAAA,IACL,SAAA,EAAW,IACT,CAAA,UAAA,CAAW,SACX,EAAA,MAAA,CAAO,6BACP,CAAA,EAAA,MAAA,CAAO,CAAgC,6BAAA,EAAA,IAAA,CAAA,CAAA,CAAA,EACvC,MAAO,CAAA,CAAA,6BAAA,EAAgC,OACvC,CAAA,CAAA,CAAA,EAAA;AAAA,MACG,CAAA,MAAA,CAAO,yCAAyC,IAAQ,IAAA,OAAA;AAAA,MACxD,CAAA,MAAA,CAAO,CAA0C,oCAAA,CAAA,CAAA,GAAA,CAAC,IAAQ,IAAA,OAAA;AAAA,KAAA,CAAA;AAAA,IAG/D,OAAO,UAAW,CAAA,KAAA;AAAA,GAEjB,CAAA,EAAA,IAAA,KAAS,WAAW,YAGvB,CAAA,mBAAA,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,CAAA,CAAA;AAGJ,EAAA,MAAM,YAAe,GAAA,KAAA,CAAM,QAAW,EAAA,CAAA,MAAA,GAAS,IAAI,CAAQ,GAAA,CAAA,GAAA,KAAA,CAAA;AAC3D,EAAO,OAAA,QAAA,uCACJ,MAAD,EAAA;AAAA,IACE,SAAA,EAAW,IAAK,CAAA,MAAA,CAAO,uCAA0C,CAAA,EAAA;AAAA,MAC9D,CAAA,MAAA,CAAO,sDACN,aAAkB,KAAA,WAAA;AAAA,KAAA,CAAA;AAAA,GAAA,EAGrB,UACA,KAGH,EAAA,CAAA,GAAA,KAAA,EAAA,CAAA;AAAA;;;;"}
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import React, { useRef } from 'react';
|
|
2
|
-
import clsx from 'clsx';
|
|
3
|
-
import { useSearchField } from '@react-aria/searchfield';
|
|
4
|
-
import { useThemeCheck, useSapphireStyleProps, useButton, Icon, ListBoxPopover } from '@danske/sapphire-react';
|
|
5
|
-
import styles from '@danske/sapphire-css/components/searchField/searchField.module.css';
|
|
6
|
-
import { useSearchFieldState } from '@react-stately/searchfield';
|
|
7
|
-
import { useObjectRef, mergeProps } from '@react-aria/utils';
|
|
8
|
-
import { Search, CloseCircle } from '@danske/sapphire-icons/react';
|
|
9
|
-
import { useFocusableRef } from '@react-spectrum/utils';
|
|
10
|
-
import { useComboBoxState } from './useComboBoxState.js';
|
|
11
|
-
import { useComboBox } from '@react-aria/combobox';
|
|
12
|
-
|
|
13
|
-
var __defProp = Object.defineProperty;
|
|
14
|
-
var __defProps = Object.defineProperties;
|
|
15
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
16
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
17
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
18
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
19
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20
|
-
var __spreadValues = (a, b) => {
|
|
21
|
-
for (var prop in b || (b = {}))
|
|
22
|
-
if (__hasOwnProp.call(b, prop))
|
|
23
|
-
__defNormalProp(a, prop, b[prop]);
|
|
24
|
-
if (__getOwnPropSymbols)
|
|
25
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
26
|
-
if (__propIsEnum.call(b, prop))
|
|
27
|
-
__defNormalProp(a, prop, b[prop]);
|
|
28
|
-
}
|
|
29
|
-
return a;
|
|
30
|
-
};
|
|
31
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
32
|
-
var __objRest = (source, exclude) => {
|
|
33
|
-
var target = {};
|
|
34
|
-
for (var prop in source)
|
|
35
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
36
|
-
target[prop] = source[prop];
|
|
37
|
-
if (source != null && __getOwnPropSymbols)
|
|
38
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
39
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
40
|
-
target[prop] = source[prop];
|
|
41
|
-
}
|
|
42
|
-
return target;
|
|
43
|
-
};
|
|
44
|
-
function SearchField(propsAndRef) {
|
|
45
|
-
var _b;
|
|
46
|
-
useThemeCheck();
|
|
47
|
-
const _a = propsAndRef, { loadingState, loadingSkeletonRowsCount, forwardedRef } = _a, props = __objRest(_a, ["loadingState", "loadingSkeletonRowsCount", "forwardedRef"]);
|
|
48
|
-
const inputRef = useObjectRef(forwardedRef);
|
|
49
|
-
const buttonRef = useRef(null);
|
|
50
|
-
const listBoxRef = useFocusableRef(null);
|
|
51
|
-
const popoverRef = useRef(null);
|
|
52
|
-
const triggerRef = useFocusableRef(null);
|
|
53
|
-
const {
|
|
54
|
-
styleProps: { style, className }
|
|
55
|
-
} = useSapphireStyleProps(props);
|
|
56
|
-
const state = useComboBoxState(__spreadProps(__spreadValues({}, props), {
|
|
57
|
-
inputValue: props.value,
|
|
58
|
-
defaultInputValue: props.defaultValue,
|
|
59
|
-
onInputChange: props.onChange,
|
|
60
|
-
allowsEmptyCollection: false,
|
|
61
|
-
allowsCustomValue: true,
|
|
62
|
-
shouldCloseOnBlur: true
|
|
63
|
-
}));
|
|
64
|
-
const { inputProps: comboBoxInputProps, listBoxProps } = useComboBox(__spreadProps(__spreadValues({}, props), {
|
|
65
|
-
inputRef,
|
|
66
|
-
listBoxRef,
|
|
67
|
-
popoverRef
|
|
68
|
-
}), state);
|
|
69
|
-
const searchProps = {
|
|
70
|
-
"aria-label": props["aria-label"],
|
|
71
|
-
"aria-labelledby": props["aria-labelledby"],
|
|
72
|
-
isDisabled: props.isDisabled,
|
|
73
|
-
isReadOnly: props.isReadOnly,
|
|
74
|
-
value: state.inputValue,
|
|
75
|
-
onSubmit: (value) => {
|
|
76
|
-
var _a2;
|
|
77
|
-
if (!state.selectionManager.isFocused) {
|
|
78
|
-
(_a2 = props == null ? void 0 : props.onSubmit) == null ? void 0 : _a2.call(props, value);
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
onClear: () => {
|
|
82
|
-
var _a2;
|
|
83
|
-
state.setInputValue("");
|
|
84
|
-
(_a2 = props.onClear) == null ? void 0 : _a2.call(props);
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
const searchFieldState = useSearchFieldState(searchProps);
|
|
88
|
-
const { clearButtonProps, inputProps: searchFieldInputProps } = useSearchField(searchProps, searchFieldState, inputRef);
|
|
89
|
-
const { buttonProps } = useButton(__spreadProps(__spreadValues({}, clearButtonProps), {
|
|
90
|
-
elementType: "div"
|
|
91
|
-
}), buttonRef);
|
|
92
|
-
return /* @__PURE__ */ React.createElement("div", {
|
|
93
|
-
className: clsx(styles["sapphire-search-field"], className, {
|
|
94
|
-
[styles["sapphire-search-field--medium"]]: props.size === "medium",
|
|
95
|
-
[styles["sapphire-search-field--surface-secondary"]]: props.surface === "secondary",
|
|
96
|
-
[styles["is-disabled"]]: props.isDisabled
|
|
97
|
-
}),
|
|
98
|
-
style,
|
|
99
|
-
ref: triggerRef
|
|
100
|
-
}, /* @__PURE__ */ React.createElement("span", {
|
|
101
|
-
className: styles["sapphire-search-field__icon"]
|
|
102
|
-
}, /* @__PURE__ */ React.createElement(Icon, {
|
|
103
|
-
size: props.size === "medium" ? "m" : "l"
|
|
104
|
-
}, /* @__PURE__ */ React.createElement(Search, null))), /* @__PURE__ */ React.createElement("input", __spreadProps(__spreadValues({}, mergeProps(comboBoxInputProps, searchFieldInputProps)), {
|
|
105
|
-
ref: inputRef,
|
|
106
|
-
className: clsx(styles["sapphire-search-field__input"], {
|
|
107
|
-
[styles["sapphire-search-field__input--empty"]]: state.inputValue.length === 0
|
|
108
|
-
})
|
|
109
|
-
})), /* @__PURE__ */ React.createElement("div", __spreadValues({
|
|
110
|
-
ref: buttonRef,
|
|
111
|
-
className: styles["sapphire-search-field__button"]
|
|
112
|
-
}, buttonProps), /* @__PURE__ */ React.createElement(Icon, {
|
|
113
|
-
size: props.size === "medium" ? "m" : "l"
|
|
114
|
-
}, /* @__PURE__ */ React.createElement(CloseCircle, null))), state.isOpen && /* @__PURE__ */ React.createElement(ListBoxPopover, {
|
|
115
|
-
state,
|
|
116
|
-
triggerRef,
|
|
117
|
-
popoverRef,
|
|
118
|
-
listBoxRef,
|
|
119
|
-
listBoxProps,
|
|
120
|
-
loadingState,
|
|
121
|
-
loadingSkeletonRowsCount,
|
|
122
|
-
selectWidth: ((_b = triggerRef.current) == null ? void 0 : _b.offsetWidth) || 0,
|
|
123
|
-
size: props.size,
|
|
124
|
-
disableSelectedStyles: true,
|
|
125
|
-
isNonModal: true
|
|
126
|
-
}, props.children || []));
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
export { SearchField };
|
|
130
|
-
//# sourceMappingURL=SearchField.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SearchField.js","sources":["../../../../src/SearchField/src/SearchField.tsx"],"sourcesContent":["import React, { ForwardedRef, useRef } from 'react';\nimport clsx from 'clsx';\nimport { HelpTextProps, LabelableProps, Validation } from '@react-types/shared';\nimport type { ComboBoxProps } from '@react-types/combobox';\nimport { AriaSearchFieldProps, useSearchField } from '@react-aria/searchfield';\n\nimport {\n SapphireStyleProps,\n useButton,\n useSapphireStyleProps,\n useThemeCheck,\n ListBoxPopover,\n Icon,\n} from '@danske/sapphire-react';\nimport styles from '@danske/sapphire-css/components/searchField/searchField.module.css';\nimport { useSearchFieldState } from '@react-stately/searchfield';\nimport { mergeProps, useObjectRef } from '@react-aria/utils';\nimport { CloseCircle, Search } from '@danske/sapphire-icons/react';\nimport { useFocusableRef } from '@react-spectrum/utils';\nimport { useComboBoxState } from './useComboBoxState';\nimport { useComboBox } from '@react-aria/combobox';\n\nexport type SapphireSearchFieldProps<T extends object> = SapphireStyleProps &\n Omit<\n AriaSearchFieldProps,\n keyof HelpTextProps | keyof Validation<unknown> | keyof LabelableProps\n > &\n AutocompleteProps<T> & {\n /**\n * @default 'large'\n */\n size?: 'large' | 'medium';\n /**\n * Adjusts the style for the type of surface it is rendered on.\n * @default 'primary'\n */\n surface?: 'primary' | 'secondary';\n } & (\n | { 'aria-labelledby': string }\n | {\n 'aria-label': string;\n }\n ) & {\n loadingState?: 'loading';\n loadingSkeletonRowsCount?: number;\n };\n\n// we don't want props related to \"selection\" because from the POV of the\n// autocomplete feature, there is no concept of \"selection\"\ninterface AutocompleteProps<T extends object> {\n items?: ComboBoxProps<T>['items'];\n defaultItems?: ComboBoxProps<T>['defaultItems'];\n children?: ComboBoxProps<T>['children'];\n onOpenChange?: ComboBoxProps<T>['onOpenChange'];\n defaultFilter?: (textValue: string, inputValue: string) => boolean;\n}\n\ntype SapphireSearchFieldPropsWithRef<T extends object> =\n SapphireSearchFieldProps<T> & {\n forwardedRef?: ForwardedRef<HTMLInputElement>;\n };\n\n/**\n * Sapphire search input field.\n */\n// Ref (forwardedRef) exposed as normal prop to keep TS generics working and inference of the right type for items/children passed\n// Ie. type for items={items} is inferred for the item in the child render function {item => (intellisense for item available here)}\n// Using forwardRef that information is lost: https://stackoverflow.com/a/58473012 and https://stackoverflow.com/a/60237948\nexport function SearchField<T extends object>(\n propsAndRef: SapphireSearchFieldPropsWithRef<T>\n) {\n useThemeCheck();\n\n const { loadingState, loadingSkeletonRowsCount, forwardedRef, ...props } =\n propsAndRef;\n\n const inputRef = useObjectRef(forwardedRef);\n const buttonRef = useRef<HTMLDivElement>(null);\n const listBoxRef = useFocusableRef<HTMLUListElement>(null);\n const popoverRef = useRef<HTMLDivElement>(null);\n const triggerRef = useFocusableRef<HTMLDivElement>(null);\n const {\n styleProps: { style, className },\n } = useSapphireStyleProps(props);\n\n const state = useComboBoxState({\n ...props,\n inputValue: props.value,\n defaultInputValue: props.defaultValue,\n onInputChange: props.onChange,\n allowsEmptyCollection: false,\n allowsCustomValue: true,\n shouldCloseOnBlur: true,\n });\n\n const { inputProps: comboBoxInputProps, listBoxProps } = useComboBox(\n {\n ...props,\n inputRef,\n listBoxRef,\n popoverRef,\n },\n state\n );\n\n /**\n * In order to compose the `useSearchField` and `useComboBox` we want to:\n * - let the combobox control the input but\n * - allow the search field's \"clear\" and \"submit\" behavior\n *\n * For this, we take control of `useSearchField` and not pass the props\n * indiscriminately.\n *\n * For example think about using `onBlur` on `SearchField`. The combobox\n * hook gets that prop and the input props we get back will add that\n * listener to the input. We don't want the input props from\n * `useSearchField` to add the same listener.\n */\n const searchProps: AriaSearchFieldProps = {\n 'aria-label': props['aria-label'],\n 'aria-labelledby': props['aria-labelledby'],\n isDisabled: props.isDisabled,\n isReadOnly: props.isReadOnly,\n // needed for the submit functionality\n value: state.inputValue,\n onSubmit: (value) => {\n if (!state.selectionManager.isFocused) {\n props?.onSubmit?.(value);\n }\n },\n onClear: () => {\n state.setInputValue('');\n props.onClear?.();\n },\n };\n\n const searchFieldState = useSearchFieldState(searchProps);\n\n const { clearButtonProps, inputProps: searchFieldInputProps } =\n useSearchField(searchProps, searchFieldState, inputRef);\n\n const { buttonProps } = useButton(\n {\n ...clearButtonProps,\n elementType: 'div',\n },\n buttonRef\n );\n\n return (\n <div\n className={clsx(styles['sapphire-search-field'], className, {\n [styles['sapphire-search-field--medium']]: props.size === 'medium',\n [styles['sapphire-search-field--surface-secondary']]:\n props.surface === 'secondary',\n [styles['is-disabled']]: props.isDisabled,\n })}\n style={style}\n ref={triggerRef}\n >\n <span className={styles['sapphire-search-field__icon']}>\n <Icon size={props.size === 'medium' ? 'm' : 'l'}>\n <Search />\n </Icon>\n </span>\n <input\n {...mergeProps(comboBoxInputProps, searchFieldInputProps)}\n ref={inputRef}\n className={clsx(styles['sapphire-search-field__input'], {\n [styles['sapphire-search-field__input--empty']]:\n state.inputValue.length === 0,\n })}\n />\n <div\n ref={buttonRef}\n className={styles['sapphire-search-field__button']}\n {...buttonProps}\n >\n <Icon size={props.size === 'medium' ? 'm' : 'l'}>\n <CloseCircle />\n </Icon>\n </div>\n {state.isOpen && (\n <ListBoxPopover<T>\n state={state}\n triggerRef={triggerRef}\n popoverRef={popoverRef}\n listBoxRef={listBoxRef}\n listBoxProps={listBoxProps}\n loadingState={loadingState}\n loadingSkeletonRowsCount={loadingSkeletonRowsCount}\n selectWidth={triggerRef.current?.offsetWidth || 0}\n size={props.size}\n disableSelectedStyles\n isNonModal\n >\n {props.children || []}\n </ListBoxPopover>\n )}\n </div>\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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