@northlight/ui 2.35.2 → 2.35.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/es/northlight.js
CHANGED
|
@@ -1046,8 +1046,9 @@ const Input = {
|
|
|
1046
1046
|
_focusVisible: {
|
|
1047
1047
|
bgColor: color.background.input["outline-focus"],
|
|
1048
1048
|
borderColor: color.border.input.focus,
|
|
1049
|
+
boxShadow: `inset 0 0 0 1px ${color.border.input.focus}`,
|
|
1049
1050
|
_invalid: {
|
|
1050
|
-
boxShadow: `0 0 0 1px ${color.border.input.error}`,
|
|
1051
|
+
boxShadow: `inset 0 0 0 1px ${color.border.input.error}`,
|
|
1051
1052
|
bgColor: color.background.input["outline-error"],
|
|
1052
1053
|
borderColor: color.border.input.error
|
|
1053
1054
|
}
|
|
@@ -1058,7 +1059,8 @@ const Input = {
|
|
|
1058
1059
|
},
|
|
1059
1060
|
_invalid: {
|
|
1060
1061
|
bgColor: color.background.input["outline-error"],
|
|
1061
|
-
borderColor: color.border.input.error
|
|
1062
|
+
borderColor: color.border.input.error,
|
|
1063
|
+
boxShadow: `inset 0 0 0 1px ${color.border.input.error}`
|
|
1062
1064
|
},
|
|
1063
1065
|
_disabled: {
|
|
1064
1066
|
bgColor: color.background.input["outline-disabled"],
|
|
@@ -1097,20 +1099,20 @@ const Input = {
|
|
|
1097
1099
|
bgColor: color.background.input["filled-hover"]
|
|
1098
1100
|
},
|
|
1099
1101
|
_focusVisible: {
|
|
1100
|
-
boxShadow: `0 0 0 1px ${color.border.input.focus}`,
|
|
1102
|
+
boxShadow: `inset 0 0 0 1px ${color.border.input.focus}`,
|
|
1101
1103
|
borderColor: color.border.input.focus,
|
|
1102
1104
|
bgColor: color.background.input["filled-focus"],
|
|
1103
1105
|
_readOnly: {
|
|
1104
1106
|
bgColor: color.background.input["filled-default"]
|
|
1105
1107
|
},
|
|
1106
1108
|
_invalid: {
|
|
1107
|
-
boxShadow: `0 0 0 1px ${color.border.input.error}`,
|
|
1109
|
+
boxShadow: `inset 0 0 0 1px ${color.border.input.error}`,
|
|
1108
1110
|
bgColor: color.background.input["outline-error"],
|
|
1109
1111
|
borderColor: color.border.input.error
|
|
1110
1112
|
}
|
|
1111
1113
|
},
|
|
1112
1114
|
_invalid: {
|
|
1113
|
-
boxShadow: `0 0 0 1px ${color.border.input.error}`,
|
|
1115
|
+
boxShadow: `inset 0 0 0 1px ${color.border.input.error}`,
|
|
1114
1116
|
bgColor: color.background.input["filled-error"],
|
|
1115
1117
|
borderColor: color.border.input.error
|
|
1116
1118
|
},
|
|
@@ -1197,11 +1199,11 @@ const Input = {
|
|
|
1197
1199
|
_focusVisible: {
|
|
1198
1200
|
bgColor: color.background.input["outline-focus"],
|
|
1199
1201
|
_hover: {
|
|
1200
|
-
boxShadow: `0 0 0 1px ${color.border.ai}`,
|
|
1202
|
+
boxShadow: `inset 0 0 0 1px ${color.border.ai}`,
|
|
1201
1203
|
borderColor: color.border.ai
|
|
1202
1204
|
},
|
|
1203
1205
|
_invalid: {
|
|
1204
|
-
boxShadow: `0 0 0 1px ${color.border.input.error}`,
|
|
1206
|
+
boxShadow: `inset 0 0 0 1px ${color.border.input.error}`,
|
|
1205
1207
|
bgColor: color.background.input["outline-error"],
|
|
1206
1208
|
borderColor: color.border.input.error
|
|
1207
1209
|
}
|
|
@@ -1758,12 +1760,12 @@ const NumberInput$1 = {
|
|
|
1758
1760
|
_focusVisible: {
|
|
1759
1761
|
bg: color.background.input["outline-focus"],
|
|
1760
1762
|
borderColor: color.border.input.focus,
|
|
1761
|
-
boxShadow: `0 0 0 1px ${color.border.textarea.focus}`
|
|
1763
|
+
boxShadow: `inset 0 0 0 1px ${color.border.textarea.focus}`
|
|
1762
1764
|
},
|
|
1763
1765
|
_invalid: {
|
|
1764
1766
|
bg: color.background.input["outline-error"],
|
|
1765
1767
|
borderColor: color.border.input.error,
|
|
1766
|
-
boxShadow: `0 0 0 1px ${color.border.input.error}`
|
|
1768
|
+
boxShadow: `inset 0 0 0 1px ${color.border.input.error}`
|
|
1767
1769
|
},
|
|
1768
1770
|
_disabled: {
|
|
1769
1771
|
bg: color.background.input["outline-disabled"],
|
|
@@ -1969,10 +1971,10 @@ const DatePicker$1 = {
|
|
|
1969
1971
|
_focusWithin: {
|
|
1970
1972
|
bgColor: color.background.input["outline-focus"],
|
|
1971
1973
|
borderColor: color.border.textarea.focus,
|
|
1972
|
-
boxShadow: `0 0 0 1px ${color.border.textarea.focus}`
|
|
1974
|
+
boxShadow: `inset 0 0 0 1px ${color.border.textarea.focus}`
|
|
1973
1975
|
},
|
|
1974
1976
|
_invalid: {
|
|
1975
|
-
boxShadow: `0 0 0 1px ${color.border.input.error}`,
|
|
1977
|
+
boxShadow: `inset 0 0 0 1px ${color.border.input.error}`,
|
|
1976
1978
|
borderColor: color.border.input.error
|
|
1977
1979
|
},
|
|
1978
1980
|
_disabled: {
|
|
@@ -1993,11 +1995,11 @@ const DatePicker$1 = {
|
|
|
1993
1995
|
outline: "none",
|
|
1994
1996
|
rounded: "md",
|
|
1995
1997
|
_focus: {
|
|
1996
|
-
bgColor: "
|
|
1998
|
+
bgColor: "bg.brand.default",
|
|
1997
1999
|
color: color.text.inverted
|
|
1998
2000
|
},
|
|
1999
2001
|
_placeholder: {
|
|
2000
|
-
color: "
|
|
2002
|
+
color: "destructive"
|
|
2001
2003
|
}
|
|
2002
2004
|
}
|
|
2003
2005
|
}),
|
|
@@ -7304,6 +7306,44 @@ const getQuickSelectOptions = (state, locale, fiscalStartMonth, fiscalStartDay)
|
|
|
7304
7306
|
},
|
|
7305
7307
|
label: "Year to Date"
|
|
7306
7308
|
};
|
|
7309
|
+
const S1 = {
|
|
7310
|
+
value: {
|
|
7311
|
+
start: startOfMonthWithDays(
|
|
7312
|
+
startOfYear(thisDay).subtract({ years: offsetFiscalYear }),
|
|
7313
|
+
{
|
|
7314
|
+
months: fiscalStartMonth,
|
|
7315
|
+
days: fiscalStartDay
|
|
7316
|
+
}
|
|
7317
|
+
),
|
|
7318
|
+
end: endOfMonthWithDays(
|
|
7319
|
+
startOfYear(thisDay).subtract({ years: offsetFiscalYear }),
|
|
7320
|
+
{
|
|
7321
|
+
months: fiscalStartMonth + 6,
|
|
7322
|
+
days: fiscalStartDay
|
|
7323
|
+
}
|
|
7324
|
+
)
|
|
7325
|
+
},
|
|
7326
|
+
label: fiscalStartMonth === 0 ? "S1" : "FS1"
|
|
7327
|
+
};
|
|
7328
|
+
const S2 = {
|
|
7329
|
+
value: {
|
|
7330
|
+
start: startOfMonthWithDays(
|
|
7331
|
+
startOfYear(thisDay).subtract({ years: offsetFiscalYear }),
|
|
7332
|
+
{
|
|
7333
|
+
months: fiscalStartMonth + 6,
|
|
7334
|
+
days: fiscalStartDay
|
|
7335
|
+
}
|
|
7336
|
+
),
|
|
7337
|
+
end: endOfMonthWithDays(
|
|
7338
|
+
startOfYear(thisDay).subtract({ years: offsetFiscalYear }),
|
|
7339
|
+
{
|
|
7340
|
+
months: fiscalStartMonth + 12,
|
|
7341
|
+
days: fiscalStartDay
|
|
7342
|
+
}
|
|
7343
|
+
)
|
|
7344
|
+
},
|
|
7345
|
+
label: fiscalStartMonth === 0 ? "S2" : "FS2"
|
|
7346
|
+
};
|
|
7307
7347
|
const F1 = {
|
|
7308
7348
|
value: {
|
|
7309
7349
|
start: startOfMonthWithDays(
|
|
@@ -7380,6 +7420,7 @@ const getQuickSelectOptions = (state, locale, fiscalStartMonth, fiscalStartDay)
|
|
|
7380
7420
|
},
|
|
7381
7421
|
label: fiscalStartMonth === 0 ? "Q4" : "FQ4"
|
|
7382
7422
|
};
|
|
7423
|
+
const fiscalSemesters = [S1, S2];
|
|
7383
7424
|
const fiscalQuarters = [F1, F2, F3, F4];
|
|
7384
7425
|
const fiscalYears = fiscalStartMonth === 0 ? [] : [thisFiscalYear, lastFiscalYear];
|
|
7385
7426
|
const quickDates = [
|
|
@@ -7397,7 +7438,7 @@ const getQuickSelectOptions = (state, locale, fiscalStartMonth, fiscalStartDay)
|
|
|
7397
7438
|
nextYear,
|
|
7398
7439
|
...fiscalYears
|
|
7399
7440
|
];
|
|
7400
|
-
return { quickDates, fiscalQuarters };
|
|
7441
|
+
return { quickDates, fiscalQuarters, fiscalSemesters };
|
|
7401
7442
|
};
|
|
7402
7443
|
|
|
7403
7444
|
const seperator = `1px solid ${palette.gray["100"]}`;
|
|
@@ -7408,7 +7449,7 @@ const QuickSelect = ({
|
|
|
7408
7449
|
locale = "",
|
|
7409
7450
|
height = "17.5rem"
|
|
7410
7451
|
}) => {
|
|
7411
|
-
const { quickDates, fiscalQuarters } = useMemo(
|
|
7452
|
+
const { quickDates, fiscalQuarters, fiscalSemesters } = useMemo(
|
|
7412
7453
|
() => getQuickSelectOptions(state, locale, fiscalStartMonth, fiscalStartDay),
|
|
7413
7454
|
[]
|
|
7414
7455
|
);
|
|
@@ -7451,10 +7492,31 @@ const QuickSelect = ({
|
|
|
7451
7492
|
), /* @__PURE__ */ React.createElement(Spacer, null), /* @__PURE__ */ React.createElement(
|
|
7452
7493
|
Flex,
|
|
7453
7494
|
{
|
|
7454
|
-
justifyContent: "space-
|
|
7495
|
+
justifyContent: "space-around",
|
|
7455
7496
|
w: "full",
|
|
7456
7497
|
pt: "2",
|
|
7457
7498
|
pr: "4",
|
|
7499
|
+
display: shouldShow(fiscalSemesters) ? "flex" : "none"
|
|
7500
|
+
},
|
|
7501
|
+
map(
|
|
7502
|
+
(semester) => validRange(semester.value, state) && /* @__PURE__ */ React.createElement(
|
|
7503
|
+
DateButton,
|
|
7504
|
+
{
|
|
7505
|
+
onClick: updateDate(semester.value),
|
|
7506
|
+
isActive: getIsActive(semester),
|
|
7507
|
+
key: `quick-select-${semester.label}`
|
|
7508
|
+
},
|
|
7509
|
+
semester.label
|
|
7510
|
+
),
|
|
7511
|
+
fiscalSemesters
|
|
7512
|
+
)
|
|
7513
|
+
), /* @__PURE__ */ React.createElement(
|
|
7514
|
+
Flex,
|
|
7515
|
+
{
|
|
7516
|
+
justifyContent: "space-around",
|
|
7517
|
+
w: "full",
|
|
7518
|
+
pt: shouldShow(fiscalSemesters) ? "0" : "2",
|
|
7519
|
+
pr: "4",
|
|
7458
7520
|
display: shouldShow(fiscalQuarters) ? "flex" : "none"
|
|
7459
7521
|
},
|
|
7460
7522
|
map(
|