beesoft-components 0.2.4 → 0.2.8
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/README.md +4 -2
- package/build/index.cjs.js +272 -163
- package/build/index.js +273 -164
- package/build/index.min.js +5 -5
- package/build/index.min.js.gz +0 -0
- package/package.json +2 -2
- package/types/src/components/common-hooks.d.ts +1 -1
- package/types/src/components/form/content-editable-input/content-editable-input.component.d.ts +6 -1
- package/types/src/components/form/date-time/date-time-context.d.ts +2 -0
- package/types/src/components/form/date-time/date-time-functions.d.ts +2 -0
- package/types/src/components/form/date-time/date-time-types.d.ts +10 -1
- package/types/src/components/form/date-time/date-time.component.d.ts +5 -3
package/build/index.cjs.js
CHANGED
|
@@ -2780,20 +2780,21 @@ var formatDistanceLocale = {
|
|
|
2780
2780
|
other: 'almost {{count}} years'
|
|
2781
2781
|
}
|
|
2782
2782
|
};
|
|
2783
|
-
|
|
2784
|
-
|
|
2783
|
+
|
|
2784
|
+
var formatDistance = function (token, count, options) {
|
|
2785
2785
|
var result;
|
|
2786
|
+
var tokenValue = formatDistanceLocale[token];
|
|
2786
2787
|
|
|
2787
|
-
if (typeof
|
|
2788
|
-
result =
|
|
2788
|
+
if (typeof tokenValue === 'string') {
|
|
2789
|
+
result = tokenValue;
|
|
2789
2790
|
} else if (count === 1) {
|
|
2790
|
-
result =
|
|
2791
|
+
result = tokenValue.one;
|
|
2791
2792
|
} else {
|
|
2792
|
-
result =
|
|
2793
|
+
result = tokenValue.other.replace('{{count}}', count.toString());
|
|
2793
2794
|
}
|
|
2794
2795
|
|
|
2795
|
-
if (options.addSuffix) {
|
|
2796
|
-
if (options.comparison > 0) {
|
|
2796
|
+
if (options !== null && options !== void 0 && options.addSuffix) {
|
|
2797
|
+
if (options.comparison && options.comparison > 0) {
|
|
2797
2798
|
return 'in ' + result;
|
|
2798
2799
|
} else {
|
|
2799
2800
|
return result + ' ago';
|
|
@@ -2801,11 +2802,12 @@ function formatDistance(token, count, options) {
|
|
|
2801
2802
|
}
|
|
2802
2803
|
|
|
2803
2804
|
return result;
|
|
2804
|
-
}
|
|
2805
|
+
};
|
|
2805
2806
|
|
|
2806
2807
|
function buildFormatLongFn(args) {
|
|
2807
|
-
return function (
|
|
2808
|
-
var options =
|
|
2808
|
+
return function () {
|
|
2809
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2810
|
+
// TODO: Remove String()
|
|
2809
2811
|
var width = options.width ? String(options.width) : args.defaultWidth;
|
|
2810
2812
|
var format = args.formats[width] || args.formats[args.defaultWidth];
|
|
2811
2813
|
return format;
|
|
@@ -2853,9 +2855,10 @@ var formatRelativeLocale = {
|
|
|
2853
2855
|
nextWeek: "eeee 'at' p",
|
|
2854
2856
|
other: 'P'
|
|
2855
2857
|
};
|
|
2856
|
-
|
|
2858
|
+
|
|
2859
|
+
var formatRelative = function (token, _date, _baseDate, _options) {
|
|
2857
2860
|
return formatRelativeLocale[token];
|
|
2858
|
-
}
|
|
2861
|
+
};
|
|
2859
2862
|
|
|
2860
2863
|
function buildLocalizeFn(args) {
|
|
2861
2864
|
return function (dirtyIndex, dirtyOptions) {
|
|
@@ -2875,7 +2878,8 @@ function buildLocalizeFn(args) {
|
|
|
2875
2878
|
valuesArray = args.values[_width] || args.values[_defaultWidth];
|
|
2876
2879
|
}
|
|
2877
2880
|
|
|
2878
|
-
var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex;
|
|
2881
|
+
var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex; // @ts-ignore: For some reason TypeScript just don't want to match it, no matter how hard we try. I challange you to try to remove it!
|
|
2882
|
+
|
|
2879
2883
|
return valuesArray[index];
|
|
2880
2884
|
};
|
|
2881
2885
|
}
|
|
@@ -2888,12 +2892,12 @@ var eraValues = {
|
|
|
2888
2892
|
var quarterValues = {
|
|
2889
2893
|
narrow: ['1', '2', '3', '4'],
|
|
2890
2894
|
abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'],
|
|
2891
|
-
wide: ['1st quarter', '2nd quarter', '3rd quarter', '4th quarter']
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
+
wide: ['1st quarter', '2nd quarter', '3rd quarter', '4th quarter']
|
|
2896
|
+
}; // Note: in English, the names of days of the week and months are capitalized.
|
|
2897
|
+
// If you are making a new locale based on this one, check if the same is true for the language you're working on.
|
|
2898
|
+
// Generally, formatted dates should look like they are in the middle of a sentence,
|
|
2899
|
+
// e.g. in Spanish language the weekdays and months should be in the lowercase.
|
|
2895
2900
|
|
|
2896
|
-
};
|
|
2897
2901
|
var monthValues = {
|
|
2898
2902
|
narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],
|
|
2899
2903
|
abbreviated: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
|
@@ -2970,16 +2974,13 @@ var formattingDayPeriodValues = {
|
|
|
2970
2974
|
}
|
|
2971
2975
|
};
|
|
2972
2976
|
|
|
2973
|
-
function
|
|
2977
|
+
var ordinalNumber = function (dirtyNumber, _options) {
|
|
2974
2978
|
var number = Number(dirtyNumber); // If ordinal numbers depend on context, for example,
|
|
2975
2979
|
// if they are different for different grammatical genders,
|
|
2976
|
-
// use `options.unit
|
|
2980
|
+
// use `options.unit`.
|
|
2977
2981
|
//
|
|
2978
|
-
//
|
|
2979
|
-
//
|
|
2980
|
-
//
|
|
2981
|
-
// where `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',
|
|
2982
|
-
// 'day', 'hour', 'minute', 'second'
|
|
2982
|
+
// `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',
|
|
2983
|
+
// 'day', 'hour', 'minute', 'second'.
|
|
2983
2984
|
|
|
2984
2985
|
var rem100 = number % 100;
|
|
2985
2986
|
|
|
@@ -2997,7 +2998,7 @@ function ordinalNumber(dirtyNumber, _dirtyOptions) {
|
|
|
2997
2998
|
}
|
|
2998
2999
|
|
|
2999
3000
|
return number + 'th';
|
|
3000
|
-
}
|
|
3001
|
+
};
|
|
3001
3002
|
|
|
3002
3003
|
var localize = {
|
|
3003
3004
|
ordinalNumber: ordinalNumber,
|
|
@@ -3009,7 +3010,7 @@ var localize = {
|
|
|
3009
3010
|
values: quarterValues,
|
|
3010
3011
|
defaultWidth: 'wide',
|
|
3011
3012
|
argumentCallback: function (quarter) {
|
|
3012
|
-
return
|
|
3013
|
+
return quarter - 1;
|
|
3013
3014
|
}
|
|
3014
3015
|
}),
|
|
3015
3016
|
month: buildLocalizeFn({
|
|
@@ -3028,36 +3029,9 @@ var localize = {
|
|
|
3028
3029
|
})
|
|
3029
3030
|
};
|
|
3030
3031
|
|
|
3031
|
-
function buildMatchPatternFn(args) {
|
|
3032
|
-
return function (dirtyString, dirtyOptions) {
|
|
3033
|
-
var string = String(dirtyString);
|
|
3034
|
-
var options = dirtyOptions || {};
|
|
3035
|
-
var matchResult = string.match(args.matchPattern);
|
|
3036
|
-
|
|
3037
|
-
if (!matchResult) {
|
|
3038
|
-
return null;
|
|
3039
|
-
}
|
|
3040
|
-
|
|
3041
|
-
var matchedString = matchResult[0];
|
|
3042
|
-
var parseResult = string.match(args.parsePattern);
|
|
3043
|
-
|
|
3044
|
-
if (!parseResult) {
|
|
3045
|
-
return null;
|
|
3046
|
-
}
|
|
3047
|
-
|
|
3048
|
-
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
|
|
3049
|
-
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
3050
|
-
return {
|
|
3051
|
-
value: value,
|
|
3052
|
-
rest: string.slice(matchedString.length)
|
|
3053
|
-
};
|
|
3054
|
-
};
|
|
3055
|
-
}
|
|
3056
|
-
|
|
3057
3032
|
function buildMatchFn(args) {
|
|
3058
|
-
return function (
|
|
3059
|
-
var
|
|
3060
|
-
var options = dirtyOptions || {};
|
|
3033
|
+
return function (string) {
|
|
3034
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
3061
3035
|
var width = options.width;
|
|
3062
3036
|
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
|
|
3063
3037
|
var matchResult = string.match(matchPattern);
|
|
@@ -3068,23 +3042,18 @@ function buildMatchFn(args) {
|
|
|
3068
3042
|
|
|
3069
3043
|
var matchedString = matchResult[0];
|
|
3070
3044
|
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
|
|
3045
|
+
var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {
|
|
3046
|
+
return pattern.test(matchedString);
|
|
3047
|
+
}) : findKey(parsePatterns, function (pattern) {
|
|
3048
|
+
return pattern.test(matchedString);
|
|
3049
|
+
});
|
|
3071
3050
|
var value;
|
|
3072
|
-
|
|
3073
|
-
if (Object.prototype.toString.call(parsePatterns) === '[object Array]') {
|
|
3074
|
-
value = findIndex(parsePatterns, function (pattern) {
|
|
3075
|
-
return pattern.test(matchedString);
|
|
3076
|
-
});
|
|
3077
|
-
} else {
|
|
3078
|
-
value = findKey(parsePatterns, function (pattern) {
|
|
3079
|
-
return pattern.test(matchedString);
|
|
3080
|
-
});
|
|
3081
|
-
}
|
|
3082
|
-
|
|
3083
|
-
value = args.valueCallback ? args.valueCallback(value) : value;
|
|
3051
|
+
value = args.valueCallback ? args.valueCallback(key) : key;
|
|
3084
3052
|
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
3053
|
+
var rest = string.slice(matchedString.length);
|
|
3085
3054
|
return {
|
|
3086
3055
|
value: value,
|
|
3087
|
-
rest:
|
|
3056
|
+
rest: rest
|
|
3088
3057
|
};
|
|
3089
3058
|
};
|
|
3090
3059
|
}
|
|
@@ -3095,6 +3064,8 @@ function findKey(object, predicate) {
|
|
|
3095
3064
|
return key;
|
|
3096
3065
|
}
|
|
3097
3066
|
}
|
|
3067
|
+
|
|
3068
|
+
return undefined;
|
|
3098
3069
|
}
|
|
3099
3070
|
|
|
3100
3071
|
function findIndex(array, predicate) {
|
|
@@ -3103,6 +3074,26 @@ function findIndex(array, predicate) {
|
|
|
3103
3074
|
return key;
|
|
3104
3075
|
}
|
|
3105
3076
|
}
|
|
3077
|
+
|
|
3078
|
+
return undefined;
|
|
3079
|
+
}
|
|
3080
|
+
|
|
3081
|
+
function buildMatchPatternFn(args) {
|
|
3082
|
+
return function (string) {
|
|
3083
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
3084
|
+
var matchResult = string.match(args.matchPattern);
|
|
3085
|
+
if (!matchResult) return null;
|
|
3086
|
+
var matchedString = matchResult[0];
|
|
3087
|
+
var parseResult = string.match(args.parsePattern);
|
|
3088
|
+
if (!parseResult) return null;
|
|
3089
|
+
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
|
|
3090
|
+
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
3091
|
+
var rest = string.slice(matchedString.length);
|
|
3092
|
+
return {
|
|
3093
|
+
value: value,
|
|
3094
|
+
rest: rest
|
|
3095
|
+
};
|
|
3096
|
+
};
|
|
3106
3097
|
}
|
|
3107
3098
|
|
|
3108
3099
|
var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
|
|
@@ -3210,7 +3201,6 @@ var match = {
|
|
|
3210
3201
|
* @author Sasha Koss [@kossnocorp]{@link https://github.com/kossnocorp}
|
|
3211
3202
|
* @author Lesha Koss [@leshakoss]{@link https://github.com/leshakoss}
|
|
3212
3203
|
*/
|
|
3213
|
-
|
|
3214
3204
|
var locale = {
|
|
3215
3205
|
code: 'en-US',
|
|
3216
3206
|
formatDistance: formatDistance,
|
|
@@ -3365,7 +3355,7 @@ function assign(target, dirtyObject) {
|
|
|
3365
3355
|
dirtyObject = dirtyObject || {};
|
|
3366
3356
|
|
|
3367
3357
|
for (var property in dirtyObject) {
|
|
3368
|
-
if (
|
|
3358
|
+
if (Object.prototype.hasOwnProperty.call(dirtyObject, property)) {
|
|
3369
3359
|
target[property] = dirtyObject[property];
|
|
3370
3360
|
}
|
|
3371
3361
|
}
|
|
@@ -5333,28 +5323,28 @@ var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
|
|
|
5333
5323
|
* | Day of week (formatting) | 90 | E..EEE | Mon, Tue, Wed, ..., Sun | |
|
|
5334
5324
|
* | | | EEEE | Monday, Tuesday, ..., Sunday | 2 |
|
|
5335
5325
|
* | | | EEEEE | M, T, W, T, F, S, S | |
|
|
5336
|
-
* | | | EEEEEE | Mo, Tu, We, Th, Fr,
|
|
5326
|
+
* | | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |
|
|
5337
5327
|
* | ISO day of week (formatting) | 90 | i | 1, 2, 3, ..., 7 | 5 |
|
|
5338
5328
|
* | | | io | 1st, 2nd, ..., 7th | 5 |
|
|
5339
5329
|
* | | | ii | 01, 02, ..., 07 | 5 |
|
|
5340
5330
|
* | | | iii | Mon, Tue, Wed, ..., Sun | 5 |
|
|
5341
5331
|
* | | | iiii | Monday, Tuesday, ..., Sunday | 2,5 |
|
|
5342
5332
|
* | | | iiiii | M, T, W, T, F, S, S | 5 |
|
|
5343
|
-
* | | | iiiiii | Mo, Tu, We, Th, Fr,
|
|
5333
|
+
* | | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 5 |
|
|
5344
5334
|
* | Local day of week (formatting) | 90 | e | 2, 3, 4, ..., 1 | |
|
|
5345
5335
|
* | | | eo | 2nd, 3rd, ..., 1st | 5 |
|
|
5346
5336
|
* | | | ee | 02, 03, ..., 01 | |
|
|
5347
5337
|
* | | | eee | Mon, Tue, Wed, ..., Sun | |
|
|
5348
5338
|
* | | | eeee | Monday, Tuesday, ..., Sunday | 2 |
|
|
5349
5339
|
* | | | eeeee | M, T, W, T, F, S, S | |
|
|
5350
|
-
* | | | eeeeee | Mo, Tu, We, Th, Fr,
|
|
5340
|
+
* | | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |
|
|
5351
5341
|
* | Local day of week (stand-alone) | 90 | c | 2, 3, 4, ..., 1 | |
|
|
5352
5342
|
* | | | co | 2nd, 3rd, ..., 1st | 5 |
|
|
5353
5343
|
* | | | cc | 02, 03, ..., 01 | |
|
|
5354
5344
|
* | | | ccc | Mon, Tue, Wed, ..., Sun | |
|
|
5355
5345
|
* | | | cccc | Monday, Tuesday, ..., Sunday | 2 |
|
|
5356
5346
|
* | | | ccccc | M, T, W, T, F, S, S | |
|
|
5357
|
-
* | | | cccccc | Mo, Tu, We, Th, Fr,
|
|
5347
|
+
* | | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |
|
|
5358
5348
|
* | AM, PM | 80 | a..aaa | AM, PM | |
|
|
5359
5349
|
* | | | aaaa | a.m., p.m. | 2 |
|
|
5360
5350
|
* | | | aaaaa | a, p | |
|
|
@@ -5593,9 +5583,9 @@ function parse(dirtyDateString, dirtyFormatString, dirtyReferenceDate, dirtyOpti
|
|
|
5593
5583
|
var subFnOptions = {
|
|
5594
5584
|
firstWeekContainsDate: firstWeekContainsDate,
|
|
5595
5585
|
weekStartsOn: weekStartsOn,
|
|
5596
|
-
locale: locale$1
|
|
5586
|
+
locale: locale$1
|
|
5587
|
+
}; // If timezone isn't specified, it will be set to the system timezone
|
|
5597
5588
|
|
|
5598
|
-
};
|
|
5599
5589
|
var setters = [{
|
|
5600
5590
|
priority: TIMEZONE_UNIT_PRIORITY,
|
|
5601
5591
|
subPriority: -1,
|
|
@@ -6048,12 +6038,6 @@ function validateTimezone(_hours, minutes) {
|
|
|
6048
6038
|
return minutes >= 0 && minutes <= 59;
|
|
6049
6039
|
}
|
|
6050
6040
|
|
|
6051
|
-
function getElementByClassNameRecursive(element, className) {
|
|
6052
|
-
if (typeof element.className === 'string' && element.className.includes(className)) {
|
|
6053
|
-
return element;
|
|
6054
|
-
}
|
|
6055
|
-
return element.parentElement ? getElementByClassNameRecursive(element.parentElement, className) : element;
|
|
6056
|
-
}
|
|
6057
6041
|
function getBrowserLanguage() {
|
|
6058
6042
|
return window.navigator.languages ? window.navigator.languages[0] : window.navigator.language;
|
|
6059
6043
|
}
|
|
@@ -6159,6 +6143,9 @@ function bindDocumentClickListener(element, callback, otherElements) {
|
|
|
6159
6143
|
document.addEventListener('mousedown', clickListener);
|
|
6160
6144
|
return clickListener;
|
|
6161
6145
|
}
|
|
6146
|
+
function unbindDocumentClickListener(clickListener) {
|
|
6147
|
+
document.removeEventListener('mousedown', clickListener);
|
|
6148
|
+
}
|
|
6162
6149
|
|
|
6163
6150
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
6164
6151
|
if (source == null) return {};
|
|
@@ -6921,7 +6908,6 @@ function OverlayPanel(_a) {
|
|
|
6921
6908
|
setZIndex(100);
|
|
6922
6909
|
};
|
|
6923
6910
|
var onEntered = function () {
|
|
6924
|
-
var _a;
|
|
6925
6911
|
if (!panelRef.current)
|
|
6926
6912
|
return;
|
|
6927
6913
|
if (shown) {
|
|
@@ -6938,16 +6924,18 @@ function OverlayPanel(_a) {
|
|
|
6938
6924
|
return panelRef.current && !isEventWithinTarget(event, panelRef.current) && setVisibility(false);
|
|
6939
6925
|
};
|
|
6940
6926
|
if (scrollerPanelRef.current) {
|
|
6941
|
-
|
|
6927
|
+
scrollerPanelRef.current.addEventListener('scroll', scrollListenerRef.current);
|
|
6942
6928
|
}
|
|
6943
6929
|
}
|
|
6944
6930
|
};
|
|
6945
6931
|
var onExit = function () {
|
|
6946
|
-
|
|
6947
|
-
|
|
6948
|
-
(_a = scrollerPanelRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('scroll', scrollListenerRef.current);
|
|
6932
|
+
if (scrollerPanelRef.current && scrollListenerRef.current) {
|
|
6933
|
+
scrollerPanelRef.current.removeEventListener('scroll', scrollListenerRef.current);
|
|
6949
6934
|
scrollListenerRef.current = undefined;
|
|
6950
6935
|
}
|
|
6936
|
+
if (listenerRef.current) {
|
|
6937
|
+
unbindDocumentClickListener(listenerRef.current);
|
|
6938
|
+
}
|
|
6951
6939
|
};
|
|
6952
6940
|
var onExited = function () {
|
|
6953
6941
|
setZIndex(-1);
|
|
@@ -7542,8 +7530,9 @@ function debounce(func, wait, options) {
|
|
|
7542
7530
|
|
|
7543
7531
|
var debounce_1 = debounce;
|
|
7544
7532
|
|
|
7545
|
-
function ContentEditableInput(
|
|
7546
|
-
var value =
|
|
7533
|
+
function ContentEditableInput(props, ref) {
|
|
7534
|
+
var value = props.value, _a = props.readOnly, readOnly = _a === void 0 ? false : _a, _b = props.debounceTime, debounceTime = _b === void 0 ? 500 : _b, _c = props.fillContainer, fillContainer = _c === void 0 ? true : _c, leftElement = props.leftElement, rightElement = props.rightElement, className = props.className, leftElementClassName = props.leftElementClassName, rightElementClassName = props.rightElementClassName, onFocus = props.onFocus, onInput = props.onInput, onElementCreate = props.onElementCreate, onLeftElementClick = props.onLeftElementClick, onRightElementClick = props.onRightElementClick;
|
|
7535
|
+
var inputRef = React.useRef(null);
|
|
7547
7536
|
var onLeftElementClicked = function (event) {
|
|
7548
7537
|
if (onLeftElementClick) {
|
|
7549
7538
|
onLeftElementClick(event);
|
|
@@ -7564,13 +7553,26 @@ function ContentEditableInput(_a) {
|
|
|
7564
7553
|
onInput(event);
|
|
7565
7554
|
}
|
|
7566
7555
|
}, debounceTime);
|
|
7556
|
+
var onElementCreated = function (element) {
|
|
7557
|
+
if (element && onElementCreate) {
|
|
7558
|
+
onElementCreate(element);
|
|
7559
|
+
}
|
|
7560
|
+
};
|
|
7561
|
+
var focus = function () {
|
|
7562
|
+
var _a;
|
|
7563
|
+
(_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
7564
|
+
};
|
|
7565
|
+
React.useImperativeHandle(ref, function () { return ({
|
|
7566
|
+
focus: focus,
|
|
7567
|
+
}); });
|
|
7567
7568
|
var classNames = classnames({ 'w-full ': fillContainer }, 'flex flex-row shadow-sm border border-solid border-gray-300 dark:border-white dark:bg-gray-900 dark:text-white rounded-md p-2', className);
|
|
7568
7569
|
var leftElementClasses = classnames('flex-shrink', { 'mr-2': leftElement }, leftElementClassName);
|
|
7569
7570
|
var rightElementClasses = classnames('flex-shrink', { 'ml-2': rightElement }, rightElementClassName);
|
|
7570
|
-
return (jsxRuntime.jsxs("div", __assign({ className: classNames }, { children: [jsxRuntime.jsx("div", __assign({ className: leftElementClasses, onClick: onLeftElementClicked }, { children: leftElement }), void 0),
|
|
7571
|
-
jsxRuntime.jsx("div", __assign({ className: "flex-grow focus:outline-none", contentEditable: !readOnly, suppressContentEditableWarning: true, onFocus: onFocused, onInput: onInputChanged }, { children: value }), void 0),
|
|
7571
|
+
return (jsxRuntime.jsxs("div", __assign({ className: classNames, ref: function (element) { return onElementCreated(element); } }, { children: [jsxRuntime.jsx("div", __assign({ className: leftElementClasses, onClick: onLeftElementClicked }, { children: leftElement }), void 0),
|
|
7572
|
+
jsxRuntime.jsx("div", __assign({ ref: inputRef, className: "flex-grow focus:outline-none", contentEditable: !readOnly, suppressContentEditableWarning: true, onFocus: onFocused, onInput: onInputChanged }, { children: value }), void 0),
|
|
7572
7573
|
jsxRuntime.jsx("div", __assign({ className: rightElementClasses, onClick: onRightElementClicked }, { children: rightElement }), void 0)] }), void 0));
|
|
7573
7574
|
}
|
|
7575
|
+
var ContentEditableInput$1 = React.forwardRef(ContentEditableInput);
|
|
7574
7576
|
|
|
7575
7577
|
var DateTimeContext = React.createContext(undefined);
|
|
7576
7578
|
|
|
@@ -7670,31 +7672,6 @@ function subMonths(dirtyDate, dirtyAmount) {
|
|
|
7670
7672
|
return addMonths(dirtyDate, -amount);
|
|
7671
7673
|
}
|
|
7672
7674
|
|
|
7673
|
-
function useKeyDown(keyCode) {
|
|
7674
|
-
var _a = React.useState(false), keyDown = _a[0], setKeyDown = _a[1];
|
|
7675
|
-
var downHandler = function (_a) {
|
|
7676
|
-
var key = _a.key;
|
|
7677
|
-
if (key === keyCode) {
|
|
7678
|
-
setKeyDown(true);
|
|
7679
|
-
}
|
|
7680
|
-
};
|
|
7681
|
-
var upHandler = function (_a) {
|
|
7682
|
-
var key = _a.key;
|
|
7683
|
-
if (key === keyCode) {
|
|
7684
|
-
setKeyDown(false);
|
|
7685
|
-
}
|
|
7686
|
-
};
|
|
7687
|
-
React.useEffect(function () {
|
|
7688
|
-
window.addEventListener('keydown', downHandler);
|
|
7689
|
-
window.addEventListener('keyup', upHandler);
|
|
7690
|
-
return function () {
|
|
7691
|
-
window.removeEventListener('keydown', downHandler);
|
|
7692
|
-
window.removeEventListener('keyup', upHandler);
|
|
7693
|
-
};
|
|
7694
|
-
}, []);
|
|
7695
|
-
return keyDown;
|
|
7696
|
-
}
|
|
7697
|
-
|
|
7698
7675
|
/**
|
|
7699
7676
|
* @name addDays
|
|
7700
7677
|
* @category Day Helpers
|
|
@@ -7736,6 +7713,36 @@ function addDays(dirtyDate, dirtyAmount) {
|
|
|
7736
7713
|
return date;
|
|
7737
7714
|
}
|
|
7738
7715
|
|
|
7716
|
+
/**
|
|
7717
|
+
* @name startOfDay
|
|
7718
|
+
* @category Day Helpers
|
|
7719
|
+
* @summary Return the start of a day for the given date.
|
|
7720
|
+
*
|
|
7721
|
+
* @description
|
|
7722
|
+
* Return the start of a day for the given date.
|
|
7723
|
+
* The result will be in the local timezone.
|
|
7724
|
+
*
|
|
7725
|
+
* ### v2.0.0 breaking changes:
|
|
7726
|
+
*
|
|
7727
|
+
* - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
|
|
7728
|
+
*
|
|
7729
|
+
* @param {Date|Number} date - the original date
|
|
7730
|
+
* @returns {Date} the start of a day
|
|
7731
|
+
* @throws {TypeError} 1 argument required
|
|
7732
|
+
*
|
|
7733
|
+
* @example
|
|
7734
|
+
* // The start of a day for 2 September 2014 11:55:00:
|
|
7735
|
+
* const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))
|
|
7736
|
+
* //=> Tue Sep 02 2014 00:00:00
|
|
7737
|
+
*/
|
|
7738
|
+
|
|
7739
|
+
function startOfDay(dirtyDate) {
|
|
7740
|
+
requiredArgs(1, arguments);
|
|
7741
|
+
var date = toDate(dirtyDate);
|
|
7742
|
+
date.setHours(0, 0, 0, 0);
|
|
7743
|
+
return date;
|
|
7744
|
+
}
|
|
7745
|
+
|
|
7739
7746
|
/**
|
|
7740
7747
|
* @name addYears
|
|
7741
7748
|
* @category Year Helpers
|
|
@@ -7765,6 +7772,36 @@ function addYears(dirtyDate, dirtyAmount) {
|
|
|
7765
7772
|
return addMonths(dirtyDate, amount * 12);
|
|
7766
7773
|
}
|
|
7767
7774
|
|
|
7775
|
+
/**
|
|
7776
|
+
* @name isSameDay
|
|
7777
|
+
* @category Day Helpers
|
|
7778
|
+
* @summary Are the given dates in the same day?
|
|
7779
|
+
*
|
|
7780
|
+
* @description
|
|
7781
|
+
* Are the given dates in the same day?
|
|
7782
|
+
*
|
|
7783
|
+
* ### v2.0.0 breaking changes:
|
|
7784
|
+
*
|
|
7785
|
+
* - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
|
|
7786
|
+
*
|
|
7787
|
+
* @param {Date|Number} dateLeft - the first date to check
|
|
7788
|
+
* @param {Date|Number} dateRight - the second date to check
|
|
7789
|
+
* @returns {Boolean} the dates are in the same day
|
|
7790
|
+
* @throws {TypeError} 2 arguments required
|
|
7791
|
+
*
|
|
7792
|
+
* @example
|
|
7793
|
+
* // Are 4 September 06:00:00 and 4 September 18:00:00 in the same day?
|
|
7794
|
+
* var result = isSameDay(new Date(2014, 8, 4, 6, 0), new Date(2014, 8, 4, 18, 0))
|
|
7795
|
+
* //=> true
|
|
7796
|
+
*/
|
|
7797
|
+
|
|
7798
|
+
function isSameDay(dirtyDateLeft, dirtyDateRight) {
|
|
7799
|
+
requiredArgs(2, arguments);
|
|
7800
|
+
var dateLeftStartOfDay = startOfDay(dirtyDateLeft);
|
|
7801
|
+
var dateRightStartOfDay = startOfDay(dirtyDateRight);
|
|
7802
|
+
return dateLeftStartOfDay.getTime() === dateRightStartOfDay.getTime();
|
|
7803
|
+
}
|
|
7804
|
+
|
|
7768
7805
|
/**
|
|
7769
7806
|
* @name eachDayOfInterval
|
|
7770
7807
|
* @category Interval Helpers
|
|
@@ -7900,7 +7937,7 @@ function startOfMonth(dirtyDate) {
|
|
|
7900
7937
|
*
|
|
7901
7938
|
* @example
|
|
7902
7939
|
* // Each year between 6 February 2014 and 10 August 2017:
|
|
7903
|
-
*
|
|
7940
|
+
* const result = eachYearOfInterval({
|
|
7904
7941
|
* start: new Date(2014, 1, 6),
|
|
7905
7942
|
* end: new Date(2017, 7, 10)
|
|
7906
7943
|
* })
|
|
@@ -8059,7 +8096,37 @@ function subDays(dirtyDate, dirtyAmount) {
|
|
|
8059
8096
|
return addDays(dirtyDate, -amount);
|
|
8060
8097
|
}
|
|
8061
8098
|
|
|
8062
|
-
|
|
8099
|
+
/**
|
|
8100
|
+
* @name isToday
|
|
8101
|
+
* @category Day Helpers
|
|
8102
|
+
* @summary Is the given date today?
|
|
8103
|
+
* @pure false
|
|
8104
|
+
*
|
|
8105
|
+
* @description
|
|
8106
|
+
* Is the given date today?
|
|
8107
|
+
*
|
|
8108
|
+
* > ⚠️ Please note that this function is not present in the FP submodule as
|
|
8109
|
+
* > it uses `Date.now()` internally hence impure and can't be safely curried.
|
|
8110
|
+
*
|
|
8111
|
+
* ### v2.0.0 breaking changes:
|
|
8112
|
+
*
|
|
8113
|
+
* - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
|
|
8114
|
+
*
|
|
8115
|
+
* @param {Date|Number} date - the date to check
|
|
8116
|
+
* @returns {Boolean} the date is today
|
|
8117
|
+
* @throws {TypeError} 1 argument required
|
|
8118
|
+
*
|
|
8119
|
+
* @example
|
|
8120
|
+
* // If today is 6 October 2014, is 6 October 14:00:00 today?
|
|
8121
|
+
* var result = isToday(new Date(2014, 9, 6, 14, 0))
|
|
8122
|
+
* //=> true
|
|
8123
|
+
*/
|
|
8124
|
+
|
|
8125
|
+
function isToday(dirtyDate) {
|
|
8126
|
+
requiredArgs(1, arguments);
|
|
8127
|
+
return isSameDay(dirtyDate, Date.now());
|
|
8128
|
+
}
|
|
8129
|
+
|
|
8063
8130
|
/**
|
|
8064
8131
|
* @name nextDay
|
|
8065
8132
|
* @category Weekday Helpers
|
|
@@ -8086,18 +8153,9 @@ var baseMap = [7, 6, 5, 4, 3, 2, 1];
|
|
|
8086
8153
|
|
|
8087
8154
|
function nextDay(date, day) {
|
|
8088
8155
|
requiredArgs(2, arguments);
|
|
8089
|
-
var
|
|
8090
|
-
|
|
8091
|
-
|
|
8092
|
-
|
|
8093
|
-
function genMap(daysToMove) {
|
|
8094
|
-
if (daysToMove === 0) {
|
|
8095
|
-
return baseMap;
|
|
8096
|
-
} else {
|
|
8097
|
-
var mapStart = baseMap.slice(-daysToMove);
|
|
8098
|
-
var mapEnd = baseMap.slice(0, baseMap.length - daysToMove);
|
|
8099
|
-
return mapStart.concat(mapEnd);
|
|
8100
|
-
}
|
|
8156
|
+
var delta = day - getDay(date);
|
|
8157
|
+
if (delta <= 0) delta += 7;
|
|
8158
|
+
return addDays(date, delta);
|
|
8101
8159
|
}
|
|
8102
8160
|
|
|
8103
8161
|
/**
|
|
@@ -8204,6 +8262,32 @@ function subYears(dirtyDate, dirtyAmount) {
|
|
|
8204
8262
|
return addYears(dirtyDate, -amount);
|
|
8205
8263
|
}
|
|
8206
8264
|
|
|
8265
|
+
function useKeyDown(keyCode) {
|
|
8266
|
+
var _a = React.useState(false), keyDown = _a[0], setKeyDown = _a[1];
|
|
8267
|
+
var keyCodes = typeof keyCode === 'string' ? [keyCode] : keyCode;
|
|
8268
|
+
var downHandler = function (_a) {
|
|
8269
|
+
var key = _a.key;
|
|
8270
|
+
if (keyCodes.includes(key)) {
|
|
8271
|
+
setKeyDown(true);
|
|
8272
|
+
}
|
|
8273
|
+
};
|
|
8274
|
+
var upHandler = function (_a) {
|
|
8275
|
+
var key = _a.key;
|
|
8276
|
+
if (keyCodes.includes(key)) {
|
|
8277
|
+
setKeyDown(false);
|
|
8278
|
+
}
|
|
8279
|
+
};
|
|
8280
|
+
React.useEffect(function () {
|
|
8281
|
+
window.addEventListener('keydown', downHandler);
|
|
8282
|
+
window.addEventListener('keyup', upHandler);
|
|
8283
|
+
return function () {
|
|
8284
|
+
window.removeEventListener('keydown', downHandler);
|
|
8285
|
+
window.removeEventListener('keyup', upHandler);
|
|
8286
|
+
};
|
|
8287
|
+
}, []);
|
|
8288
|
+
return keyDown;
|
|
8289
|
+
}
|
|
8290
|
+
|
|
8207
8291
|
function getMonthMatrix(matrixDate, locale, loadOtherMonths) {
|
|
8208
8292
|
var _a, _b;
|
|
8209
8293
|
if (loadOtherMonths === void 0) { loadOtherMonths = true; }
|
|
@@ -8343,6 +8427,14 @@ function loadLocale(localeToLoad) {
|
|
|
8343
8427
|
.catch(function (error) { return reject(error); });
|
|
8344
8428
|
});
|
|
8345
8429
|
}
|
|
8430
|
+
function createDefaultColors() {
|
|
8431
|
+
return {
|
|
8432
|
+
inputBgColor: 'bg-white',
|
|
8433
|
+
readOnlyInputBgColor: 'bg-gray-200',
|
|
8434
|
+
selectedDateColor: 'bg-blue-100',
|
|
8435
|
+
todayDateColor: 'bg-green-100',
|
|
8436
|
+
};
|
|
8437
|
+
}
|
|
8346
8438
|
|
|
8347
8439
|
var DateSelectionType;
|
|
8348
8440
|
(function (DateSelectionType) {
|
|
@@ -8373,6 +8465,7 @@ var CalendarIconPosition;
|
|
|
8373
8465
|
(function (CalendarIconPosition) {
|
|
8374
8466
|
CalendarIconPosition[CalendarIconPosition["Right"] = 0] = "Right";
|
|
8375
8467
|
CalendarIconPosition[CalendarIconPosition["Left"] = 1] = "Left";
|
|
8468
|
+
CalendarIconPosition[CalendarIconPosition["None"] = 2] = "None";
|
|
8376
8469
|
})(CalendarIconPosition || (CalendarIconPosition = {}));
|
|
8377
8470
|
|
|
8378
8471
|
var DateTimeActionType;
|
|
@@ -8437,7 +8530,7 @@ function DateTimeCalendar(_a) {
|
|
|
8437
8530
|
var selectedDateRef = React.useRef();
|
|
8438
8531
|
var _f = React.useState(), selectedStartComparison = _f[0], setSelectedStartComparison = _f[1];
|
|
8439
8532
|
var _g = React.useState(), selectedEndComparison = _g[0], setSelectedEndComparison = _g[1];
|
|
8440
|
-
var isShiftDown = useKeyDown('
|
|
8533
|
+
var isShiftDown = useKeyDown(['Meta', 'Control']);
|
|
8441
8534
|
var context = React.useContext(DateTimeContext);
|
|
8442
8535
|
var viewTemplate = context.calendarTemplate;
|
|
8443
8536
|
var loadLocaleObject = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
@@ -8544,24 +8637,27 @@ function DateTimeCalendar(_a) {
|
|
|
8544
8637
|
return (jsxRuntime.jsx(TemplateOutlet, __assign({ props: templateProps, template: template }, { children: jsxRuntime.jsxs("div", __assign({ className: "grid grid-cols-7 gap-3 bc-dt-day-row" }, { children: [(_b = weekDaysRef.current) === null || _b === void 0 ? void 0 : _b.map(function (day, index) { return (jsxRuntime.jsx("div", __assign({ className: "text-center font-bold bc-dt-day-cell" }, { children: day }), index)); }),
|
|
8545
8638
|
monthMatrix === null || monthMatrix === void 0 ? void 0 : monthMatrix.map(function (row, rIndex) {
|
|
8546
8639
|
return row.map(function (column, cIndex) {
|
|
8547
|
-
var _a
|
|
8640
|
+
var _a;
|
|
8641
|
+
var _b, _c;
|
|
8548
8642
|
var isSelectable = column.dayValue !== null && (selectableDate === undefined || selectableDate(column.dayValue));
|
|
8549
|
-
var dayStyles = classnames('text-center py-1', {
|
|
8550
|
-
|
|
8551
|
-
|
|
8643
|
+
var dayStyles = classnames('text-center py-1', (_a = {
|
|
8644
|
+
'text-gray-400': !column.isCurrent
|
|
8645
|
+
},
|
|
8646
|
+
_a[(context.colors.selectedDateColor || 'bg-blue-100') + " dark:bg-white dark:text-black rounded-full"] = column &&
|
|
8552
8647
|
column.dayValue &&
|
|
8553
8648
|
((selectedDateRef.current && isSelectedDate(column.dayValue)) ||
|
|
8554
8649
|
(selectedStartComparison && selectedEndComparison && isInSelectedDateRange(column.dayValue))),
|
|
8555
|
-
'cursor-pointer'
|
|
8556
|
-
'text-red-300 cursor-not-allowed'
|
|
8557
|
-
|
|
8650
|
+
_a['cursor-pointer'] = isSelectable,
|
|
8651
|
+
_a['text-red-300 cursor-not-allowed'] = !isSelectable,
|
|
8652
|
+
_a[(context.colors.todayDateColor || 'bg-green-100') + " dark:text-black rounded-full"] = column.dayValue && isToday(column.dayValue) && !isSelectedDate(column.dayValue),
|
|
8653
|
+
_a), 'bc-dt-date-cell');
|
|
8558
8654
|
return (jsxRuntime.jsx("div", __assign({ className: dayStyles, onClick: function () {
|
|
8559
8655
|
return column &&
|
|
8560
8656
|
column.dayValue &&
|
|
8561
8657
|
isSelectable &&
|
|
8562
8658
|
(isValidDate === undefined || isValidDate(column.dayValue)) &&
|
|
8563
8659
|
onDateClicked(column.dayValue);
|
|
8564
|
-
} }, { children: (
|
|
8660
|
+
} }, { children: (_b = column.dayValue) === null || _b === void 0 ? void 0 : _b.getDate().toLocaleString((_c = loadedLocale.current) === null || _c === void 0 ? void 0 : _c.code) }), rIndex.toString() + cIndex.toString()));
|
|
8565
8661
|
});
|
|
8566
8662
|
})] }), void 0) }), void 0));
|
|
8567
8663
|
}
|
|
@@ -8820,14 +8916,16 @@ function DateTimeYearSelector(_a) {
|
|
|
8820
8916
|
}
|
|
8821
8917
|
|
|
8822
8918
|
function DateTime(_a) {
|
|
8823
|
-
var value = _a.value, _b = _a.readOnly, readOnly = _b === void 0 ? false : _b, label = _a.label, _c = _a.useDefaultDateValue, useDefaultDateValue = _c === void 0 ? false : _c, locale = _a.locale, _d = _a.dateSelection, dateSelection = _d === void 0 ? DateSelectionType.DateTime : _d, dateFormat = _a.dateFormat, timeConstraints = _a.timeConstraints, icon = _a.icon, _e = _a.iconPosition, iconPosition = _e === void 0 ? CalendarIconPosition.Right : _e, selectableDate = _a.selectableDate, isValidDate = _a.isValidDate, onChange = _a.onChange, calendarTemplate = _a.calendarTemplate, dateScrollerTemplate = _a.dateScrollerTemplate, inputTemplate = _a.inputTemplate;
|
|
8824
|
-
var
|
|
8825
|
-
var
|
|
8919
|
+
var value = _a.value, _b = _a.readOnly, readOnly = _b === void 0 ? false : _b, label = _a.label, _c = _a.useDefaultDateValue, useDefaultDateValue = _c === void 0 ? false : _c, locale = _a.locale, _d = _a.dateSelection, dateSelection = _d === void 0 ? DateSelectionType.DateTime : _d, dateFormat = _a.dateFormat, timeConstraints = _a.timeConstraints, icon = _a.icon, _e = _a.iconPosition, iconPosition = _e === void 0 ? CalendarIconPosition.Right : _e, inputElement = _a.inputElement, _f = _a.colors, colors = _f === void 0 ? createDefaultColors() : _f, selectableDate = _a.selectableDate, isValidDate = _a.isValidDate, onChange = _a.onChange, calendarTemplate = _a.calendarTemplate, dateScrollerTemplate = _a.dateScrollerTemplate, inputTemplate = _a.inputTemplate;
|
|
8920
|
+
var _g = React.useState(false), selectorOpen = _g[0], setSelectorOpen = _g[1];
|
|
8921
|
+
var _h = React.useState(), dropDownTarget = _h[0], setDropDownTarget = _h[1];
|
|
8826
8922
|
var language = React.useRef(locale || getBrowserLanguage());
|
|
8827
8923
|
var loadedLocale = React.useRef();
|
|
8924
|
+
var inputElementRef = React.useRef();
|
|
8828
8925
|
var contextProps = {
|
|
8829
8926
|
calendarTemplate: calendarTemplate,
|
|
8830
8927
|
dateScrollerTemplate: dateScrollerTemplate,
|
|
8928
|
+
colors: colors,
|
|
8831
8929
|
};
|
|
8832
8930
|
React.useEffect(function () {
|
|
8833
8931
|
if (language.current) {
|
|
@@ -8848,6 +8946,11 @@ function DateTime(_a) {
|
|
|
8848
8946
|
});
|
|
8849
8947
|
}
|
|
8850
8948
|
}, [value, loadedLocale.current]);
|
|
8949
|
+
React.useEffect(function () {
|
|
8950
|
+
if (inputElement) {
|
|
8951
|
+
inputElementRef.current = inputElement;
|
|
8952
|
+
}
|
|
8953
|
+
}, [inputElement]);
|
|
8851
8954
|
var loadLocaleObject = function (localeToLoad) {
|
|
8852
8955
|
loadLocale(localeToLoad)
|
|
8853
8956
|
.then(function (locale) {
|
|
@@ -8916,9 +9019,9 @@ function DateTime(_a) {
|
|
|
8916
9019
|
selectedDateChanged: false,
|
|
8917
9020
|
dateInitialized: false,
|
|
8918
9021
|
};
|
|
8919
|
-
var
|
|
9022
|
+
var _j = React.useReducer(reducer, initialState), state = _j[0], dispatcher = _j[1];
|
|
8920
9023
|
var onFocus = function (event) {
|
|
8921
|
-
setDropDownElement(
|
|
9024
|
+
setDropDownElement();
|
|
8922
9025
|
setSelectorOpen(true);
|
|
8923
9026
|
};
|
|
8924
9027
|
var onInput = function (event) {
|
|
@@ -8935,13 +9038,17 @@ function DateTime(_a) {
|
|
|
8935
9038
|
}
|
|
8936
9039
|
};
|
|
8937
9040
|
var onCalendarClick = function (event) {
|
|
8938
|
-
setDropDownElement(
|
|
9041
|
+
setDropDownElement();
|
|
8939
9042
|
setSelectorOpen(!selectorOpen);
|
|
8940
9043
|
};
|
|
9044
|
+
var onInputElementCreated = function (element) {
|
|
9045
|
+
if (!inputElementRef.current) {
|
|
9046
|
+
inputElementRef.current = element;
|
|
9047
|
+
}
|
|
9048
|
+
};
|
|
8941
9049
|
var setDropDownElement = function (event) {
|
|
8942
|
-
if (!dropDownTarget) {
|
|
8943
|
-
|
|
8944
|
-
setDropDownTarget(parentElement);
|
|
9050
|
+
if (!dropDownTarget && inputElementRef.current) {
|
|
9051
|
+
setDropDownTarget(inputElementRef.current);
|
|
8945
9052
|
}
|
|
8946
9053
|
};
|
|
8947
9054
|
var onDateTimeHidden = function () {
|
|
@@ -9029,17 +9136,19 @@ function DateTime(_a) {
|
|
|
9029
9136
|
};
|
|
9030
9137
|
var canShowDateSelectors = dateSelection === DateSelectionType.DateTime || dateSelection === DateSelectionType.DateOnly;
|
|
9031
9138
|
var canShowTimeSelector = dateSelection === DateSelectionType.DateTime || dateSelection === DateSelectionType.TimeOnly;
|
|
9032
|
-
var inputProps = iconPosition === CalendarIconPosition.
|
|
9033
|
-
? {
|
|
9034
|
-
|
|
9035
|
-
|
|
9036
|
-
|
|
9037
|
-
|
|
9038
|
-
|
|
9039
|
-
|
|
9040
|
-
|
|
9041
|
-
|
|
9042
|
-
|
|
9139
|
+
var inputProps = iconPosition === CalendarIconPosition.None
|
|
9140
|
+
? {}
|
|
9141
|
+
: iconPosition === CalendarIconPosition.Right
|
|
9142
|
+
? {
|
|
9143
|
+
rightElement: icon || jsxRuntime.jsx(FontAwesomeIcon, { icon: ['far', 'calendar-alt'] }, void 0),
|
|
9144
|
+
rightElementClassName: !readOnly ? 'cursor-pointer' : undefined,
|
|
9145
|
+
onRightElementClick: !readOnly ? onCalendarClick : undefined,
|
|
9146
|
+
}
|
|
9147
|
+
: {
|
|
9148
|
+
leftElement: icon || jsxRuntime.jsx(FontAwesomeIcon, { icon: ['far', 'calendar-alt'] }, void 0),
|
|
9149
|
+
leftElementClassName: !readOnly ? 'cursor-pointer' : undefined,
|
|
9150
|
+
onLeftElementClick: !readOnly ? onCalendarClick : undefined,
|
|
9151
|
+
};
|
|
9043
9152
|
var inputTemplateProps = {
|
|
9044
9153
|
label: label,
|
|
9045
9154
|
readOnly: readOnly,
|
|
@@ -9054,7 +9163,7 @@ function DateTime(_a) {
|
|
|
9054
9163
|
var defaultTemplate = function (props, children) { return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: children }, void 0)); };
|
|
9055
9164
|
var template = inputTemplate || defaultTemplate;
|
|
9056
9165
|
return (jsxRuntime.jsx(DateTimeContext.Provider, __assign({ value: contextProps }, { children: jsxRuntime.jsxs("div", __assign({ className: "bc-date-time" }, { children: [jsxRuntime.jsxs(TemplateOutlet, __assign({ props: inputTemplateProps, template: template }, { children: [label && jsxRuntime.jsx("label", __assign({ className: "dark:text-white bc-dt-label" }, { children: label }), void 0),
|
|
9057
|
-
jsxRuntime.jsx(ContentEditableInput, __assign({ value: getValue(), readOnly: readOnly, className: "
|
|
9166
|
+
jsxRuntime.jsx(ContentEditableInput$1, __assign({ value: getValue(), readOnly: readOnly, className: "text-left " + (readOnly ? (colors === null || colors === void 0 ? void 0 : colors.readOnlyInputBgColor) || 'bg-gray-200' : (colors === null || colors === void 0 ? void 0 : colors.inputBgColor) || 'bg-white') + " dark:bg-black " + (colors === null || colors === void 0 ? void 0 : colors.inputBorderColor) + " bc-dt-input", onFocus: onFocus, onInput: onInput, onElementCreate: onInputElementCreated }, inputProps), void 0)] }), void 0),
|
|
9058
9167
|
jsxRuntime.jsx(OverlayPanel, __assign({ visible: selectorOpen, target: dropDownTarget, shouldTargetCloseOverlay: false, shouldScrollCloseOverlay: true, hidden: onDateTimeHidden }, { children: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [state.currentSelector === DateTimeActionType.DaySelector &&
|
|
9059
9168
|
canShowDateSelectors &&
|
|
9060
9169
|
state.dateInitialized &&
|
|
@@ -9101,7 +9210,7 @@ function styleInject(css, ref) {
|
|
|
9101
9210
|
}
|
|
9102
9211
|
}
|
|
9103
9212
|
|
|
9104
|
-
var css_248z = "/*! tailwindcss v2.1.2 | MIT License | https://tailwindcss.com */\n\n/*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */\n\n/*\nDocument\n========\n*/\n\n/**\nUse a better box model (opinionated).\n*/\n\n*,\n::before,\n::after {\n box-sizing: border-box;\n}\n\n/**\nUse a more readable tab size (opinionated).\n*/\n\nhtml {\n -moz-tab-size: 4;\n tab-size: 4;\n}\n\n/**\n1. Correct the line height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n*/\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/*\nSections\n========\n*/\n\n/**\nRemove the margin in all browsers.\n*/\n\nbody {\n margin: 0;\n}\n\n/**\nImprove consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)\n*/\n\nbody {\n font-family:\n\t\tsystem-ui,\n\t\t-apple-system, /* Firefox supports this but not yet `system-ui` */\n\t\t'Segoe UI',\n\t\tRoboto,\n\t\tHelvetica,\n\t\tArial,\n\t\tsans-serif,\n\t\t'Apple Color Emoji',\n\t\t'Segoe UI Emoji';\n}\n\n/*\nGrouping content\n================\n*/\n\n/**\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n*/\n\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n}\n\n/*\nText-level semantics\n====================\n*/\n\n/**\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr[title] {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/**\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n1. Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)\n2. Correct the odd 'em' font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n font-family:\n\t\tui-monospace,\n\t\tSFMono-Regular,\n\t\tConsolas,\n\t\t'Liberation Mono',\n\t\tMenlo,\n\t\tmonospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n font-size: 80%;\n}\n\n/**\nPrevent 'sub' and 'sup' elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/*\nTabular data\n============\n*/\n\n/**\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n*/\n\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n}\n\n/*\nForms\n=====\n*/\n\n/**\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\nRemove the inheritance of text transform in Edge and Firefox.\n1. Remove the inheritance of text transform in Firefox.\n*/\n\nbutton,\nselect { /* 1 */\n text-transform: none;\n}\n\n/**\nCorrect the inability to style clickable types in iOS and Safari.\n*/\n\nbutton,\n[type='button'] {\n -webkit-appearance: button;\n}\n\n/**\nRemove the inner border and padding in Firefox.\n*/\n\n/**\nRestore the focus styles unset by the previous rule.\n*/\n\n/**\nRemove the additional ':invalid' styles in Firefox.\nSee: https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737\n*/\n\n/**\nRemove the padding so developers are not caught out when they zero out 'fieldset' elements in all browsers.\n*/\n\nlegend {\n padding: 0;\n}\n\n/**\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n/**\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n/**\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n/**\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to 'inherit' in Safari.\n*/\n\n/*\nInteractive\n===========\n*/\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n display: list-item;\n}\n\n/**\n * Manually forked from SUIT CSS Base: https://github.com/suitcss/base\n * A thin layer on top of normalize.css that provides a starting point more\n * suitable for web applications.\n */\n\n/**\n * Removes the default spacing and border for appropriate elements.\n */\n\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\n\nbutton {\n background-color: transparent;\n background-image: none;\n}\n\n/**\n * Work around a Firefox/IE bug where the transparent `button` background\n * results in a loss of the default `button` focus styles.\n */\n\nbutton:focus {\n outline: 1px dotted;\n outline: 5px auto -webkit-focus-ring-color;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nol,\nul {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/**\n * Tailwind custom reset styles\n */\n\n/**\n * 1. Use the user's configured `sans` font-family (with Tailwind's default\n * sans-serif font stack as a fallback) as a sane default.\n * 2. Use Tailwind's default \"normal\" line-height so the user isn't forced\n * to override it to ensure consistency even when using the default theme.\n */\n\nhtml {\n font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; /* 1 */\n line-height: 1.5; /* 2 */\n}\n\n/**\n * Inherit font-family and line-height from `html` so users can set them as\n * a class directly on the `html` element.\n */\n\nbody {\n font-family: inherit;\n line-height: inherit;\n}\n\n/**\n * 1. Prevent padding and border from affecting element width.\n *\n * We used to set this in the html element and inherit from\n * the parent element for everything else. This caused issues\n * in shadow-dom-enhanced elements like <details> where the content\n * is wrapped by a div with box-sizing set to `content-box`.\n *\n * https://github.com/mozdevs/cssremedy/issues/4\n *\n *\n * 2. Allow adding a border to an element by just adding a border-width.\n *\n * By default, the way the browser specifies that an element should have no\n * border is by setting it's border-style to `none` in the user-agent\n * stylesheet.\n *\n * In order to easily add borders to elements by just setting the `border-width`\n * property, we change the default border-style for all elements to `solid`, and\n * use border-width to hide them instead. This way our `border` utilities only\n * need to set the `border-width` property instead of the entire `border`\n * shorthand, making our border utilities much more straightforward to compose.\n *\n * https://github.com/tailwindcss/tailwindcss/pull/116\n */\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}\n\n/*\n * Ensure horizontal rules are visible by default\n */\n\nhr {\n border-top-width: 1px;\n}\n\n/**\n * Undo the `border-style: none` reset that Normalize applies to images so that\n * our `border-{width}` utilities have the expected effect.\n *\n * The Normalize reset is unnecessary for us since we default the border-width\n * to 0 on all elements.\n *\n * https://github.com/tailwindcss/tailwindcss/issues/362\n */\n\nimg {\n border-style: solid;\n}\n\ntextarea {\n resize: vertical;\n}\n\ninput::-webkit-input-placeholder, textarea::-webkit-input-placeholder {\n opacity: 1;\n color: #9ca3af;\n}\n\ninput:-ms-input-placeholder, textarea:-ms-input-placeholder {\n opacity: 1;\n color: #9ca3af;\n}\n\ninput::placeholder,\ntextarea::placeholder {\n opacity: 1;\n color: #9ca3af;\n}\n\nbutton {\n cursor: pointer;\n}\n\ntable {\n border-collapse: collapse;\n}\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/**\n * Reset links to optimize for opt-in styling instead of\n * opt-out.\n */\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/**\n * Reset form element properties that are easy to forget to\n * style explicitly so you don't inadvertently introduce\n * styles that deviate from your design system. These styles\n * supplement a partial reset that is already applied by\n * normalize.css.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n padding: 0;\n line-height: inherit;\n color: inherit;\n}\n\n/**\n * Use the configured 'mono' font family for elements that\n * are expected to be rendered with a monospace font, falling\n * back to the system monospace stack if there is no configured\n * 'mono' font family.\n */\n\npre,\ncode,\nkbd,\nsamp {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;\n}\n\n/**\n * Make replaced elements `display: block` by default as that's\n * the behavior you want almost all of the time. Inspired by\n * CSS Remedy, with `svg` added as well.\n *\n * https://github.com/mozdevs/cssremedy/issues/14\n */\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block;\n vertical-align: middle;\n}\n\n/**\n * Constrain images and videos to the parent width and preserve\n * their intrinsic aspect ratio.\n *\n * https://github.com/mozdevs/cssremedy/issues/14\n */\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n.bg-white {\n --tw-bg-opacity: 1;\n background-color: rgba(255, 255, 255, var(--tw-bg-opacity));\n}\n\n.bg-gray-200 {\n --tw-bg-opacity: 1;\n background-color: rgba(229, 231, 235, var(--tw-bg-opacity));\n}\n\n.bg-gray-900 {\n --tw-bg-opacity: 1;\n background-color: rgba(17, 24, 39, var(--tw-bg-opacity));\n}\n\n.bg-blue-100 {\n --tw-bg-opacity: 1;\n background-color: rgba(219, 234, 254, var(--tw-bg-opacity));\n}\n\n.hover\\:bg-gray-300:hover {\n --tw-bg-opacity: 1;\n background-color: rgba(209, 213, 219, var(--tw-bg-opacity));\n}\n\n.dark .dark\\:bg-black {\n --tw-bg-opacity: 1;\n background-color: rgba(0, 0, 0, var(--tw-bg-opacity));\n}\n\n.dark .dark\\:bg-white {\n --tw-bg-opacity: 1;\n background-color: rgba(255, 255, 255, var(--tw-bg-opacity));\n}\n\n.dark .dark\\:bg-gray-900 {\n --tw-bg-opacity: 1;\n background-color: rgba(17, 24, 39, var(--tw-bg-opacity));\n}\n\n.dark .dark\\:hover\\:bg-white:hover {\n --tw-bg-opacity: 1;\n background-color: rgba(255, 255, 255, var(--tw-bg-opacity));\n}\n\n.border-black {\n --tw-border-opacity: 1;\n border-color: rgba(0, 0, 0, var(--tw-border-opacity));\n}\n\n.border-gray-300 {\n --tw-border-opacity: 1;\n border-color: rgba(209, 213, 219, var(--tw-border-opacity));\n}\n\n.border-gray-400 {\n --tw-border-opacity: 1;\n border-color: rgba(156, 163, 175, var(--tw-border-opacity));\n}\n\n.border-gray-500 {\n --tw-border-opacity: 1;\n border-color: rgba(107, 114, 128, var(--tw-border-opacity));\n}\n\n.dark .dark\\:border-white {\n --tw-border-opacity: 1;\n border-color: rgba(255, 255, 255, var(--tw-border-opacity));\n}\n\n.rounded-md {\n border-radius: 0.375rem;\n}\n\n.rounded-full {\n border-radius: 9999px;\n}\n\n.border-solid {\n border-style: solid;\n}\n\n.border {\n border-width: 1px;\n}\n\n.border-r {\n border-right-width: 1px;\n}\n\n.cursor-pointer {\n cursor: pointer;\n}\n\n.cursor-not-allowed {\n cursor: not-allowed;\n}\n\n.flex {\n display: -webkit-flex;\n display: flex;\n}\n\n.table {\n display: table;\n}\n\n.grid {\n display: grid;\n}\n\n.hidden {\n display: none;\n}\n\n.flex-row {\n -webkit-flex-direction: row;\n flex-direction: row;\n}\n\n.flex-col {\n -webkit-flex-direction: column;\n flex-direction: column;\n}\n\n.justify-center {\n -webkit-justify-content: center;\n justify-content: center;\n}\n\n.flex-grow {\n -webkit-flex-grow: 1;\n flex-grow: 1;\n}\n\n.flex-shrink {\n -webkit-flex-shrink: 1;\n flex-shrink: 1;\n}\n\n.font-bold {\n font-weight: 700;\n}\n\n.mr-2 {\n margin-right: 0.5rem;\n}\n\n.ml-2 {\n margin-left: 0.5rem;\n}\n\n.focus\\:outline-none:focus {\n outline: 2px solid transparent;\n outline-offset: 2px;\n}\n\n.overflow-scroll {\n overflow: scroll;\n}\n\n.p-2 {\n padding: 0.5rem;\n}\n\n.p-4 {\n padding: 1rem;\n}\n\n.py-1 {\n padding-top: 0.25rem;\n padding-bottom: 0.25rem;\n}\n\n.px-2 {\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n}\n\n.pr-4 {\n padding-right: 1rem;\n}\n\n.pl-4 {\n padding-left: 1rem;\n}\n\n.pb-8 {\n padding-bottom: 2rem;\n}\n\n.static {\n position: static;\n}\n\n.absolute {\n position: absolute;\n}\n\n* {\n --tw-shadow: 0 0 #0000;\n}\n\n.shadow-sm {\n --tw-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n.shadow {\n --tw-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n* {\n --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgba(59, 130, 246, 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n}\n\n.text-center {\n text-align: center;\n}\n\n.text-gray-400 {\n --tw-text-opacity: 1;\n color: rgba(156, 163, 175, var(--tw-text-opacity));\n}\n\n.text-red-300 {\n --tw-text-opacity: 1;\n color: rgba(252, 165, 165, var(--tw-text-opacity));\n}\n\n.dark .dark\\:text-black {\n --tw-text-opacity: 1;\n color: rgba(0, 0, 0, var(--tw-text-opacity));\n}\n\n.dark .dark\\:text-white {\n --tw-text-opacity: 1;\n color: rgba(255, 255, 255, var(--tw-text-opacity));\n}\n\n.dark .dark\\:hover\\:text-black:hover {\n --tw-text-opacity: 1;\n color: rgba(0, 0, 0, var(--tw-text-opacity));\n}\n\n.visible {\n visibility: visible;\n}\n\n.w-full {\n width: 100%;\n}\n\n.gap-3 {\n gap: 0.75rem;\n}\n\n.gap-4 {\n gap: 1rem;\n}\n\n.grid-cols-4 {\n grid-template-columns: repeat(4, minmax(0, 1fr));\n}\n\n.grid-cols-7 {\n grid-template-columns: repeat(7, minmax(0, 1fr));\n}\n\n.col-span-4 {\n grid-column: span 4 / span 4;\n}\n\n.transition {\n transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, -webkit-transform, -webkit-filter, -webkit-backdrop-filter;\n transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;\n transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-transform, -webkit-filter, -webkit-backdrop-filter;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n@-webkit-keyframes spin {\n to {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes spin {\n to {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@-webkit-keyframes ping {\n 75%, 100% {\n -webkit-transform: scale(2);\n transform: scale(2);\n opacity: 0;\n }\n}\n\n@keyframes ping {\n 75%, 100% {\n -webkit-transform: scale(2);\n transform: scale(2);\n opacity: 0;\n }\n}\n\n@-webkit-keyframes pulse {\n 50% {\n opacity: .5;\n }\n}\n\n@keyframes pulse {\n 50% {\n opacity: .5;\n }\n}\n\n@-webkit-keyframes bounce {\n 0%, 100% {\n -webkit-transform: translateY(-25%);\n transform: translateY(-25%);\n -webkit-animation-timing-function: cubic-bezier(0.8,0,1,1);\n animation-timing-function: cubic-bezier(0.8,0,1,1);\n }\n\n 50% {\n -webkit-transform: none;\n transform: none;\n -webkit-animation-timing-function: cubic-bezier(0,0,0.2,1);\n animation-timing-function: cubic-bezier(0,0,0.2,1);\n }\n}\n\n@keyframes bounce {\n 0%, 100% {\n -webkit-transform: translateY(-25%);\n transform: translateY(-25%);\n -webkit-animation-timing-function: cubic-bezier(0.8,0,1,1);\n animation-timing-function: cubic-bezier(0.8,0,1,1);\n }\n\n 50% {\n -webkit-transform: none;\n transform: none;\n -webkit-animation-timing-function: cubic-bezier(0,0,0.2,1);\n animation-timing-function: cubic-bezier(0,0,0.2,1);\n }\n}\n\nbody {\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\n sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\ncode {\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\n monospace;\n}\n\n@media (min-width: 640px) {\n}\n\n@media (min-width: 768px) {\n}\n\n@media (min-width: 1024px) {\n}\n\n@media (min-width: 1280px) {\n}\n\n@media (min-width: 1536px) {\n}\n";
|
|
9213
|
+
var css_248z = "/*! tailwindcss v2.1.2 | MIT License | https://tailwindcss.com */\n\n/*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */\n\n/*\nDocument\n========\n*/\n\n/**\nUse a better box model (opinionated).\n*/\n\n*,\n::before,\n::after {\n box-sizing: border-box;\n}\n\n/**\nUse a more readable tab size (opinionated).\n*/\n\nhtml {\n -moz-tab-size: 4;\n tab-size: 4;\n}\n\n/**\n1. Correct the line height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n*/\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/*\nSections\n========\n*/\n\n/**\nRemove the margin in all browsers.\n*/\n\nbody {\n margin: 0;\n}\n\n/**\nImprove consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)\n*/\n\nbody {\n font-family:\n\t\tsystem-ui,\n\t\t-apple-system, /* Firefox supports this but not yet `system-ui` */\n\t\t'Segoe UI',\n\t\tRoboto,\n\t\tHelvetica,\n\t\tArial,\n\t\tsans-serif,\n\t\t'Apple Color Emoji',\n\t\t'Segoe UI Emoji';\n}\n\n/*\nGrouping content\n================\n*/\n\n/**\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n*/\n\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n}\n\n/*\nText-level semantics\n====================\n*/\n\n/**\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr[title] {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/**\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n1. Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)\n2. Correct the odd 'em' font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n font-family:\n\t\tui-monospace,\n\t\tSFMono-Regular,\n\t\tConsolas,\n\t\t'Liberation Mono',\n\t\tMenlo,\n\t\tmonospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n font-size: 80%;\n}\n\n/**\nPrevent 'sub' and 'sup' elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/*\nTabular data\n============\n*/\n\n/**\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n*/\n\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n}\n\n/*\nForms\n=====\n*/\n\n/**\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\nRemove the inheritance of text transform in Edge and Firefox.\n1. Remove the inheritance of text transform in Firefox.\n*/\n\nbutton,\nselect { /* 1 */\n text-transform: none;\n}\n\n/**\nCorrect the inability to style clickable types in iOS and Safari.\n*/\n\nbutton,\n[type='button'] {\n -webkit-appearance: button;\n}\n\n/**\nRemove the inner border and padding in Firefox.\n*/\n\n/**\nRestore the focus styles unset by the previous rule.\n*/\n\n/**\nRemove the additional ':invalid' styles in Firefox.\nSee: https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737\n*/\n\n/**\nRemove the padding so developers are not caught out when they zero out 'fieldset' elements in all browsers.\n*/\n\nlegend {\n padding: 0;\n}\n\n/**\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n/**\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n/**\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n/**\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to 'inherit' in Safari.\n*/\n\n/*\nInteractive\n===========\n*/\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n display: list-item;\n}\n\n/**\n * Manually forked from SUIT CSS Base: https://github.com/suitcss/base\n * A thin layer on top of normalize.css that provides a starting point more\n * suitable for web applications.\n */\n\n/**\n * Removes the default spacing and border for appropriate elements.\n */\n\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\n\nbutton {\n background-color: transparent;\n background-image: none;\n}\n\n/**\n * Work around a Firefox/IE bug where the transparent `button` background\n * results in a loss of the default `button` focus styles.\n */\n\nbutton:focus {\n outline: 1px dotted;\n outline: 5px auto -webkit-focus-ring-color;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nol,\nul {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/**\n * Tailwind custom reset styles\n */\n\n/**\n * 1. Use the user's configured `sans` font-family (with Tailwind's default\n * sans-serif font stack as a fallback) as a sane default.\n * 2. Use Tailwind's default \"normal\" line-height so the user isn't forced\n * to override it to ensure consistency even when using the default theme.\n */\n\nhtml {\n font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; /* 1 */\n line-height: 1.5; /* 2 */\n}\n\n/**\n * Inherit font-family and line-height from `html` so users can set them as\n * a class directly on the `html` element.\n */\n\nbody {\n font-family: inherit;\n line-height: inherit;\n}\n\n/**\n * 1. Prevent padding and border from affecting element width.\n *\n * We used to set this in the html element and inherit from\n * the parent element for everything else. This caused issues\n * in shadow-dom-enhanced elements like <details> where the content\n * is wrapped by a div with box-sizing set to `content-box`.\n *\n * https://github.com/mozdevs/cssremedy/issues/4\n *\n *\n * 2. Allow adding a border to an element by just adding a border-width.\n *\n * By default, the way the browser specifies that an element should have no\n * border is by setting it's border-style to `none` in the user-agent\n * stylesheet.\n *\n * In order to easily add borders to elements by just setting the `border-width`\n * property, we change the default border-style for all elements to `solid`, and\n * use border-width to hide them instead. This way our `border` utilities only\n * need to set the `border-width` property instead of the entire `border`\n * shorthand, making our border utilities much more straightforward to compose.\n *\n * https://github.com/tailwindcss/tailwindcss/pull/116\n */\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}\n\n/*\n * Ensure horizontal rules are visible by default\n */\n\nhr {\n border-top-width: 1px;\n}\n\n/**\n * Undo the `border-style: none` reset that Normalize applies to images so that\n * our `border-{width}` utilities have the expected effect.\n *\n * The Normalize reset is unnecessary for us since we default the border-width\n * to 0 on all elements.\n *\n * https://github.com/tailwindcss/tailwindcss/issues/362\n */\n\nimg {\n border-style: solid;\n}\n\ntextarea {\n resize: vertical;\n}\n\ninput::-webkit-input-placeholder, textarea::-webkit-input-placeholder {\n opacity: 1;\n color: #9ca3af;\n}\n\ninput:-ms-input-placeholder, textarea:-ms-input-placeholder {\n opacity: 1;\n color: #9ca3af;\n}\n\ninput::placeholder,\ntextarea::placeholder {\n opacity: 1;\n color: #9ca3af;\n}\n\nbutton {\n cursor: pointer;\n}\n\ntable {\n border-collapse: collapse;\n}\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/**\n * Reset links to optimize for opt-in styling instead of\n * opt-out.\n */\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/**\n * Reset form element properties that are easy to forget to\n * style explicitly so you don't inadvertently introduce\n * styles that deviate from your design system. These styles\n * supplement a partial reset that is already applied by\n * normalize.css.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n padding: 0;\n line-height: inherit;\n color: inherit;\n}\n\n/**\n * Use the configured 'mono' font family for elements that\n * are expected to be rendered with a monospace font, falling\n * back to the system monospace stack if there is no configured\n * 'mono' font family.\n */\n\npre,\ncode,\nkbd,\nsamp {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;\n}\n\n/**\n * Make replaced elements `display: block` by default as that's\n * the behavior you want almost all of the time. Inspired by\n * CSS Remedy, with `svg` added as well.\n *\n * https://github.com/mozdevs/cssremedy/issues/14\n */\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block;\n vertical-align: middle;\n}\n\n/**\n * Constrain images and videos to the parent width and preserve\n * their intrinsic aspect ratio.\n *\n * https://github.com/mozdevs/cssremedy/issues/14\n */\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n.bg-white {\n --tw-bg-opacity: 1;\n background-color: rgba(255, 255, 255, var(--tw-bg-opacity));\n}\n\n.bg-gray-200 {\n --tw-bg-opacity: 1;\n background-color: rgba(229, 231, 235, var(--tw-bg-opacity));\n}\n\n.bg-gray-900 {\n --tw-bg-opacity: 1;\n background-color: rgba(17, 24, 39, var(--tw-bg-opacity));\n}\n\n.bg-red-500 {\n --tw-bg-opacity: 1;\n background-color: rgba(239, 68, 68, var(--tw-bg-opacity));\n}\n\n.bg-green-100 {\n --tw-bg-opacity: 1;\n background-color: rgba(209, 250, 229, var(--tw-bg-opacity));\n}\n\n.bg-blue-100 {\n --tw-bg-opacity: 1;\n background-color: rgba(219, 234, 254, var(--tw-bg-opacity));\n}\n\n.bg-blue-200 {\n --tw-bg-opacity: 1;\n background-color: rgba(191, 219, 254, var(--tw-bg-opacity));\n}\n\n.hover\\:bg-gray-300:hover {\n --tw-bg-opacity: 1;\n background-color: rgba(209, 213, 219, var(--tw-bg-opacity));\n}\n\n.dark .dark\\:bg-black {\n --tw-bg-opacity: 1;\n background-color: rgba(0, 0, 0, var(--tw-bg-opacity));\n}\n\n.dark .dark\\:bg-white {\n --tw-bg-opacity: 1;\n background-color: rgba(255, 255, 255, var(--tw-bg-opacity));\n}\n\n.dark .dark\\:bg-gray-900 {\n --tw-bg-opacity: 1;\n background-color: rgba(17, 24, 39, var(--tw-bg-opacity));\n}\n\n.dark .dark\\:hover\\:bg-white:hover {\n --tw-bg-opacity: 1;\n background-color: rgba(255, 255, 255, var(--tw-bg-opacity));\n}\n\n.border-black {\n --tw-border-opacity: 1;\n border-color: rgba(0, 0, 0, var(--tw-border-opacity));\n}\n\n.border-gray-300 {\n --tw-border-opacity: 1;\n border-color: rgba(209, 213, 219, var(--tw-border-opacity));\n}\n\n.border-gray-400 {\n --tw-border-opacity: 1;\n border-color: rgba(156, 163, 175, var(--tw-border-opacity));\n}\n\n.border-gray-500 {\n --tw-border-opacity: 1;\n border-color: rgba(107, 114, 128, var(--tw-border-opacity));\n}\n\n.dark .dark\\:border-white {\n --tw-border-opacity: 1;\n border-color: rgba(255, 255, 255, var(--tw-border-opacity));\n}\n\n.rounded-md {\n border-radius: 0.375rem;\n}\n\n.rounded-full {\n border-radius: 9999px;\n}\n\n.border-solid {\n border-style: solid;\n}\n\n.border-none {\n border-style: none;\n}\n\n.border {\n border-width: 1px;\n}\n\n.border-r {\n border-right-width: 1px;\n}\n\n.cursor-pointer {\n cursor: pointer;\n}\n\n.cursor-not-allowed {\n cursor: not-allowed;\n}\n\n.flex {\n display: -webkit-flex;\n display: flex;\n}\n\n.table {\n display: table;\n}\n\n.grid {\n display: grid;\n}\n\n.hidden {\n display: none;\n}\n\n.flex-row {\n -webkit-flex-direction: row;\n flex-direction: row;\n}\n\n.flex-col {\n -webkit-flex-direction: column;\n flex-direction: column;\n}\n\n.justify-center {\n -webkit-justify-content: center;\n justify-content: center;\n}\n\n.flex-grow {\n -webkit-flex-grow: 1;\n flex-grow: 1;\n}\n\n.flex-shrink {\n -webkit-flex-shrink: 1;\n flex-shrink: 1;\n}\n\n.font-bold {\n font-weight: 700;\n}\n\n.mr-2 {\n margin-right: 0.5rem;\n}\n\n.ml-2 {\n margin-left: 0.5rem;\n}\n\n.focus\\:outline-none:focus {\n outline: 2px solid transparent;\n outline-offset: 2px;\n}\n\n.overflow-scroll {\n overflow: scroll;\n}\n\n.p-2 {\n padding: 0.5rem;\n}\n\n.p-4 {\n padding: 1rem;\n}\n\n.py-1 {\n padding-top: 0.25rem;\n padding-bottom: 0.25rem;\n}\n\n.px-2 {\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n}\n\n.pr-4 {\n padding-right: 1rem;\n}\n\n.pl-4 {\n padding-left: 1rem;\n}\n\n.pb-8 {\n padding-bottom: 2rem;\n}\n\n.static {\n position: static;\n}\n\n.absolute {\n position: absolute;\n}\n\n* {\n --tw-shadow: 0 0 #0000;\n}\n\n.shadow-sm {\n --tw-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n.shadow {\n --tw-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n* {\n --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgba(59, 130, 246, 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n}\n\n.text-left {\n text-align: left;\n}\n\n.text-center {\n text-align: center;\n}\n\n.text-gray-400 {\n --tw-text-opacity: 1;\n color: rgba(156, 163, 175, var(--tw-text-opacity));\n}\n\n.text-red-300 {\n --tw-text-opacity: 1;\n color: rgba(252, 165, 165, var(--tw-text-opacity));\n}\n\n.dark .dark\\:text-black {\n --tw-text-opacity: 1;\n color: rgba(0, 0, 0, var(--tw-text-opacity));\n}\n\n.dark .dark\\:text-white {\n --tw-text-opacity: 1;\n color: rgba(255, 255, 255, var(--tw-text-opacity));\n}\n\n.dark .dark\\:hover\\:text-black:hover {\n --tw-text-opacity: 1;\n color: rgba(0, 0, 0, var(--tw-text-opacity));\n}\n\n.visible {\n visibility: visible;\n}\n\n.w-full {\n width: 100%;\n}\n\n.gap-3 {\n gap: 0.75rem;\n}\n\n.gap-4 {\n gap: 1rem;\n}\n\n.grid-cols-4 {\n grid-template-columns: repeat(4, minmax(0, 1fr));\n}\n\n.grid-cols-7 {\n grid-template-columns: repeat(7, minmax(0, 1fr));\n}\n\n.col-span-4 {\n grid-column: span 4 / span 4;\n}\n\n.transition {\n transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, -webkit-transform, -webkit-filter, -webkit-backdrop-filter;\n transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;\n transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-transform, -webkit-filter, -webkit-backdrop-filter;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n@-webkit-keyframes spin {\n to {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes spin {\n to {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@-webkit-keyframes ping {\n 75%, 100% {\n -webkit-transform: scale(2);\n transform: scale(2);\n opacity: 0;\n }\n}\n\n@keyframes ping {\n 75%, 100% {\n -webkit-transform: scale(2);\n transform: scale(2);\n opacity: 0;\n }\n}\n\n@-webkit-keyframes pulse {\n 50% {\n opacity: .5;\n }\n}\n\n@keyframes pulse {\n 50% {\n opacity: .5;\n }\n}\n\n@-webkit-keyframes bounce {\n 0%, 100% {\n -webkit-transform: translateY(-25%);\n transform: translateY(-25%);\n -webkit-animation-timing-function: cubic-bezier(0.8,0,1,1);\n animation-timing-function: cubic-bezier(0.8,0,1,1);\n }\n\n 50% {\n -webkit-transform: none;\n transform: none;\n -webkit-animation-timing-function: cubic-bezier(0,0,0.2,1);\n animation-timing-function: cubic-bezier(0,0,0.2,1);\n }\n}\n\n@keyframes bounce {\n 0%, 100% {\n -webkit-transform: translateY(-25%);\n transform: translateY(-25%);\n -webkit-animation-timing-function: cubic-bezier(0.8,0,1,1);\n animation-timing-function: cubic-bezier(0.8,0,1,1);\n }\n\n 50% {\n -webkit-transform: none;\n transform: none;\n -webkit-animation-timing-function: cubic-bezier(0,0,0.2,1);\n animation-timing-function: cubic-bezier(0,0,0.2,1);\n }\n}\n\nbody {\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\n sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\ncode {\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\n monospace;\n}\n\n@media (min-width: 640px) {\n}\n\n@media (min-width: 768px) {\n}\n\n@media (min-width: 1024px) {\n}\n\n@media (min-width: 1280px) {\n}\n\n@media (min-width: 1536px) {\n}\n";
|
|
9105
9214
|
styleInject(css_248z);
|
|
9106
9215
|
|
|
9107
9216
|
/*!
|