@fibery/ui-kit 4.1.0 → 4.2.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/CHANGELOG.md +6 -0
- package/package.json +3 -5
- package/src/antd/ant-upload.tsx +13 -13
- package/src/antd/auto-complete.tsx +10 -10
- package/src/antd/input-number.tsx +55 -45
- package/src/antd/styles.ts +28 -22
- package/src/antd/tabs.tsx +28 -28
- package/src/color-filter.ts +1 -1
- package/src/comment.tsx +2 -2
- package/src/count-badge.tsx +3 -11
- package/src/design-system/colors.ts +57 -37
- package/src/design-system/def.ts +1 -1
- package/src/dom-utils.ts +5 -12
- package/src/download-file.ts +36 -0
- package/src/dropdown-menu/index.tsx +0 -1
- package/src/file-item/file-menu-items.tsx +29 -11
- package/src/file-item/file-preview-actions.tsx +52 -11
- package/src/file-item/share-file.ts +53 -0
- package/src/file-item.tsx +9 -9
- package/src/html-styles.ts +0 -1
- package/src/icons/ast/gauge.ts +12 -0
- package/src/icons/ast/index.tsx +3 -1
- package/src/icons/ast/people-edit.ts +12 -0
- package/src/icons/react/gauge.tsx +18 -0
- package/src/icons/react/index.tsx +3 -1
- package/src/icons/react/people-edit.tsx +18 -0
- package/src/icons/svg/gauge.svg +5 -0
- package/src/icons/svg/people-edit.svg +4 -0
- package/src/images-gallery/images-gallery.tsx +0 -1
- package/src/images-gallery/slide-buttons.tsx +49 -16
- package/src/is-in-popup.ts +0 -3
- package/src/loading-sausage.tsx +3 -3
- package/src/palettes/diff-colors.test.ts +1 -1
- package/src/palettes/inspect.defs.colors.neutral-arch.test.ts +94 -26
- package/src/palettes/inspect.defs.colors.neutral-user.test.ts +94 -26
- package/src/palettes/inspect.defs.colors.warm-arch.test.ts +94 -26
- package/src/palettes/inspect.defs.colors.warm-user.test.ts +94 -26
- package/src/palettes/show-colors.test.ts +2 -1
- package/src/palettes/testkit.ts +3 -1
- package/src/popover/index.tsx +20 -11
- package/src/popover/popup-modifiers-context.ts +1 -2
- package/src/select/components/option.tsx +0 -1
- package/src/select/index.tsx +1 -0
- package/src/select/select-in-popover.tsx +1 -3
- package/src/select/select.tsx +2 -0
- package/src/thematic.tsx +0 -1
- package/src/theme-provider.test.tsx +1 -1
- package/src/theming.generated.css +110 -50
- package/src/theming.generated.ts +127 -50
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fibery/ui-kit",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"dependencies": {
|
|
@@ -39,7 +39,6 @@
|
|
|
39
39
|
"node-types-local": "npm:@types/node@^24",
|
|
40
40
|
"photoswipe": "5.4.4",
|
|
41
41
|
"popper-max-size-modifier": "0.2.0",
|
|
42
|
-
"prop-types": "15.7.2",
|
|
43
42
|
"rc-dialog": "9.0.4",
|
|
44
43
|
"rc-input": "0.1.4",
|
|
45
44
|
"rc-input-number": "8.5.0",
|
|
@@ -74,11 +73,10 @@
|
|
|
74
73
|
"@types/culori": "4.0.1",
|
|
75
74
|
"@types/history": "4.7.11",
|
|
76
75
|
"@types/invariant": "2.2.34",
|
|
77
|
-
"@types/prop-types": "15.7.5",
|
|
78
76
|
"@types/react": "18.3.12",
|
|
79
77
|
"@types/react-color": "2.13.5",
|
|
80
78
|
"@types/react-dom": "18.3.1",
|
|
81
|
-
"@typescript/native-preview": "
|
|
79
|
+
"@typescript/native-preview": "7.0.0-dev.20260604.1",
|
|
82
80
|
"csstype": "3.0.8",
|
|
83
81
|
"fs-extra": "10.0.0",
|
|
84
82
|
"glob": "13.0.6",
|
|
@@ -86,7 +84,7 @@
|
|
|
86
84
|
"react-dom": "18.3.1",
|
|
87
85
|
"svg-parser": "2.0.4",
|
|
88
86
|
"svgo": "2.8.0",
|
|
89
|
-
"typescript": "6.0.
|
|
87
|
+
"typescript": "6.0.3",
|
|
90
88
|
"unist-util-reduce": "0.2.2",
|
|
91
89
|
"@fibery/babel-preset": "7.4.2"
|
|
92
90
|
},
|
package/src/antd/ant-upload.tsx
CHANGED
|
@@ -64,7 +64,7 @@ export const antUploadStyle = css`
|
|
|
64
64
|
alignItems: "stretch",
|
|
65
65
|
alignContent: "stretch",
|
|
66
66
|
},
|
|
67
|
-
"& .ant-upload": {
|
|
67
|
+
":where(&) .ant-upload": {
|
|
68
68
|
boxSizing: "border-box",
|
|
69
69
|
margin: 0,
|
|
70
70
|
padding: 0,
|
|
@@ -73,30 +73,30 @@ export const antUploadStyle = css`
|
|
|
73
73
|
listStyle: "none",
|
|
74
74
|
outline: "none",
|
|
75
75
|
},
|
|
76
|
-
"& .ant-upload p": {
|
|
76
|
+
":where(&) .ant-upload p": {
|
|
77
77
|
margin: 0,
|
|
78
78
|
},
|
|
79
|
-
"& .ant-upload-btn": {
|
|
79
|
+
":where(&) .ant-upload-btn": {
|
|
80
80
|
display: "block",
|
|
81
81
|
width: "100%",
|
|
82
82
|
outline: "none",
|
|
83
83
|
},
|
|
84
|
-
"& .ant-upload input[type='file']": {
|
|
84
|
+
":where(&) .ant-upload input[type='file']": {
|
|
85
85
|
cursor: "pointer",
|
|
86
86
|
},
|
|
87
|
-
"& .ant-upload.ant-upload-disabled": {
|
|
87
|
+
":where(&) .ant-upload.ant-upload-disabled": {
|
|
88
88
|
color: themeVars.disabledTextColor,
|
|
89
89
|
cursor: "not-allowed",
|
|
90
90
|
},
|
|
91
|
-
"& .ant-upload.ant-upload-disabled input[type='file']": {
|
|
91
|
+
":where(&) .ant-upload.ant-upload-disabled input[type='file']": {
|
|
92
92
|
cursor: "not-allowed",
|
|
93
93
|
},
|
|
94
|
-
"& .ant-upload-select": {
|
|
94
|
+
":where(&) .ant-upload-select": {
|
|
95
95
|
display: "inline-flex",
|
|
96
96
|
alignItems: "stretch",
|
|
97
97
|
maxWidth: "100%",
|
|
98
98
|
},
|
|
99
|
-
"& .ant-upload-select > .ant-upload": {
|
|
99
|
+
":where(&) .ant-upload-select > .ant-upload": {
|
|
100
100
|
display: "inline-flex",
|
|
101
101
|
alignItems: "center",
|
|
102
102
|
outline: "none",
|
|
@@ -139,23 +139,23 @@ export const antUploadStyle = css`
|
|
|
139
139
|
transition: "none",
|
|
140
140
|
},
|
|
141
141
|
},
|
|
142
|
-
"& .ant-upload.ant-upload-drag .ant-upload-btn": {
|
|
142
|
+
":where(&) .ant-upload.ant-upload-drag .ant-upload-btn": {
|
|
143
143
|
display: "table",
|
|
144
144
|
height: "100%",
|
|
145
145
|
},
|
|
146
|
-
"& .ant-upload.ant-upload-drag .ant-upload-drag-container": {
|
|
146
|
+
":where(&) .ant-upload.ant-upload-drag .ant-upload-drag-container": {
|
|
147
147
|
display: "table-cell",
|
|
148
148
|
verticalAlign: "middle",
|
|
149
149
|
},
|
|
150
|
-
"& .ant-upload-picture-card-wrapper": {
|
|
150
|
+
":where(&) .ant-upload-picture-card-wrapper": {
|
|
151
151
|
display: "inline-block",
|
|
152
152
|
width: "100%",
|
|
153
153
|
},
|
|
154
|
-
"& .ant-upload-picture-card-wrapper::before": {
|
|
154
|
+
":where(&) .ant-upload-picture-card-wrapper::before": {
|
|
155
155
|
display: "table",
|
|
156
156
|
content: "''",
|
|
157
157
|
},
|
|
158
|
-
"& .ant-upload-picture-card-wrapper::after": {
|
|
158
|
+
":where(&) .ant-upload-picture-card-wrapper::after": {
|
|
159
159
|
display: "table",
|
|
160
160
|
clear: "both",
|
|
161
161
|
content: "''",
|
|
@@ -13,14 +13,14 @@ import {wrapWithPopupContainer} from "./utils";
|
|
|
13
13
|
const autoCompleteStyles = css`
|
|
14
14
|
${{
|
|
15
15
|
position: "relative",
|
|
16
|
-
"& .ant-select": {
|
|
16
|
+
":where(&) .ant-select": {
|
|
17
17
|
...textStyles.regular,
|
|
18
18
|
boxSizing: "border-box",
|
|
19
19
|
display: "inline-block",
|
|
20
20
|
width: "100%",
|
|
21
21
|
cursor: "text",
|
|
22
22
|
},
|
|
23
|
-
"& .ant-select-selector": {
|
|
23
|
+
":where(&) .ant-select-selector": {
|
|
24
24
|
boxSizing: "border-box",
|
|
25
25
|
display: "flex",
|
|
26
26
|
alignItems: "center",
|
|
@@ -29,7 +29,7 @@ const autoCompleteStyles = css`
|
|
|
29
29
|
position: "relative",
|
|
30
30
|
backgroundColor: themeVars.transparent,
|
|
31
31
|
},
|
|
32
|
-
"& .ant-select-selection-search": {
|
|
32
|
+
":where(&) .ant-select-selection-search": {
|
|
33
33
|
flex: 1,
|
|
34
34
|
minWidth: 0,
|
|
35
35
|
},
|
|
@@ -45,7 +45,7 @@ const autoCompleteStyles = css`
|
|
|
45
45
|
appearance: "none",
|
|
46
46
|
...textStyles.regular,
|
|
47
47
|
},
|
|
48
|
-
"& .ant-select-dropdown": {
|
|
48
|
+
":where(&) .ant-select-dropdown": {
|
|
49
49
|
boxSizing: "border-box",
|
|
50
50
|
position: "absolute",
|
|
51
51
|
zIndex: 1050,
|
|
@@ -55,16 +55,16 @@ const autoCompleteStyles = css`
|
|
|
55
55
|
paddingTop: space.s8,
|
|
56
56
|
paddingBottom: space.s8,
|
|
57
57
|
},
|
|
58
|
-
"& .ant-select-dropdown-hidden": {
|
|
58
|
+
":where(&) .ant-select-dropdown-hidden": {
|
|
59
59
|
display: "none",
|
|
60
60
|
},
|
|
61
|
-
"& .ant-select-item-empty": {
|
|
61
|
+
":where(&) .ant-select-item-empty": {
|
|
62
62
|
minHeight: 32,
|
|
63
63
|
padding: "5px 12px",
|
|
64
64
|
lineHeight: "22px",
|
|
65
65
|
color: themeVars.colorTextListItemGeneralDisabled,
|
|
66
66
|
},
|
|
67
|
-
"& .ant-select-item": {
|
|
67
|
+
":where(&) .ant-select-item": {
|
|
68
68
|
...textStyles.regular,
|
|
69
69
|
color: themeVars.textColor,
|
|
70
70
|
minHeight: 32,
|
|
@@ -75,16 +75,16 @@ const autoCompleteStyles = css`
|
|
|
75
75
|
cursor: "pointer",
|
|
76
76
|
transition: `background-color ${transitions.slow}`,
|
|
77
77
|
},
|
|
78
|
-
"& .ant-select-item-option-content": {
|
|
78
|
+
":where(&) .ant-select-item-option-content": {
|
|
79
79
|
flex: 1,
|
|
80
80
|
overflow: "hidden",
|
|
81
81
|
textOverflow: "ellipsis",
|
|
82
82
|
whiteSpace: "nowrap",
|
|
83
83
|
},
|
|
84
|
-
"& .ant-select-item-option-state": {
|
|
84
|
+
":where(&) .ant-select-item-option-state": {
|
|
85
85
|
display: "none",
|
|
86
86
|
},
|
|
87
|
-
"& .ant-select-item-option": {
|
|
87
|
+
":where(&) .ant-select-item-option": {
|
|
88
88
|
display: "flex",
|
|
89
89
|
alignItems: "center",
|
|
90
90
|
"&:hover": {
|
|
@@ -23,64 +23,97 @@ const PrefixedInputNumber = forwardRef<HTMLInputElement, InputNumberPropsAny>(fu
|
|
|
23
23
|
|
|
24
24
|
const inputNumberStyles = css`
|
|
25
25
|
${{
|
|
26
|
-
"& .ant-input-number": {
|
|
26
|
+
":where(&) .ant-input-number": {
|
|
27
27
|
boxSizing: "border-box",
|
|
28
28
|
position: "relative",
|
|
29
29
|
display: "inline-flex",
|
|
30
30
|
alignItems: "stretch",
|
|
31
31
|
width: "90px",
|
|
32
|
+
},
|
|
33
|
+
"& .ant-input-number": {
|
|
32
34
|
height: "auto",
|
|
33
35
|
border: "none",
|
|
34
36
|
...textStyles.regular,
|
|
35
37
|
backgroundColor: themeVars.transparent,
|
|
36
38
|
},
|
|
37
|
-
"& .ant-input-number-input-wrap": {
|
|
39
|
+
":where(&) .ant-input-number-input-wrap": {
|
|
38
40
|
flex: 1,
|
|
39
41
|
minWidth: 0,
|
|
40
42
|
},
|
|
41
|
-
"& .ant-input-number-input": {
|
|
42
|
-
...inputOverrides.main,
|
|
43
|
+
":where(&) .ant-input-number-input": {
|
|
43
44
|
boxSizing: "border-box",
|
|
44
45
|
width: "100%",
|
|
45
46
|
height: "100%",
|
|
46
47
|
appearance: "textfield",
|
|
47
48
|
},
|
|
48
|
-
"& .ant-input-number-input
|
|
49
|
-
|
|
49
|
+
"& .ant-input-number-input": {
|
|
50
|
+
...inputOverrides.main,
|
|
50
51
|
},
|
|
51
|
-
"& .ant-input-number-input
|
|
52
|
-
|
|
53
|
-
appearance: "none",
|
|
52
|
+
":where(&) .ant-input-number-input:placeholder-shown": {
|
|
53
|
+
textOverflow: "ellipsis",
|
|
54
54
|
},
|
|
55
|
-
"& .ant-input-number-
|
|
55
|
+
":where(&) .ant-input-number-input::-webkit-inner-spin-button, :where(&) .ant-input-number-input::-webkit-outer-spin-button":
|
|
56
|
+
{
|
|
57
|
+
margin: 0,
|
|
58
|
+
appearance: "none",
|
|
59
|
+
},
|
|
60
|
+
":where(&) .ant-input-number-handler-wrap": {
|
|
56
61
|
position: "absolute",
|
|
57
|
-
top: 1,
|
|
58
|
-
bottom: 1,
|
|
59
|
-
right: 1,
|
|
60
62
|
width: 22,
|
|
61
|
-
backgroundColor: themeVars.transparent,
|
|
62
|
-
background: themeVars.transparent,
|
|
63
|
-
// antd hid the stepper arrows until hover/focus; reproduce that (dropped with the vendored CSS)
|
|
64
63
|
opacity: 0,
|
|
65
64
|
transition: `opacity ${transitionDuration.normal} linear ${transitionDuration.faster}`,
|
|
66
65
|
},
|
|
67
|
-
"& .ant-input-number-handler-wrap:hover .ant-input-number-handler": {
|
|
66
|
+
":where(&) .ant-input-number-handler-wrap:hover .ant-input-number-handler": {
|
|
68
67
|
height: "40%",
|
|
69
68
|
},
|
|
70
|
-
"& .ant-input-number:hover .ant-input-number-handler-wrap, & .ant-input-number-focused .ant-input-number-handler-wrap":
|
|
69
|
+
":where(&) .ant-input-number:hover .ant-input-number-handler-wrap, :where(&) .ant-input-number-focused .ant-input-number-handler-wrap":
|
|
71
70
|
{
|
|
72
71
|
opacity: 1,
|
|
73
72
|
},
|
|
74
|
-
"& .ant-input-number-
|
|
75
|
-
"& .ant-input-number-handler-up, & .ant-input-number-handler-down": {
|
|
73
|
+
":where(&) .ant-input-number-handler-up, :where(&) .ant-input-number-handler-down": {
|
|
76
74
|
cursor: "pointer",
|
|
77
75
|
},
|
|
78
|
-
"& .ant-input-number-handler-up:hover, & .ant-input-number-handler-down:hover": {
|
|
76
|
+
":where(&) .ant-input-number-handler-up:hover, :where(&) .ant-input-number-handler-down:hover": {
|
|
79
77
|
height: "60% !important",
|
|
80
78
|
},
|
|
81
|
-
"& .ant-input-number-handler-up-disabled, & .ant-input-number-handler-down-disabled": {
|
|
79
|
+
":where(&) .ant-input-number-handler-up-disabled, :where(&) .ant-input-number-handler-down-disabled": {
|
|
82
80
|
cursor: "not-allowed",
|
|
83
81
|
},
|
|
82
|
+
":where(&) .ant-input-number-handler-up-inner, :where(&) .ant-input-number-handler-down-inner": {
|
|
83
|
+
position: "absolute",
|
|
84
|
+
right: 4,
|
|
85
|
+
width: 12,
|
|
86
|
+
height: 12,
|
|
87
|
+
lineHeight: "12px",
|
|
88
|
+
transition: `all ${transitionDuration.faster} linear`,
|
|
89
|
+
userSelect: "none",
|
|
90
|
+
},
|
|
91
|
+
":where(&) .ant-input-number-handler-up-inner": {
|
|
92
|
+
top: "50%",
|
|
93
|
+
marginTop: -5,
|
|
94
|
+
},
|
|
95
|
+
":where(&) .ant-input-number-handler-down-inner": {
|
|
96
|
+
top: "50%",
|
|
97
|
+
transform: "translateY(-50%)",
|
|
98
|
+
},
|
|
99
|
+
":where(&) .ant-input-number-handler": {
|
|
100
|
+
position: "relative",
|
|
101
|
+
display: "block",
|
|
102
|
+
width: "100%",
|
|
103
|
+
height: "50%",
|
|
104
|
+
overflow: "hidden",
|
|
105
|
+
lineHeight: 0,
|
|
106
|
+
textAlign: "center",
|
|
107
|
+
transition: `all ${transitionDuration.faster} linear`,
|
|
108
|
+
},
|
|
109
|
+
"& .ant-input-number-handler-wrap": {
|
|
110
|
+
top: 1,
|
|
111
|
+
bottom: 1,
|
|
112
|
+
right: 1,
|
|
113
|
+
backgroundColor: themeVars.transparent,
|
|
114
|
+
background: themeVars.transparent,
|
|
115
|
+
},
|
|
116
|
+
"& .ant-input-number-focused": {boxShadow: "none"},
|
|
84
117
|
"& .ant-input-number-handler-up-disabled .ant-input-number-handler-up-inner, & .ant-input-number-handler-down-disabled .ant-input-number-handler-down-inner":
|
|
85
118
|
{
|
|
86
119
|
color: themeVars.disabledTextColor,
|
|
@@ -101,33 +134,10 @@ const inputNumberStyles = css`
|
|
|
101
134
|
},
|
|
102
135
|
"& .ant-input-number-handler-up-inner, & .ant-input-number-handler-down-inner": {
|
|
103
136
|
color: themeVars.iconColor,
|
|
104
|
-
position: "absolute",
|
|
105
|
-
right: 4,
|
|
106
|
-
width: 12,
|
|
107
|
-
height: 12,
|
|
108
|
-
lineHeight: "12px",
|
|
109
|
-
transition: `all ${transitionDuration.faster} linear`,
|
|
110
|
-
userSelect: "none",
|
|
111
|
-
},
|
|
112
|
-
"& .ant-input-number-handler-up-inner": {
|
|
113
|
-
top: "50%",
|
|
114
|
-
marginTop: -5,
|
|
115
|
-
},
|
|
116
|
-
"& .ant-input-number-handler-down-inner": {
|
|
117
|
-
top: "50%",
|
|
118
|
-
transform: "translateY(-50%)",
|
|
119
137
|
},
|
|
120
138
|
"& .ant-input-number-handler": {
|
|
121
|
-
position: "relative",
|
|
122
|
-
display: "block",
|
|
123
|
-
width: "100%",
|
|
124
|
-
height: "50%",
|
|
125
|
-
overflow: "hidden",
|
|
126
139
|
color: themeVars.iconColor,
|
|
127
|
-
lineHeight: 0,
|
|
128
|
-
textAlign: "center",
|
|
129
140
|
borderLeft: themeVars.borderSolidSeparator,
|
|
130
|
-
transition: `all ${transitionDuration.faster} linear`,
|
|
131
141
|
"&:active": {
|
|
132
142
|
backgroundColor: themeVars.transparent,
|
|
133
143
|
},
|
package/src/antd/styles.ts
CHANGED
|
@@ -5,7 +5,7 @@ import {border, layout, shadows, space, textStyles, themeVars, transitions} from
|
|
|
5
5
|
const inputVariables = {
|
|
6
6
|
default: {
|
|
7
7
|
"--input-border": `${themeVars.inputBorderColor} inset`,
|
|
8
|
-
"--input-hover-border":
|
|
8
|
+
"--input-hover-border": `${themeVars.inputBorderHoverColor} inset`,
|
|
9
9
|
"--input-focus-border": `0 0 0 1px ${themeVars.colorAccentStrokeFocus} inset`,
|
|
10
10
|
"--input-focus-shadow": `0 0 0 2px ${themeVars.colorAccentStroke}`,
|
|
11
11
|
},
|
|
@@ -40,7 +40,7 @@ export const inputOverrides = {
|
|
|
40
40
|
},
|
|
41
41
|
},
|
|
42
42
|
hover: {
|
|
43
|
-
boxShadow: `var(--input-hover-border,
|
|
43
|
+
boxShadow: `var(--input-hover-border, ${themeVars.inputBorderHoverColor}) !important`,
|
|
44
44
|
transition: `box-shadow ${transitions.faster}`,
|
|
45
45
|
},
|
|
46
46
|
focus: {
|
|
@@ -69,10 +69,12 @@ export const inputStyles = css`
|
|
|
69
69
|
}
|
|
70
70
|
${{
|
|
71
71
|
...textStyles.regular,
|
|
72
|
-
"& .ant-input, & .ant-input-affix-wrapper, & .ant-input-group-wrapper, & .ant-input-wrapper":
|
|
72
|
+
":where(&) .ant-input, :where(&) .ant-input-affix-wrapper, :where(&) .ant-input-group-wrapper, :where(&) .ant-input-wrapper":
|
|
73
|
+
{
|
|
74
|
+
boxSizing: "border-box",
|
|
75
|
+
},
|
|
76
|
+
":where(&) .ant-input-affix-wrapper": {
|
|
73
77
|
boxSizing: "border-box",
|
|
74
|
-
},
|
|
75
|
-
"& .ant-input-affix-wrapper": {
|
|
76
78
|
display: "inline-flex",
|
|
77
79
|
alignItems: "center",
|
|
78
80
|
width: "100%",
|
|
@@ -83,40 +85,40 @@ export const inputStyles = css`
|
|
|
83
85
|
boxShadow: "none",
|
|
84
86
|
backgroundColor: themeVars.transparent,
|
|
85
87
|
},
|
|
86
|
-
"& .ant-input-affix-wrapper > input.ant-input": {
|
|
88
|
+
":where(&) .ant-input-affix-wrapper > input.ant-input": {
|
|
87
89
|
minWidth: 0,
|
|
88
90
|
flex: 1,
|
|
89
91
|
padding: "0 12px",
|
|
90
92
|
border: "inherit",
|
|
91
93
|
outline: "inherit",
|
|
92
94
|
},
|
|
93
|
-
"& .ant-input-prefix, & .ant-input-suffix": {
|
|
95
|
+
":where(&) .ant-input-prefix, :where(&) .ant-input-suffix": {
|
|
94
96
|
display: "flex",
|
|
95
97
|
flex: "none",
|
|
96
98
|
alignItems: "center",
|
|
97
99
|
},
|
|
98
100
|
// antd source: spacing between adjacent icons when prefix/suffix holds multiple nodes.
|
|
99
|
-
"& .ant-input-prefix > *:not(:last-child), & .ant-input-suffix > *:not(:last-child)": {
|
|
101
|
+
":where(&) .ant-input-prefix > *:not(:last-child), :where(&) .ant-input-suffix > *:not(:last-child)": {
|
|
100
102
|
marginRight: space.s8,
|
|
101
103
|
},
|
|
102
|
-
"& .ant-input-suffix": {
|
|
104
|
+
":where(&) .ant-input-suffix": {
|
|
103
105
|
marginLeft: space.s6,
|
|
104
106
|
},
|
|
105
|
-
"& .ant-input-clear-icon": {
|
|
107
|
+
":where(&) .ant-input-clear-icon": {
|
|
106
108
|
display: "inline-flex",
|
|
107
109
|
alignItems: "center",
|
|
108
110
|
color: themeVars.iconColor,
|
|
109
111
|
cursor: "pointer",
|
|
110
112
|
lineHeight: 1,
|
|
111
113
|
},
|
|
112
|
-
"& .ant-input-clear-icon-hidden": {
|
|
114
|
+
":where(&) .ant-input-clear-icon-hidden": {
|
|
113
115
|
visibility: "hidden",
|
|
114
116
|
},
|
|
115
|
-
"& .ant-input-group-wrapper": {
|
|
117
|
+
":where(&) .ant-input-group-wrapper": {
|
|
116
118
|
display: "inline-block",
|
|
117
119
|
width: "100%",
|
|
118
120
|
},
|
|
119
|
-
"& .ant-input-wrapper.ant-input-group": {
|
|
121
|
+
":where(&) .ant-input-wrapper.ant-input-group": {
|
|
120
122
|
display: "inline-flex",
|
|
121
123
|
width: "100%",
|
|
122
124
|
alignItems: "stretch",
|
|
@@ -130,9 +132,8 @@ export const inputStyles = css`
|
|
|
130
132
|
"&:hover": inputOverrides.hover,
|
|
131
133
|
"&:focus": inputOverrides.focus,
|
|
132
134
|
},
|
|
133
|
-
"& .ant-input-group": {borderSpacing: 1, ...textStyles.regular},
|
|
134
|
-
"& .ant-input": {
|
|
135
|
-
...inputOverrides.main,
|
|
135
|
+
":where(&) .ant-input-group": {borderSpacing: 1, ...textStyles.regular},
|
|
136
|
+
":where(&) .ant-input": {
|
|
136
137
|
// antd source: .ant-input { width: 100%; min-width: 0 } — without it, bare <AntInput>
|
|
137
138
|
// doesn't fill its container and can't shrink inside a flex parent. AutoComplete's
|
|
138
139
|
// .ant-select-selection-search .ant-input rule (two-class selector) beats this on
|
|
@@ -140,8 +141,11 @@ export const inputStyles = css`
|
|
|
140
141
|
width: "100%",
|
|
141
142
|
minWidth: 0,
|
|
142
143
|
},
|
|
144
|
+
"& .ant-input": {
|
|
145
|
+
...inputOverrides.main,
|
|
146
|
+
},
|
|
143
147
|
// antd source: long placeholders get ellipsis instead of wrap-clip.
|
|
144
|
-
"& .ant-input:placeholder-shown": {
|
|
148
|
+
":where(&) .ant-input:placeholder-shown": {
|
|
145
149
|
textOverflow: "ellipsis",
|
|
146
150
|
},
|
|
147
151
|
// bordered={false} → wrap with `ant-input-borderless` class; strip the box-shadow ring + bg.
|
|
@@ -155,7 +159,7 @@ export const inputStyles = css`
|
|
|
155
159
|
// antd source: inner input inside affix-wrapper must not paint its own focus ring —
|
|
156
160
|
// the wrapper owns the visual focus state. Without this prefix/suffix usage shows a
|
|
157
161
|
// double ring.
|
|
158
|
-
"& .ant-input-affix-wrapper > .ant-input:focus": {
|
|
162
|
+
":where(&) .ant-input-affix-wrapper > .ant-input:focus": {
|
|
159
163
|
boxShadow: "none !important",
|
|
160
164
|
},
|
|
161
165
|
"& .ant-input-status-error": inputVariables.error,
|
|
@@ -170,13 +174,15 @@ export const inputStyles = css`
|
|
|
170
174
|
"& .ant-input-affix-wrapper:hover .ant-input:not(.ant-input-disabled)": {
|
|
171
175
|
borderColor: "transparent",
|
|
172
176
|
},
|
|
173
|
-
//
|
|
174
|
-
//
|
|
175
|
-
// vertical-align: bottom matches the baseline of a single-line <input> next to it.
|
|
177
|
+
// Textarea padding must beat inputOverrides.main's zero vertical padding so rc-textarea
|
|
178
|
+
// autosize measures the same row height as the rendered control.
|
|
176
179
|
"& textarea.ant-input": {
|
|
177
180
|
paddingTop: space.s8,
|
|
178
181
|
paddingBottom: space.s8,
|
|
179
|
-
|
|
182
|
+
},
|
|
183
|
+
// antd source: textarea defaults — max-width prevents user-resize from blowing out the
|
|
184
|
+
// container, and vertical-align: bottom matches the baseline of a single-line <input> next to it.
|
|
185
|
+
":where(&) textarea.ant-input": {
|
|
180
186
|
maxWidth: "100%",
|
|
181
187
|
verticalAlign: "bottom",
|
|
182
188
|
},
|
package/src/antd/tabs.tsx
CHANGED
|
@@ -16,16 +16,16 @@ const PrefixedTabs = forwardRef<HTMLDivElement, TabsPropsAny>(function PrefixedT
|
|
|
16
16
|
export const tabsStyles = css`
|
|
17
17
|
${{
|
|
18
18
|
width: "100%",
|
|
19
|
-
"& .ant-tabs": {
|
|
19
|
+
":where(&) .ant-tabs": {
|
|
20
20
|
boxSizing: "border-box",
|
|
21
21
|
display: "flex",
|
|
22
22
|
overflow: "visible",
|
|
23
23
|
width: "100%",
|
|
24
24
|
},
|
|
25
|
-
"& .ant-tabs-top, & .ant-tabs-bottom": {
|
|
25
|
+
":where(&) .ant-tabs-top, :where(&) .ant-tabs-bottom": {
|
|
26
26
|
flexDirection: "column",
|
|
27
27
|
},
|
|
28
|
-
"& .ant-tabs-nav": {
|
|
28
|
+
":where(&) .ant-tabs-nav": {
|
|
29
29
|
display: "flex",
|
|
30
30
|
flex: "none",
|
|
31
31
|
alignItems: "center",
|
|
@@ -41,7 +41,7 @@ export const tabsStyles = css`
|
|
|
41
41
|
content: "''",
|
|
42
42
|
},
|
|
43
43
|
},
|
|
44
|
-
"& .ant-tabs-nav-wrap": {
|
|
44
|
+
":where(&) .ant-tabs-nav-wrap": {
|
|
45
45
|
display: "flex",
|
|
46
46
|
flex: "auto",
|
|
47
47
|
overflow: "hidden",
|
|
@@ -53,7 +53,7 @@ export const tabsStyles = css`
|
|
|
53
53
|
marginLeft: space.s12,
|
|
54
54
|
marginRight: space.s12,
|
|
55
55
|
},
|
|
56
|
-
"& .ant-tabs-nav-wrap::before, & .ant-tabs-nav-wrap::after": {
|
|
56
|
+
":where(&) .ant-tabs-nav-wrap::before, :where(&) .ant-tabs-nav-wrap::after": {
|
|
57
57
|
position: "absolute",
|
|
58
58
|
zIndex: 1,
|
|
59
59
|
opacity: 0,
|
|
@@ -61,27 +61,27 @@ export const tabsStyles = css`
|
|
|
61
61
|
content: "''",
|
|
62
62
|
pointerEvents: "none",
|
|
63
63
|
},
|
|
64
|
-
"& .ant-tabs-nav-list": {
|
|
64
|
+
":where(&) .ant-tabs-nav-list": {
|
|
65
65
|
position: "relative",
|
|
66
66
|
display: "flex",
|
|
67
67
|
transition: `transform ${transitions.normal}`,
|
|
68
68
|
},
|
|
69
|
-
"& .ant-tabs-nav-operations": {
|
|
69
|
+
":where(&) .ant-tabs-nav-operations": {
|
|
70
70
|
display: "flex",
|
|
71
71
|
alignSelf: "stretch",
|
|
72
72
|
},
|
|
73
|
-
"& .ant-tabs-nav-operations-hidden": {
|
|
73
|
+
":where(&) .ant-tabs-nav-operations-hidden": {
|
|
74
74
|
position: "absolute",
|
|
75
75
|
visibility: "hidden",
|
|
76
76
|
pointerEvents: "none",
|
|
77
77
|
},
|
|
78
|
-
"& .ant-tabs-nav-more": {
|
|
78
|
+
":where(&) .ant-tabs-nav-more": {
|
|
79
79
|
position: "relative",
|
|
80
80
|
padding: `${space.s8}px ${space.s16}px`,
|
|
81
81
|
backgroundColor: themeVars.transparent,
|
|
82
82
|
border: 0,
|
|
83
83
|
},
|
|
84
|
-
"& .ant-tabs-nav-more::after": {
|
|
84
|
+
":where(&) .ant-tabs-nav-more::after": {
|
|
85
85
|
position: "absolute",
|
|
86
86
|
right: 0,
|
|
87
87
|
bottom: 0,
|
|
@@ -90,13 +90,13 @@ export const tabsStyles = css`
|
|
|
90
90
|
transform: "translateY(100%)",
|
|
91
91
|
content: "''",
|
|
92
92
|
},
|
|
93
|
-
"& .ant-tabs-extra-content": {
|
|
93
|
+
":where(&) .ant-tabs-extra-content": {
|
|
94
94
|
flex: "none",
|
|
95
95
|
},
|
|
96
|
-
"& .ant-tabs-centered .ant-tabs-nav-wrap:not([class*='ant-tabs-nav-wrap-ping'])": {
|
|
96
|
+
":where(&) .ant-tabs-centered .ant-tabs-nav-wrap:not([class*='ant-tabs-nav-wrap-ping'])": {
|
|
97
97
|
justifyContent: "center",
|
|
98
98
|
},
|
|
99
|
-
"& .ant-tabs-ink-bar": {
|
|
99
|
+
":where(&) .ant-tabs-ink-bar": {
|
|
100
100
|
position: "absolute",
|
|
101
101
|
bottom: 0,
|
|
102
102
|
backgroundColor: themeVars.colorAccent,
|
|
@@ -104,12 +104,12 @@ export const tabsStyles = css`
|
|
|
104
104
|
pointerEvents: "none",
|
|
105
105
|
transition: `left ${transitions.faster}, right ${transitions.faster}, width ${transitions.faster}`,
|
|
106
106
|
},
|
|
107
|
-
"& .ant-tabs-tab, & .ant-tabs-tab:hover, & .ant-tabs-tab-btn:active, & .ant-tabs-tabpane, & .ant-tabs-tab-active .ant-tabs-tab-btn":
|
|
107
|
+
":where(&) .ant-tabs-tab, :where(&) .ant-tabs-tab:hover, :where(&) .ant-tabs-tab-btn:active, :where(&) .ant-tabs-tabpane, :where(&) .ant-tabs-tab-active .ant-tabs-tab-btn":
|
|
108
108
|
{
|
|
109
109
|
...textStyles.regular,
|
|
110
110
|
textShadow: "none",
|
|
111
111
|
},
|
|
112
|
-
"& .ant-tabs-tab": {
|
|
112
|
+
":where(&) .ant-tabs-tab": {
|
|
113
113
|
position: "relative",
|
|
114
114
|
display: "inline-flex",
|
|
115
115
|
alignItems: "center",
|
|
@@ -118,53 +118,53 @@ export const tabsStyles = css`
|
|
|
118
118
|
cursor: "pointer",
|
|
119
119
|
outline: "none",
|
|
120
120
|
},
|
|
121
|
-
"& .ant-tabs-tab + .ant-tabs-tab": {
|
|
121
|
+
":where(&) .ant-tabs-tab + .ant-tabs-tab": {
|
|
122
122
|
margin: `0 ${space.s8}px 0 0`,
|
|
123
123
|
},
|
|
124
|
-
"& .ant-tabs-tab-btn": {
|
|
124
|
+
":where(&) .ant-tabs-tab-btn": {
|
|
125
125
|
outline: "none",
|
|
126
126
|
transition: `all ${transitions.slow}`,
|
|
127
127
|
},
|
|
128
|
-
"& .ant-tabs-tab-active .ant-tabs-tab-btn": {
|
|
128
|
+
":where(&) .ant-tabs-tab-active .ant-tabs-tab-btn": {
|
|
129
129
|
color: themeVars.colorAccent,
|
|
130
130
|
},
|
|
131
|
-
"& .ant-tabs-content-holder": {
|
|
131
|
+
":where(&) .ant-tabs-content-holder": {
|
|
132
132
|
flex: "auto",
|
|
133
133
|
minWidth: 0,
|
|
134
134
|
minHeight: 0,
|
|
135
135
|
},
|
|
136
|
-
"& .ant-tabs-content": {
|
|
136
|
+
":where(&) .ant-tabs-content": {
|
|
137
137
|
position: "relative",
|
|
138
138
|
display: "flex",
|
|
139
139
|
width: "100%",
|
|
140
140
|
},
|
|
141
|
-
"& .ant-tabs-tabpane": {
|
|
141
|
+
":where(&) .ant-tabs-tabpane": {
|
|
142
142
|
flex: "none",
|
|
143
143
|
width: "100%",
|
|
144
144
|
outline: "none",
|
|
145
145
|
},
|
|
146
|
-
"& .ant-tabs-tabpane-hidden": {
|
|
146
|
+
":where(&) .ant-tabs-tabpane-hidden": {
|
|
147
147
|
display: "none",
|
|
148
148
|
},
|
|
149
|
-
"& .ant-tabs-switch-appear, & .ant-tabs-switch-enter": {
|
|
149
|
+
":where(&) .ant-tabs-switch-appear, :where(&) .ant-tabs-switch-enter": {
|
|
150
150
|
transition: "none",
|
|
151
151
|
},
|
|
152
|
-
"& .ant-tabs-switch-appear-start, & .ant-tabs-switch-enter-start": {
|
|
152
|
+
":where(&) .ant-tabs-switch-appear-start, :where(&) .ant-tabs-switch-enter-start": {
|
|
153
153
|
opacity: 0,
|
|
154
154
|
},
|
|
155
|
-
"& .ant-tabs-switch-appear-active, & .ant-tabs-switch-enter-active": {
|
|
155
|
+
":where(&) .ant-tabs-switch-appear-active, :where(&) .ant-tabs-switch-enter-active": {
|
|
156
156
|
opacity: 1,
|
|
157
157
|
transition: `opacity ${transitions.slow}`,
|
|
158
158
|
},
|
|
159
|
-
"& .ant-tabs-switch-leave": {
|
|
159
|
+
":where(&) .ant-tabs-switch-leave": {
|
|
160
160
|
position: "absolute",
|
|
161
161
|
inset: 0,
|
|
162
162
|
transition: "none",
|
|
163
163
|
},
|
|
164
|
-
"& .ant-tabs-switch-leave-start": {
|
|
164
|
+
":where(&) .ant-tabs-switch-leave-start": {
|
|
165
165
|
opacity: 1,
|
|
166
166
|
},
|
|
167
|
-
"& .ant-tabs-switch-leave-active": {
|
|
167
|
+
":where(&) .ant-tabs-switch-leave-active": {
|
|
168
168
|
opacity: 0,
|
|
169
169
|
transition: `opacity ${transitions.slow}`,
|
|
170
170
|
},
|
package/src/color-filter.ts
CHANGED
|
@@ -65,7 +65,7 @@ export function makeColorFilter(spec: ColorFilterSpec | undefined): ColorFilter
|
|
|
65
65
|
if (!color) {
|
|
66
66
|
return color;
|
|
67
67
|
}
|
|
68
|
-
//
|
|
68
|
+
// eslint-disable-next-line no-param-reassign
|
|
69
69
|
color = spec.swatches?.[color.toUpperCase()] ?? color;
|
|
70
70
|
|
|
71
71
|
const parsed = oklchFrom(color);
|