@pingux/astro 2.245.0 → 2.246.0-alpha.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/lib/cjs/components/Calendar/CalendarCell.js +8 -2
- package/lib/cjs/components/DatePicker/DateField.js +24 -5
- package/lib/cjs/components/DatePicker/DatePicker.js +19 -9
- package/lib/cjs/components/TableBase/TableBase.js +14 -3
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/colors.d.ts +1 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/colors.js +3 -2
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/buttons.d.ts +17 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/buttons.js +17 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/calendar.d.ts +113 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/calendar.js +128 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/forms.d.ts +1822 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/forms.js +42 -2
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.d.ts +112 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.js +3 -1
- package/lib/cjs/styles/themeOverrides/onyxUiLibraryOverride.js +5 -1
- package/lib/cjs/styles/themes/next-gen/colors/colors.d.ts +1 -0
- package/lib/cjs/styles/themes/next-gen/colors/colors.js +1 -0
- package/lib/cjs/styles/themes/next-gen/convertedComponentList.js +1 -1
- package/lib/cjs/styles/themes/next-gen/forms.d.ts +2044 -214
- package/lib/cjs/styles/themes/next-gen/forms.js +48 -2
- package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +1185 -90
- package/lib/cjs/styles/themes/next-gen/variants/button.d.ts +22 -0
- package/lib/cjs/styles/themes/next-gen/variants/button.js +22 -0
- package/lib/cjs/styles/themes/next-gen/variants/calendar.d.ts +158 -0
- package/lib/cjs/styles/themes/next-gen/variants/calendar.js +172 -0
- package/lib/cjs/styles/themes/next-gen/variants/variants.d.ts +157 -0
- package/lib/cjs/styles/themes/next-gen/variants/variants.js +2 -0
- package/lib/cjs/types/popoverContainer.d.ts +7 -2
- package/lib/components/Calendar/CalendarCell.js +9 -3
- package/lib/components/DatePicker/DateField.js +25 -6
- package/lib/components/DatePicker/DatePicker.js +20 -10
- package/lib/components/TableBase/TableBase.js +14 -3
- package/lib/styles/themeOverrides/nextGenDarkMode/colors.js +3 -2
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/buttons.js +17 -0
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/calendar.js +122 -0
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/forms.js +41 -1
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/variants.js +3 -1
- package/lib/styles/themeOverrides/onyxUiLibraryOverride.js +5 -1
- package/lib/styles/themes/next-gen/colors/colors.js +1 -0
- package/lib/styles/themes/next-gen/convertedComponentList.js +1 -1
- package/lib/styles/themes/next-gen/forms.js +47 -1
- package/lib/styles/themes/next-gen/variants/button.js +22 -0
- package/lib/styles/themes/next-gen/variants/calendar.js +166 -0
- package/lib/styles/themes/next-gen/variants/variants.js +2 -0
- package/package.json +1 -1
|
@@ -8,9 +8,10 @@ import { useDateField } from '@react-aria/datepicker';
|
|
|
8
8
|
import { useLocale } from '@react-aria/i18n';
|
|
9
9
|
import { VisuallyHidden } from '@react-aria/visually-hidden';
|
|
10
10
|
import { useDateFieldState } from '@react-stately/datepicker';
|
|
11
|
-
import { useField, useStatusClasses } from '../../hooks';
|
|
11
|
+
import { useField, useGetTheme, useStatusClasses } from '../../hooks';
|
|
12
12
|
import { Box, FieldHelperText, Icon, IconButton, Input, Label, Messages } from '../../index';
|
|
13
13
|
import statuses from '../../utils/devUtils/constants/statuses';
|
|
14
|
+
import IconSymbol from '../Icon/IconSymbol';
|
|
14
15
|
import DateSegment from './DateSegment';
|
|
15
16
|
|
|
16
17
|
/**
|
|
@@ -46,6 +47,10 @@ const DateField = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
46
47
|
...other
|
|
47
48
|
} = props;
|
|
48
49
|
const [errorMessage, setErrorMessage] = useState('');
|
|
50
|
+
const {
|
|
51
|
+
themeState
|
|
52
|
+
} = useGetTheme();
|
|
53
|
+
const isOnyxTheme = themeState.isOnyx;
|
|
49
54
|
const fieldRef = useRef(null);
|
|
50
55
|
const inputRef = useRef(null);
|
|
51
56
|
const labelRef = useRef(null);
|
|
@@ -146,10 +151,11 @@ const DateField = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
146
151
|
*/
|
|
147
152
|
|
|
148
153
|
const formatHelpText = useMemo(() => {
|
|
149
|
-
|
|
154
|
+
const displaySegments = isLocalEnUS ? enUSSegments : segments;
|
|
155
|
+
return displaySegments.map(s => {
|
|
150
156
|
return s.text;
|
|
151
157
|
}).join(' ');
|
|
152
|
-
}, [hasFormatHelpText]);
|
|
158
|
+
}, [hasFormatHelpText, isLocalEnUS]);
|
|
153
159
|
const handlePaste = useCallback(e => {
|
|
154
160
|
const copiedValue = e.clipboardData.getData('text');
|
|
155
161
|
let isNextAvailableDate;
|
|
@@ -197,7 +203,9 @@ const DateField = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
197
203
|
}, [minValue, maxValue, unavailableRanges]);
|
|
198
204
|
return ___EmotionJSX(Box, _extends({
|
|
199
205
|
variant: "forms.input.fieldContainer"
|
|
200
|
-
}, fieldContainerProps
|
|
206
|
+
}, fieldContainerProps, {
|
|
207
|
+
className: classNames
|
|
208
|
+
}), ___EmotionJSX(Label, _extends({}, fieldLabelProps, {
|
|
201
209
|
ref: labelRef
|
|
202
210
|
})), ___EmotionJSX(Box, _extends({
|
|
203
211
|
isRow: true,
|
|
@@ -234,13 +242,24 @@ const DateField = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
234
242
|
isDisabled: isDisabled || isReadOnly
|
|
235
243
|
}, buttonProps, {
|
|
236
244
|
"aria-label": toggleCalendarButtonAriaLabel
|
|
237
|
-
}), ___EmotionJSX(
|
|
245
|
+
}), isOnyxTheme ? ___EmotionJSX(IconSymbol, {
|
|
246
|
+
icon: "calendar_today",
|
|
247
|
+
size: 20,
|
|
248
|
+
sx: {
|
|
249
|
+
flexShrink: 0
|
|
250
|
+
},
|
|
251
|
+
title: {
|
|
252
|
+
name: 'Calendar Icon'
|
|
253
|
+
}
|
|
254
|
+
}) : ___EmotionJSX(Icon, {
|
|
238
255
|
icon: CalendarIcon,
|
|
239
256
|
title: {
|
|
240
257
|
name: 'Calendar Icon'
|
|
241
258
|
},
|
|
242
259
|
size: 20
|
|
243
|
-
})))), hasFormatHelpText && ___EmotionJSX(FieldHelperText, null, formatHelpText),
|
|
260
|
+
})))), hasFormatHelpText && ___EmotionJSX(FieldHelperText, null, formatHelpText), helperText && ___EmotionJSX(FieldHelperText, {
|
|
261
|
+
status: status
|
|
262
|
+
}, helperText), errorMessage && ___EmotionJSX(Messages, {
|
|
244
263
|
onClose: () => setErrorMessage('')
|
|
245
264
|
}, ___EmotionJSX(Item, {
|
|
246
265
|
key: "message1",
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
|
2
2
|
import React, { forwardRef, useRef } from 'react';
|
|
3
3
|
import { parseDate } from '@internationalized/date';
|
|
4
|
+
import { astroTokens } from '@pingux/onyx-tokens';
|
|
4
5
|
import { useDatePicker } from '@react-aria/datepicker';
|
|
5
6
|
import { FocusScope } from '@react-aria/focus';
|
|
6
7
|
import { mergeProps } from '@react-aria/utils';
|
|
7
8
|
import { useDatePickerState } from '@react-stately/datepicker';
|
|
8
9
|
import { omit } from 'lodash/object';
|
|
9
|
-
import {
|
|
10
|
+
import { useGetTheme } from '../../hooks';
|
|
11
|
+
import { Calendar } from '../../index';
|
|
10
12
|
import { getPendoID } from '../../utils/devUtils/constants/pendoID';
|
|
11
13
|
import { isDateWithinRanges } from '../../utils/devUtils/props/isDateWithinRanges';
|
|
12
14
|
import Popover from '../Popover/Popover';
|
|
@@ -46,6 +48,10 @@ const DatePicker = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
46
48
|
} = props;
|
|
47
49
|
const groupRef = useRef(null);
|
|
48
50
|
const popoverRef = useRef(null);
|
|
51
|
+
const {
|
|
52
|
+
themeState
|
|
53
|
+
} = useGetTheme();
|
|
54
|
+
const isOnyxTheme = themeState.isOnyx;
|
|
49
55
|
|
|
50
56
|
/**
|
|
51
57
|
* This function is run against each date in the calendar
|
|
@@ -89,12 +95,18 @@ const DatePicker = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
89
95
|
popoverRef: popoverRef,
|
|
90
96
|
triggerRef: groupRef,
|
|
91
97
|
state: state,
|
|
92
|
-
offset: 15,
|
|
93
|
-
crossOffset: 40,
|
|
94
|
-
"data-testid": "popover-container"
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
+
offset: isOnyxTheme ? 1 : 15,
|
|
99
|
+
crossOffset: isOnyxTheme ? -45 : 40,
|
|
100
|
+
"data-testid": "popover-container",
|
|
101
|
+
style: isOnyxTheme ? {
|
|
102
|
+
position: 'absolute',
|
|
103
|
+
overflow: 'auto',
|
|
104
|
+
borderRadius: astroTokens.radius.xl,
|
|
105
|
+
maxWidth: '312px'
|
|
106
|
+
} : {
|
|
107
|
+
position: 'absolute',
|
|
108
|
+
overflow: 'auto'
|
|
109
|
+
}
|
|
98
110
|
}, ___EmotionJSX(FocusScope, {
|
|
99
111
|
autoFocus: true,
|
|
100
112
|
contain: true,
|
|
@@ -117,8 +129,6 @@ const DatePicker = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
117
129
|
status: status,
|
|
118
130
|
datePickerState: state,
|
|
119
131
|
helpHintProps: helpHintProps
|
|
120
|
-
})), calendar
|
|
121
|
-
status: status
|
|
122
|
-
}, helperText));
|
|
132
|
+
})), calendar);
|
|
123
133
|
});
|
|
124
134
|
export default DatePicker;
|
|
@@ -358,6 +358,7 @@ function Resizer(props) {
|
|
|
358
358
|
classNames
|
|
359
359
|
} = useStatusClasses('resizer', {
|
|
360
360
|
isFocused: isFocusVisible,
|
|
361
|
+
isFocusVisible,
|
|
361
362
|
isResizing
|
|
362
363
|
});
|
|
363
364
|
return ___EmotionJSX(Box, _extends({
|
|
@@ -416,7 +417,8 @@ function TableColumnHeader(props) {
|
|
|
416
417
|
const {
|
|
417
418
|
classNames
|
|
418
419
|
} = useStatusClasses(className, {
|
|
419
|
-
isFocused: isFocusVisible
|
|
420
|
+
isFocused: isFocusVisible,
|
|
421
|
+
isFocusVisible
|
|
420
422
|
});
|
|
421
423
|
useHandleFocusRef(ref);
|
|
422
424
|
return ___EmotionJSX(Box, _extends({
|
|
@@ -517,7 +519,15 @@ function TableRow(props) {
|
|
|
517
519
|
isSelected,
|
|
518
520
|
isHovered,
|
|
519
521
|
isPressed,
|
|
520
|
-
|
|
522
|
+
// Keyboard focus only. Backward compatible: consumer CSS and library themes
|
|
523
|
+
// targeting `.is-focused` keep working unchanged.
|
|
524
|
+
isFocused: isFocusVisible,
|
|
525
|
+
// Keyboard-focus ring hook (useFocusRing). Absent on pointer activation so
|
|
526
|
+
// styling away a click ring cannot remove the keyboard focus indicator.
|
|
527
|
+
isFocusVisible,
|
|
528
|
+
// Mouse/touch activation of a row action. No default focus ring; consumers
|
|
529
|
+
// style `.is-active-row` for a click highlight.
|
|
530
|
+
isActiveRow,
|
|
521
531
|
isDisabled,
|
|
522
532
|
'has-actions': hasActions
|
|
523
533
|
});
|
|
@@ -554,7 +564,8 @@ function TableCell(props) {
|
|
|
554
564
|
const {
|
|
555
565
|
classNames
|
|
556
566
|
} = useStatusClasses(className, {
|
|
557
|
-
isFocused: isFocusVisible
|
|
567
|
+
isFocused: isFocusVisible,
|
|
568
|
+
isFocusVisible
|
|
558
569
|
});
|
|
559
570
|
useHandleFocusRef(ref);
|
|
560
571
|
|
|
@@ -160,6 +160,7 @@ export const colors = {
|
|
|
160
160
|
text: {
|
|
161
161
|
primary: astroTokensDark.color.font.base,
|
|
162
162
|
secondary: astroTokensDark.color.font.light,
|
|
163
|
+
reverse: astroTokensDark.color.font.reverse,
|
|
163
164
|
error: astroTokensDark.color.font.error,
|
|
164
165
|
message: 'white',
|
|
165
166
|
fieldHelper: astroTokensDark.color.gray[400]
|
|
@@ -175,8 +176,8 @@ export const colors = {
|
|
|
175
176
|
badge,
|
|
176
177
|
codeEditor,
|
|
177
178
|
critical: {
|
|
178
|
-
bright: astroTokensDark.color.red[
|
|
179
|
-
dark: astroTokensDark.color.red[
|
|
179
|
+
bright: astroTokensDark.color.red[500],
|
|
180
|
+
dark: astroTokensDark.color.red[500]
|
|
180
181
|
},
|
|
181
182
|
common
|
|
182
183
|
};
|
|
@@ -84,6 +84,23 @@ const iconButtons = {
|
|
|
84
84
|
modalHeaderCloseButton: {
|
|
85
85
|
...baseIconButton
|
|
86
86
|
},
|
|
87
|
+
datePicker: {
|
|
88
|
+
containedIcon: {
|
|
89
|
+
width: 28,
|
|
90
|
+
height: 28,
|
|
91
|
+
minWidth: 18,
|
|
92
|
+
right: 20,
|
|
93
|
+
px: 0,
|
|
94
|
+
py: 0,
|
|
95
|
+
border: 'none',
|
|
96
|
+
'&.is-hovered': {
|
|
97
|
+
backgroundColor: 'light',
|
|
98
|
+
path: {
|
|
99
|
+
fill: astroTokensDark.color.gray[400]
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
87
104
|
messageCloseButton: {
|
|
88
105
|
...baseIconButton,
|
|
89
106
|
'&.is-hovered': {
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { astroTokensDark } from '@pingux/onyx-tokens';
|
|
2
|
+
const calendarBody = {
|
|
3
|
+
backgroundColor: 'backgroundBase',
|
|
4
|
+
'& > tr:nth-of-type(odd) ': {
|
|
5
|
+
backgroundColor: 'backgroundBase'
|
|
6
|
+
}
|
|
7
|
+
};
|
|
8
|
+
const calendarButton = {
|
|
9
|
+
color: 'text.primary',
|
|
10
|
+
'&.is-focused, &:focus-visible': {
|
|
11
|
+
outline: '2px solid',
|
|
12
|
+
outlineColor: 'focus',
|
|
13
|
+
outlineOffset: '2px',
|
|
14
|
+
borderRadius: astroTokensDark.radius.xl
|
|
15
|
+
},
|
|
16
|
+
'&.is-hovered': {
|
|
17
|
+
bg: astroTokensDark.color.gray[700],
|
|
18
|
+
color: 'text.primary',
|
|
19
|
+
cursor: 'pointer'
|
|
20
|
+
},
|
|
21
|
+
'&.is-selected': {
|
|
22
|
+
bg: 'active',
|
|
23
|
+
color: 'text.reverse',
|
|
24
|
+
'&.is-hovered': {
|
|
25
|
+
bg: 'active',
|
|
26
|
+
color: 'text.reverse'
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
'&.is-unavailable': {
|
|
30
|
+
color: 'text.primary',
|
|
31
|
+
bg: astroTokensDark.color.gray[750],
|
|
32
|
+
cursor: 'default'
|
|
33
|
+
},
|
|
34
|
+
'&:not(.is-outside-visible-range)&.is-extreme&:not(.is-completely-disabled)': {
|
|
35
|
+
color: 'text.primary',
|
|
36
|
+
bg: astroTokensDark.color.gray[750],
|
|
37
|
+
opacity: 1,
|
|
38
|
+
'&.is-hovered': {
|
|
39
|
+
backgroundColor: astroTokensDark.color.gray[750],
|
|
40
|
+
cursor: 'default'
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
'&.is-disabled': {
|
|
44
|
+
bg: astroTokensDark.color.gray[750],
|
|
45
|
+
cursor: 'default',
|
|
46
|
+
'&.is-hovered': {
|
|
47
|
+
bg: astroTokensDark.color.gray[750]
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
const calendarCell = {
|
|
52
|
+
color: 'text.primary',
|
|
53
|
+
'&.is-outside-month': {
|
|
54
|
+
opacity: 0.65,
|
|
55
|
+
backgroundColor: 'transparent',
|
|
56
|
+
color: 'text.secondary',
|
|
57
|
+
'& > [hidden]': {
|
|
58
|
+
color: 'text.secondary'
|
|
59
|
+
},
|
|
60
|
+
'&.is-completely-disabled': {
|
|
61
|
+
backgroundColor: 'transparent',
|
|
62
|
+
'& > [hidden]': {
|
|
63
|
+
color: 'text.secondary'
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
'&.is-unavailable': {
|
|
67
|
+
backgroundColor: astroTokensDark.color.gray[750],
|
|
68
|
+
color: 'text.primary',
|
|
69
|
+
'& > [hidden]': {
|
|
70
|
+
color: 'text.secondary'
|
|
71
|
+
},
|
|
72
|
+
'&.is-hovered': {
|
|
73
|
+
backgroundColor: astroTokensDark.color.gray[750],
|
|
74
|
+
color: 'text.primary'
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
'&.is-extreme:not(.is-completely-disabled):not(.is-unavailable)': {
|
|
78
|
+
backgroundColor: astroTokensDark.color.gray[750],
|
|
79
|
+
color: 'text.primary',
|
|
80
|
+
'& > [hidden]': {
|
|
81
|
+
color: 'text.secondary'
|
|
82
|
+
},
|
|
83
|
+
'&.is-hovered': {
|
|
84
|
+
backgroundColor: astroTokensDark.color.gray[750],
|
|
85
|
+
color: 'text.primary'
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
const calendarHeader = {
|
|
91
|
+
// Month/year title renders at #F6F8FA per the Figma spec; the shared itemTitle
|
|
92
|
+
// variant resolves to text.secondary (#C0C9D5) under the dark theme.
|
|
93
|
+
color: 'text.primary',
|
|
94
|
+
'& :is(div, span, h3)': {
|
|
95
|
+
color: 'inherit'
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
const columnHeader = {
|
|
99
|
+
color: 'text.primary',
|
|
100
|
+
borderBottom: '1px solid',
|
|
101
|
+
borderBottomColor: astroTokensDark.color.common.border,
|
|
102
|
+
pb: '32px',
|
|
103
|
+
mb: '0'
|
|
104
|
+
};
|
|
105
|
+
const calendarContainer = {
|
|
106
|
+
bg: 'backgroundBase',
|
|
107
|
+
color: 'text.primary',
|
|
108
|
+
border: '1px solid',
|
|
109
|
+
borderColor: astroTokensDark.color.common.border
|
|
110
|
+
};
|
|
111
|
+
const calendarRow = {
|
|
112
|
+
bg: 'backgroundBase'
|
|
113
|
+
};
|
|
114
|
+
export default {
|
|
115
|
+
calendarBody,
|
|
116
|
+
calendarButton,
|
|
117
|
+
calendarCell,
|
|
118
|
+
calendarContainer,
|
|
119
|
+
calendarHeader,
|
|
120
|
+
calendarRow,
|
|
121
|
+
columnHeader
|
|
122
|
+
};
|
|
@@ -1,6 +1,45 @@
|
|
|
1
1
|
import { astroTokensDark } from '@pingux/onyx-tokens';
|
|
2
2
|
import comboBox from './comboBox';
|
|
3
3
|
import { fieldControlWrapper, input } from './input';
|
|
4
|
+
export const datePicker = {
|
|
5
|
+
inSlotContainer: {
|
|
6
|
+
minWidth: '400px'
|
|
7
|
+
},
|
|
8
|
+
inputField: {
|
|
9
|
+
...input,
|
|
10
|
+
color: astroTokensDark.color.font.base,
|
|
11
|
+
width: '100%',
|
|
12
|
+
p: `${astroTokensDark.spacing.input['md-s']}px !important`,
|
|
13
|
+
pr: '44px !important',
|
|
14
|
+
'&:focus-within:not(.is-read-only)': {
|
|
15
|
+
borderColor: 'focus',
|
|
16
|
+
boxShadow: 'none',
|
|
17
|
+
outline: '1px solid',
|
|
18
|
+
outlineColor: 'focus',
|
|
19
|
+
outlineOffset: '0px'
|
|
20
|
+
},
|
|
21
|
+
'&.is-read-only': {
|
|
22
|
+
border: '1px solid',
|
|
23
|
+
borderColor: 'border.input',
|
|
24
|
+
backgroundColor: astroTokensDark.color.input['readonly-bg'],
|
|
25
|
+
boxShadow: 'none'
|
|
26
|
+
},
|
|
27
|
+
'&.is-disabled': {
|
|
28
|
+
opacity: 1,
|
|
29
|
+
border: '1px solid',
|
|
30
|
+
borderColor: 'border.input',
|
|
31
|
+
backgroundColor: 'disabled',
|
|
32
|
+
color: astroTokensDark.color.font.base,
|
|
33
|
+
boxShadow: 'none'
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
segment: {
|
|
37
|
+
color: astroTokensDark.color.font.base,
|
|
38
|
+
'&:empty': {
|
|
39
|
+
color: astroTokensDark.color.font.base
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
};
|
|
4
43
|
export const select = {
|
|
5
44
|
backgroundColor: 'backgroundBase',
|
|
6
45
|
borderRadius: astroTokensDark.radius.input,
|
|
@@ -121,5 +160,6 @@ export default {
|
|
|
121
160
|
},
|
|
122
161
|
switch: switchable,
|
|
123
162
|
comboBox,
|
|
124
|
-
numberField
|
|
163
|
+
numberField,
|
|
164
|
+
datePicker
|
|
125
165
|
};
|
|
@@ -2,6 +2,7 @@ import { astroTokensDark } from '@pingux/onyx-tokens';
|
|
|
2
2
|
import { colors } from '../colors';
|
|
3
3
|
import { avatar } from './avatar';
|
|
4
4
|
import { box } from './box';
|
|
5
|
+
import calendar from './calendar';
|
|
5
6
|
import callout from './callout';
|
|
6
7
|
import { footer } from './footer';
|
|
7
8
|
import iconBadge from './iconBadge';
|
|
@@ -231,6 +232,7 @@ export default {
|
|
|
231
232
|
}
|
|
232
233
|
}
|
|
233
234
|
},
|
|
235
|
+
calendar,
|
|
234
236
|
callout,
|
|
235
237
|
table: {
|
|
236
238
|
caption: {
|
|
@@ -315,7 +317,7 @@ export default {
|
|
|
315
317
|
color: 'text.fieldHelper'
|
|
316
318
|
},
|
|
317
319
|
'&.is-error': {
|
|
318
|
-
color:
|
|
320
|
+
color: astroTokensDark.color.font.error
|
|
319
321
|
},
|
|
320
322
|
'&.is-warning': {
|
|
321
323
|
color: 'warning.bright'
|
|
@@ -103,7 +103,11 @@ const buttons = {
|
|
|
103
103
|
datePicker: {
|
|
104
104
|
containedIcon: {
|
|
105
105
|
'&:not(.disabled):hover': {
|
|
106
|
-
border: 'none'
|
|
106
|
+
border: 'none',
|
|
107
|
+
backgroundColor: astroTokens.color.gray[100],
|
|
108
|
+
path: {
|
|
109
|
+
fill: 'dark'
|
|
110
|
+
}
|
|
107
111
|
},
|
|
108
112
|
'&:focus': {
|
|
109
113
|
border: 'none'
|
|
@@ -76,6 +76,7 @@ export const info = {
|
|
|
76
76
|
const text = {
|
|
77
77
|
primary: astroTokens.color.font.base,
|
|
78
78
|
secondary: astroTokens.color.font.light,
|
|
79
|
+
reverse: astroTokens.color.font.reverse,
|
|
79
80
|
error: astroTokens.color.font.error,
|
|
80
81
|
message: astroTokens.color.gray[700],
|
|
81
82
|
fieldHelper: astroTokens.color.font.light
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const nextGenConvertedComponents = ['AccordionGridGroup', 'AccordionGroup', 'ArrayField', 'AstroProvider', 'Avatar', 'Badge', 'Base Components', 'Breadcrumbs', 'Button', 'ButtonBar', 'Callout', 'Card', 'CheckboxField', 'CheckboxFieldGroup', 'CodeView', 'ColorField', 'ComboBoxField', 'CopyText', 'DataTable', 'EnvironmentBreadcrumb', 'GridList', 'HelpHint', 'Icon', 'MaterialSymbolIcon', 'IconBadge', 'IconButton', 'IconWrapper', 'ImageUploadField', 'Loader', 'Link', 'LinkSelectField', 'ListView', 'ListViewItem', 'Message', 'Messages', 'Modal', 'MultiValuesField', 'MultivaluesField', 'NavBar', 'NavList', 'NavigationHeader', 'NextGen ListViewItem', 'NumberField', 'OverlayPanel', 'PageHeader', 'Pagination', 'PanelHeader', 'PasswordField', 'PhoneNumberField', 'PopoverMenu', 'ProgressBar', 'RadioField', 'RadioGroupField', 'RangeCalendar', 'RequirementsList', 'RockerButtonGroup', 'SearchField', 'SelectField', 'Skeleton', 'SliderField', 'Stepper', 'Sticker Sheet', 'SwitchField', 'StatusIcon', 'Table', 'TableBase', 'Tabs', 'Text', 'TextAreaField', 'TextField', 'TooltipTrigger', 'Tree', 'ArrayField', 'ColorField', 'LinkSelectField', 'NumberField', 'SwitchField', 'Base Components', 'SliderField', 'ServerErrorBoundary', 'Avatar', 'Box', 'TimeField', 'LabelValuePairs'];
|
|
1
|
+
const nextGenConvertedComponents = ['AccordionGridGroup', 'AccordionGroup', 'ArrayField', 'AstroProvider', 'Avatar', 'Badge', 'Base Components', 'Breadcrumbs', 'Button', 'ButtonBar', 'Callout', 'Card', 'CheckboxField', 'CheckboxFieldGroup', 'CodeView', 'ColorField', 'ComboBoxField', 'CopyText', 'DataTable', 'DatePicker', 'EnvironmentBreadcrumb', 'GridList', 'HelpHint', 'Icon', 'MaterialSymbolIcon', 'IconBadge', 'IconButton', 'IconWrapper', 'ImageUploadField', 'Loader', 'Link', 'LinkSelectField', 'ListView', 'ListViewItem', 'Message', 'Messages', 'Modal', 'MultiValuesField', 'MultivaluesField', 'NavBar', 'NavList', 'NavigationHeader', 'NextGen ListViewItem', 'NumberField', 'OverlayPanel', 'PageHeader', 'Pagination', 'PanelHeader', 'PasswordField', 'PhoneNumberField', 'PopoverMenu', 'ProgressBar', 'RadioField', 'RadioGroupField', 'RangeCalendar', 'RequirementsList', 'RockerButtonGroup', 'SearchField', 'SelectField', 'Skeleton', 'SliderField', 'Stepper', 'Sticker Sheet', 'SwitchField', 'StatusIcon', 'Table', 'TableBase', 'Tabs', 'Text', 'TextAreaField', 'TextField', 'TooltipTrigger', 'Tree', 'ArrayField', 'ColorField', 'LinkSelectField', 'NumberField', 'SwitchField', 'Base Components', 'SliderField', 'ServerErrorBoundary', 'Avatar', 'Box', 'TimeField', 'LabelValuePairs'];
|
|
2
2
|
export const componentSpecificNextGenBlacklist = {
|
|
3
3
|
AstroProvider: ['Default', 'With Custom Theme Override'],
|
|
4
4
|
Messages: ['Customization'],
|
|
@@ -157,6 +157,51 @@ export const timeField = {
|
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
};
|
|
160
|
+
export const datePicker = {
|
|
161
|
+
inSlotContainer: {
|
|
162
|
+
'&:after': {
|
|
163
|
+
display: 'none'
|
|
164
|
+
},
|
|
165
|
+
minWidth: '400px'
|
|
166
|
+
},
|
|
167
|
+
inputField: {
|
|
168
|
+
...input,
|
|
169
|
+
color: 'font.base',
|
|
170
|
+
fontWeight: 0,
|
|
171
|
+
alignItems: 'center',
|
|
172
|
+
lineHeight: 'body',
|
|
173
|
+
width: '100%',
|
|
174
|
+
p: astroTokens.spacing.input['md-s'],
|
|
175
|
+
'&:focus-within:not(.is-read-only)': {
|
|
176
|
+
borderColor: 'focus',
|
|
177
|
+
boxShadow: 'none',
|
|
178
|
+
outline: '1px solid',
|
|
179
|
+
outlineColor: 'focus',
|
|
180
|
+
outlineOffset: '0px'
|
|
181
|
+
},
|
|
182
|
+
'&.is-read-only': {
|
|
183
|
+
border: '1px solid',
|
|
184
|
+
borderColor: 'border.input',
|
|
185
|
+
backgroundColor: astroTokens.color.input['readonly-bg'],
|
|
186
|
+
boxShadow: 'none'
|
|
187
|
+
},
|
|
188
|
+
'&.is-disabled': {
|
|
189
|
+
opacity: 1,
|
|
190
|
+
border: '1px solid',
|
|
191
|
+
borderColor: 'border.input',
|
|
192
|
+
backgroundColor: astroTokens.color.gray[100],
|
|
193
|
+
color: 'font.base',
|
|
194
|
+
boxShadow: 'none'
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
segment: {
|
|
198
|
+
color: 'font.base',
|
|
199
|
+
fontWeight: 0,
|
|
200
|
+
'&:empty': {
|
|
201
|
+
color: 'font.base'
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
};
|
|
160
205
|
export default {
|
|
161
206
|
input,
|
|
162
207
|
label,
|
|
@@ -170,5 +215,6 @@ export default {
|
|
|
170
215
|
search,
|
|
171
216
|
switch: switchable,
|
|
172
217
|
numberField,
|
|
173
|
-
timeField
|
|
218
|
+
timeField,
|
|
219
|
+
datePicker
|
|
174
220
|
};
|
|
@@ -665,6 +665,28 @@ const iconButtons = {
|
|
|
665
665
|
backgroundColor: astroTokens.color.common.light
|
|
666
666
|
}
|
|
667
667
|
}
|
|
668
|
+
},
|
|
669
|
+
datePicker: {
|
|
670
|
+
containedIcon: {
|
|
671
|
+
width: 28,
|
|
672
|
+
height: 28,
|
|
673
|
+
minWidth: 18,
|
|
674
|
+
right: 20,
|
|
675
|
+
px: 0,
|
|
676
|
+
py: 0,
|
|
677
|
+
border: 'none',
|
|
678
|
+
'&.is-disabled': {
|
|
679
|
+
opacity: 1
|
|
680
|
+
},
|
|
681
|
+
'&.is-hovered': {
|
|
682
|
+
backgroundColor: astroTokens.color.gray[100]
|
|
683
|
+
},
|
|
684
|
+
'&.is-pressed': {
|
|
685
|
+
'.material-symbols-outlined': {
|
|
686
|
+
color: 'white'
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
}
|
|
668
690
|
}
|
|
669
691
|
};
|
|
670
692
|
const listBoxLink = {
|