@infonomic/uikit 6.5.1 → 6.6.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/README.md +76 -4
- package/dist/components/accordion/accordion.module.css +1 -2
- package/dist/components/avatar/avatar.module.css +2 -19
- package/dist/components/avatar/avatar_module.css +2 -10
- package/dist/components/button/button-group.d.ts.map +1 -1
- package/dist/components/button/button-group.js +1 -1
- package/dist/components/button/button.module.css +56 -37
- package/dist/components/button/button_module.css +12 -12
- package/dist/components/button/combo-button.d.ts.map +1 -1
- package/dist/components/button/combo-button.module.css +3 -3
- package/dist/components/button/copy-button.d.ts.map +1 -1
- package/dist/components/button/copy-button.js +14 -7
- package/dist/components/card/card.module.css +1 -9
- package/dist/components/card/card_module.css +1 -5
- package/dist/components/chips/chip.module.css +32 -21
- package/dist/components/chips/chip_module.css +2 -2
- package/dist/components/dropdown/dropdown.d.ts.map +1 -1
- package/dist/components/hamburger/hamburger.module.css +6 -7
- package/dist/components/inputs/autocomplete.d.ts.map +1 -1
- package/dist/components/inputs/autocomplete.module.css +9 -10
- package/dist/components/inputs/autocomplete_module.css +2 -2
- package/dist/components/inputs/checkbox-group.module.css +6 -7
- package/dist/components/inputs/checkbox.module.css +16 -18
- package/dist/components/inputs/checkbox_module.css +2 -2
- package/dist/components/inputs/error-text.module.css +1 -1
- package/dist/components/inputs/error-text_module.css +1 -1
- package/dist/components/inputs/input.module.css +10 -11
- package/dist/components/inputs/input_module.css +2 -2
- package/dist/components/inputs/label.module.css +1 -1
- package/dist/components/inputs/label_module.css +1 -1
- package/dist/components/inputs/radio-group.module.css +6 -7
- package/dist/components/inputs/select.d.ts.map +1 -1
- package/dist/components/inputs/select.module.css +6 -7
- package/dist/components/inputs/text-area.module.css +10 -9
- package/dist/components/notifications/toast.module.css +9 -19
- package/dist/components/notifications/toast_module.css +3 -6
- package/dist/components/pager/first-button.d.ts.map +1 -1
- package/dist/components/pager/last-button.d.ts.map +1 -1
- package/dist/components/pager/next-button.d.ts.map +1 -1
- package/dist/components/pager/number-button.d.ts.map +1 -1
- package/dist/components/pager/pagination.module.css +1 -6
- package/dist/components/pager/pagination_module.css +1 -1
- package/dist/components/pager/previous-button.d.ts.map +1 -1
- package/dist/components/scroll-area/scroll-area.d.ts.map +1 -1
- package/dist/components/scroll-to-top/scroll-to-top.module.css +3 -3
- package/dist/components/scroll-to-top/scroll-to-top_module.css +6 -6
- package/dist/components/tabs/tabs.module.css +6 -7
- package/dist/components/tooltip/tooltip.d.ts.map +1 -1
- package/dist/components/tooltip/tooltip.module.css +10 -11
- package/dist/lib/ripple.js +3 -3
- package/dist/loaders/ellipses.d.ts.map +1 -1
- package/dist/loaders/ring.d.ts.map +1 -1
- package/dist/loaders/spinner.d.ts.map +1 -1
- package/dist/styles/components-vanilla.css +1 -1
- package/dist/styles/styles.css +1 -1
- package/dist/widgets/datepicker/datepicker.d.ts.map +1 -1
- package/dist/widgets/datepicker/datepicker.module.css +1 -2
- package/dist/widgets/drawer/drawer.module.css +1 -2
- package/dist/widgets/modal/modal.d.ts.map +1 -1
- package/dist/widgets/modal/modal.module.css +1 -4
- package/package.json +1 -1
- package/src/components/accordion/accordion.module.css +1 -2
- package/src/components/avatar/avatar.module.css +2 -19
- package/src/components/button/button-group.tsx +3 -9
- package/src/components/button/button.module.css +56 -37
- package/src/components/button/combo-button.module.css +3 -3
- package/src/components/button/combo-button.tsx +1 -7
- package/src/components/button/copy-button.tsx +23 -9
- package/src/components/card/card.module.css +1 -9
- package/src/components/chips/chip.module.css +32 -21
- package/src/components/chips/chip.stories.tsx +2 -2
- package/src/components/chips/chip.tsx +2 -2
- package/src/components/dropdown/dropdown.tsx +4 -19
- package/src/components/hamburger/hamburger.module.css +6 -7
- package/src/components/hamburger/hamburger.stories.tsx +0 -1
- package/src/components/inputs/autocomplete.module.css +9 -10
- package/src/components/inputs/autocomplete.tsx +10 -4
- package/src/components/inputs/calendar.stories.tsx +18 -18
- package/src/components/inputs/checkbox-group.module.css +6 -7
- package/src/components/inputs/checkbox-group.stories.tsx +4 -7
- package/src/components/inputs/checkbox.module.css +16 -18
- package/src/components/inputs/error-text.module.css +1 -1
- package/src/components/inputs/input.module.css +10 -11
- package/src/components/inputs/label.module.css +1 -1
- package/src/components/inputs/radio-group.module.css +6 -7
- package/src/components/inputs/select.module.css +6 -7
- package/src/components/inputs/select.stories.tsx +21 -4
- package/src/components/inputs/select.tsx +9 -7
- package/src/components/inputs/text-area.module.css +10 -9
- package/src/components/notifications/toast.module.css +9 -19
- package/src/components/notifications/toast.tsx +2 -11
- package/src/components/pager/first-button.tsx +5 -1
- package/src/components/pager/last-button.tsx +5 -1
- package/src/components/pager/next-button.tsx +5 -1
- package/src/components/pager/number-button.tsx +6 -3
- package/src/components/pager/pagination.module.css +1 -6
- package/src/components/pager/previous-button.tsx +5 -1
- package/src/components/scroll-area/scroll-area.tsx +1 -1
- package/src/components/scroll-to-top/scroll-to-top.module.css +3 -3
- package/src/components/tabs/tabs.module.css +6 -7
- package/src/components/tooltip/tooltip.module.css +10 -11
- package/src/components/tooltip/tooltip.tsx +12 -12
- package/src/lib/ripple.ts +3 -3
- package/src/loaders/ellipses.tsx +1 -1
- package/src/loaders/loaders.stories.tsx +44 -10
- package/src/loaders/ring.tsx +1 -1
- package/src/loaders/spinner.tsx +2 -2
- package/src/styles/components/hamburger.css +6 -6
- package/src/styles/components/loaders.css +1 -1
- package/src/styles/functional/README.md +67 -0
- package/src/styles/functional/borders.css +19 -0
- package/src/styles/functional/colors.css +237 -69
- package/src/styles/functional/functional.css +1 -0
- package/src/styles/functional/shadcn-compat.css +120 -0
- package/src/styles/functional/surfaces.css +17 -0
- package/src/styles/functional/typography.css +14 -6
- package/src/styles/local-fonts.css +1 -1
- package/src/styles/theme/theme.css +1 -1
- package/src/styles/utils/utility-classes.css +12 -22
- package/src/widgets/datepicker/datepicker.module.css +1 -2
- package/src/widgets/datepicker/datepicker.tsx +10 -8
- package/src/widgets/drawer/drawer.module.css +1 -2
- package/src/widgets/modal/modal.module.css +1 -4
- package/src/widgets/modal/modal.tsx +2 -6
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SHADCN COMPATIBILITY ALIAS LAYER
|
|
3
|
+
*
|
|
4
|
+
* Additive translation layer that maps Infonomic semantic tokens onto the
|
|
5
|
+
* naming ShadCN-style UI snippets and AI-generated markup expect. The
|
|
6
|
+
* Infonomic token model remains the source of truth - these aliases are
|
|
7
|
+
* strictly for compatibility with consumer apps that register Tailwind
|
|
8
|
+
* semantic utilities (bg-card, text-muted-foreground, border-border, etc.).
|
|
9
|
+
*
|
|
10
|
+
* Important notes on mapping intent:
|
|
11
|
+
* - ShadCN `accent` is an interactive neutral surface, NOT a brand accent.
|
|
12
|
+
* It is mapped to --surface-subtle-hover, not --accent.
|
|
13
|
+
* - ShadCN `muted` is a subdued surface, NOT Infonomic's --muted text token.
|
|
14
|
+
* Surface aliases use --surface-subtle*; text aliases use --text-subtle.
|
|
15
|
+
* - ShadCN `primary` is a high-emphasis action surface, matched to
|
|
16
|
+
* --fill-primary-strong (not the raw --primary palette token).
|
|
17
|
+
*
|
|
18
|
+
* This file is imported after the rest of the functional layer so the
|
|
19
|
+
* aliases always resolve against the current mode's semantic values.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
@layer infonomic-functional {
|
|
23
|
+
:root {
|
|
24
|
+
--shadcn-background: var(--background);
|
|
25
|
+
--shadcn-foreground: var(--foreground);
|
|
26
|
+
|
|
27
|
+
--shadcn-card: var(--surface-panel);
|
|
28
|
+
--shadcn-card-foreground: var(--text);
|
|
29
|
+
|
|
30
|
+
--shadcn-popover: var(--surface-panel-elevated);
|
|
31
|
+
--shadcn-popover-foreground: var(--text);
|
|
32
|
+
|
|
33
|
+
--shadcn-primary: var(--fill-primary-strong);
|
|
34
|
+
--shadcn-primary-foreground: var(--text-on-primary-strong);
|
|
35
|
+
|
|
36
|
+
--shadcn-secondary: var(--fill-secondary-strong);
|
|
37
|
+
--shadcn-secondary-foreground: var(--text-on-secondary-strong);
|
|
38
|
+
|
|
39
|
+
--shadcn-muted: var(--surface-subtle-hover);
|
|
40
|
+
--shadcn-muted-foreground: var(--text-subtle);
|
|
41
|
+
|
|
42
|
+
--shadcn-accent: var(--surface-subtle-hover);
|
|
43
|
+
--shadcn-accent-foreground: var(--text);
|
|
44
|
+
|
|
45
|
+
--shadcn-destructive: var(--fill-danger-strong);
|
|
46
|
+
--shadcn-destructive-foreground: var(--text-on-danger-strong);
|
|
47
|
+
|
|
48
|
+
--shadcn-border: var(--border-color);
|
|
49
|
+
--shadcn-input: var(--field-border);
|
|
50
|
+
--shadcn-ring: var(--focus-ring);
|
|
51
|
+
|
|
52
|
+
--shadcn-radius: var(--border-radius-md);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.dark,
|
|
56
|
+
[data-theme="dark"],
|
|
57
|
+
[data-theme="dark"]::backdrop {
|
|
58
|
+
--shadcn-background: var(--background);
|
|
59
|
+
--shadcn-foreground: var(--foreground);
|
|
60
|
+
|
|
61
|
+
--shadcn-card: var(--surface-panel);
|
|
62
|
+
--shadcn-card-foreground: var(--text);
|
|
63
|
+
|
|
64
|
+
--shadcn-popover: var(--surface-panel-elevated);
|
|
65
|
+
--shadcn-popover-foreground: var(--text);
|
|
66
|
+
|
|
67
|
+
--shadcn-primary: var(--fill-primary-strong);
|
|
68
|
+
--shadcn-primary-foreground: var(--text-on-primary-strong);
|
|
69
|
+
|
|
70
|
+
--shadcn-secondary: var(--fill-secondary-strong);
|
|
71
|
+
--shadcn-secondary-foreground: var(--text-on-secondary-strong);
|
|
72
|
+
|
|
73
|
+
--shadcn-muted: var(--surface-subtle-hover);
|
|
74
|
+
--shadcn-muted-foreground: var(--text-subtle);
|
|
75
|
+
|
|
76
|
+
--shadcn-accent: var(--surface-subtle-hover);
|
|
77
|
+
--shadcn-accent-foreground: var(--text);
|
|
78
|
+
|
|
79
|
+
--shadcn-destructive: var(--fill-danger-strong);
|
|
80
|
+
--shadcn-destructive-foreground: var(--text-on-danger-strong);
|
|
81
|
+
|
|
82
|
+
--shadcn-border: var(--border-color);
|
|
83
|
+
--shadcn-input: var(--field-border);
|
|
84
|
+
--shadcn-ring: var(--focus-ring);
|
|
85
|
+
|
|
86
|
+
--shadcn-radius: var(--border-radius-md);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.not-dark {
|
|
90
|
+
--shadcn-background: var(--background);
|
|
91
|
+
--shadcn-foreground: var(--foreground);
|
|
92
|
+
|
|
93
|
+
--shadcn-card: var(--surface-panel);
|
|
94
|
+
--shadcn-card-foreground: var(--text);
|
|
95
|
+
|
|
96
|
+
--shadcn-popover: var(--surface-panel-elevated);
|
|
97
|
+
--shadcn-popover-foreground: var(--text);
|
|
98
|
+
|
|
99
|
+
--shadcn-primary: var(--fill-primary-strong);
|
|
100
|
+
--shadcn-primary-foreground: var(--text-on-primary-strong);
|
|
101
|
+
|
|
102
|
+
--shadcn-secondary: var(--fill-secondary-strong);
|
|
103
|
+
--shadcn-secondary-foreground: var(--text-on-secondary-strong);
|
|
104
|
+
|
|
105
|
+
--shadcn-muted: var(--surface-subtle-hover);
|
|
106
|
+
--shadcn-muted-foreground: var(--text-subtle);
|
|
107
|
+
|
|
108
|
+
--shadcn-accent: var(--surface-subtle-hover);
|
|
109
|
+
--shadcn-accent-foreground: var(--text);
|
|
110
|
+
|
|
111
|
+
--shadcn-destructive: var(--fill-danger-strong);
|
|
112
|
+
--shadcn-destructive-foreground: var(--text-on-danger-strong);
|
|
113
|
+
|
|
114
|
+
--shadcn-border: var(--border-color);
|
|
115
|
+
--shadcn-input: var(--field-border);
|
|
116
|
+
--shadcn-ring: var(--focus-ring);
|
|
117
|
+
|
|
118
|
+
--shadcn-radius: var(--border-radius-md);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
@@ -32,6 +32,13 @@
|
|
|
32
32
|
--surface-item-text-active: var(--text);
|
|
33
33
|
--surface-item-text-disabled: var(--gray-400);
|
|
34
34
|
|
|
35
|
+
/* Subtle neutral surface - generic role used by components that need
|
|
36
|
+
a muted background without adopting any intent color. Also the
|
|
37
|
+
mapping target for ShadCN-style muted/accent tokens. */
|
|
38
|
+
--surface-subtle: var(--canvas-50);
|
|
39
|
+
--surface-subtle-hover: var(--canvas-100);
|
|
40
|
+
--surface-subtle-active: var(--canvas-200);
|
|
41
|
+
|
|
35
42
|
/* Panel scrollers */
|
|
36
43
|
--surface-panel-scrollbar: var(--gray-50);
|
|
37
44
|
--surface-panel-scrollbar-thumb: var(--primary-100);
|
|
@@ -71,6 +78,11 @@
|
|
|
71
78
|
--surface-item-text-active: var(--text);
|
|
72
79
|
--surface-item-text-disabled: var(--gray-500);
|
|
73
80
|
|
|
81
|
+
/* Subtle neutral surface */
|
|
82
|
+
--surface-subtle: var(--canvas-800);
|
|
83
|
+
--surface-subtle-hover: var(--canvas-700);
|
|
84
|
+
--surface-subtle-active: var(--canvas-600);
|
|
85
|
+
|
|
74
86
|
/* Panel scrollers */
|
|
75
87
|
--surface-panel-scrollbar: var(--canvas-700);
|
|
76
88
|
--surface-panel-scrollbar-thumb: var(--primary-400);
|
|
@@ -108,6 +120,11 @@
|
|
|
108
120
|
--surface-item-text-active: var(--text);
|
|
109
121
|
--surface-item-text-disabled: var(--gray-400);
|
|
110
122
|
|
|
123
|
+
/* Subtle neutral surface */
|
|
124
|
+
--surface-subtle: var(--canvas-50);
|
|
125
|
+
--surface-subtle-hover: var(--canvas-100);
|
|
126
|
+
--surface-subtle-active: var(--canvas-200);
|
|
127
|
+
|
|
111
128
|
/* Panel scrollers */
|
|
112
129
|
--surface-panel-scrollbar: var(--gray-50);
|
|
113
130
|
--surface-panel-scrollbar-thumb: var(--primary-100);
|
|
@@ -11,12 +11,16 @@
|
|
|
11
11
|
--text: var(--gray-900);
|
|
12
12
|
--headings: var(--primary-700);
|
|
13
13
|
--muted: oklch(from var(--foreground) calc(l * 2) c h);
|
|
14
|
-
|
|
14
|
+
|
|
15
|
+
/* Generic text-role tokens - for components that need a subdued or
|
|
16
|
+
placeholder-style foreground without adopting any intent color. */
|
|
17
|
+
--text-subtle: var(--muted);
|
|
18
|
+
--text-placeholder: var(--muted);
|
|
15
19
|
}
|
|
16
20
|
|
|
17
|
-
/* 🌙 Dark via `.dark` class or [data-theme="dark"] attribute.
|
|
18
|
-
* We rely on the consuming application to detect a user's
|
|
19
|
-
* preferred color scheme - either by header or cookie, and to set
|
|
21
|
+
/* 🌙 Dark via `.dark` class or [data-theme="dark"] attribute.
|
|
22
|
+
* We rely on the consuming application to detect a user's
|
|
23
|
+
* preferred color scheme - either by header or cookie, and to set
|
|
20
24
|
* a root html class accordingly (for now), which unfortunately means
|
|
21
25
|
* relying on either a server-side render or JS to set the theme
|
|
22
26
|
* on initial load.
|
|
@@ -27,7 +31,9 @@
|
|
|
27
31
|
--text: var(--gray-50);
|
|
28
32
|
--headings: var(--gray-50);
|
|
29
33
|
--muted: oklch(from var(--foreground) calc(l * 0.75) c h);
|
|
30
|
-
|
|
34
|
+
|
|
35
|
+
--text-subtle: var(--muted);
|
|
36
|
+
--text-placeholder: var(--muted);
|
|
31
37
|
}
|
|
32
38
|
|
|
33
39
|
/* ===================================================================
|
|
@@ -41,6 +47,8 @@
|
|
|
41
47
|
--text: var(--gray-900);
|
|
42
48
|
--headings: var(--primary-800);
|
|
43
49
|
--muted: oklch(from var(--foreground) calc(l * 2) c h);
|
|
44
|
-
|
|
50
|
+
|
|
51
|
+
--text-subtle: var(--muted);
|
|
52
|
+
--text-placeholder: var(--muted);
|
|
45
53
|
}
|
|
46
54
|
}
|
|
@@ -63,72 +63,62 @@
|
|
|
63
63
|
|
|
64
64
|
.primary-strong {
|
|
65
65
|
background-color: var(--fill-primary-strong);
|
|
66
|
-
color: var(--text-on-primary);
|
|
66
|
+
color: var(--text-on-primary-strong);
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
.primary-weak {
|
|
70
70
|
background-color: var(--fill-primary-weak);
|
|
71
|
-
color: var(--text-on-primary);
|
|
71
|
+
color: var(--text-on-primary-weak);
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
.secondary-strong {
|
|
75
75
|
background-color: var(--fill-secondary-strong);
|
|
76
|
-
color: var(--text-on-secondary);
|
|
76
|
+
color: var(--text-on-secondary-strong);
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
.secondary-weak {
|
|
80
80
|
background-color: var(--fill-secondary-weak);
|
|
81
|
-
color: var(--text-on-secondary);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.accent-strong {
|
|
85
|
-
background-color: var(--fill-accent-strong);
|
|
86
|
-
color: var(--text-on-accent);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.accent-weak {
|
|
90
|
-
background-color: var(--fill-accent-weak);
|
|
91
|
-
color: var(--text-on-accent);
|
|
81
|
+
color: var(--text-on-secondary-weak);
|
|
92
82
|
}
|
|
93
83
|
|
|
94
84
|
.info-strong {
|
|
95
85
|
background-color: var(--fill-info-strong);
|
|
96
|
-
color: var(--text-on-info);
|
|
86
|
+
color: var(--text-on-info-strong);
|
|
97
87
|
}
|
|
98
88
|
|
|
99
89
|
.info-weak {
|
|
100
90
|
background-color: var(--fill-info-weak);
|
|
101
|
-
color: var(--text-on-info);
|
|
91
|
+
color: var(--text-on-info-weak);
|
|
102
92
|
}
|
|
103
93
|
|
|
104
94
|
.success-strong {
|
|
105
95
|
background-color: var(--fill-success-strong);
|
|
106
|
-
color: var(--text-on-success);
|
|
96
|
+
color: var(--text-on-success-strong);
|
|
107
97
|
}
|
|
108
98
|
|
|
109
99
|
.success-weak {
|
|
110
100
|
background-color: var(--fill-success-weak);
|
|
111
|
-
color: var(--text-on-success);
|
|
101
|
+
color: var(--text-on-success-weak);
|
|
112
102
|
}
|
|
113
103
|
|
|
114
104
|
.warning-strong {
|
|
115
105
|
background-color: var(--fill-warning-strong);
|
|
116
|
-
color: var(--text-on-warning);
|
|
106
|
+
color: var(--text-on-warning-strong);
|
|
117
107
|
}
|
|
118
108
|
|
|
119
109
|
.warning-weak {
|
|
120
110
|
background-color: var(--fill-warning-weak);
|
|
121
|
-
color: var(--text-on-warning);
|
|
111
|
+
color: var(--text-on-warning-weak);
|
|
122
112
|
}
|
|
123
113
|
|
|
124
114
|
.danger-strong {
|
|
125
115
|
background-color: var(--fill-danger-strong);
|
|
126
|
-
color: var(--text-on-danger);
|
|
116
|
+
color: var(--text-on-danger-strong);
|
|
127
117
|
}
|
|
128
118
|
|
|
129
119
|
.danger-weak {
|
|
130
120
|
background-color: var(--fill-danger-weak);
|
|
131
|
-
color: var(--text-on-danger);
|
|
121
|
+
color: var(--text-on-danger-weak);
|
|
132
122
|
}
|
|
133
123
|
|
|
134
124
|
/* ========================================
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
@layer infonomic-base, infonomic-utilities, infonomic-theme, infonomic-components;
|
|
2
2
|
|
|
3
3
|
@layer infonomic-components {
|
|
4
|
-
|
|
5
4
|
.container,
|
|
6
5
|
:global(.infonomic-datepicker-container) {
|
|
7
6
|
position: relative;
|
|
@@ -205,4 +204,4 @@
|
|
|
205
204
|
transform: translateX(0);
|
|
206
205
|
}
|
|
207
206
|
}
|
|
208
|
-
}
|
|
207
|
+
}
|
|
@@ -70,8 +70,8 @@ export function DatePicker({
|
|
|
70
70
|
inputWrapperClassName,
|
|
71
71
|
containerClassName,
|
|
72
72
|
contentClassName,
|
|
73
|
-
onClear = () => {
|
|
74
|
-
onDateChange = () => {
|
|
73
|
+
onClear = () => {},
|
|
74
|
+
onDateChange = () => {},
|
|
75
75
|
validatorFn,
|
|
76
76
|
helpText,
|
|
77
77
|
errorText,
|
|
@@ -237,11 +237,11 @@ export function DatePicker({
|
|
|
237
237
|
}}
|
|
238
238
|
startMonth={new Date(new Date().getFullYear() - yearsInPast, 0)}
|
|
239
239
|
endMonth={new Date(new Date().getFullYear() + yearsInFuture, 0)}
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
240
|
+
// TODO: add props
|
|
241
|
+
// disabled={(date) =>
|
|
242
|
+
// Number(date) < Date.now() - 1000 * 60 * 60 * 24 ||
|
|
243
|
+
// Number(date) > Date.now() + 1000 * 60 * 60 * 24 * 30
|
|
244
|
+
// }
|
|
245
245
|
/>
|
|
246
246
|
</div>
|
|
247
247
|
{mode === 'datetime' && (
|
|
@@ -289,7 +289,9 @@ export function DatePicker({
|
|
|
289
289
|
styles['status-and-actions']
|
|
290
290
|
)}
|
|
291
291
|
>
|
|
292
|
-
<div
|
|
292
|
+
<div
|
|
293
|
+
className={cx('infonomic-datepicker-content-status', styles['content-status'])}
|
|
294
|
+
>
|
|
293
295
|
{date ? format(date, mode === 'datetime' ? 'PPPp' : 'PPP') : 'No date selected'}
|
|
294
296
|
</div>
|
|
295
297
|
<div
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
@layer infonomic-base, infonomic-utilities, infonomic-theme, infonomic-components;
|
|
2
2
|
|
|
3
3
|
@layer infonomic-components {
|
|
4
|
-
|
|
5
4
|
/* Backdrop overlay (replaces previous Overlay component) */
|
|
6
5
|
|
|
7
6
|
.backdrop,
|
|
@@ -139,4 +138,4 @@
|
|
|
139
138
|
:global(.infonomic-drawer-content) {
|
|
140
139
|
padding: var(--spacing-12);
|
|
141
140
|
}
|
|
142
|
-
}
|
|
141
|
+
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
@layer infonomic-base, infonomic-utilities, infonomic-theme, infonomic-components;
|
|
2
2
|
|
|
3
3
|
@layer infonomic-components {
|
|
4
|
-
|
|
5
4
|
/* Backdrop overlay */
|
|
6
5
|
|
|
7
6
|
.backdrop,
|
|
@@ -49,7 +48,6 @@
|
|
|
49
48
|
}
|
|
50
49
|
|
|
51
50
|
@media screen and (min-width: 40rem) {
|
|
52
|
-
|
|
53
51
|
.modal-wrapper,
|
|
54
52
|
:global(.infonomic-modal-wrapper) {
|
|
55
53
|
justify-content: center;
|
|
@@ -74,7 +72,6 @@
|
|
|
74
72
|
}
|
|
75
73
|
|
|
76
74
|
@media screen and (min-width: 40rem) {
|
|
77
|
-
|
|
78
75
|
.modal-container,
|
|
79
76
|
:global(.infonomic-modal-container) {
|
|
80
77
|
max-height: calc(100vh - 24px);
|
|
@@ -127,4 +124,4 @@
|
|
|
127
124
|
padding-left: var(--spacing-16);
|
|
128
125
|
padding-right: var(--spacing-16);
|
|
129
126
|
}
|
|
130
|
-
}
|
|
127
|
+
}
|
|
@@ -68,12 +68,8 @@ function Modal({
|
|
|
68
68
|
disablePointerDismissal={closeOnOverlayClick !== true}
|
|
69
69
|
>
|
|
70
70
|
<Dialog.Portal>
|
|
71
|
-
<Dialog.Backdrop
|
|
72
|
-
|
|
73
|
-
/>
|
|
74
|
-
<Dialog.Popup
|
|
75
|
-
className={cx('infonomic-modal-wrapper', styles['modal-wrapper'])}
|
|
76
|
-
>
|
|
71
|
+
<Dialog.Backdrop className={cx('infonomic-modal-backdrop', styles.backdrop)} />
|
|
72
|
+
<Dialog.Popup className={cx('infonomic-modal-wrapper', styles['modal-wrapper'])}>
|
|
77
73
|
{children}
|
|
78
74
|
</Dialog.Popup>
|
|
79
75
|
</Dialog.Portal>
|