@cocso-ui/react 1.10.1 → 1.12.0
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/cjs/components/breadcrumb/breadcrumb.d.ts +24 -3
- package/dist/cjs/components/breadcrumb/breadcrumb.js +44 -2
- package/dist/cjs/components/breadcrumb/breadcrumb.module.css.js +2 -2
- package/dist/cjs/components/card/card.d.ts +49 -2
- package/dist/cjs/components/card/card.js +76 -10
- package/dist/cjs/components/card/card.module.css.js +2 -2
- package/dist/cjs/components/copy-button/copy-button.d.ts +29 -0
- package/dist/cjs/components/copy-button/copy-button.js +67 -0
- package/dist/cjs/components/date-time-picker/date-time-picker.js +99 -76
- package/dist/cjs/components/day-picker/day-picker.js +24 -137
- package/dist/cjs/components/day-picker/day-picker.module.css.js +2 -2
- package/dist/cjs/components/empty-state/empty-state.d.ts +30 -0
- package/dist/cjs/components/empty-state/empty-state.js +50 -0
- package/dist/cjs/components/empty-state/empty-state.module.css.js +9 -0
- package/dist/cjs/components/file-uploader/file-uploader.d.ts +80 -0
- package/dist/cjs/components/file-uploader/file-uploader.js +258 -0
- package/dist/cjs/components/file-uploader/file-uploader.module.css.js +9 -0
- package/dist/cjs/components/form-field/form-field-context.d.ts +31 -0
- package/dist/cjs/components/form-field/form-field-context.js +53 -0
- package/dist/cjs/components/form-field/form-field-parts.d.ts +52 -0
- package/dist/cjs/components/form-field/form-field-parts.js +109 -0
- package/dist/cjs/components/form-field/form-field.d.ts +44 -0
- package/dist/cjs/components/form-field/form-field.js +61 -0
- package/dist/cjs/components/form-field/form-field.module.css.js +9 -0
- package/dist/cjs/components/info-popover/info-popover.d.ts +43 -0
- package/dist/cjs/components/info-popover/info-popover.js +57 -0
- package/dist/cjs/components/info-popover/info-popover.module.css.js +9 -0
- package/dist/cjs/components/loading-overlay/loading-overlay.d.ts +33 -0
- package/dist/cjs/components/loading-overlay/loading-overlay.js +68 -0
- package/dist/cjs/components/loading-overlay/loading-overlay.module.css.js +9 -0
- package/dist/cjs/components/number-input/number-input.d.ts +39 -0
- package/dist/cjs/components/number-input/number-input.js +167 -0
- package/dist/cjs/components/picker/year-month-view.js +216 -0
- package/dist/cjs/components/picker/year-month-view.module.css.js +9 -0
- package/dist/cjs/components/section-header/section-header.d.ts +48 -0
- package/dist/cjs/components/section-header/section-header.js +210 -0
- package/dist/cjs/components/section-header/section-header.module.css.js +9 -0
- package/dist/cjs/components/segmented-control/segmented-control.d.ts +55 -0
- package/dist/cjs/components/segmented-control/segmented-control.js +119 -0
- package/dist/cjs/components/segmented-control/segmented-control.module.css.js +9 -0
- package/dist/cjs/components/selection-chip/selection-chip.d.ts +22 -0
- package/dist/cjs/components/selection-chip/selection-chip.js +32 -0
- package/dist/cjs/components/selection-chip/selection-chip.module.css.js +9 -0
- package/dist/cjs/components/skeleton/skeleton.d.ts +7 -1
- package/dist/cjs/components/skeleton/skeleton.js +20 -2
- package/dist/cjs/components/skeleton/skeleton.module.css.js +1 -1
- package/dist/cjs/components/summary-card/summary-card.d.ts +47 -0
- package/dist/cjs/components/summary-card/summary-card.js +89 -0
- package/dist/cjs/components/summary-card/summary-card.module.css.js +9 -0
- package/dist/cjs/index.d.ts +15 -2
- package/dist/cjs/index.js +24 -0
- package/dist/esm/components/breadcrumb/breadcrumb.d.mts +24 -3
- package/dist/esm/components/breadcrumb/breadcrumb.mjs +44 -2
- package/dist/esm/components/breadcrumb/breadcrumb.module.css.mjs +1 -1
- package/dist/esm/components/card/card.d.mts +49 -2
- package/dist/esm/components/card/card.mjs +76 -10
- package/dist/esm/components/card/card.module.css.mjs +1 -1
- package/dist/esm/components/copy-button/copy-button.d.mts +29 -0
- package/dist/esm/components/copy-button/copy-button.mjs +65 -0
- package/dist/esm/components/date-time-picker/date-time-picker.mjs +99 -76
- package/dist/esm/components/day-picker/day-picker.mjs +27 -140
- package/dist/esm/components/day-picker/day-picker.module.css.mjs +1 -1
- package/dist/esm/components/empty-state/empty-state.d.mts +30 -0
- package/dist/esm/components/empty-state/empty-state.mjs +48 -0
- package/dist/esm/components/empty-state/empty-state.module.css.mjs +3 -0
- package/dist/esm/components/file-uploader/file-uploader.d.mts +80 -0
- package/dist/esm/components/file-uploader/file-uploader.mjs +256 -0
- package/dist/esm/components/file-uploader/file-uploader.module.css.mjs +3 -0
- package/dist/esm/components/form-field/form-field-context.d.mts +31 -0
- package/dist/esm/components/form-field/form-field-context.mjs +49 -0
- package/dist/esm/components/form-field/form-field-parts.d.mts +52 -0
- package/dist/esm/components/form-field/form-field-parts.mjs +105 -0
- package/dist/esm/components/form-field/form-field.d.mts +44 -0
- package/dist/esm/components/form-field/form-field.mjs +59 -0
- package/dist/esm/components/form-field/form-field.module.css.mjs +3 -0
- package/dist/esm/components/info-popover/info-popover.d.mts +43 -0
- package/dist/esm/components/info-popover/info-popover.mjs +55 -0
- package/dist/esm/components/info-popover/info-popover.module.css.mjs +3 -0
- package/dist/esm/components/loading-overlay/loading-overlay.d.mts +33 -0
- package/dist/esm/components/loading-overlay/loading-overlay.mjs +66 -0
- package/dist/esm/components/loading-overlay/loading-overlay.module.css.mjs +3 -0
- package/dist/esm/components/number-input/number-input.d.mts +39 -0
- package/dist/esm/components/number-input/number-input.mjs +165 -0
- package/dist/esm/components/picker/year-month-view.mjs +212 -0
- package/dist/esm/components/picker/year-month-view.module.css.mjs +3 -0
- package/dist/esm/components/section-header/section-header.d.mts +48 -0
- package/dist/esm/components/section-header/section-header.mjs +208 -0
- package/dist/esm/components/section-header/section-header.module.css.mjs +3 -0
- package/dist/esm/components/segmented-control/segmented-control.d.mts +55 -0
- package/dist/esm/components/segmented-control/segmented-control.mjs +117 -0
- package/dist/esm/components/segmented-control/segmented-control.module.css.mjs +3 -0
- package/dist/esm/components/selection-chip/selection-chip.d.mts +22 -0
- package/dist/esm/components/selection-chip/selection-chip.mjs +30 -0
- package/dist/esm/components/selection-chip/selection-chip.module.css.mjs +3 -0
- package/dist/esm/components/skeleton/skeleton.d.mts +7 -1
- package/dist/esm/components/skeleton/skeleton.mjs +20 -2
- package/dist/esm/components/summary-card/summary-card.d.mts +47 -0
- package/dist/esm/components/summary-card/summary-card.mjs +87 -0
- package/dist/esm/components/summary-card/summary-card.module.css.mjs +3 -0
- package/dist/esm/index.css +2 -2
- package/dist/esm/index.d.mts +15 -2
- package/dist/esm/index.mjs +12 -0
- package/package.json +1 -1
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var react = require('react');
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var input = require('../input/input.js');
|
|
7
|
+
|
|
8
|
+
const NON_NUMERIC = /[^0-9.]/g;
|
|
9
|
+
const ALL_POINTS = /\./g;
|
|
10
|
+
const LEADING_ZEROS = /^0+(?=\d)/;
|
|
11
|
+
const THOUSANDS = /\B(?=(\d{3})+(?!\d))/g;
|
|
12
|
+
const GROUP_SEPARATORS = /,/g;
|
|
13
|
+
const NUMERIC_CHAR = /[0-9.]/;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Keeps digits and the decimal point, plus a leading `-`.
|
|
17
|
+
*
|
|
18
|
+
* With `maxFractionDigits` 0 the point is dropped; otherwise only the first
|
|
19
|
+
* point survives and the fraction is cut to length. Leading zeros on the
|
|
20
|
+
* integer part go too, so typing after a prefilled `0` gives `5`, not `05`.
|
|
21
|
+
*/
|
|
22
|
+
function sanitizeNumeric(raw, maxFractionDigits) {
|
|
23
|
+
const sign = raw.trimStart().startsWith("-") ? "-" : "";
|
|
24
|
+
let cleaned = raw.replace(NON_NUMERIC, "");
|
|
25
|
+
if (maxFractionDigits === 0) {
|
|
26
|
+
cleaned = cleaned.replace(ALL_POINTS, "");
|
|
27
|
+
} else {
|
|
28
|
+
const dot = cleaned.indexOf(".");
|
|
29
|
+
if (dot !== -1) {
|
|
30
|
+
const integer = cleaned.slice(0, dot);
|
|
31
|
+
const fraction = cleaned.slice(dot + 1).replace(ALL_POINTS, "").slice(0, maxFractionDigits);
|
|
32
|
+
cleaned = `${integer}.${fraction}`;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
// "0123" becomes "123"; the zero in "0" and "0.5" stays.
|
|
36
|
+
cleaned = cleaned.replace(LEADING_ZEROS, "");
|
|
37
|
+
return `${sign}${cleaned}`;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** Groups the integer part in thousands. The sign and fraction are kept as they are. */
|
|
41
|
+
function formatWithGrouping(numeric) {
|
|
42
|
+
const sign = numeric.startsWith("-") ? "-" : "";
|
|
43
|
+
const [integer = "", fraction] = numeric.slice(sign.length).split(".");
|
|
44
|
+
const grouped = integer.replace(THOUSANDS, ",");
|
|
45
|
+
return fraction === undefined ? `${sign}${grouped}` : `${sign}${grouped}.${fraction}`;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** Display text to a number; `null` when it is empty or not yet a number. */
|
|
49
|
+
function parseNumeric(display) {
|
|
50
|
+
const numeric = display.replace(GROUP_SEPARATORS, "");
|
|
51
|
+
if (numeric === "" || numeric === "." || numeric === "-") {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
const parsed = Number(numeric);
|
|
55
|
+
return Number.isNaN(parsed) ? null : parsed;
|
|
56
|
+
}
|
|
57
|
+
function toDisplay(value) {
|
|
58
|
+
return value == null ? "" : formatWithGrouping(String(value));
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* An `Input` for amounts, grouped in thousands as the user types.
|
|
62
|
+
*
|
|
63
|
+
* It is a text field with `inputMode`, not `type="number"`: a native number
|
|
64
|
+
* input cannot display a separator. The caret is put back after the same digit
|
|
65
|
+
* when a comma is inserted or removed in front of it.
|
|
66
|
+
*
|
|
67
|
+
* Defaults to the `small` size and the full width of its container, the shape
|
|
68
|
+
* the field had where it came from; both can be overridden.
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* <Controller
|
|
72
|
+
* control={control}
|
|
73
|
+
* name="amount"
|
|
74
|
+
* render={({ field }) => (
|
|
75
|
+
* <NumberInput
|
|
76
|
+
* aria-label="금액"
|
|
77
|
+
* onBlur={field.onBlur}
|
|
78
|
+
* onValueChange={field.onChange}
|
|
79
|
+
* value={field.value}
|
|
80
|
+
* />
|
|
81
|
+
* )}
|
|
82
|
+
* />
|
|
83
|
+
*/
|
|
84
|
+
function NumberInput({
|
|
85
|
+
value,
|
|
86
|
+
onValueChange,
|
|
87
|
+
maxFractionDigits = 0,
|
|
88
|
+
onBlur,
|
|
89
|
+
size = "small",
|
|
90
|
+
stretch = true,
|
|
91
|
+
...props
|
|
92
|
+
}) {
|
|
93
|
+
// An external value is formatted as given; the fraction limit applies to
|
|
94
|
+
// what is typed, not to what the caller supplies.
|
|
95
|
+
const [draft, setDraft] = react.useState(() => toDisplay(value));
|
|
96
|
+
// What this field last reported, to tell its own edits from a caller's reset.
|
|
97
|
+
const lastEmitted = react.useRef(value ?? null);
|
|
98
|
+
const frame = react.useRef(null);
|
|
99
|
+
|
|
100
|
+
// Only a value that did not come from this field rewrites the text, so an
|
|
101
|
+
// intermediate state like "1." survives the re-render its own edit causes.
|
|
102
|
+
react.useEffect(() => {
|
|
103
|
+
const next = value ?? null;
|
|
104
|
+
if (next === lastEmitted.current) {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
lastEmitted.current = next;
|
|
108
|
+
setDraft(toDisplay(next));
|
|
109
|
+
}, [value]);
|
|
110
|
+
react.useEffect(() => () => {
|
|
111
|
+
if (frame.current !== null) {
|
|
112
|
+
cancelAnimationFrame(frame.current);
|
|
113
|
+
}
|
|
114
|
+
}, []);
|
|
115
|
+
const handleChange = event => {
|
|
116
|
+
const el = event.currentTarget;
|
|
117
|
+
const caret = el.selectionStart ?? el.value.length;
|
|
118
|
+
// Count the digits before the caret, then put it back after the same digit
|
|
119
|
+
// once the commas have moved.
|
|
120
|
+
const digitsBeforeCaret = el.value.slice(0, caret).replace(NON_NUMERIC, "").length;
|
|
121
|
+
const numeric = sanitizeNumeric(el.value, maxFractionDigits);
|
|
122
|
+
const formatted = formatWithGrouping(numeric);
|
|
123
|
+
setDraft(formatted);
|
|
124
|
+
const parsed = parseNumeric(numeric);
|
|
125
|
+
lastEmitted.current = parsed;
|
|
126
|
+
onValueChange(parsed);
|
|
127
|
+
if (frame.current !== null) {
|
|
128
|
+
cancelAnimationFrame(frame.current);
|
|
129
|
+
}
|
|
130
|
+
frame.current = requestAnimationFrame(() => {
|
|
131
|
+
frame.current = null;
|
|
132
|
+
let position = formatted.startsWith("-") ? 1 : 0;
|
|
133
|
+
let count = 0;
|
|
134
|
+
while (position < formatted.length && count < digitsBeforeCaret) {
|
|
135
|
+
if (NUMERIC_CHAR.test(formatted.charAt(position))) {
|
|
136
|
+
count += 1;
|
|
137
|
+
}
|
|
138
|
+
position += 1;
|
|
139
|
+
}
|
|
140
|
+
if (document.activeElement === el) {
|
|
141
|
+
el.setSelectionRange(position, position);
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
};
|
|
145
|
+
const handleBlur = event => {
|
|
146
|
+
// Tidy what typing leaves behind: a trailing point, a lone sign.
|
|
147
|
+
setDraft(previous => {
|
|
148
|
+
const trimmed = previous.endsWith(".") ? previous.slice(0, -1) : previous;
|
|
149
|
+
return trimmed === "-" ? "" : trimmed;
|
|
150
|
+
});
|
|
151
|
+
onBlur?.(event);
|
|
152
|
+
};
|
|
153
|
+
return /*#__PURE__*/jsxRuntime.jsx(input.Input, {
|
|
154
|
+
autoComplete: "off",
|
|
155
|
+
"data-cocso-component": "number-input",
|
|
156
|
+
inputMode: maxFractionDigits > 0 ? "decimal" : "numeric",
|
|
157
|
+
size: size,
|
|
158
|
+
stretch: stretch,
|
|
159
|
+
...props,
|
|
160
|
+
onBlur: handleBlur,
|
|
161
|
+
onChange: handleChange,
|
|
162
|
+
type: "text",
|
|
163
|
+
value: draft
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
exports.NumberInput = NumberInput;
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var reactIcons = require('@cocso-ui/react-icons');
|
|
5
|
+
var dateFns = require('date-fns');
|
|
6
|
+
var react = require('react');
|
|
7
|
+
var yearMonthView_module = require('./year-month-view.module.css.js');
|
|
8
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
9
|
+
var typography = require('../typography/typography.js');
|
|
10
|
+
var button = require('../button/button.js');
|
|
11
|
+
|
|
12
|
+
const MONTHS = Array.from({
|
|
13
|
+
length: 12
|
|
14
|
+
}, (_, month) => month);
|
|
15
|
+
/**
|
|
16
|
+
* The state behind a calendar header that opens a year-and-month grid, shared
|
|
17
|
+
* by DayPicker and DateTimePicker so a date years away is a few clicks in
|
|
18
|
+
* either of them instead of one click per month.
|
|
19
|
+
*/
|
|
20
|
+
function useYearMonthView(initial) {
|
|
21
|
+
const [view, setView] = react.useState("day");
|
|
22
|
+
const [viewDate, setViewDate] = react.useState(initial);
|
|
23
|
+
// Remounts the calendar after a jump. A live calendar follows its keyboard
|
|
24
|
+
// cursor before `openToDate`, so a fresh mount is the reliable way to land
|
|
25
|
+
// on the picked month.
|
|
26
|
+
const [calendarKey, setCalendarKey] = react.useState(0);
|
|
27
|
+
// The day grid's height, held by the month grid so the panel does not
|
|
28
|
+
// shrink under the pointer — a panel opened above its trigger would jump.
|
|
29
|
+
const [dayViewHeight, setDayViewHeight] = react.useState();
|
|
30
|
+
const focusAfterViewChange = react.useRef(false);
|
|
31
|
+
const titleElement = react.useRef(null);
|
|
32
|
+
// Set when the day view should take focus but its header is not mounted yet.
|
|
33
|
+
// A remounted calendar draws its header in a later pass when it carries a
|
|
34
|
+
// time list (DateTimePicker), after the view effect has already run.
|
|
35
|
+
const titleFocusPending = react.useRef(false);
|
|
36
|
+
const currentMonthRef = react.useRef(null);
|
|
37
|
+
const titleRef = react.useCallback(element => {
|
|
38
|
+
titleElement.current = element;
|
|
39
|
+
if (element && titleFocusPending.current) {
|
|
40
|
+
titleFocusPending.current = false;
|
|
41
|
+
element.focus();
|
|
42
|
+
}
|
|
43
|
+
}, []);
|
|
44
|
+
|
|
45
|
+
// A view change unmounts the control that had focus. Hand it to the
|
|
46
|
+
// matching control in the new view instead of dropping it on the body.
|
|
47
|
+
react.useEffect(() => {
|
|
48
|
+
if (!focusAfterViewChange.current) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
focusAfterViewChange.current = false;
|
|
52
|
+
if (view === "month") {
|
|
53
|
+
currentMonthRef.current?.focus();
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
const title = titleElement.current;
|
|
57
|
+
if (title?.isConnected) {
|
|
58
|
+
title.focus();
|
|
59
|
+
} else {
|
|
60
|
+
titleFocusPending.current = true;
|
|
61
|
+
}
|
|
62
|
+
}, [view]);
|
|
63
|
+
const changeView = next => {
|
|
64
|
+
focusAfterViewChange.current = true;
|
|
65
|
+
setView(next);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
/** Back to the day grid on `date`'s month, as when the panel opens. */
|
|
69
|
+
const reset = date => {
|
|
70
|
+
setView("day");
|
|
71
|
+
setViewDate(date);
|
|
72
|
+
setCalendarKey(key => key + 1);
|
|
73
|
+
};
|
|
74
|
+
const openMonths = (date, calendar) => {
|
|
75
|
+
setDayViewHeight(calendar?.getBoundingClientRect().height);
|
|
76
|
+
setViewDate(date);
|
|
77
|
+
changeView("month");
|
|
78
|
+
};
|
|
79
|
+
const jumpTo = (year, month) => {
|
|
80
|
+
setViewDate(new Date(year, month, 1));
|
|
81
|
+
setCalendarKey(key => key + 1);
|
|
82
|
+
changeView("day");
|
|
83
|
+
};
|
|
84
|
+
return {
|
|
85
|
+
calendarKey,
|
|
86
|
+
changeView,
|
|
87
|
+
currentMonthRef,
|
|
88
|
+
dayViewHeight,
|
|
89
|
+
jumpTo,
|
|
90
|
+
openMonths,
|
|
91
|
+
reset,
|
|
92
|
+
setViewDate,
|
|
93
|
+
titleRef,
|
|
94
|
+
view,
|
|
95
|
+
viewDate
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
/** The day grid's "2026년 10월 ▾", pressed to open the month grid. */
|
|
99
|
+
function CalendarTitle({
|
|
100
|
+
date,
|
|
101
|
+
locale,
|
|
102
|
+
onPress,
|
|
103
|
+
ref
|
|
104
|
+
}) {
|
|
105
|
+
return /*#__PURE__*/jsxRuntime.jsxs("button", {
|
|
106
|
+
"aria-label": "Choose year and month",
|
|
107
|
+
className: yearMonthView_module.title,
|
|
108
|
+
onClick: event => onPress(event.currentTarget.closest(".react-datepicker")),
|
|
109
|
+
ref: ref,
|
|
110
|
+
type: "button",
|
|
111
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(typography.Typography, {
|
|
112
|
+
size: "small",
|
|
113
|
+
type: "body",
|
|
114
|
+
weight: "semibold",
|
|
115
|
+
children: date.toLocaleDateString(locale.code ?? "ko-KR", {
|
|
116
|
+
year: "numeric",
|
|
117
|
+
month: "long"
|
|
118
|
+
})
|
|
119
|
+
}), /*#__PURE__*/jsxRuntime.jsx(reactIcons.ArrowDropDownIcon, {
|
|
120
|
+
"aria-hidden": true,
|
|
121
|
+
size: 16
|
|
122
|
+
})]
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
/** The year's twelve months, with the year paged by the header's arrows. */
|
|
126
|
+
function YearMonthView({
|
|
127
|
+
currentMonthRef,
|
|
128
|
+
hidden,
|
|
129
|
+
locale,
|
|
130
|
+
maxDate,
|
|
131
|
+
minDate,
|
|
132
|
+
minHeight,
|
|
133
|
+
onBack,
|
|
134
|
+
onPick,
|
|
135
|
+
onYearChange,
|
|
136
|
+
selected,
|
|
137
|
+
viewDate
|
|
138
|
+
}) {
|
|
139
|
+
const year = viewDate.getFullYear();
|
|
140
|
+
const monthDisabled = month => {
|
|
141
|
+
const first = dateFns.startOfMonth(new Date(year, month, 1));
|
|
142
|
+
return minDate !== undefined && dateFns.endOfMonth(first) < minDate || maxDate !== undefined && first > maxDate;
|
|
143
|
+
};
|
|
144
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
145
|
+
className: yearMonthView_module.monthView,
|
|
146
|
+
hidden: hidden,
|
|
147
|
+
style: {
|
|
148
|
+
minHeight
|
|
149
|
+
},
|
|
150
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
151
|
+
className: yearMonthView_module.monthHeader,
|
|
152
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("button", {
|
|
153
|
+
"aria-label": "Back to days",
|
|
154
|
+
className: yearMonthView_module.title,
|
|
155
|
+
onClick: onBack,
|
|
156
|
+
type: "button",
|
|
157
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(typography.Typography, {
|
|
158
|
+
size: "small",
|
|
159
|
+
type: "body",
|
|
160
|
+
weight: "semibold",
|
|
161
|
+
children: viewDate.toLocaleDateString(locale.code ?? "ko-KR", {
|
|
162
|
+
year: "numeric"
|
|
163
|
+
})
|
|
164
|
+
}), /*#__PURE__*/jsxRuntime.jsx(reactIcons.ArrowDropUpIcon, {
|
|
165
|
+
"aria-hidden": true,
|
|
166
|
+
size: 16
|
|
167
|
+
})]
|
|
168
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
169
|
+
className: yearMonthView_module.menu,
|
|
170
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(button.Button, {
|
|
171
|
+
"aria-label": "Previous year",
|
|
172
|
+
className: yearMonthView_module.arrow,
|
|
173
|
+
disabled: minDate !== undefined && year - 1 < minDate.getFullYear(),
|
|
174
|
+
onClick: () => onYearChange(new Date(year - 1, 0, 1)),
|
|
175
|
+
size: "x-small",
|
|
176
|
+
svgOnly: true,
|
|
177
|
+
type: "button",
|
|
178
|
+
variant: "outline",
|
|
179
|
+
children: /*#__PURE__*/jsxRuntime.jsx(reactIcons.ArrowIOSBackwardIcon, {})
|
|
180
|
+
}), /*#__PURE__*/jsxRuntime.jsx(button.Button, {
|
|
181
|
+
"aria-label": "Next year",
|
|
182
|
+
className: yearMonthView_module.arrow,
|
|
183
|
+
disabled: maxDate !== undefined && year + 1 > maxDate.getFullYear(),
|
|
184
|
+
onClick: () => onYearChange(new Date(year + 1, 0, 1)),
|
|
185
|
+
size: "x-small",
|
|
186
|
+
svgOnly: true,
|
|
187
|
+
type: "button",
|
|
188
|
+
variant: "outline",
|
|
189
|
+
children: /*#__PURE__*/jsxRuntime.jsx(reactIcons.ArrowIOSForwardIcon, {})
|
|
190
|
+
})]
|
|
191
|
+
})]
|
|
192
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
193
|
+
className: yearMonthView_module.monthGrid,
|
|
194
|
+
children: MONTHS.map(month => {
|
|
195
|
+
const current = selected != null && selected.getFullYear() === year && selected.getMonth() === month;
|
|
196
|
+
const isViewed = viewDate.getMonth() === month;
|
|
197
|
+
return /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
198
|
+
"aria-current": current ? "date" : undefined,
|
|
199
|
+
className: yearMonthView_module.monthCell,
|
|
200
|
+
"data-selected": current || undefined,
|
|
201
|
+
disabled: monthDisabled(month),
|
|
202
|
+
onClick: () => onPick(year, month),
|
|
203
|
+
ref: isViewed ? currentMonthRef : undefined,
|
|
204
|
+
type: "button",
|
|
205
|
+
children: dateFns.format(new Date(year, month, 1), "LLL", {
|
|
206
|
+
locale
|
|
207
|
+
})
|
|
208
|
+
}, month);
|
|
209
|
+
})
|
|
210
|
+
})]
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
exports.CalendarTitle = CalendarTitle;
|
|
215
|
+
exports.YearMonthView = YearMonthView;
|
|
216
|
+
exports.useYearMonthView = useYearMonthView;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var styleInject_es = require('../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js');
|
|
4
|
+
|
|
5
|
+
var css_248z = "@layer components{.year-month-view-module_title__xCQjI{align-items:center;background:none;border:0;border-radius:var(--cocso-radius-2);color:inherit;cursor:pointer;display:inline-flex;gap:var(--cocso-spacing-1);margin-inline-start:calc(var(--cocso-spacing-2)*-1);padding-block:var(--cocso-spacing-1);padding-inline:var(--cocso-spacing-2)}.year-month-view-module_monthCell__Tju2y:focus-visible,.year-month-view-module_title__xCQjI:focus-visible{outline:2px solid var(--cocso-color-focus-ring);outline-offset:2px}.year-month-view-module_menu__WInY3{align-items:center;display:flex;gap:var(--cocso-spacing-3);justify-content:center}.year-month-view-module_arrow__oIH1T{height:24px;width:24px}.year-month-view-module_monthView__6rbV7{display:flex;flex-direction:column}.year-month-view-module_monthView__6rbV7[hidden]{display:none}.year-month-view-module_monthHeader__3ZcdS{align-items:center;display:flex;justify-content:space-between;padding-bottom:var(--cocso-spacing-5);width:100%}.year-month-view-module_monthGrid__jGMsB{display:grid;flex:1;gap:var(--cocso-spacing-3);grid-auto-rows:1fr;grid-template-columns:repeat(3,1fr)}.year-month-view-module_monthCell__Tju2y{align-items:center;background:none;border:0;border-radius:var(--cocso-radius-4);color:var(--cocso-color-text-primary);cursor:pointer;display:flex;font-size:var(--cocso-text-sm);font-weight:var(--cocso-font-weight-medium);justify-content:center;min-height:var(--cocso-spacing-14)}.year-month-view-module_monthCell__Tju2y[data-selected]{background-color:var(--cocso-color-interactive-primary);color:var(--cocso-color-text-on-primary);font-weight:var(--cocso-font-weight-semibold)}.year-month-view-module_monthCell__Tju2y:disabled{cursor:not-allowed;opacity:.4}@media (hover:hover) and (pointer:fine){.year-month-view-module_monthCell__Tju2y:not(:disabled):hover,.year-month-view-module_title__xCQjI:hover{background-color:var(--cocso-color-interactive-secondary)}.year-month-view-module_monthCell__Tju2y[data-selected]:not(:disabled):hover{background-color:var(--cocso-color-interactive-primary-hover)}}}";
|
|
6
|
+
var styles = {"title":"year-month-view-module_title__xCQjI","monthCell":"year-month-view-module_monthCell__Tju2y","menu":"year-month-view-module_menu__WInY3","arrow":"year-month-view-module_arrow__oIH1T","monthView":"year-month-view-module_monthView__6rbV7","monthHeader":"year-month-view-module_monthHeader__3ZcdS","monthGrid":"year-month-view-module_monthGrid__jGMsB"};
|
|
7
|
+
styleInject_es(css_248z);
|
|
8
|
+
|
|
9
|
+
module.exports = styles;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
type SectionHeaderLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
5
|
+
interface SectionHeaderProps extends Omit<ComponentProps<"div">, "title"> {
|
|
6
|
+
/**
|
|
7
|
+
* Trailing controls — buttons, a menu, a search box. When the header is too
|
|
8
|
+
* narrow to keep `MIN_TITLE_WIDTH` for the title they collapse behind one
|
|
9
|
+
* toggle button.
|
|
10
|
+
*/
|
|
11
|
+
actions?: ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Collapses `actions` behind a toggle when they would crowd the title.
|
|
14
|
+
* Defaults to `true`.
|
|
15
|
+
*/
|
|
16
|
+
collapsible?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Opens the collapsed panel on mount. Only meaningful while collapsed; mostly
|
|
19
|
+
* for showing the panel in documentation.
|
|
20
|
+
*/
|
|
21
|
+
defaultActionsOpen?: boolean;
|
|
22
|
+
/** Secondary text under the title. */
|
|
23
|
+
description?: ReactNode;
|
|
24
|
+
/** Heading level of the title. Defaults to `2`. */
|
|
25
|
+
level?: SectionHeaderLevel;
|
|
26
|
+
/** Text of the toggle the actions collapse into. Defaults to `"More"`. */
|
|
27
|
+
moreLabel?: string;
|
|
28
|
+
title: ReactNode;
|
|
29
|
+
/** Class for the title element, e.g. to truncate a long title. */
|
|
30
|
+
titleClassName?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The heading row of a section or a card: a title, its actions on the same
|
|
34
|
+
* line, and an optional description under them.
|
|
35
|
+
*
|
|
36
|
+
* When the row gets too narrow for the actions to sit beside the title, they
|
|
37
|
+
* collapse behind a single toggle and open in a panel under it, so the title
|
|
38
|
+
* is never squeezed to nothing.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* <Card>
|
|
42
|
+
* <SectionHeader actions={<Button>Add</Button>} title="Medicines" />
|
|
43
|
+
* </Card>
|
|
44
|
+
*/
|
|
45
|
+
declare function SectionHeader({ className, title, titleClassName, description, actions, level, moreLabel, collapsible, defaultActionsOpen, ...props }: SectionHeaderProps): react_jsx_runtime.JSX.Element;
|
|
46
|
+
|
|
47
|
+
export { SectionHeader };
|
|
48
|
+
export type { SectionHeaderLevel, SectionHeaderProps };
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var reactIcons = require('@cocso-ui/react-icons');
|
|
5
|
+
var react = require('react');
|
|
6
|
+
var cn = require('../../cn.js');
|
|
7
|
+
var sectionHeader_module = require('./section-header.module.css.js');
|
|
8
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
9
|
+
var typography = require('../typography/typography.js');
|
|
10
|
+
var button = require('../button/button.js');
|
|
11
|
+
|
|
12
|
+
const MIN_TITLE_WIDTH = 120;
|
|
13
|
+
/** The gap between the title and the actions — `--cocso-spacing-5`. */
|
|
14
|
+
const HEADER_GAP = 8;
|
|
15
|
+
/** The least room left between the open panel and the viewport edge. */
|
|
16
|
+
const PANEL_MARGIN = 16;
|
|
17
|
+
/** The gap between the toggle and the panel under it. */
|
|
18
|
+
const PANEL_OFFSET = 4;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Floating layers an action may have opened from inside the panel — a menu, a
|
|
22
|
+
* dialog. Interacting with one does not close the panel, and Escape belongs
|
|
23
|
+
* to it first.
|
|
24
|
+
*/
|
|
25
|
+
const FLOATING_SELECTOR = '[role="menu"],[role="dialog"],[role="alertdialog"],[role="listbox"]';
|
|
26
|
+
function measurePanel(toggle) {
|
|
27
|
+
const rect = toggle.getBoundingClientRect();
|
|
28
|
+
const viewport = document.documentElement.clientWidth;
|
|
29
|
+
const rtl = getComputedStyle(toggle).direction === "rtl";
|
|
30
|
+
return {
|
|
31
|
+
top: rect.bottom + PANEL_OFFSET,
|
|
32
|
+
insetInlineEnd: rtl ? rect.left : viewport - rect.right,
|
|
33
|
+
maxWidth: (rtl ? viewport - rect.left : rect.right) - PANEL_MARGIN
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* The actions slot. When it runs out of room it hands its content to a panel
|
|
39
|
+
* that opens under a toggle.
|
|
40
|
+
*
|
|
41
|
+
* The actions are hidden, never unmounted, while the panel is closed, and the
|
|
42
|
+
* panel is the same element as the inline slot. An action that owns a dialog
|
|
43
|
+
* keeps its state through a collapse, and a dialog opened from the panel
|
|
44
|
+
* survives the panel closing. That is also why this is not built on
|
|
45
|
+
* `Popover`: a portal moves the actions to another tree and remounts them.
|
|
46
|
+
* The panel is a disclosure — the toggle carries `aria-expanded` and
|
|
47
|
+
* `aria-controls` — not a dialog.
|
|
48
|
+
*/
|
|
49
|
+
function CollapsibleActions({
|
|
50
|
+
actions,
|
|
51
|
+
collapsible,
|
|
52
|
+
defaultOpen,
|
|
53
|
+
moreLabel
|
|
54
|
+
}) {
|
|
55
|
+
const panelId = react.useId();
|
|
56
|
+
const actionsRef = react.useRef(null);
|
|
57
|
+
const toggleRef = react.useRef(null);
|
|
58
|
+
const [collapsed, setCollapsed] = react.useState(false);
|
|
59
|
+
const [open, setOpen] = react.useState(defaultOpen);
|
|
60
|
+
const [position, setPosition] = react.useState(null);
|
|
61
|
+
|
|
62
|
+
// Once collapsed the slot no longer has an inline width to measure, so the
|
|
63
|
+
// width it had while expanded is kept.
|
|
64
|
+
const expandedWidthRef = react.useRef(0);
|
|
65
|
+
const collapsedRef = react.useRef(false);
|
|
66
|
+
react.useLayoutEffect(() => {
|
|
67
|
+
const element = actionsRef.current;
|
|
68
|
+
const header = element?.parentElement;
|
|
69
|
+
if (!(collapsible && header && element)) {
|
|
70
|
+
collapsedRef.current = false;
|
|
71
|
+
setCollapsed(false);
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
const measure = () => {
|
|
75
|
+
if (!collapsedRef.current) {
|
|
76
|
+
expandedWidthRef.current = element.offsetWidth;
|
|
77
|
+
}
|
|
78
|
+
const next = header.clientWidth < expandedWidthRef.current + HEADER_GAP + MIN_TITLE_WIDTH;
|
|
79
|
+
collapsedRef.current = next;
|
|
80
|
+
setCollapsed(next);
|
|
81
|
+
// Widening closes the panel, so narrowing again later does not bring
|
|
82
|
+
// it back by itself.
|
|
83
|
+
if (!next) {
|
|
84
|
+
setOpen(false);
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
measure();
|
|
88
|
+
const observer = new ResizeObserver(measure);
|
|
89
|
+
observer.observe(header);
|
|
90
|
+
observer.observe(element);
|
|
91
|
+
return () => observer.disconnect();
|
|
92
|
+
}, [collapsible]);
|
|
93
|
+
const expanded = collapsed && open;
|
|
94
|
+
react.useLayoutEffect(() => {
|
|
95
|
+
if (expanded && toggleRef.current) {
|
|
96
|
+
setPosition(measurePanel(toggleRef.current));
|
|
97
|
+
} else {
|
|
98
|
+
setPosition(null);
|
|
99
|
+
}
|
|
100
|
+
}, [expanded]);
|
|
101
|
+
react.useEffect(() => {
|
|
102
|
+
if (!expanded) {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
const isInside = target => target instanceof Element && (Boolean(actionsRef.current?.contains(target)) || Boolean(toggleRef.current?.contains(target)) || Boolean(target.closest(FLOATING_SELECTOR)));
|
|
106
|
+
const close = event => {
|
|
107
|
+
if (!isInside(event.target)) {
|
|
108
|
+
setOpen(false);
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
const closeOnEscape = event => {
|
|
112
|
+
if (event.key === "Escape" && !document.querySelector(FLOATING_SELECTOR)) {
|
|
113
|
+
setOpen(false);
|
|
114
|
+
toggleRef.current?.focus();
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
document.addEventListener("click", close);
|
|
118
|
+
document.addEventListener("keydown", closeOnEscape);
|
|
119
|
+
window.addEventListener("scroll", close, true);
|
|
120
|
+
return () => {
|
|
121
|
+
document.removeEventListener("click", close);
|
|
122
|
+
document.removeEventListener("keydown", closeOnEscape);
|
|
123
|
+
window.removeEventListener("scroll", close, true);
|
|
124
|
+
};
|
|
125
|
+
}, [expanded]);
|
|
126
|
+
const style = expanded && position ? position : undefined;
|
|
127
|
+
let state;
|
|
128
|
+
if (collapsed) {
|
|
129
|
+
state = open ? "open" : "closed";
|
|
130
|
+
}
|
|
131
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
132
|
+
children: [collapsed && /*#__PURE__*/jsxRuntime.jsx(button.Button, {
|
|
133
|
+
"aria-controls": panelId,
|
|
134
|
+
"aria-expanded": open,
|
|
135
|
+
className: sectionHeader_module.toggle,
|
|
136
|
+
onClick: () => setOpen(current => !current),
|
|
137
|
+
ref: toggleRef,
|
|
138
|
+
size: "x-small",
|
|
139
|
+
suffix: /*#__PURE__*/jsxRuntime.jsx(reactIcons.ChevronDownIcon, {
|
|
140
|
+
size: 14
|
|
141
|
+
}),
|
|
142
|
+
type: "button",
|
|
143
|
+
variant: "outline",
|
|
144
|
+
children: moreLabel
|
|
145
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
146
|
+
className: cn.cn(sectionHeader_module.actions, collapsed && sectionHeader_module.panel),
|
|
147
|
+
"data-cocso-component": "section-header-actions",
|
|
148
|
+
"data-state": state,
|
|
149
|
+
hidden: collapsed && !open,
|
|
150
|
+
id: panelId,
|
|
151
|
+
ref: actionsRef,
|
|
152
|
+
style: style,
|
|
153
|
+
children: actions
|
|
154
|
+
})]
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* The heading row of a section or a card: a title, its actions on the same
|
|
160
|
+
* line, and an optional description under them.
|
|
161
|
+
*
|
|
162
|
+
* When the row gets too narrow for the actions to sit beside the title, they
|
|
163
|
+
* collapse behind a single toggle and open in a panel under it, so the title
|
|
164
|
+
* is never squeezed to nothing.
|
|
165
|
+
*
|
|
166
|
+
* @example
|
|
167
|
+
* <Card>
|
|
168
|
+
* <SectionHeader actions={<Button>Add</Button>} title="Medicines" />
|
|
169
|
+
* </Card>
|
|
170
|
+
*/
|
|
171
|
+
function SectionHeader({
|
|
172
|
+
className,
|
|
173
|
+
title,
|
|
174
|
+
titleClassName,
|
|
175
|
+
description,
|
|
176
|
+
actions,
|
|
177
|
+
level = 2,
|
|
178
|
+
moreLabel = "More",
|
|
179
|
+
collapsible = true,
|
|
180
|
+
defaultActionsOpen = false,
|
|
181
|
+
...props
|
|
182
|
+
}) {
|
|
183
|
+
const Heading = `h${level}`;
|
|
184
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
185
|
+
className: cn.cn(sectionHeader_module.root, className),
|
|
186
|
+
"data-cocso-component": "section-header",
|
|
187
|
+
...props,
|
|
188
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
189
|
+
className: sectionHeader_module.row,
|
|
190
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(typography.Typography, {
|
|
191
|
+
className: cn.cn(sectionHeader_module.title, titleClassName),
|
|
192
|
+
render: /*#__PURE__*/jsxRuntime.jsx(Heading, {}),
|
|
193
|
+
size: "small",
|
|
194
|
+
type: "heading",
|
|
195
|
+
weight: "bold",
|
|
196
|
+
children: title
|
|
197
|
+
}), actions ? /*#__PURE__*/jsxRuntime.jsx(CollapsibleActions, {
|
|
198
|
+
actions: actions,
|
|
199
|
+
collapsible: collapsible,
|
|
200
|
+
defaultOpen: defaultActionsOpen,
|
|
201
|
+
moreLabel: moreLabel
|
|
202
|
+
}) : null]
|
|
203
|
+
}), description ? /*#__PURE__*/jsxRuntime.jsx("p", {
|
|
204
|
+
className: sectionHeader_module.description,
|
|
205
|
+
children: description
|
|
206
|
+
}) : null]
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
exports.SectionHeader = SectionHeader;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var styleInject_es = require('../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js');
|
|
4
|
+
|
|
5
|
+
var css_248z = "@layer components{.section-header-module_root__sOgb3{display:flex;flex-direction:column;gap:var(--cocso-spacing-3);min-inline-size:0}.section-header-module_row__xsVIe{align-items:center;display:flex;gap:var(--cocso-spacing-5);justify-content:space-between;min-block-size:var(--cocso-spacing-12)}.section-header-module_title__7ddbh{color:var(--cocso-color-text-primary);flex:1;margin:0;min-inline-size:0;word-break:keep-all}.section-header-module_description__T8tck{color:var(--cocso-color-text-secondary);font-size:var(--cocso-text-xs);margin:0}.section-header-module_toggle__bVZ9N{flex-shrink:0}.section-header-module_actions__kS-uK{align-items:center;display:flex;flex-shrink:0;gap:var(--cocso-spacing-5)}.section-header-module_actions__kS-uK[hidden]{display:none}.section-header-module_panel__1Zc9C{background-color:var(--cocso-color-surface-primary);border:1px solid var(--cocso-color-border-secondary);border-radius:var(--cocso-radius-4);box-shadow:var(--cocso-shadow-popover);flex-wrap:wrap;justify-content:flex-end;padding:var(--cocso-spacing-5);position:fixed;z-index:var(--cocso-z-index-popover)}.section-header-module_panel__1Zc9C>*{flex-shrink:1;flex-wrap:wrap;justify-content:flex-end;max-inline-size:100%;white-space:normal}}";
|
|
6
|
+
var styles = {"root":"section-header-module_root__sOgb3","row":"section-header-module_row__xsVIe","title":"section-header-module_title__7ddbh","description":"section-header-module_description__T8tck","toggle":"section-header-module_toggle__bVZ9N","actions":"section-header-module_actions__kS-uK","panel":"section-header-module_panel__1Zc9C"};
|
|
7
|
+
styleInject_es(css_248z);
|
|
8
|
+
|
|
9
|
+
module.exports = styles;
|