@koine/react 2.0.0-beta.5 → 2.0.0-beta.6
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/Alert/Alert.js +7 -3
- package/Alert/Alert.mjs +7 -3
- package/Alert/Alert.stories.js +4 -1
- package/Alert/Alert.stories.mjs +4 -1
- package/Animations/Reveal.js +5 -3
- package/Animations/Reveal.mjs +5 -3
- package/Animations/Underline.d.ts +1 -1
- package/Autocomplete/AutocompleteMui.js +57 -28
- package/Autocomplete/AutocompleteMui.mjs +57 -28
- package/Autocomplete/components.d.ts +12 -16
- package/Bg/BgColor.d.ts +2 -7
- package/Bg/BgColor.js +15 -10
- package/Bg/BgColor.mjs +15 -10
- package/Bg/BgPhoto.js +8 -6
- package/Bg/BgPhoto.mjs +8 -6
- package/Bg/BgSvg.js +8 -6
- package/Bg/BgSvg.mjs +8 -6
- package/Breadcrumbs/Breadcrumbs.js +30 -17
- package/Breadcrumbs/Breadcrumbs.mjs +30 -17
- package/Buttons/Button.d.ts +1 -1
- package/Buttons/ButtonComposite.js +52 -19
- package/Buttons/ButtonComposite.mjs +52 -19
- package/Buttons/ButtonFab.d.ts +1 -3
- package/Buttons/ButtonLink.js +3 -2
- package/Buttons/ButtonLink.mjs +3 -2
- package/Buttons/IconButton.d.ts +1 -3
- package/Calendar/CalendarDaygridCell.js +75 -52
- package/Calendar/CalendarDaygridCell.mjs +75 -52
- package/Calendar/CalendarDaygridNav.js +31 -17
- package/Calendar/CalendarDaygridNav.mjs +31 -17
- package/Calendar/CalendarDaygridTable.js +40 -15
- package/Calendar/CalendarDaygridTable.mjs +40 -15
- package/Calendar/CalendarLegend.js +20 -7
- package/Calendar/CalendarLegend.mjs +20 -7
- package/Carousel/CarouselCss.d.ts +2 -19
- package/Carousel/CarouselCss.js +10 -8
- package/Carousel/CarouselCss.mjs +10 -8
- package/Debug/Debug.js +4 -1
- package/Debug/Debug.mjs +4 -1
- package/Details/Details.js +27 -19
- package/Details/Details.mjs +27 -19
- package/Details/Details.stories.js +2 -1
- package/Details/Details.stories.mjs +2 -1
- package/Dialog/DialogMui.d.ts +9 -326
- package/Dialog/DialogMui.js +24 -11
- package/Dialog/DialogMui.mjs +24 -11
- package/Dialog/DialogMui.stories.js +2 -1
- package/Dialog/DialogMui.stories.mjs +2 -1
- package/Dialog/css/bare.d.ts +9 -327
- package/Dialog/css/index.stories.js +11 -3
- package/Dialog/css/index.stories.mjs +11 -3
- package/Dialog/m/bare.d.ts +2 -398
- package/Dialog/m/bare.js +114 -69
- package/Dialog/m/bare.mjs +114 -69
- package/Dialog/sc/bare.d.ts +27 -405
- package/Dialog/sc/framer.d.ts +15 -422
- package/Dialog/sc/framerMaterial.d.ts +15 -422
- package/Dialog/sc/index.stories.js +5 -4
- package/Dialog/sc/index.stories.mjs +5 -4
- package/Dialog/sc/material.d.ts +27 -405
- package/Dialog/tw/bare.d.ts +9 -327
- package/Dialog/tw/elegant.d.ts +9 -327
- package/Dialog/tw/framer.d.ts +3 -354
- package/Dialog/tw/framerMaterial.d.ts +3 -354
- package/Dialog/tw/index.stories.js +6 -5
- package/Dialog/tw/index.stories.mjs +6 -5
- package/Dialog/tw/material.d.ts +9 -327
- package/Editor/Editor--tiptap.js +29 -14
- package/Editor/Editor--tiptap.mjs +29 -14
- package/Editor/components.d.ts +3 -5
- package/FaviconTags.js +52 -38
- package/FaviconTags.mjs +52 -38
- package/Form/Form.js +33 -16
- package/Form/Form.mjs +33 -16
- package/Form/sc/bare.d.ts +11 -11
- package/Forms/Checkbox/Checkbox.d.ts +4 -4
- package/Forms/Checkbox/Checkbox.js +15 -1
- package/Forms/Checkbox/Checkbox.mjs +15 -1
- package/Forms/Feedback/Feedback.js +5 -3
- package/Forms/Feedback/Feedback.mjs +5 -3
- package/Forms/Field/Field.d.ts +2 -4
- package/Forms/Field/Field.js +11 -5
- package/Forms/Field/Field.mjs +11 -5
- package/Forms/Field/FieldControl.js +20 -6
- package/Forms/Field/FieldControl.mjs +20 -6
- package/Forms/Field/FieldHint.d.ts +1 -1
- package/Forms/Input/Input.d.ts +5 -5
- package/Forms/Input/Input.js +15 -7
- package/Forms/Input/Input.mjs +15 -7
- package/Forms/InputGroup/InputGroup.d.ts +4 -4
- package/Forms/InputGroup/InputGroup.js +17 -7
- package/Forms/InputGroup/InputGroup.mjs +17 -7
- package/Forms/Label/Label.d.ts +1 -1
- package/Forms/Password/Password.d.ts +1 -1
- package/Forms/Password/Password.js +25 -11
- package/Forms/Password/Password.mjs +25 -11
- package/Forms/Radio/Radio.js +30 -11
- package/Forms/Radio/Radio.mjs +30 -11
- package/Forms/Switch/Switch.d.ts +2 -2
- package/Forms/Switch/Switch.js +13 -1
- package/Forms/Switch/Switch.mjs +13 -1
- package/Forms/Textarea/Textarea.d.ts +1 -1
- package/Forms/Textarea/Textarea.js +15 -7
- package/Forms/Textarea/Textarea.mjs +15 -7
- package/Forms/Textarea/TextareaRich.js +20 -12
- package/Forms/Textarea/TextareaRich.mjs +20 -12
- package/Forms/Toggle/Toggle.d.ts +7 -7
- package/Forms/Toggle/Toggle.js +48 -29
- package/Forms/Toggle/Toggle.mjs +49 -30
- package/Forms/Toggle/useToggle.js +21 -15
- package/Forms/Toggle/useToggle.mjs +21 -15
- package/Forms/styles.d.ts +3 -7
- package/Forms/styles.js +2 -1
- package/Forms/styles.mjs +2 -1
- package/Grid/Grid.d.ts +4 -28
- package/Hamburger/Hamburger.js +24 -17
- package/Hamburger/Hamburger.mjs +25 -18
- package/Hidden/Hidden.d.ts +1 -1
- package/Img/sc/bare.d.ts +1 -1
- package/Link/Link.d.ts +1 -3
- package/Link/LinkBlank.d.ts +2 -5
- package/Link/LinkBlank.js +8 -1
- package/Link/LinkBlank.mjs +8 -1
- package/Menu/Menu.d.ts +1 -1
- package/MenuItem/MenuItem.d.ts +1 -4
- package/Meta/Meta.js +2 -1
- package/Meta/Meta.mjs +2 -1
- package/NoJs/NoJs.js +2 -1
- package/NoJs/NoJs.mjs +2 -1
- package/Pagination/PaginationNav.js +42 -23
- package/Pagination/PaginationNav.mjs +42 -23
- package/Pagination/PaginationResults.js +25 -20
- package/Pagination/PaginationResults.mjs +25 -20
- package/Pill/Pill.d.ts +4 -4
- package/Progress/ProgressCircular.js +14 -12
- package/Progress/ProgressCircular.mjs +14 -12
- package/Progress/ProgressLinear.js +21 -19
- package/Progress/ProgressLinear.mjs +21 -19
- package/Progress/ProgressOverlay.js +20 -14
- package/Progress/ProgressOverlay.mjs +20 -14
- package/Rating/Rating.d.ts +5 -5
- package/Rating/Rating.js +61 -35
- package/Rating/Rating.mjs +61 -35
- package/Select/components.d.ts +1 -1
- package/Select/components.js +5 -3
- package/Select/components.mjs +5 -3
- package/Sidebar/Sidebar.js +17 -8
- package/Sidebar/Sidebar.mjs +17 -8
- package/Spacing/Spacing.js +5 -2
- package/Spacing/Spacing.mjs +5 -2
- package/Sticky/StickyCss.js +2 -1
- package/Sticky/StickyCss.mjs +2 -1
- package/Tabs/TabsMui.d.ts +7 -296
- package/Tabs/TabsMui.js +11 -2
- package/Tabs/TabsMui.mjs +11 -2
- package/Tabs/TabsMui.stories.js +2 -1
- package/Tabs/TabsMui.stories.mjs +2 -1
- package/Tabs/tw/bare.d.ts +7 -296
- package/Tabs/tw/index.stories.js +3 -2
- package/Tabs/tw/index.stories.mjs +3 -2
- package/Tabs/tw/material.d.ts +7 -332
- package/Typography/CopyPasteVisible.d.ts +1 -1
- package/Typography/Native.d.ts +5 -5
- package/Typography/ReadMore.js +33 -18
- package/Typography/ReadMore.mjs +33 -18
- package/Typography/TextLoop.js +43 -35
- package/Typography/TextLoop.mjs +43 -35
- package/Typography/TypeStairs.js +27 -19
- package/Typography/TypeStairs.mjs +27 -19
- package/helpers/classed.stories.js +40 -22
- package/helpers/classed.stories.mjs +40 -22
- package/m/MotionProvider.js +5 -3
- package/m/MotionProvider.mjs +5 -3
- package/package.json +5 -25
- package/styles/Body.d.ts +2 -2
- package/styles/theme--vanilla.js +5 -3
- package/styles/theme--vanilla.mjs +5 -3
|
@@ -9,6 +9,7 @@ Object.defineProperty(exports, "KoineCalendarDaygridNav", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
12
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
12
13
|
const _format = /*#__PURE__*/ _interop_require_default._(require("date-fns/format"));
|
|
13
14
|
const _useDateLocale = require("../hooks/useDateLocale");
|
|
14
15
|
const KoineCalendarDaygridNav = ({ range, view, todayInView, handlePrev, handleNext, handleToday, handleView, locale: localeCode, NavRoot = "nav", NavTitle = "div", NavBtns = "div", NavBtnPrev = "button", NavBtnNext = "button", NavBtnToday = "button", NavBtnViewMonth = "button", NavBtnViewWeek = "button" })=>{
|
|
@@ -29,21 +30,34 @@ const KoineCalendarDaygridNav = ({ range, view, todayInView, handlePrev, handleN
|
|
|
29
30
|
formatted = `${(0, _format.default)(start, "d MMMM", opts)} - ${(0, _format.default)(end, "d MMMM yyyy", opts)}`;
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
|
-
return /*#__PURE__*/
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
33
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(NavRoot, {
|
|
34
|
+
children: [
|
|
35
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)(NavBtns, {
|
|
36
|
+
children: [
|
|
37
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(NavBtnPrev, {
|
|
38
|
+
onClick: handlePrev
|
|
39
|
+
}),
|
|
40
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(NavBtnNext, {
|
|
41
|
+
onClick: handleNext
|
|
42
|
+
}),
|
|
43
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(NavBtnToday, {
|
|
44
|
+
onClick: handleToday,
|
|
45
|
+
disabled: todayInView
|
|
46
|
+
}),
|
|
47
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(NavBtnViewMonth, {
|
|
48
|
+
onClick: ()=>handleView("month"),
|
|
49
|
+
disabled: view === "month"
|
|
50
|
+
}),
|
|
51
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(NavBtnViewWeek, {
|
|
52
|
+
onClick: ()=>handleView("week"),
|
|
53
|
+
disabled: view === "week"
|
|
54
|
+
})
|
|
55
|
+
]
|
|
56
|
+
}),
|
|
57
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(NavTitle, {
|
|
58
|
+
range: range,
|
|
59
|
+
formatted: formatted
|
|
60
|
+
})
|
|
61
|
+
]
|
|
62
|
+
});
|
|
49
63
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import format from "date-fns/format";
|
|
2
3
|
import { useDateLocale } from "../hooks/useDateLocale";
|
|
3
4
|
export const KoineCalendarDaygridNav = ({ range, view, todayInView, handlePrev, handleNext, handleToday, handleView, locale: localeCode, NavRoot = "nav", NavTitle = "div", NavBtns = "div", NavBtnPrev = "button", NavBtnNext = "button", NavBtnToday = "button", NavBtnViewMonth = "button", NavBtnViewWeek = "button" })=>{
|
|
@@ -18,21 +19,34 @@ export const KoineCalendarDaygridNav = ({ range, view, todayInView, handlePrev,
|
|
|
18
19
|
formatted = `${format(start, "d MMMM", opts)} - ${format(end, "d MMMM yyyy", opts)}`;
|
|
19
20
|
}
|
|
20
21
|
}
|
|
21
|
-
return /*#__PURE__*/
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
22
|
+
return /*#__PURE__*/ _jsxs(NavRoot, {
|
|
23
|
+
children: [
|
|
24
|
+
/*#__PURE__*/ _jsxs(NavBtns, {
|
|
25
|
+
children: [
|
|
26
|
+
/*#__PURE__*/ _jsx(NavBtnPrev, {
|
|
27
|
+
onClick: handlePrev
|
|
28
|
+
}),
|
|
29
|
+
/*#__PURE__*/ _jsx(NavBtnNext, {
|
|
30
|
+
onClick: handleNext
|
|
31
|
+
}),
|
|
32
|
+
/*#__PURE__*/ _jsx(NavBtnToday, {
|
|
33
|
+
onClick: handleToday,
|
|
34
|
+
disabled: todayInView
|
|
35
|
+
}),
|
|
36
|
+
/*#__PURE__*/ _jsx(NavBtnViewMonth, {
|
|
37
|
+
onClick: ()=>handleView("month"),
|
|
38
|
+
disabled: view === "month"
|
|
39
|
+
}),
|
|
40
|
+
/*#__PURE__*/ _jsx(NavBtnViewWeek, {
|
|
41
|
+
onClick: ()=>handleView("week"),
|
|
42
|
+
disabled: view === "week"
|
|
43
|
+
})
|
|
44
|
+
]
|
|
45
|
+
}),
|
|
46
|
+
/*#__PURE__*/ _jsx(NavTitle, {
|
|
47
|
+
range: range,
|
|
48
|
+
formatted: formatted
|
|
49
|
+
})
|
|
50
|
+
]
|
|
51
|
+
});
|
|
38
52
|
};
|
|
@@ -9,6 +9,7 @@ Object.defineProperty(exports, "KoineCalendarDaygridTable", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
12
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
12
13
|
const _eachWeekOfInterval = /*#__PURE__*/ _interop_require_default._(require("date-fns/eachWeekOfInterval"));
|
|
13
14
|
const _react = require("react");
|
|
14
15
|
const _reactswipeable = require("react-swipeable");
|
|
@@ -83,19 +84,43 @@ const KoineCalendarDaygridTable = ({ locale: localeCode, handlePrev, handleNext,
|
|
|
83
84
|
locale,
|
|
84
85
|
dayLabels
|
|
85
86
|
]);
|
|
86
|
-
return /*#__PURE__*/
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
87
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(Table, {
|
|
88
|
+
...swipeableHandlers,
|
|
89
|
+
children: [
|
|
90
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(TableHead, {
|
|
91
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("tr", {
|
|
92
|
+
children: days.map((day)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(TableHeadCell, {
|
|
93
|
+
scope: "column",
|
|
94
|
+
children: day
|
|
95
|
+
}, day))
|
|
96
|
+
})
|
|
97
|
+
}),
|
|
98
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(TableBody, {
|
|
99
|
+
children: weeksEvents.map((week, i)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(TableBodyRow, {
|
|
100
|
+
...week.props,
|
|
101
|
+
children: week.days.map((day)=>/*#__PURE__*/ (0, _jsxruntime.jsxs)(TableBodyCell, {
|
|
102
|
+
...day.props,
|
|
103
|
+
children: [
|
|
104
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(TableBodyCellDate, {
|
|
105
|
+
...day.props,
|
|
106
|
+
children: day.label
|
|
107
|
+
}),
|
|
108
|
+
day.events.length > 0 && /*#__PURE__*/ (0, _jsxruntime.jsx)(_CalendarDaygridCell.CalendarDaygridCell, {
|
|
109
|
+
eventClicked,
|
|
110
|
+
setEventClicked,
|
|
111
|
+
eventHovered,
|
|
112
|
+
setEventHovered,
|
|
113
|
+
view,
|
|
114
|
+
maxEvents,
|
|
115
|
+
events: day.events,
|
|
116
|
+
timestamp: day.timestamp,
|
|
117
|
+
calendarsMap,
|
|
118
|
+
...restKoine
|
|
119
|
+
})
|
|
120
|
+
]
|
|
121
|
+
}))
|
|
122
|
+
}))
|
|
123
|
+
})
|
|
124
|
+
]
|
|
125
|
+
});
|
|
101
126
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import eachWeekOfInterval from "date-fns/eachWeekOfInterval";
|
|
2
3
|
import { useEffect, useMemo, useState } from "react";
|
|
3
4
|
import { useSwipeable } from "react-swipeable";
|
|
@@ -72,19 +73,43 @@ export const KoineCalendarDaygridTable = ({ locale: localeCode, handlePrev, hand
|
|
|
72
73
|
locale,
|
|
73
74
|
dayLabels
|
|
74
75
|
]);
|
|
75
|
-
return /*#__PURE__*/
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
76
|
+
return /*#__PURE__*/ _jsxs(Table, {
|
|
77
|
+
...swipeableHandlers,
|
|
78
|
+
children: [
|
|
79
|
+
/*#__PURE__*/ _jsx(TableHead, {
|
|
80
|
+
children: /*#__PURE__*/ _jsx("tr", {
|
|
81
|
+
children: days.map((day)=>/*#__PURE__*/ _jsx(TableHeadCell, {
|
|
82
|
+
scope: "column",
|
|
83
|
+
children: day
|
|
84
|
+
}, day))
|
|
85
|
+
})
|
|
86
|
+
}),
|
|
87
|
+
/*#__PURE__*/ _jsx(TableBody, {
|
|
88
|
+
children: weeksEvents.map((week, i)=>/*#__PURE__*/ _jsx(TableBodyRow, {
|
|
89
|
+
...week.props,
|
|
90
|
+
children: week.days.map((day)=>/*#__PURE__*/ _jsxs(TableBodyCell, {
|
|
91
|
+
...day.props,
|
|
92
|
+
children: [
|
|
93
|
+
/*#__PURE__*/ _jsx(TableBodyCellDate, {
|
|
94
|
+
...day.props,
|
|
95
|
+
children: day.label
|
|
96
|
+
}),
|
|
97
|
+
day.events.length > 0 && /*#__PURE__*/ _jsx(CalendarDaygridCell, {
|
|
98
|
+
eventClicked,
|
|
99
|
+
setEventClicked,
|
|
100
|
+
eventHovered,
|
|
101
|
+
setEventHovered,
|
|
102
|
+
view,
|
|
103
|
+
maxEvents,
|
|
104
|
+
events: day.events,
|
|
105
|
+
timestamp: day.timestamp,
|
|
106
|
+
calendarsMap,
|
|
107
|
+
...restKoine
|
|
108
|
+
})
|
|
109
|
+
]
|
|
110
|
+
}))
|
|
111
|
+
}))
|
|
112
|
+
})
|
|
113
|
+
]
|
|
114
|
+
});
|
|
90
115
|
};
|
|
@@ -8,6 +8,7 @@ Object.defineProperty(exports, "KoineCalendarLegend", {
|
|
|
8
8
|
return KoineCalendarLegend;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
11
12
|
const KoineCalendarLegend = ({ calendarsMap = {}, toggleCalendarVisibility, LegendItem = "div", LegendItemStatus = "span", LegendItemLabel = "span", LegendItemEvents = "span" })=>{
|
|
12
13
|
// const sorted = Object.entries(calendarsMap).sort((a, b) => {
|
|
13
14
|
// const { name: nameA } = a[1];
|
|
@@ -16,11 +17,23 @@ const KoineCalendarLegend = ({ calendarsMap = {}, toggleCalendarVisibility, Lege
|
|
|
16
17
|
// else if (nameA > nameB) return 1;
|
|
17
18
|
// else return 0;
|
|
18
19
|
// });
|
|
19
|
-
return /*#__PURE__*/
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
|
|
21
|
+
children: Object.entries(calendarsMap).map(([id, calendar])=>/*#__PURE__*/ (0, _jsxruntime.jsxs)(LegendItem, {
|
|
22
|
+
onClick: ()=>toggleCalendarVisibility(id),
|
|
23
|
+
$color: calendar.color,
|
|
24
|
+
$empty: calendar.events === 0,
|
|
25
|
+
disabled: calendar.events === 0,
|
|
26
|
+
children: [
|
|
27
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(LegendItemStatus, {
|
|
28
|
+
children: calendar.on ? "\u2b24" : "\u2b58"
|
|
29
|
+
}),
|
|
30
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(LegendItemLabel, {
|
|
31
|
+
children: calendar.name
|
|
32
|
+
}),
|
|
33
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(LegendItemEvents, {
|
|
34
|
+
children: calendar.events
|
|
35
|
+
})
|
|
36
|
+
]
|
|
37
|
+
}, "CalendarLegend." + id))
|
|
38
|
+
});
|
|
26
39
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
1
2
|
export const KoineCalendarLegend = ({ calendarsMap = {}, toggleCalendarVisibility, LegendItem = "div", LegendItemStatus = "span", LegendItemLabel = "span", LegendItemEvents = "span" })=>{
|
|
2
3
|
// const sorted = Object.entries(calendarsMap).sort((a, b) => {
|
|
3
4
|
// const { name: nameA } = a[1];
|
|
@@ -6,11 +7,23 @@ export const KoineCalendarLegend = ({ calendarsMap = {}, toggleCalendarVisibilit
|
|
|
6
7
|
// else if (nameA > nameB) return 1;
|
|
7
8
|
// else return 0;
|
|
8
9
|
// });
|
|
9
|
-
return /*#__PURE__*/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
return /*#__PURE__*/ _jsx(_Fragment, {
|
|
11
|
+
children: Object.entries(calendarsMap).map(([id, calendar])=>/*#__PURE__*/ _jsxs(LegendItem, {
|
|
12
|
+
onClick: ()=>toggleCalendarVisibility(id),
|
|
13
|
+
$color: calendar.color,
|
|
14
|
+
$empty: calendar.events === 0,
|
|
15
|
+
disabled: calendar.events === 0,
|
|
16
|
+
children: [
|
|
17
|
+
/*#__PURE__*/ _jsx(LegendItemStatus, {
|
|
18
|
+
children: calendar.on ? "\u2b24" : "\u2b58"
|
|
19
|
+
}),
|
|
20
|
+
/*#__PURE__*/ _jsx(LegendItemLabel, {
|
|
21
|
+
children: calendar.name
|
|
22
|
+
}),
|
|
23
|
+
/*#__PURE__*/ _jsx(LegendItemEvents, {
|
|
24
|
+
children: calendar.events
|
|
25
|
+
})
|
|
26
|
+
]
|
|
27
|
+
}, "CalendarLegend." + id))
|
|
28
|
+
});
|
|
16
29
|
};
|
|
@@ -1,24 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ColProps, RowProps } from "../Grid";
|
|
3
|
-
export declare const CarouselCssRow:
|
|
4
|
-
|
|
5
|
-
$reverse?: "min:xs" | "min:sm" | "min:md" | "min:lg" | "min:xl" | "min:xxl" | "max:xs" | "max:sm" | "max:md" | "max:lg" | "max:xl" | "max:xxl" | undefined;
|
|
6
|
-
$noWrap?: boolean | undefined;
|
|
7
|
-
} & {
|
|
8
|
-
$valign?: import("csstype").Property.AlignItems | undefined;
|
|
9
|
-
$reverse?: "min:xs" | "min:sm" | "min:md" | "min:lg" | "min:xl" | "min:xxl" | "max:xs" | "max:sm" | "max:md" | "max:lg" | "max:xl" | "max:xxl" | undefined;
|
|
10
|
-
$noWrap?: boolean | undefined;
|
|
11
|
-
$gutter: "normal" | "double" | "quarter" | "third" | "half" | "triple";
|
|
12
|
-
}, never>;
|
|
13
|
-
export declare const CarouselCssCol: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, import("../Grid").GridProps & Partial<Record<import("../styles").Breakpoint, number>> & {
|
|
14
|
-
$width?: number | undefined;
|
|
15
|
-
$flex?: boolean | undefined;
|
|
16
|
-
$valign?: import("csstype").Property.AlignItems | undefined;
|
|
17
|
-
$auto?: boolean | undefined;
|
|
18
|
-
$offset?: string | undefined;
|
|
19
|
-
} & Pick<KoineCarouselCssProps, "$snap"> & {
|
|
20
|
-
$width: KoineCarouselCssProps["width"];
|
|
21
|
-
}, never>;
|
|
3
|
+
export declare const CarouselCssRow: any;
|
|
4
|
+
export declare const CarouselCssCol: any;
|
|
22
5
|
export type KoineCarouselCssProps = ColProps & {
|
|
23
6
|
/**
|
|
24
7
|
* Override the `<Row>` gutter, if not specified `$gutter` prop is used
|
package/Carousel/CarouselCss.js
CHANGED
|
@@ -21,6 +21,7 @@ _export(exports, {
|
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
23
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
24
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
24
25
|
const _react = require("react");
|
|
25
26
|
const _styledcomponents = /*#__PURE__*/ _interop_require_default._(require("styled-components"));
|
|
26
27
|
const _Grid = require("../Grid");
|
|
@@ -50,13 +51,14 @@ const KoineCarouselCss = ({ items, $gutterRow, $gutterCol, $gutter = "quarter",
|
|
|
50
51
|
const slides = children ? _react.Children.toArray(children) : items;
|
|
51
52
|
const id = (0, _react.useId)();
|
|
52
53
|
if (!slides) return null;
|
|
53
|
-
return /*#__PURE__*/
|
|
54
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(CarouselCssRow, {
|
|
54
55
|
$noWrap: true,
|
|
55
|
-
$gutter: $gutterRow || $gutter
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
56
|
+
$gutter: $gutterRow || $gutter,
|
|
57
|
+
children: slides.map((_slide, idx)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(CarouselCssCol, {
|
|
58
|
+
...colProps,
|
|
59
|
+
$gutter: $gutterCol || $gutter,
|
|
60
|
+
$width: width,
|
|
61
|
+
children: slides[idx]
|
|
62
|
+
}, `CarouselCssCol-${id}-${idx}`))
|
|
63
|
+
});
|
|
62
64
|
};
|
package/Carousel/CarouselCss.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="csstype" />
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
3
|
import { Children, useId } from "react";
|
|
3
4
|
import styled from "styled-components";
|
|
4
5
|
import { Col, GRID_GUTTER_DEFAULT as DF, Row } from "../Grid";
|
|
@@ -30,13 +31,14 @@ export const CarouselCssCol = styled(Col)`
|
|
|
30
31
|
const slides = children ? Children.toArray(children) : items;
|
|
31
32
|
const id = useId();
|
|
32
33
|
if (!slides) return null;
|
|
33
|
-
return /*#__PURE__*/
|
|
34
|
+
return /*#__PURE__*/ _jsx(CarouselCssRow, {
|
|
34
35
|
$noWrap: true,
|
|
35
|
-
$gutter: $gutterRow || $gutter
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
$gutter: $gutterRow || $gutter,
|
|
37
|
+
children: slides.map((_slide, idx)=>/*#__PURE__*/ _jsx(CarouselCssCol, {
|
|
38
|
+
...colProps,
|
|
39
|
+
$gutter: $gutterCol || $gutter,
|
|
40
|
+
$width: width,
|
|
41
|
+
children: slides[idx]
|
|
42
|
+
}, `CarouselCssCol-${id}-${idx}`))
|
|
43
|
+
});
|
|
42
44
|
};
|
package/Debug/Debug.js
CHANGED
|
@@ -9,6 +9,7 @@ Object.defineProperty(exports, "Debug", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
12
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
12
13
|
const _styledcomponents = /*#__PURE__*/ _interop_require_default._(require("styled-components"));
|
|
13
14
|
const Root = _styledcomponents.default.div`
|
|
14
15
|
background: #f4f4f4;
|
|
@@ -27,5 +28,7 @@ const Root = _styledcomponents.default.div`
|
|
|
27
28
|
word-wrap: break-word;
|
|
28
29
|
`;
|
|
29
30
|
const Debug = ({ data })=>{
|
|
30
|
-
return /*#__PURE__*/
|
|
31
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(Root, {
|
|
32
|
+
children: JSON.stringify(data, undefined, 2)
|
|
33
|
+
});
|
|
31
34
|
};
|
package/Debug/Debug.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import styled from "styled-components";
|
|
2
3
|
const Root = styled.div`
|
|
3
4
|
background: #f4f4f4;
|
|
@@ -16,5 +17,7 @@ const Root = styled.div`
|
|
|
16
17
|
word-wrap: break-word;
|
|
17
18
|
`;
|
|
18
19
|
export const Debug = ({ data })=>{
|
|
19
|
-
return /*#__PURE__*/
|
|
20
|
+
return /*#__PURE__*/ _jsx(Root, {
|
|
21
|
+
children: JSON.stringify(data, undefined, 2)
|
|
22
|
+
});
|
|
20
23
|
};
|
package/Details/Details.js
CHANGED
|
@@ -25,6 +25,7 @@ _export(exports, {
|
|
|
25
25
|
return KoineDetails;
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
28
29
|
const _react = require("react");
|
|
29
30
|
const _helpers = require("../helpers");
|
|
30
31
|
const _useWindowSize = require("../hooks/useWindowSize");
|
|
@@ -80,26 +81,33 @@ const Content = "div";
|
|
|
80
81
|
hash,
|
|
81
82
|
isControlled
|
|
82
83
|
]);
|
|
83
|
-
return /*#__PURE__*/
|
|
84
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(Root, {
|
|
84
85
|
...props,
|
|
85
|
-
open: open || false
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
86
|
+
open: open || false,
|
|
87
|
+
children: [
|
|
88
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(Summary, {
|
|
89
|
+
$open: open,
|
|
90
|
+
onClick: handleClick,
|
|
91
|
+
children: summary || " "
|
|
92
|
+
}),
|
|
93
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(Body, {
|
|
94
|
+
$open: open,
|
|
95
|
+
style: {
|
|
96
|
+
overflow
|
|
97
|
+
},
|
|
98
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(Content, {
|
|
99
|
+
// ref={content}
|
|
100
|
+
$open: open,
|
|
101
|
+
// aria-expanded={open}
|
|
102
|
+
// aria-label={open ? ariaCollapse : ariaExpand}
|
|
103
|
+
style: {
|
|
104
|
+
pointerEvents: open ? "all" : "none"
|
|
105
|
+
},
|
|
106
|
+
children: children
|
|
107
|
+
})
|
|
108
|
+
})
|
|
109
|
+
]
|
|
110
|
+
});
|
|
103
111
|
});
|
|
104
112
|
const KoineDetails = (0, _helpers.extendComponent)(DetailsWithRef, {
|
|
105
113
|
Root,
|
package/Details/Details.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import { forwardRef, useCallback, useEffect, useId, useRef, useState } from "react";
|
|
2
3
|
import { extendComponent } from "../helpers";
|
|
3
4
|
import { useWindowSize } from "../hooks/useWindowSize";
|
|
@@ -53,26 +54,33 @@ export const Content = "div";
|
|
|
53
54
|
hash,
|
|
54
55
|
isControlled
|
|
55
56
|
]);
|
|
56
|
-
return /*#__PURE__*/
|
|
57
|
+
return /*#__PURE__*/ _jsxs(Root, {
|
|
57
58
|
...props,
|
|
58
|
-
open: open || false
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
59
|
+
open: open || false,
|
|
60
|
+
children: [
|
|
61
|
+
/*#__PURE__*/ _jsx(Summary, {
|
|
62
|
+
$open: open,
|
|
63
|
+
onClick: handleClick,
|
|
64
|
+
children: summary || " "
|
|
65
|
+
}),
|
|
66
|
+
/*#__PURE__*/ _jsx(Body, {
|
|
67
|
+
$open: open,
|
|
68
|
+
style: {
|
|
69
|
+
overflow
|
|
70
|
+
},
|
|
71
|
+
children: /*#__PURE__*/ _jsx(Content, {
|
|
72
|
+
// ref={content}
|
|
73
|
+
$open: open,
|
|
74
|
+
// aria-expanded={open}
|
|
75
|
+
// aria-label={open ? ariaCollapse : ariaExpand}
|
|
76
|
+
style: {
|
|
77
|
+
pointerEvents: open ? "all" : "none"
|
|
78
|
+
},
|
|
79
|
+
children: children
|
|
80
|
+
})
|
|
81
|
+
})
|
|
82
|
+
]
|
|
83
|
+
});
|
|
76
84
|
});
|
|
77
85
|
export const KoineDetails = extendComponent(DetailsWithRef, {
|
|
78
86
|
Root,
|
|
@@ -16,6 +16,7 @@ _export(exports, {
|
|
|
16
16
|
return Bare;
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
19
20
|
const _stories = require("@koine/stories");
|
|
20
21
|
const _Details = require("./Details");
|
|
21
22
|
const _default = {
|
|
@@ -25,7 +26,7 @@ const _default = {
|
|
|
25
26
|
};
|
|
26
27
|
const BareTemplate = (args)=>{
|
|
27
28
|
// return <StoryDetails {...args} Details={KoineDetails} />;
|
|
28
|
-
return /*#__PURE__*/
|
|
29
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_stories.StoryDetails, {
|
|
29
30
|
...args,
|
|
30
31
|
Details: _Details.KoineDetails
|
|
31
32
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { StoryDetails, storyDetailsMeta } from "@koine/stories";
|
|
2
3
|
import { KoineDetails } from "./Details";
|
|
3
4
|
export default {
|
|
@@ -7,7 +8,7 @@ export default {
|
|
|
7
8
|
};
|
|
8
9
|
const BareTemplate = (args)=>{
|
|
9
10
|
// return <StoryDetails {...args} Details={KoineDetails} />;
|
|
10
|
-
return /*#__PURE__*/
|
|
11
|
+
return /*#__PURE__*/ _jsx(StoryDetails, {
|
|
11
12
|
...args,
|
|
12
13
|
Details: KoineDetails
|
|
13
14
|
});
|