@infonomic/uikit 6.8.2 → 6.9.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.
- package/README.md +183 -19
- package/dist/components/accordion/accordion.js +5 -5
- package/dist/components/accordion/accordion.module.css +11 -1
- package/dist/components/accordion/accordion_module.css +3 -1
- package/dist/components/avatar/avatar.d.ts +8 -2
- package/dist/components/avatar/avatar.d.ts.map +1 -1
- package/dist/components/avatar/avatar.js +6 -7
- package/dist/components/avatar/avatar.module.css +9 -4
- package/dist/components/avatar/avatar_module.css +3 -1
- package/dist/components/badge/badge.d.ts +1 -1
- package/dist/components/badge/badge.module.css +9 -4
- package/dist/components/badge/badge_module.css +3 -1
- package/dist/components/button/button-group.d.ts +1 -1
- package/dist/components/button/button-group.module.css +11 -1
- package/dist/components/button/button-group_module.css +4 -2
- package/dist/components/button/button.module.css +9 -4
- package/dist/components/button/button_module.css +3 -1
- package/dist/components/button/combo-button.d.ts +1 -1
- package/dist/components/button/combo-button.module.css +11 -1
- package/dist/components/button/combo-button_module.css +3 -1
- package/dist/components/button/control-buttons.module.css +11 -1
- package/dist/components/button/control-buttons_module.css +3 -1
- package/dist/components/button/copy-button.module.css +9 -4
- package/dist/components/button/copy-button_module.css +3 -1
- package/dist/components/button/index.d.ts +5 -5
- package/dist/components/card/card.module.css +9 -4
- package/dist/components/card/card_module.css +3 -1
- package/dist/components/chips/chip.module.css +9 -4
- package/dist/components/chips/chip_module.css +3 -1
- package/dist/components/container/container.module.css +9 -4
- package/dist/components/container/container_module.css +6 -4
- package/dist/components/dropdown/dropdown.js +11 -11
- package/dist/components/dropdown/dropdown.module.css +9 -4
- package/dist/components/dropdown/dropdown_module.css +3 -1
- package/dist/components/hamburger/hamburger.module.css +9 -4
- package/dist/components/hamburger/hamburger_module.css +3 -1
- package/dist/components/inputs/autocomplete.module.css +9 -4
- package/dist/components/inputs/autocomplete_module.css +3 -1
- package/dist/components/inputs/calendar.module.css +9 -4
- package/dist/components/inputs/calendar_module.css +4 -2
- package/dist/components/inputs/checkbox-group.module.css +9 -4
- package/dist/components/inputs/checkbox-group_module.css +3 -1
- package/dist/components/inputs/checkbox.module.css +9 -4
- package/dist/components/inputs/checkbox_module.css +3 -1
- package/dist/components/inputs/error-text.module.css +9 -4
- package/dist/components/inputs/error-text_module.css +3 -1
- package/dist/components/inputs/help-text.module.css +9 -4
- package/dist/components/inputs/help-text_module.css +3 -1
- package/dist/components/inputs/input-adornment.module.css +9 -4
- package/dist/components/inputs/input-adornment_module.css +3 -1
- package/dist/components/inputs/input-password.d.ts +18 -2
- package/dist/components/inputs/input-password.d.ts.map +1 -1
- package/dist/components/inputs/input-password.js +19 -11
- package/dist/components/inputs/input-password.module.css +55 -0
- package/dist/components/inputs/input-password.module.js +5 -0
- package/dist/components/inputs/input-password_module.css +25 -0
- package/dist/components/inputs/input.d.ts +1 -1
- package/dist/components/inputs/input.module.css +9 -4
- package/dist/components/inputs/input_module.css +3 -1
- package/dist/components/inputs/label.module.css +9 -4
- package/dist/components/inputs/label_module.css +3 -1
- package/dist/components/inputs/radio-group.d.ts +1 -1
- package/dist/components/inputs/radio-group.module.css +9 -4
- package/dist/components/inputs/radio-group_module.css +3 -1
- package/dist/components/inputs/select.module.css +9 -4
- package/dist/components/inputs/select_module.css +3 -1
- package/dist/components/inputs/text-area.module.css +9 -4
- package/dist/components/inputs/text-area_module.css +3 -1
- package/dist/components/notifications/alert.module.css +9 -4
- package/dist/components/notifications/alert_module.css +4 -2
- package/dist/components/notifications/toast.module.css +9 -4
- package/dist/components/notifications/toast_module.css +5 -3
- package/dist/components/pager/first-button.d.ts +1 -1
- package/dist/components/pager/hooks/usePagination.d.ts +1 -1
- package/dist/components/pager/last-button.d.ts +1 -1
- package/dist/components/pager/next-button.d.ts +1 -1
- package/dist/components/pager/number-button.d.ts +1 -1
- package/dist/components/pager/pagination.d.ts +7 -7
- package/dist/components/pager/pagination.module.css +9 -4
- package/dist/components/pager/pagination_module.css +4 -2
- package/dist/components/pager/previous-button.d.ts +1 -1
- package/dist/components/scroll-area/scroll-area.module.css +9 -4
- package/dist/components/scroll-area/scroll-area_module.css +3 -1
- package/dist/components/scroll-to-top/scroll-to-top.module.css +9 -3
- package/dist/components/scroll-to-top/scroll-to-top_module.css +4 -2
- package/dist/components/section/section.module.css +9 -4
- package/dist/components/section/section_module.css +3 -1
- package/dist/components/shimmer/shimmer.module.css +9 -4
- package/dist/components/shimmer/shimmer_module.css +3 -1
- package/dist/components/table/table.module.css +9 -4
- package/dist/components/table/table_module.css +3 -1
- package/dist/components/tabs/tabs.module.css +9 -4
- package/dist/components/tabs/tabs_module.css +3 -1
- package/dist/components/tooltip/tooltip.module.css +9 -4
- package/dist/components/tooltip/tooltip_module.css +3 -1
- package/dist/css-layers.d.ts +23 -0
- package/dist/css-layers.d.ts.map +1 -0
- package/dist/css-layers.js +14 -0
- package/dist/icons/icons.module.css +11 -1
- package/dist/icons/icons_module.css +3 -1
- package/dist/icons/stopwatch-icon.d.ts +1 -1
- package/dist/loaders/ellipses.module.css +9 -4
- package/dist/loaders/ellipses_module.css +3 -1
- package/dist/loaders/ring.module.css +9 -4
- package/dist/loaders/ring_module.css +3 -1
- package/dist/loaders/spinner.module.css +9 -4
- package/dist/loaders/spinner_module.css +3 -1
- package/dist/react.d.ts +14 -14
- package/dist/styles/components-vanilla.css +1 -1
- package/dist/styles/reset.css +1 -1
- package/dist/styles/styles.css +1 -1
- package/dist/styles/typography.css +1 -1
- package/dist/widgets/datepicker/datepicker.d.ts +42 -1
- package/dist/widgets/datepicker/datepicker.d.ts.map +1 -1
- package/dist/widgets/datepicker/datepicker.js +34 -4
- package/dist/widgets/datepicker/datepicker.module.css +21 -2
- package/dist/widgets/datepicker/datepicker.module.js +1 -0
- package/dist/widgets/datepicker/datepicker_module.css +7 -2
- package/dist/widgets/drawer/drawer.d.ts +4 -4
- package/dist/widgets/drawer/drawer.module.css +11 -1
- package/dist/widgets/drawer/drawer_module.css +4 -2
- package/dist/widgets/modal/modal-context.d.ts +20 -0
- package/dist/widgets/modal/modal-context.d.ts.map +1 -0
- package/dist/widgets/modal/modal-context.js +4 -0
- package/dist/widgets/modal/modal-header.d.ts +1 -1
- package/dist/widgets/modal/modal-header.d.ts.map +1 -1
- package/dist/widgets/modal/modal-header.js +23 -1
- package/dist/widgets/modal/modal.d.ts +13 -8
- package/dist/widgets/modal/modal.d.ts.map +1 -1
- package/dist/widgets/modal/modal.js +8 -4
- package/dist/widgets/modal/modal.module.css +11 -1
- package/dist/widgets/modal/modal_module.css +5 -3
- package/dist/widgets/timeline/timeline.module.css +9 -4
- package/dist/widgets/timeline/timeline_module.css +3 -1
- package/package.json +45 -32
- package/src/components/accordion/accordion.module.css +11 -1
- package/src/components/avatar/avatar.module.css +9 -4
- package/src/components/avatar/avatar.stories.tsx +8 -0
- package/src/components/avatar/avatar.tsx +17 -8
- package/src/components/badge/badge.module.css +9 -4
- package/src/components/button/button-group.module.css +11 -1
- package/src/components/button/button.module.css +9 -4
- package/src/components/button/combo-button.module.css +11 -1
- package/src/components/button/control-buttons.module.css +11 -1
- package/src/components/button/copy-button.module.css +9 -4
- package/src/components/card/card.module.css +9 -4
- package/src/components/chips/chip.module.css +9 -4
- package/src/components/container/container.module.css +9 -4
- package/src/components/dropdown/dropdown.module.css +9 -4
- package/src/components/hamburger/hamburger.module.css +9 -4
- package/src/components/inputs/autocomplete.module.css +9 -4
- package/src/components/inputs/calendar.module.css +9 -4
- package/src/components/inputs/checkbox-group.module.css +9 -4
- package/src/components/inputs/checkbox.module.css +9 -4
- package/src/components/inputs/error-text.module.css +9 -4
- package/src/components/inputs/help-text.module.css +9 -4
- package/src/components/inputs/input-adornment.module.css +9 -4
- package/src/components/inputs/input-password.module.css +55 -0
- package/src/components/inputs/input-password.tsx +49 -7
- package/src/components/inputs/input.module.css +9 -4
- package/src/components/inputs/label.module.css +9 -4
- package/src/components/inputs/radio-group.module.css +9 -4
- package/src/components/inputs/select.module.css +9 -4
- package/src/components/inputs/text-area.module.css +9 -4
- package/src/components/notifications/alert.module.css +9 -4
- package/src/components/notifications/toast.module.css +9 -4
- package/src/components/pager/pagination.module.css +9 -4
- package/src/components/scroll-area/scroll-area.module.css +9 -4
- package/src/components/scroll-to-top/scroll-to-top.module.css +9 -3
- package/src/components/section/section.module.css +9 -4
- package/src/components/shimmer/shimmer.module.css +9 -4
- package/src/components/table/table.module.css +9 -4
- package/src/components/tabs/tabs.module.css +9 -4
- package/src/components/tooltip/tooltip.module.css +9 -4
- package/src/css-layers.ts +34 -0
- package/src/icons/icons.module.css +11 -1
- package/src/loaders/ellipses.module.css +9 -4
- package/src/loaders/ring.module.css +9 -4
- package/src/loaders/spinner.module.css +9 -4
- package/src/styles/base/animations.css +12 -0
- package/src/styles/base/base.css +12 -0
- package/src/styles/base/borders.css +12 -0
- package/src/styles/base/breakpoints.css +12 -0
- package/src/styles/base/colors.css +12 -0
- package/src/styles/base/opacity.css +12 -0
- package/src/styles/base/shadows.css +12 -0
- package/src/styles/base/size.css +12 -0
- package/src/styles/base/spacing.css +12 -0
- package/src/styles/base/transitions.css +12 -0
- package/src/styles/base/typography.css +12 -0
- package/src/styles/base/z-index.css +12 -0
- package/src/styles/components/components.css +12 -0
- package/src/styles/components/fade-in-lift.css +27 -13
- package/src/styles/components/hamburger.css +11 -6
- package/src/styles/components/loaders.css +168 -154
- package/src/styles/functional/README.md +18 -18
- package/src/styles/functional/borders.css +12 -0
- package/src/styles/functional/colors.css +12 -0
- package/src/styles/functional/functional.css +12 -0
- package/src/styles/functional/grid-flex.css +12 -0
- package/src/styles/functional/shadcn-compat.css +12 -0
- package/src/styles/functional/surfaces.css +12 -0
- package/src/styles/functional/typography.css +12 -0
- package/src/styles/local-fonts.css +12 -0
- package/src/styles/reset.css +18 -0
- package/src/styles/styles.css +9 -4
- package/src/styles/theme/autofill.css +12 -0
- package/src/styles/theme/defaults.css +12 -0
- package/src/styles/theme/scrollers.css +12 -0
- package/src/styles/theme/theme.css +12 -0
- package/src/styles/typography/fonts.css +12 -0
- package/src/styles/typography/prose.css +12 -0
- package/src/styles/typography.css +12 -0
- package/src/styles/utils/scroll-layout-shift.css +12 -0
- package/src/styles/utils/utility-classes.css +12 -0
- package/src/styles/utils/utils.css +12 -0
- package/src/widgets/datepicker/datepicker.module.css +21 -2
- package/src/widgets/datepicker/datepicker.tsx +97 -4
- package/src/widgets/drawer/drawer.module.css +11 -1
- package/src/widgets/modal/modal-context.ts +23 -0
- package/src/widgets/modal/modal-header.tsx +29 -2
- package/src/widgets/modal/modal.module.css +11 -1
- package/src/widgets/modal/modal.tsx +15 -6
- package/src/widgets/timeline/timeline.module.css +9 -4
|
@@ -13,14 +13,14 @@ import { ScrollArea } from "../../components/scroll-area/scroll-area.js";
|
|
|
13
13
|
import { CalendarIcon } from "../../icons/calendar-icon.js";
|
|
14
14
|
import { CloseIcon } from "../../icons/close-icon.js";
|
|
15
15
|
import datepicker_module from "./datepicker.module.js";
|
|
16
|
-
function DatePicker({ id, name, label, required, initialValue, mode = 'datetime', yearsInFuture = 1, yearsInPast = 10, variant, intent, inputSize, inputClassName, inputWrapperClassName, containerClassName, contentClassName, onClear = ()=>{}, onDateChange = ()=>{}, validatorFn, helpText, errorText, placeHolderText = '', ariaLabelForSearch = 'date', ariaLabelForClear = 'clear', ...rest }) {
|
|
16
|
+
function DatePicker({ id, name, label, required, initialValue, mode = 'datetime', minDate, maxDate, yearsInFuture = 1, yearsInPast = 10, variant, intent, inputSize, inputClassName, inputWrapperClassName, containerClassName, contentClassName, onClear = ()=>{}, onDateChange = ()=>{}, onWallTimeChange, validatorFn, helpText, errorText, placeHolderText = '', ariaLabelForSearch = 'date', ariaLabelForClear = 'clear', ...rest }) {
|
|
17
17
|
const [isOpen, setIsOpen] = useState(false);
|
|
18
|
-
const [time, setTime] = useState('08:00');
|
|
19
18
|
const [date, setDate] = useState(()=>{
|
|
20
19
|
if (initialValue) return initialValue;
|
|
21
20
|
if (null == initialValue && true === required) return new Date();
|
|
22
21
|
return null;
|
|
23
22
|
});
|
|
23
|
+
const [time, setTime] = useState(()=>null != date ? format(date, 'HH:mm') : '08:00');
|
|
24
24
|
const [month, setMonth] = useState(date);
|
|
25
25
|
const calendarRef = useRef(null);
|
|
26
26
|
const inputRef = useRef(null);
|
|
@@ -29,11 +29,31 @@ function DatePicker({ id, name, label, required, initialValue, mode = 'datetime'
|
|
|
29
29
|
if (inputRef?.current != null) inputRef.current.value = '';
|
|
30
30
|
setDate(null);
|
|
31
31
|
onDateChange(null);
|
|
32
|
+
emitWallTime(null, time);
|
|
32
33
|
onClear();
|
|
33
34
|
};
|
|
34
35
|
const handleOnDateChange = (value)=>{
|
|
35
36
|
if (null != onDateChange && 'function' == typeof onDateChange) onDateChange(value);
|
|
36
37
|
};
|
|
38
|
+
const emitWallTime = (day, clock)=>{
|
|
39
|
+
if (null == onWallTimeChange) return;
|
|
40
|
+
onWallTimeChange(null == day ? null : {
|
|
41
|
+
date: format(day, 'yyyy-MM-dd'),
|
|
42
|
+
time: clock
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
const disabledDays = [
|
|
46
|
+
...null == minDate ? [] : [
|
|
47
|
+
{
|
|
48
|
+
before: minDate
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
...null == maxDate ? [] : [
|
|
52
|
+
{
|
|
53
|
+
after: maxDate
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
];
|
|
37
57
|
const handleOnKeyDown = (e)=>{
|
|
38
58
|
if ('ArrowDown' === e.key) {
|
|
39
59
|
e.preventDefault();
|
|
@@ -44,6 +64,7 @@ function DatePicker({ id, name, label, required, initialValue, mode = 'datetime'
|
|
|
44
64
|
if (null == initialValue && null != date && true === required && false === hasInitialized.current) {
|
|
45
65
|
hasInitialized.current = true;
|
|
46
66
|
onDateChange(date);
|
|
67
|
+
emitWallTime(date, time);
|
|
47
68
|
}
|
|
48
69
|
});
|
|
49
70
|
return /*#__PURE__*/ jsxs("div", {
|
|
@@ -134,6 +155,7 @@ function DatePicker({ id, name, label, required, initialValue, mode = 'datetime'
|
|
|
134
155
|
/*#__PURE__*/ jsx(Popover.Portal, {
|
|
135
156
|
children: /*#__PURE__*/ jsx(Popover.Positioner, {
|
|
136
157
|
sideOffset: 5,
|
|
158
|
+
className: clsx('infonomic-datepicker-positioner', datepicker_module.positioner),
|
|
137
159
|
children: /*#__PURE__*/ jsxs(Popover.Popup, {
|
|
138
160
|
className: clsx('infonomic-datepicker-content', datepicker_module.content, contentClassName),
|
|
139
161
|
children: [
|
|
@@ -151,15 +173,18 @@ function DatePicker({ id, name, label, required, initialValue, mode = 'datetime'
|
|
|
151
173
|
onMonthChange: setMonth,
|
|
152
174
|
onSelect: (selectedDate)=>{
|
|
153
175
|
if (selectedDate) {
|
|
176
|
+
const day = new Date(selectedDate.getTime());
|
|
154
177
|
const [hours, minutes] = time.split(':');
|
|
155
178
|
selectedDate.setHours(Number.parseInt(hours, 10), Number.parseInt(minutes, 10));
|
|
156
179
|
setDate(selectedDate);
|
|
157
180
|
setMonth(selectedDate);
|
|
158
181
|
handleOnDateChange(selectedDate);
|
|
182
|
+
emitWallTime(day, time);
|
|
159
183
|
}
|
|
160
184
|
},
|
|
161
|
-
|
|
162
|
-
|
|
185
|
+
disabled: disabledDays.length > 0 ? disabledDays : void 0,
|
|
186
|
+
startMonth: minDate ?? new Date(new Date().getFullYear() - yearsInPast, 0),
|
|
187
|
+
endMonth: maxDate ?? new Date(new Date().getFullYear() + yearsInFuture, 0)
|
|
163
188
|
})
|
|
164
189
|
}),
|
|
165
190
|
'datetime' === mode && /*#__PURE__*/ jsx("div", {
|
|
@@ -185,6 +210,7 @@ function DatePicker({ id, name, label, required, initialValue, mode = 'datetime'
|
|
|
185
210
|
newDate.setHours(Number.parseInt(hour, 10), Number.parseInt(minute, 10), 0);
|
|
186
211
|
setDate(newDate);
|
|
187
212
|
handleOnDateChange(newDate);
|
|
213
|
+
emitWallTime(date, timeValue);
|
|
188
214
|
}
|
|
189
215
|
},
|
|
190
216
|
children: timeValue
|
|
@@ -212,9 +238,12 @@ function DatePicker({ id, name, label, required, initialValue, mode = 'datetime'
|
|
|
212
238
|
className: clsx('infonomic-datepicker-content-actions-button', datepicker_module["content-actions-button"]),
|
|
213
239
|
onClick: ()=>{
|
|
214
240
|
const today = new Date();
|
|
241
|
+
const clock = format(today, 'HH:mm');
|
|
215
242
|
setDate(today);
|
|
216
243
|
setMonth(today);
|
|
244
|
+
setTime(clock);
|
|
217
245
|
handleOnDateChange(today);
|
|
246
|
+
emitWallTime(today, clock);
|
|
218
247
|
},
|
|
219
248
|
children: "Today"
|
|
220
249
|
})
|
|
@@ -241,6 +270,7 @@ function DatePicker({ id, name, label, required, initialValue, mode = 'datetime'
|
|
|
241
270
|
onClick: ()=>{
|
|
242
271
|
setIsOpen(false);
|
|
243
272
|
handleOnDateChange(date);
|
|
273
|
+
emitWallTime(date, time);
|
|
244
274
|
},
|
|
245
275
|
children: "Select"
|
|
246
276
|
})
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
@layer
|
|
1
|
+
@layer base,
|
|
2
|
+
infonomic-base,
|
|
3
|
+
theme,
|
|
4
|
+
infonomic-theme,
|
|
5
|
+
infonomic-functional,
|
|
6
|
+
infonomic-typography,
|
|
7
|
+
components,
|
|
8
|
+
infonomic-components,
|
|
9
|
+
overrides,
|
|
10
|
+
infonomic-utilities,
|
|
11
|
+
utilities;
|
|
2
12
|
|
|
3
13
|
@layer infonomic-components {
|
|
4
14
|
.container,
|
|
@@ -13,10 +23,19 @@
|
|
|
13
23
|
width: 100%;
|
|
14
24
|
}
|
|
15
25
|
|
|
26
|
+
/* Base UI's Positioner is the absolutely-positioned element, so it is the
|
|
27
|
+
one that can take part in z-index stacking. The Popup inside it is
|
|
28
|
+
`position: static`, where a z-index is inert — which is why the calendar
|
|
29
|
+
lost to any positioned ancestor above it in the tree, most visibly by
|
|
30
|
+
rendering behind a Modal. */
|
|
31
|
+
.positioner,
|
|
32
|
+
:global(.infonomic-datepicker-positioner) {
|
|
33
|
+
z-index: 50;
|
|
34
|
+
}
|
|
35
|
+
|
|
16
36
|
.content,
|
|
17
37
|
:global(.infonomic-datepicker-content) {
|
|
18
38
|
width: 100%;
|
|
19
|
-
z-index: 50;
|
|
20
39
|
border-radius: 4px;
|
|
21
40
|
padding-top: var(--spacing-16);
|
|
22
41
|
padding-bottom: var(--spacing-8);
|
|
@@ -4,6 +4,7 @@ const datepicker_module = {
|
|
|
4
4
|
input: "input-SaODq9",
|
|
5
5
|
"input-wrapper": "input-wrapper-qwAckv",
|
|
6
6
|
inputWrapper: "input-wrapper-qwAckv",
|
|
7
|
+
positioner: "positioner-l698qq",
|
|
7
8
|
content: "content-UK9iLF",
|
|
8
9
|
slideDownAndFade: "slideDownAndFade-dohHTE",
|
|
9
10
|
slideLeftAndFade: "slideLeftAndFade-ugM6Hs",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@layer infonomic-base, infonomic-
|
|
1
|
+
@layer base, infonomic-base, theme, infonomic-theme, infonomic-functional, infonomic-typography, components;
|
|
2
2
|
|
|
3
3
|
@layer infonomic-components {
|
|
4
4
|
:is(.container-u5_VUp, .infonomic-datepicker-container) {
|
|
@@ -9,8 +9,11 @@
|
|
|
9
9
|
width: 100%;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
:is(.
|
|
12
|
+
:is(.positioner-l698qq, .infonomic-datepicker-positioner) {
|
|
13
13
|
z-index: 50;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
:is(.content-UK9iLF, .infonomic-datepicker-content) {
|
|
14
17
|
width: 100%;
|
|
15
18
|
padding-top: var(--spacing-16);
|
|
16
19
|
padding-bottom: var(--spacing-8);
|
|
@@ -186,3 +189,5 @@
|
|
|
186
189
|
}
|
|
187
190
|
}
|
|
188
191
|
|
|
192
|
+
@layer overrides, infonomic-utilities, utilities;
|
|
193
|
+
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import { DrawerContainer } from './drawer-container';
|
|
3
|
-
import { DrawerContent } from './drawer-content';
|
|
4
|
-
import { DrawerHeader } from './drawer-header';
|
|
5
|
-
import { DrawerTopActions } from './drawer-top-actions';
|
|
2
|
+
import { DrawerContainer } from './drawer-container.js';
|
|
3
|
+
import { DrawerContent } from './drawer-content.js';
|
|
4
|
+
import { DrawerHeader } from './drawer-header.js';
|
|
5
|
+
import { DrawerTopActions } from './drawer-top-actions.js';
|
|
6
6
|
export interface DrawerProps {
|
|
7
7
|
id: string;
|
|
8
8
|
isOpen: boolean;
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
@layer
|
|
1
|
+
@layer base,
|
|
2
|
+
infonomic-base,
|
|
3
|
+
theme,
|
|
4
|
+
infonomic-theme,
|
|
5
|
+
infonomic-functional,
|
|
6
|
+
infonomic-typography,
|
|
7
|
+
components,
|
|
8
|
+
infonomic-components,
|
|
9
|
+
overrides,
|
|
10
|
+
infonomic-utilities,
|
|
11
|
+
utilities;
|
|
2
12
|
|
|
3
13
|
@layer infonomic-components {
|
|
4
14
|
/* Backdrop overlay (replaces previous Overlay component) */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@layer infonomic-base, infonomic-
|
|
1
|
+
@layer base, infonomic-base, theme, infonomic-theme, infonomic-functional, infonomic-typography, components;
|
|
2
2
|
|
|
3
3
|
@layer infonomic-components {
|
|
4
4
|
:is(.backdrop-Ga1s55, .infonomic-drawer-backdrop) {
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
width: 86%;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
@media (
|
|
77
|
+
@media (width >= 48rem) {
|
|
78
78
|
.drawer-depth-0-VYE9YM.drawer-medium-ZFbdby {
|
|
79
79
|
width: 600px;
|
|
80
80
|
}
|
|
@@ -127,3 +127,5 @@
|
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
+
@layer overrides, infonomic-utilities, utilities;
|
|
131
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared between `Modal` and its slots. Lives in its own module because
|
|
3
|
+
* `Modal` renders `Modal.Header` while `Modal.Header` needs the context —
|
|
4
|
+
* importing it from `modal.tsx` would make the two modules circular.
|
|
5
|
+
*/
|
|
6
|
+
export declare const ModalContext: import("react").Context<{
|
|
7
|
+
onDismiss?: () => void;
|
|
8
|
+
/**
|
|
9
|
+
* Id the dialog points `aria-labelledby` at. `Modal.Header` puts it on the
|
|
10
|
+
* heading it finds among its children, which is what gives the dialog its
|
|
11
|
+
* accessible name — without it a screen reader announces the modal as an
|
|
12
|
+
* unnamed "dialog".
|
|
13
|
+
*
|
|
14
|
+
* A dangling reference degrades safely: name computation ignores an
|
|
15
|
+
* `aria-labelledby` that resolves to nothing and falls through, so a modal
|
|
16
|
+
* with no header is no worse off than before.
|
|
17
|
+
*/
|
|
18
|
+
headingId?: string;
|
|
19
|
+
}>;
|
|
20
|
+
//# sourceMappingURL=modal-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal-context.d.ts","sourceRoot":"","sources":["../../../src/widgets/modal/modal-context.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,eAAO,MAAM,YAAY;gBACX,MAAM,IAAI;IACtB;;;;;;;;;OASG;gBACS,MAAM;EACd,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal-header.d.ts","sourceRoot":"","sources":["../../../src/widgets/modal/modal-header.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,
|
|
1
|
+
{"version":3,"file":"modal-header.d.ts","sourceRoot":"","sources":["../../../src/widgets/modal/modal-header.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAQ9B,KAAK,yBAAyB,GAAG,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAA;AACnE,MAAM,WAAW,gBAAiB,SAAQ,yBAAyB;IACjE,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AA0BD,eAAO,MAAM,WAAW,0CAKrB,gBAAgB,GAAG;IACpB,GAAG,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAA;CACtC,sBAQA,CAAA"}
|
|
@@ -2,7 +2,29 @@
|
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import modal_module from "./modal.module.js";
|
|
5
|
+
import { ModalContext } from "./modal-context.js";
|
|
6
|
+
import * as __rspack_external_react from "react";
|
|
7
|
+
const HEADING_TAGS = new Set([
|
|
8
|
+
'h1',
|
|
9
|
+
'h2',
|
|
10
|
+
'h3',
|
|
11
|
+
'h4',
|
|
12
|
+
'h5',
|
|
13
|
+
'h6'
|
|
14
|
+
]);
|
|
15
|
+
function labelHeading(children, headingId) {
|
|
16
|
+
let labelled = false;
|
|
17
|
+
return __rspack_external_react.Children.map(children, (child)=>{
|
|
18
|
+
if (labelled || !/*#__PURE__*/ __rspack_external_react.isValidElement(child)) return child;
|
|
19
|
+
if ('string' != typeof child.type || !HEADING_TAGS.has(child.type)) return child;
|
|
20
|
+
labelled = true;
|
|
21
|
+
return /*#__PURE__*/ __rspack_external_react.cloneElement(child, {
|
|
22
|
+
id: headingId
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
}
|
|
5
26
|
const modal_header_ModalHeader = function({ ref, children, className, ...rest }) {
|
|
27
|
+
const { headingId } = (0, __rspack_external_react.useContext)(ModalContext);
|
|
6
28
|
const classes = clsx('infonomic-modal-header', modal_module["modal-header"], 'prose', className);
|
|
7
29
|
return /*#__PURE__*/ jsx("div", {
|
|
8
30
|
style: {
|
|
@@ -11,7 +33,7 @@ const modal_header_ModalHeader = function({ ref, children, className, ...rest })
|
|
|
11
33
|
ref: ref,
|
|
12
34
|
...rest,
|
|
13
35
|
className: classes,
|
|
14
|
-
children: children
|
|
36
|
+
children: null == headingId ? children : labelHeading(children, headingId)
|
|
15
37
|
});
|
|
16
38
|
};
|
|
17
39
|
export { modal_header_ModalHeader as ModalHeader };
|
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
-
import { ModalActions } from './modal-actions';
|
|
3
|
-
import { ModalContainer } from './modal-container';
|
|
4
|
-
import { ModalContent } from './modal-content';
|
|
5
|
-
import {
|
|
2
|
+
import { ModalActions } from './modal-actions.js';
|
|
3
|
+
import { ModalContainer } from './modal-container.js';
|
|
4
|
+
import { ModalContent } from './modal-content.js';
|
|
5
|
+
import { ModalContext } from './modal-context.js';
|
|
6
|
+
import { ModalHeader } from './modal-header.js';
|
|
7
|
+
export { ModalContext };
|
|
6
8
|
export interface ModalProps {
|
|
7
9
|
isOpen?: boolean;
|
|
8
10
|
onDismiss?: () => void;
|
|
9
11
|
closeOnOverlayClick?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Accessible name for the dialog, for modals that carry no `Modal.Header`
|
|
14
|
+
* heading to borrow one from. Modals that do have a heading need nothing
|
|
15
|
+
* here — see `ModalContext.headingId`.
|
|
16
|
+
*/
|
|
17
|
+
ariaLabel?: string;
|
|
10
18
|
children?: React.ReactNode;
|
|
11
19
|
}
|
|
12
|
-
export declare const ModalContext: React.Context<{
|
|
13
|
-
onDismiss?: () => void;
|
|
14
|
-
}>;
|
|
15
20
|
export type UseModalProps = ReturnType<typeof useModal>;
|
|
16
21
|
export declare function useModal(): {
|
|
17
22
|
onDismiss: () => void;
|
|
@@ -19,7 +24,7 @@ export declare function useModal(): {
|
|
|
19
24
|
isOpen: boolean;
|
|
20
25
|
setIsOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
21
26
|
};
|
|
22
|
-
declare function Modal({ isOpen, onDismiss, closeOnOverlayClick, children, }: ModalProps): React.JSX.Element;
|
|
27
|
+
declare function Modal({ isOpen, onDismiss, closeOnOverlayClick, ariaLabel, children, }: ModalProps): React.JSX.Element;
|
|
23
28
|
declare namespace Modal {
|
|
24
29
|
var displayName: string;
|
|
25
30
|
export { ModalContainer as Container };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../src/widgets/modal/modal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAO9B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAE5C,MAAM,WAAW,UAAU;IACzB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;IACtB,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B;AAED,
|
|
1
|
+
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../src/widgets/modal/modal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAO9B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAE5C,OAAO,EAAE,YAAY,EAAE,CAAA;AAEvB,MAAM,WAAW,UAAU;IACzB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;IACtB,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B;AAED,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAA;AAEvD,wBAAgB,QAAQ,IAAI;IAC1B,SAAS,EAAE,MAAM,IAAI,CAAA;IACrB,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,MAAM,EAAE,OAAO,CAAA;IACf,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAA;CACzD,CAiBA;AAED,iBAAS,KAAK,CAAC,EACb,MAAM,EACN,SAAS,EACT,mBAAmB,EACnB,SAAS,EACT,QAAQ,GACT,EAAE,UAAU,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAwDhC;kBA9DQ,KAAK;;aAkEI,cAAc;aACjB,WAAW;aACV,YAAY;aACZ,YAAY;;AAE5B,OAAO,EAAE,KAAK,EAAE,CAAA"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
3
|
+
import { useCallback, useId, useRef, useState } from "react";
|
|
4
4
|
import { Dialog } from "@base-ui/react/dialog";
|
|
5
5
|
import clsx from "clsx";
|
|
6
6
|
import modal_module from "./modal.module.js";
|
|
7
7
|
import { ModalActions } from "./modal-actions.js";
|
|
8
8
|
import { ModalContainer } from "./modal-container.js";
|
|
9
9
|
import { ModalContent } from "./modal-content.js";
|
|
10
|
+
import { ModalContext } from "./modal-context.js";
|
|
10
11
|
import { ModalHeader } from "./modal-header.js";
|
|
11
|
-
const ModalContext = /*#__PURE__*/ createContext({});
|
|
12
12
|
function useModal() {
|
|
13
13
|
const [isOpen, setIsOpen] = useState(false);
|
|
14
14
|
const onDismiss = useCallback(()=>{
|
|
@@ -24,7 +24,8 @@ function useModal() {
|
|
|
24
24
|
setIsOpen
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
function Modal({ isOpen, onDismiss, closeOnOverlayClick, children }) {
|
|
27
|
+
function Modal({ isOpen, onDismiss, closeOnOverlayClick, ariaLabel, children }) {
|
|
28
|
+
const headingId = useId();
|
|
28
29
|
const pressStartedOnOverlay = useRef(false);
|
|
29
30
|
const handleOverlayPointerDown = (event)=>{
|
|
30
31
|
pressStartedOnOverlay.current = event.target === event.currentTarget;
|
|
@@ -38,7 +39,8 @@ function Modal({ isOpen, onDismiss, closeOnOverlayClick, children }) {
|
|
|
38
39
|
};
|
|
39
40
|
return /*#__PURE__*/ jsx(ModalContext.Provider, {
|
|
40
41
|
value: {
|
|
41
|
-
onDismiss
|
|
42
|
+
onDismiss,
|
|
43
|
+
headingId
|
|
42
44
|
},
|
|
43
45
|
children: /*#__PURE__*/ jsx(Dialog.Root, {
|
|
44
46
|
open: isOpen,
|
|
@@ -54,6 +56,8 @@ function Modal({ isOpen, onDismiss, closeOnOverlayClick, children }) {
|
|
|
54
56
|
}),
|
|
55
57
|
/*#__PURE__*/ jsx(Dialog.Popup, {
|
|
56
58
|
className: clsx('infonomic-modal-wrapper', modal_module["modal-wrapper"]),
|
|
59
|
+
"aria-label": ariaLabel,
|
|
60
|
+
"aria-labelledby": null == ariaLabel ? headingId : void 0,
|
|
57
61
|
onPointerDown: handleOverlayPointerDown,
|
|
58
62
|
onClick: handleOverlayClick,
|
|
59
63
|
children: children
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
@layer
|
|
1
|
+
@layer base,
|
|
2
|
+
infonomic-base,
|
|
3
|
+
theme,
|
|
4
|
+
infonomic-theme,
|
|
5
|
+
infonomic-functional,
|
|
6
|
+
infonomic-typography,
|
|
7
|
+
components,
|
|
8
|
+
infonomic-components,
|
|
9
|
+
overrides,
|
|
10
|
+
infonomic-utilities,
|
|
11
|
+
utilities;
|
|
2
12
|
|
|
3
13
|
@layer infonomic-components {
|
|
4
14
|
/* Backdrop overlay */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@layer infonomic-base, infonomic-
|
|
1
|
+
@layer base, infonomic-base, theme, infonomic-theme, infonomic-functional, infonomic-typography, components;
|
|
2
2
|
|
|
3
3
|
@layer infonomic-components {
|
|
4
4
|
:is(.backdrop-BgKon2, .infonomic-modal-backdrop) {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
opacity: 0;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
@media screen and (
|
|
45
|
+
@media screen and (width >= 40rem) {
|
|
46
46
|
:is(.modal-wrapper-wF5Mv1, .infonomic-modal-wrapper) {
|
|
47
47
|
justify-content: center;
|
|
48
48
|
}
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
display: flex;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
@media screen and (
|
|
65
|
+
@media screen and (width >= 40rem) {
|
|
66
66
|
:is(.modal-container-PPkPyj, .infonomic-modal-container) {
|
|
67
67
|
width: auto;
|
|
68
68
|
min-height: auto;
|
|
@@ -116,3 +116,5 @@
|
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
+
@layer overrides, infonomic-utilities, utilities;
|
|
120
|
+
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
@layer
|
|
2
|
-
infonomic-
|
|
3
|
-
|
|
1
|
+
@layer base,
|
|
2
|
+
infonomic-base,
|
|
3
|
+
theme,
|
|
4
4
|
infonomic-theme,
|
|
5
|
+
infonomic-functional,
|
|
5
6
|
infonomic-typography,
|
|
6
|
-
|
|
7
|
+
components,
|
|
8
|
+
infonomic-components,
|
|
9
|
+
overrides,
|
|
10
|
+
infonomic-utilities,
|
|
11
|
+
utilities;
|
|
7
12
|
|
|
8
13
|
@layer infonomic-components {
|
|
9
14
|
.timeline,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@layer
|
|
1
|
+
@layer base, infonomic-base, theme, infonomic-theme, infonomic-functional, infonomic-typography, components;
|
|
2
2
|
|
|
3
3
|
@layer infonomic-components {
|
|
4
4
|
:is(.timeline-qJOU85, .infonomic-timeline) {
|
|
@@ -81,3 +81,5 @@
|
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
+
@layer overrides, infonomic-utilities, utilities;
|
|
85
|
+
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@infonomic/uikit",
|
|
3
3
|
"private": false,
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "6.
|
|
5
|
+
"version": "6.9.1",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"description": "Infonomic UI kit is a collection of reusable UI components and utilities for React and Astro.",
|
|
8
8
|
"keywords": [
|
|
@@ -55,52 +55,59 @@
|
|
|
55
55
|
"./components.css": {
|
|
56
56
|
"import": "./dist/styles/components-vanilla.css",
|
|
57
57
|
"default": "./dist/styles/components-vanilla.css"
|
|
58
|
+
},
|
|
59
|
+
"./css-layers": {
|
|
60
|
+
"types": "./dist/css-layers.d.ts",
|
|
61
|
+
"import": "./dist/css-layers.js",
|
|
62
|
+
"default": "./dist/css-layers.js"
|
|
58
63
|
}
|
|
59
64
|
},
|
|
60
65
|
"peerDependencies": {
|
|
66
|
+
"postcss": "^8.4.0",
|
|
61
67
|
"react": "^19.0.0",
|
|
62
68
|
"react-dom": "^19.0.0"
|
|
63
69
|
},
|
|
64
70
|
"dependencies": {
|
|
65
|
-
"@base-ui/react": "^1.
|
|
71
|
+
"@base-ui/react": "^1.9.0",
|
|
66
72
|
"clsx": "^2.1.1",
|
|
67
73
|
"date-fns": "^4.4.0",
|
|
68
|
-
"motion": "^
|
|
74
|
+
"motion": "^14.14.0",
|
|
69
75
|
"npm-run-all": "^4.1.5",
|
|
70
76
|
"prism-react-renderer": "^2.4.1",
|
|
71
|
-
"react-day-picker": "^10.0.
|
|
72
|
-
"zod": "^4.
|
|
73
|
-
"zod-form-data": "^3.0.
|
|
77
|
+
"react-day-picker": "^10.0.2",
|
|
78
|
+
"zod": "^4.6.7",
|
|
79
|
+
"zod-form-data": "^3.0.4"
|
|
74
80
|
},
|
|
75
81
|
"devDependencies": {
|
|
76
|
-
"@astrojs/check": "0.9.
|
|
77
|
-
"@astrojs/node": "11.1.
|
|
78
|
-
"@biomejs/biome": "2.
|
|
79
|
-
"@rsbuild/plugin-react": "^2.1.
|
|
80
|
-
"@rslib/core": "^0.
|
|
81
|
-
"@storybook/addon-a11y": "^10.
|
|
82
|
-
"@storybook/addon-docs": "^10.
|
|
83
|
-
"@storybook/addon-links": "^10.
|
|
84
|
-
"@storybook/addon-themes": "^10.
|
|
85
|
-
"@storybook/react-vite": "^10.
|
|
86
|
-
"@types/lodash": "^4.17.
|
|
87
|
-
"@types/node": "^26.
|
|
88
|
-
"@types/react": "19.
|
|
89
|
-
"@types/react-dom": "19.
|
|
90
|
-
"@vitejs/plugin-react": "^6.0
|
|
91
|
-
"astro": "7.
|
|
92
|
-
"chokidar": "^
|
|
93
|
-
"eslint-plugin-storybook": "^10.
|
|
82
|
+
"@astrojs/check": "0.9.12",
|
|
83
|
+
"@astrojs/node": "11.1.14",
|
|
84
|
+
"@biomejs/biome": "2.6.8",
|
|
85
|
+
"@rsbuild/plugin-react": "^2.1.1",
|
|
86
|
+
"@rslib/core": "^1.0.7",
|
|
87
|
+
"@storybook/addon-a11y": "^10.6.7",
|
|
88
|
+
"@storybook/addon-docs": "^10.6.7",
|
|
89
|
+
"@storybook/addon-links": "^10.6.7",
|
|
90
|
+
"@storybook/addon-themes": "^10.6.7",
|
|
91
|
+
"@storybook/react-vite": "^10.6.7",
|
|
92
|
+
"@types/lodash": "^4.17.27",
|
|
93
|
+
"@types/node": "^26.6.6",
|
|
94
|
+
"@types/react": "19.3.0",
|
|
95
|
+
"@types/react-dom": "19.3.0",
|
|
96
|
+
"@vitejs/plugin-react": "^6.3.0",
|
|
97
|
+
"astro": "7.4.13",
|
|
98
|
+
"chokidar": "^6.0.0",
|
|
99
|
+
"eslint-plugin-storybook": "^10.6.7",
|
|
94
100
|
"lightningcss": "^1.33.0",
|
|
95
101
|
"lightningcss-cli": "^1.33.0",
|
|
96
|
-
"
|
|
97
|
-
"react
|
|
98
|
-
"
|
|
99
|
-
"
|
|
102
|
+
"postcss": "^8.5.33",
|
|
103
|
+
"react": "^19.3.1",
|
|
104
|
+
"react-dom": "^19.3.1",
|
|
105
|
+
"rimraf": "^6.1.4",
|
|
106
|
+
"storybook": "^10.6.7",
|
|
100
107
|
"typescript": "7.0.2",
|
|
101
|
-
"typescript-plugin-css-modules": "^5.
|
|
102
|
-
"vite": "^8.
|
|
103
|
-
"vitest": "^
|
|
108
|
+
"typescript-plugin-css-modules": "^5.3.0",
|
|
109
|
+
"vite": "^8.3.8",
|
|
110
|
+
"vitest": "^5.1.1"
|
|
104
111
|
},
|
|
105
112
|
"publishConfig": {
|
|
106
113
|
"access": "public",
|
|
@@ -109,6 +116,11 @@
|
|
|
109
116
|
"src/"
|
|
110
117
|
]
|
|
111
118
|
},
|
|
119
|
+
"peerDependenciesMeta": {
|
|
120
|
+
"postcss": {
|
|
121
|
+
"optional": true
|
|
122
|
+
}
|
|
123
|
+
},
|
|
112
124
|
"scripts": {
|
|
113
125
|
"dev": "run-p dev:*",
|
|
114
126
|
"skip:astro-compose": "node ./scripts/build-astro.js",
|
|
@@ -127,6 +139,7 @@
|
|
|
127
139
|
"lint": "biome check --write --unsafe --diagnostic-level=error",
|
|
128
140
|
"storybook": "storybook dev -p 6007",
|
|
129
141
|
"build-storybook": "storybook build",
|
|
130
|
-
"test": "
|
|
142
|
+
"test": "node --test tests/*.test.mjs",
|
|
143
|
+
"test:css-build": "CSS_BUILD_CHECK=1 node --test tests/*.test.mjs"
|
|
131
144
|
}
|
|
132
145
|
}
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
@layer
|
|
1
|
+
@layer base,
|
|
2
|
+
infonomic-base,
|
|
3
|
+
theme,
|
|
4
|
+
infonomic-theme,
|
|
5
|
+
infonomic-functional,
|
|
6
|
+
infonomic-typography,
|
|
7
|
+
components,
|
|
8
|
+
infonomic-components,
|
|
9
|
+
overrides,
|
|
10
|
+
infonomic-utilities,
|
|
11
|
+
utilities;
|
|
2
12
|
|
|
3
13
|
@layer infonomic-components {
|
|
4
14
|
.item,
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
@layer
|
|
2
|
-
infonomic-
|
|
3
|
-
|
|
1
|
+
@layer base,
|
|
2
|
+
infonomic-base,
|
|
3
|
+
theme,
|
|
4
4
|
infonomic-theme,
|
|
5
|
+
infonomic-functional,
|
|
5
6
|
infonomic-typography,
|
|
6
|
-
|
|
7
|
+
components,
|
|
8
|
+
infonomic-components,
|
|
9
|
+
overrides,
|
|
10
|
+
infonomic-utilities,
|
|
11
|
+
utilities;
|
|
7
12
|
|
|
8
13
|
@layer infonomic-components {
|
|
9
14
|
/* relative inline-flex h-10 w-10 rounded-full */
|