@headless-adminapp/fluent 1.0.0 → 1.0.1
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.
|
@@ -15,6 +15,8 @@ const useStyles = (0, react_components_1.makeStyles)({
|
|
|
15
15
|
overflow: 'hidden',
|
|
16
16
|
display: 'flex',
|
|
17
17
|
flexShrink: 0,
|
|
18
|
+
boxShadow: react_components_1.tokens.shadow4,
|
|
19
|
+
zIndex: 1,
|
|
18
20
|
},
|
|
19
21
|
content: {
|
|
20
22
|
flex: '1',
|
|
@@ -34,7 +36,10 @@ const useStyles = (0, react_components_1.makeStyles)({
|
|
|
34
36
|
const NavigationContainer = ({ open, type, onOpenChange, }) => {
|
|
35
37
|
const styles = useStyles();
|
|
36
38
|
const { appExperience: app } = (0, app_1.useAppContext)();
|
|
37
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: styles.root, children: (0, jsx_runtime_1.jsx)(react_nav_preview_1.NavDrawer, { selectedValue: "active", open: open, type: type, onOpenChange: (value, data) => onOpenChange(data.open), children: (0, jsx_runtime_1.jsx)(react_nav_preview_1.NavDrawerBody, { style: {
|
|
39
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: styles.root, children: (0, jsx_runtime_1.jsx)(react_nav_preview_1.NavDrawer, { selectedValue: "active", open: open, type: type, onOpenChange: (value, data) => onOpenChange(data.open), children: (0, jsx_runtime_1.jsx)(react_nav_preview_1.NavDrawerBody, { style: {
|
|
40
|
+
paddingTop: 8,
|
|
41
|
+
// borderRight: `1px solid ${tokens.colorNeutralStroke1}`,
|
|
42
|
+
}, children: app.navItems.map((area) => ((0, jsx_runtime_1.jsx)(react_1.Fragment, { children: area.groups.map((group) => ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [!group.hideLabel && ((0, jsx_runtime_1.jsx)(react_nav_preview_1.NavSectionHeader, { children: group.label })), group.items.map((item, index) => ((0, jsx_runtime_1.jsx)(Test, { item: item, drawerType: type, onOpenChange: onOpenChange }, (item.label ?? '') + String(index))))] }, group.label))) }, area.label))) }) }) }));
|
|
38
43
|
};
|
|
39
44
|
exports.NavigationContainer = NavigationContainer;
|
|
40
45
|
const Test = ({ item, onOpenChange, drawerType }) => {
|
|
@@ -26,5 +26,9 @@ function TableCellChoice(props) {
|
|
|
26
26
|
width: props.width,
|
|
27
27
|
minWidth: props.width,
|
|
28
28
|
maxWidth: props.width,
|
|
29
|
-
}, children: (0, jsx_runtime_1.jsx)(react_components_1.
|
|
29
|
+
}, children: (0, jsx_runtime_1.jsx)(react_components_1.Badge, { style: {
|
|
30
|
+
backgroundColor: bgColor,
|
|
31
|
+
color,
|
|
32
|
+
fontWeight: react_components_1.tokens.fontWeightRegular,
|
|
33
|
+
}, children: props.formattedValue }) }));
|
|
30
34
|
}
|
package/PageBoard/PageBoard.js
CHANGED
|
@@ -25,8 +25,8 @@ function PageBoard(props) {
|
|
|
25
25
|
flexDirection: 'column',
|
|
26
26
|
flex: 1,
|
|
27
27
|
gap: react_components_1.tokens.spacingVerticalM,
|
|
28
|
-
padding: react_components_1.tokens.
|
|
29
|
-
background: react_components_1.tokens.
|
|
28
|
+
padding: react_components_1.tokens.spacingHorizontalM,
|
|
29
|
+
background: react_components_1.tokens.colorNeutralBackground2,
|
|
30
30
|
}, children: [(0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("div", { style: {
|
|
31
31
|
display: 'flex',
|
|
32
32
|
flexDirection: 'column',
|
|
@@ -225,7 +225,7 @@ function PageCalendar(props) {
|
|
|
225
225
|
flexDirection: 'column',
|
|
226
226
|
flex: 1,
|
|
227
227
|
gap: react_components_1.tokens.spacingVerticalM,
|
|
228
|
-
padding: react_components_1.tokens.
|
|
229
|
-
background: react_components_1.tokens.
|
|
228
|
+
padding: react_components_1.tokens.spacingHorizontalM,
|
|
229
|
+
background: react_components_1.tokens.colorNeutralBackground2,
|
|
230
230
|
}, children: [(0, jsx_runtime_1.jsx)(Header_1.Header, { filterForm: filterForm, onCreateButtonClick: handleCreateButtonClick }), (0, jsx_runtime_1.jsx)(CalendarSection, { startDate: currentStartDate, endDate: currentEndDate, viewType: viewType, onRangeChange: onRangeChange, events: events ?? [], onEventClick: handleEventClick, onDateSelect: handleDateSelect, loading: loading })] }) }));
|
|
231
231
|
}
|
|
@@ -18,12 +18,11 @@ dayjs_1.default.extend(timezone_1.default);
|
|
|
18
18
|
function DateControl({ value, onChange, id, name, onBlur, onFocus, placeholder, disabled, readOnly, }) {
|
|
19
19
|
const { dateFormats, timezone } = (0, locale_1.useLocale)();
|
|
20
20
|
const { datePickerStrings } = (0, AppStringContext_1.useAppStrings)();
|
|
21
|
-
return ((0, jsx_runtime_1.jsx)(react_datepicker_compat_1.DatePicker, { id: id, name: name, onFocus: () => onFocus?.(), onBlur: () => onBlur?.(), placeholder: placeholder, appearance: "filled-darker",
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
disabled: disabled, readOnly: readOnly, formatDate: (date) => date ? (0, dayjs_1.default)(date).tz(timezone).format(dateFormats.short) : '', value: value ? new Date(value) : null, onSelectDate: (date) => onChange?.(date ? (0, dayjs_1.default)(date).tz(timezone).startOf('day').toISOString() : null), strings: datePickerStrings, contentAfter: (0, jsx_runtime_1.jsx)("div", { style: {
|
|
21
|
+
return ((0, jsx_runtime_1.jsx)(react_datepicker_compat_1.DatePicker, { id: id, name: name, onFocus: () => onFocus?.(), onBlur: () => onBlur?.(), placeholder: placeholder, appearance: "filled-darker", disabled: disabled, readOnly: readOnly, formatDate: (date) => date ? (0, dayjs_1.default)(date).tz(timezone).format(dateFormats.short) : '', value: value ? new Date(value) : null, onSelectDate: (date) => {
|
|
22
|
+
onChange?.(date
|
|
23
|
+
? (0, dayjs_1.default)(date).tz(timezone, true).startOf('day').toISOString()
|
|
24
|
+
: null);
|
|
25
|
+
}, strings: datePickerStrings, contentAfter: (0, jsx_runtime_1.jsx)("div", { style: {
|
|
27
26
|
display: 'flex',
|
|
28
27
|
alignItems: 'center',
|
|
29
28
|
justifyContent: 'center',
|
|
@@ -43,8 +43,9 @@ function DateTimeControl({ value, onChange, id, name, onBlur, onFocus, placehold
|
|
|
43
43
|
onChange?.((0, dayjs_1.default)(date).tz(timezone, true).toISOString());
|
|
44
44
|
}
|
|
45
45
|
else {
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
const dateISOString = (0, dayjs_1.default)(date).tz(timezone, true).toISOString();
|
|
47
|
+
onChange?.((0, dayjs_1.default)(dateISOString)
|
|
48
|
+
.tz(timezone)
|
|
48
49
|
.set('hour', (0, dayjs_1.default)(value).tz(timezone).hour())
|
|
49
50
|
.set('minute', (0, dayjs_1.default)(value).tz(timezone).minute())
|
|
50
51
|
.toISOString());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@headless-adminapp/fluent",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"uuid": "11.0.3",
|
|
49
49
|
"yup": "^1.4.0"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "61978f1e2f0eac79069afa52511a5c8dde8b8ebc"
|
|
52
52
|
}
|