@broxus/react-uikit 0.7.0 → 0.8.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.
@@ -379,6 +379,16 @@
379
379
  }
380
380
  }
381
381
 
382
+ /* OnClick + Active */
383
+ .uk-button-text:active,
384
+ .uk-button-text.uk-active {
385
+ background-color: var(--button-text-active-background);
386
+ color: var(--button-text-active-color);
387
+ @if mixin-exists(hook-button-text-active) {
388
+ @include hook-button-text-active;
389
+ }
390
+ }
391
+
382
392
  /*
383
393
  * Link
384
394
  * 1. Reset
@@ -408,6 +418,15 @@
408
418
  text-decoration: none;
409
419
  }
410
420
 
421
+ /* OnClick + Active */
422
+ .uk-button-link:active,
423
+ .uk-button-link.uk-active {
424
+ background-color: var(--button-link-active-background);
425
+ color: var(--button-link-active-color);
426
+ @if mixin-exists(hook-button-link-active) {
427
+ @include hook-button-link-active;
428
+ }
429
+ }
411
430
 
412
431
  /* Ghost modifiers
413
432
  ========================================================================== */
@@ -2,6 +2,9 @@ import * as React from 'react';
2
2
  import { type ButtonProps } from '../../components/Button';
3
3
  import { type BreakpointsConfig, type TooltipOptions } from '../../types';
4
4
  export type ColorMode = 'light' | 'dark';
5
+ type PropsWithMouseHandler = {
6
+ onClick: React.HTMLAttributes<HTMLElement>['onClick'];
7
+ };
5
8
  export type ConfigContextConsumedProps = {
6
9
  breakpoints: Exclude<BreakpointsConfig<number>, 'default'>;
7
10
  buttonShape?: ButtonProps['shape'];
@@ -9,6 +12,7 @@ export type ConfigContextConsumedProps = {
9
12
  cardPrimaryColorMode?: ColorMode;
10
13
  cardSecondaryColorMode?: ColorMode;
11
14
  cardTertiaryColorMode?: ColorMode;
15
+ controlClearIcon?: React.ReactNode | ((props: PropsWithMouseHandler) => React.ReactElement);
12
16
  direction?: string;
13
17
  getPopupContainer?: (triggerNode?: HTMLElement) => HTMLElement;
14
18
  getRootPrefixCls: (prefix?: string, component?: string) => string;
@@ -20,6 +24,14 @@ export type ConfigContextConsumedProps = {
20
24
  sectionPrimaryColorMode?: ColorMode;
21
25
  sectionSecondaryColorMode?: ColorMode;
22
26
  sectionTertiaryColorMode?: ColorMode;
27
+ selectAddIcon?: React.ReactNode | ((props: PropsWithMouseHandler) => React.ReactElement);
28
+ selectArrowIcon?: React.ReactNode | ((props: {
29
+ isOpen: boolean;
30
+ } & PropsWithMouseHandler) => React.ReactElement);
31
+ selectClearIcon?: React.ReactNode | (() => React.ReactElement);
32
+ selectLoadingIcon?: React.ReactNode | (() => React.ReactElement);
33
+ selectNotFoundContent?: React.ReactNode | (() => React.ReactElement);
34
+ selectSearchIcon?: React.ReactNode | (() => React.ReactElement);
23
35
  tilePrimaryColorMode?: ColorMode;
24
36
  tileSecondaryColorMode?: ColorMode;
25
37
  tileTertiaryColorMode?: ColorMode;
@@ -28,3 +40,4 @@ export type ConfigContextProviderProps = React.PropsWithChildren<ConfigContextCo
28
40
  export declare const ConfigContext: React.Context<ConfigContextConsumedProps>;
29
41
  export declare function useConfig(): ConfigContextConsumedProps;
30
42
  export declare function ConfigContextProvider(props: Partial<ConfigContextProviderProps>): React.JSX.Element;
43
+ export {};
@@ -86,20 +86,21 @@
86
86
  }
87
87
 
88
88
  .uk-checkbox-wrapper .uk-checkbox-inner::after {
89
- border: var(--checkbox-border-width) solid var(--checkbox-checked-border);
89
+ border: var(--checkbox-checked-icon-border-width) solid var(--checkbox-checked-icon-color);
90
90
  border-left: 0;
91
91
  border-top: 0;
92
+ box-sizing: border-box;
92
93
  content: ' ';
93
94
  display: block;
94
- height: calc(var(--checkbox-size) / 2.5);
95
- left: 27.5%;
95
+ height: calc(var(--checkbox-size) / 2);
96
+ left: 28.5%;
96
97
  opacity: 0;
97
98
  position: absolute;
98
99
  top: 50%;
99
100
  transform: rotate(45deg) scale(0) translate(-50%, -50%);
100
101
  transition: all var(--transition-fast-duration) var(--ease-in-back),
101
102
  opacity var(--transition-fast-duration);
102
- width: calc(var(--checkbox-size) / 6);
103
+ width: calc(var(--checkbox-size) / 4);
103
104
  }
104
105
 
105
106
  .uk-checkbox-wrapper .uk-checkbox-label {
@@ -314,6 +315,7 @@
314
315
  --checkbox-size: #{$checkbox-size};
315
316
  --checkbox-checked-background: var(--global-primary-background);
316
317
  --checkbox-checked-border: var(--global-primary-border);
318
+ --checkbox-checked-icon-border-width: #{$checkbox-checked-icon-border-width};
317
319
  --checkbox-checked-icon-color: var(--global-inverse-color);
318
320
  --checkbox-control-background: #{$checkbox-control-background};
319
321
  --checkbox-checked-control-background: #{$checkbox-checked-control-background};
@@ -7,7 +7,7 @@ import { Icon } from '../../../components/Icon';
7
7
  import '../index.scss';
8
8
  export const Input = React.forwardRef((props, ref) => {
9
9
  const config = useConfig();
10
- const { allowClear, inputRef, prefix, prefixCls = config.prefixCls, suffix, wrapperClasses, onClear, ...restProps } = useInput({
10
+ const { allowClear, htmlSize, inputRef, prefix, prefixCls = config.prefixCls, suffix, wrapperClasses, onClear, ...restProps } = useInput({
11
11
  type: 'text',
12
12
  ...props,
13
13
  });
@@ -19,6 +19,19 @@ export const Input = React.forwardRef((props, ref) => {
19
19
  [`${prefixCls || config.prefixCls}-empty`]: !restProps.value,
20
20
  }),
21
21
  }, ['dir', 'size']);
22
+ const clearIcon = React.useMemo(() => {
23
+ if (typeof config.controlClearIcon === 'function') {
24
+ return config.controlClearIcon({
25
+ onClick: (event) => {
26
+ onClear?.(event);
27
+ },
28
+ });
29
+ }
30
+ if (React.isValidElement(config.controlClearIcon)) {
31
+ return config.controlClearIcon;
32
+ }
33
+ return (React.createElement(Icon, { key: "clearfix-icon", icon: "close", className: `${controlCls}-clear`, onClick: onClear }));
34
+ }, [config, controlCls, onClear]);
22
35
  React.useImperativeHandle(ref, () => ({
23
36
  blur() {
24
37
  inputRef.current?.blur();
@@ -33,8 +46,8 @@ export const Input = React.forwardRef((props, ref) => {
33
46
  return (React.createElement("label", { className: wrapperClasses, htmlFor: restProps.id },
34
47
  prefix && (React.createElement("span", { key: "prefix", className: `${controlCls}-prefix` }, prefix)),
35
48
  React.createElement("span", { key: "input", className: `${controlCls}-input` },
36
- React.createElement("input", { ref: inputRef, ...inputProps, type: restProps.type })),
37
- allowClear && restProps.value && (React.createElement(Icon, { key: "clearfix-icon", icon: "close", className: `${controlCls}-clear`, onClick: onClear })),
49
+ React.createElement("input", { ref: inputRef, ...inputProps, size: htmlSize, type: restProps.type })),
50
+ allowClear && restProps.value && clearIcon,
38
51
  suffix && (React.createElement("span", { key: "suffix", className: `${controlCls}-suffix` }, suffix))));
39
52
  });
40
53
  if (process.env.NODE_ENV !== 'production') {
@@ -11,6 +11,7 @@ export interface InputRef {
11
11
  }
12
12
  export type OmittedNativeInput = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'defaultValue' | 'defaultChecked' | 'size' | 'prefix' | 'type' | 'max' | 'min'>;
13
13
  export interface InputProps<T extends ValueType = ValueType> extends OmittedNativeInput, ControlProps<T> {
14
+ htmlSize?: number | undefined;
14
15
  useInternalValueState?: boolean;
15
16
  onClear?(event: React.MouseEvent<HTMLElement>): void;
16
17
  }
@@ -10,7 +10,7 @@ const SECRET_COMBOBOX_MODE_DO_NOT_USE = 'SECRET_COMBOBOX_MODE_DO_NOT_USE';
10
10
  /* eslint-disable jsx-a11y/label-has-associated-control */
11
11
  function InternalSelect(props, ref) {
12
12
  const config = useConfig();
13
- const { className, listHeight = 256, listItemHeight = 24, prefixCls = config.prefixCls, showArrow = true, showSearch = false, onPressEnter, ...restProps } = props;
13
+ const { allowClear, className, listHeight = 256, listItemHeight = 24, prefixCls = config.prefixCls, showArrow = true, showSearch = false, onPressEnter, ...restProps } = props;
14
14
  const inputRef = React.useRef(null);
15
15
  const labelRef = React.useRef(null);
16
16
  const [focused, setFocused] = React.useState(false);
@@ -40,8 +40,8 @@ function InternalSelect(props, ref) {
40
40
  restProps.onDropdownVisibleChange?.(open);
41
41
  }, [restProps]);
42
42
  const onClickIcon = React.useCallback(() => {
43
- setInternalOpen(true);
44
- }, []);
43
+ setInternalOpen(!internalOpen);
44
+ }, [internalOpen]);
45
45
  React.useEffect(() => {
46
46
  setInternalOpen(restProps.defaultOpen || restProps.open || internalOpen);
47
47
  }, [restProps.open, restProps.defaultOpen, internalOpen]);
@@ -86,20 +86,48 @@ function InternalSelect(props, ref) {
86
86
  // Arrow or loading icon
87
87
  let suffixIcon;
88
88
  if (restProps.loading) {
89
- suffixIcon = React.createElement(Spinner, { key: "spinner", ratio: 0.9 });
89
+ if (typeof config.selectLoadingIcon === 'function') {
90
+ suffixIcon = config.selectLoadingIcon();
91
+ }
92
+ else if (React.isValidElement(config.selectLoadingIcon)) {
93
+ suffixIcon = config.selectLoadingIcon;
94
+ }
95
+ else {
96
+ suffixIcon = React.createElement(Spinner, { key: "spinner", ratio: 0.7 });
97
+ }
90
98
  }
91
99
  else if (showArrow) {
92
100
  const isMultiple = mode === 'multiple' || mode === 'tags';
93
101
  if (isMultiple) {
94
- suffixIcon = React.createElement(Icon, { key: "add_box", icon: "add_box", onClick: onClickIcon });
102
+ if (typeof config.selectAddIcon === 'function') {
103
+ suffixIcon = config.selectAddIcon({ onClick: onClickIcon });
104
+ }
105
+ else if (React.isValidElement(config.selectAddIcon)) {
106
+ suffixIcon = config.selectAddIcon;
107
+ }
108
+ else {
109
+ suffixIcon = React.createElement(Icon, { key: "add_box", icon: "add_box", onClick: onClickIcon });
110
+ }
95
111
  }
96
112
  else if (showSearch && internalOpen) {
97
- suffixIcon = React.createElement(Icon, { key: "manage_search", icon: "manage_search" });
113
+ if (typeof config.selectSearchIcon === 'function') {
114
+ suffixIcon = config.selectSearchIcon();
115
+ }
116
+ else if (React.isValidElement(config.selectSearchIcon)) {
117
+ suffixIcon = config.selectSearchIcon;
118
+ }
119
+ else {
120
+ suffixIcon = React.createElement(Icon, { key: "manage_search", icon: "manage_search" });
121
+ }
122
+ }
123
+ else if (typeof config.selectArrowIcon === 'function') {
124
+ suffixIcon = config.selectArrowIcon({ isOpen: internalOpen, onClick: onClickIcon });
125
+ }
126
+ else if (React.isValidElement(config.selectArrowIcon)) {
127
+ suffixIcon = config.selectArrowIcon;
98
128
  }
99
129
  else {
100
- suffixIcon = internalOpen
101
- ? React.createElement(Icon, { key: "expand_less", icon: "expand_less" })
102
- : React.createElement(Icon, { key: "expand_more", icon: "expand_more", onClick: onClickIcon });
130
+ suffixIcon = internalOpen ? (React.createElement(Icon, { key: "expand_less", icon: "expand_less" })) : (React.createElement(Icon, { key: "expand_more", icon: "expand_more", onClick: onClickIcon }));
103
131
  }
104
132
  }
105
133
  // Not found content
@@ -110,9 +138,22 @@ function InternalSelect(props, ref) {
110
138
  else if (mode === 'combobox') {
111
139
  mergedNotFound = null;
112
140
  }
141
+ if (typeof config.selectNotFoundContent === 'function') {
142
+ mergedNotFound = config.selectNotFoundContent();
143
+ }
144
+ else if (React.isValidElement(config.selectNotFoundContent)) {
145
+ mergedNotFound = config.selectNotFoundContent;
146
+ }
147
+ let clearIcon = React.createElement(Icon, { icon: "clear" });
148
+ if (typeof config.selectClearIcon === 'function') {
149
+ clearIcon = config.selectClearIcon();
150
+ }
151
+ else if (React.isValidElement(config.selectClearIcon)) {
152
+ clearIcon = config.selectClearIcon;
153
+ }
113
154
  return {
114
- allowClear: {
115
- clearIcon: React.createElement(Icon, { icon: "clear" }),
155
+ allowClear: (allowClear || allowClear === undefined) && {
156
+ clearIcon,
116
157
  },
117
158
  dropdownMatchSelectWidth: true,
118
159
  listHeight,
@@ -138,13 +179,14 @@ function InternalSelect(props, ref) {
138
179
  restProps,
139
180
  showArrow,
140
181
  mode,
182
+ config,
183
+ allowClear,
141
184
  listHeight,
142
185
  listItemHeight,
143
186
  internalOpen,
144
187
  rootCls,
145
188
  showSearch,
146
189
  prefixCls,
147
- config.prefixCls,
148
190
  onBlur,
149
191
  onDropdownVisibleChange,
150
192
  onFocus,
@@ -163,9 +205,9 @@ function InternalSelect(props, ref) {
163
205
  },
164
206
  }));
165
207
  return (React.createElement("label", { ref: labelRef, className: wrapperClasses, htmlFor: restProps.id },
166
- React.createElement(RcSelect, { ref: inputRef, ...inputProps, dropdownAlign: {
208
+ React.createElement(RcSelect, { ref: inputRef, dropdownAlign: {
167
209
  offset: [offsetY, 5],
168
- }, mode: mode })));
210
+ }, ...inputProps, mode: mode })));
169
211
  }
170
212
  export const Select = React.forwardRef(InternalSelect);
171
213
  Select.SECRET_COMBOBOX_MODE_DO_NOT_USE = SECRET_COMBOBOX_MODE_DO_NOT_USE;
@@ -219,6 +219,7 @@
219
219
  flex-wrap: wrap;
220
220
  grid-gap: var(--select-gutter);
221
221
  height: auto;
222
+ line-height: normal;
222
223
  padding: 0;
223
224
  width: 100%;
224
225
  }
@@ -347,24 +348,47 @@
347
348
  cursor: not-allowed;
348
349
  }
349
350
 
351
+ .uk-control-select:not(.uk-control-rtl) .uk-select-arrow,
352
+ .uk-control-select:not(.uk-control-rtl) .uk-select-clear {
353
+ right: 0;
354
+ }
355
+
356
+ /* Arrow */
350
357
  .uk-select-arrow {
351
358
  --icon-size: var(--select-arrow-icon-size);
352
- right: 0;
353
359
  @if mixin-exists(hook-select-arrow) {
354
360
  @include hook-select-arrow;
355
361
  }
356
362
  }
357
363
 
364
+ /* Clear */
358
365
  .uk-select-clear {
359
366
  @if mixin-exists(hook-select-clear) {
360
367
  @include hook-select-clear;
361
368
  }
362
369
  }
363
370
 
364
- .uk-select-arrow + .uk-select-clear {
371
+ .uk-control-select .uk-select-arrow + .uk-select-clear {
372
+ width: calc(var(--select-height) * 0.6777);
373
+ }
374
+
375
+ .uk-control-select:not(.uk-control-rtl) .uk-select-arrow + .uk-select-clear {
365
376
  right: var(--select-height);
366
377
  }
367
378
 
379
+ /* Selector */
380
+ .uk-control-select:not(.uk-control-rtl) .uk-select-allow-clear .uk-select-selector,
381
+ .uk-control-select:not(.uk-control-rtl) .uk-select-show-arrow .uk-select-selector {
382
+ padding-right: var(--select-height);
383
+ }
384
+
385
+ .uk-control-select:not(.uk-control-rtl) .uk-select-allow-clear.uk-select-show-arrow .uk-select-selector {
386
+ --arrow-width: var(--select-height);
387
+ --clear-width: calc(var(--select-height) * 0.6777);
388
+ padding-right: calc(var(--arrow-width) + var(--clear-width));
389
+ }
390
+
391
+
368
392
  /* Dropdown
369
393
  ========================================================================== */
370
394
 
@@ -558,8 +582,25 @@
558
582
  width: var(--select-small-height);
559
583
  }
560
584
 
585
+ // Clear
561
586
  .uk-control-select.uk-control-small .uk-select-arrow + .uk-select-clear {
562
- width: var(--select-small-height);
587
+ width: calc(var(--select-small-height) * 0.6777);
588
+ }
589
+
590
+ .uk-control-select.uk-control-small:not(.uk-control-rtl) .uk-select-arrow + .uk-select-clear {
591
+ right: var(--select-small-height);
592
+ }
593
+
594
+ // Selector
595
+ .uk-control-select.uk-control-small:not(.uk-control-rtl) .uk-select-allow-clear .uk-select-selector,
596
+ .uk-control-select.uk-control-small:not(.uk-control-rtl) .uk-select-show-arrow .uk-select-selector {
597
+ padding-right: var(--select-small-height);
598
+ }
599
+
600
+ .uk-control-select.uk-control-small:not(.uk-control-rtl) .uk-select-allow-clear.uk-select-show-arrow .uk-select-selector {
601
+ --arrow-width: var(--select-small-height);
602
+ --clear-width: calc(var(--select-small-height) * 0.6777);
603
+ padding-right: calc(var(--arrow-width) + var(--clear-width));
563
604
  }
564
605
 
565
606
  /* Medium */
@@ -576,8 +617,25 @@
576
617
  width: var(--select-medium-height);
577
618
  }
578
619
 
620
+ // Clear
579
621
  .uk-control-select.uk-control-medium .uk-select-arrow + .uk-select-clear {
580
- width: var(--select-medium-height);
622
+ width: calc(var(--select-medium-height) * 0.6777);
623
+ }
624
+
625
+ .uk-control-select.uk-control-medium:not(.uk-control-rtl) .uk-select-arrow + .uk-select-clear {
626
+ right: var(--select-medium-height);
627
+ }
628
+
629
+ // Selector
630
+ .uk-control-select.uk-control-medium:not(.uk-control-rtl) .uk-select-allow-clear .uk-select-selector,
631
+ .uk-control-select.uk-control-medium:not(.uk-control-rtl) .uk-select-show-arrow .uk-select-selector {
632
+ padding-right: var(--select-medium-height);
633
+ }
634
+
635
+ .uk-control-select.uk-control-medium:not(.uk-control-rtl) .uk-select-allow-clear.uk-select-show-arrow .uk-select-selector {
636
+ --arrow-width: var(--select-medium-height);
637
+ --clear-width: calc(var(--select-medium-height) * 0.6777);
638
+ padding-right: calc(var(--arrow-width) + var(--clear-width));
581
639
  }
582
640
 
583
641
  /* Large */
@@ -589,13 +647,30 @@
589
647
  padding: 0 var(--select-selector-large-padding-horizontal);
590
648
  }
591
649
 
592
- .uk-control-select.uk-control-large .uk-select-arrow,
650
+ .uk-control-select.uk-control-large .uk-select-arrow ,
593
651
  .uk-control-select.uk-control-large .uk-select-clear {
594
- width: var(--select-large-height);
652
+ width: calc(var(--select-large-height) * 0.8667);
595
653
  }
596
654
 
655
+ // Clear
597
656
  .uk-control-select.uk-control-large .uk-select-arrow + .uk-select-clear {
598
- width: var(--select-large-height);
657
+ width: calc(var(--select-large-height) * 0.6777);
658
+ }
659
+
660
+ .uk-control-select.uk-control-large:not(.uk-control-rtl) .uk-select-arrow + .uk-select-clear {
661
+ right: calc(var(--select-large-height) * 0.8667);
662
+ }
663
+
664
+ // Selector
665
+ .uk-control-select.uk-control-large:not(.uk-control-rtl) .uk-select-allow-clear .uk-select-selector,
666
+ .uk-control-select.uk-control-large:not(.uk-control-rtl) .uk-select-show-arrow .uk-select-selector {
667
+ padding-right: calc(var(--select-large-height) * 0.8667);
668
+ }
669
+
670
+ .uk-control-select.uk-control-large:not(.uk-control-rtl) .uk-select-allow-clear.uk-select-show-arrow .uk-select-selector {
671
+ --arrow-width: calc(var(--select-large-height) * 0.8667);
672
+ --clear-width: calc(var(--select-large-height) * 0.6777);
673
+ padding-right: calc(var(--arrow-width) + var(--clear-width));
599
674
  }
600
675
 
601
676
  /* Right to Left Direction
@@ -606,29 +681,74 @@
606
681
  direction: rtl;
607
682
  }
608
683
 
609
- .uk-control-select.uk-control-rtl .uk-select-arrow {
684
+ .uk-control-select.uk-control-rtl .uk-select-arrow,
685
+ .uk-control-select.uk-control-rtl .uk-select-clear {
610
686
  left: 0;
611
- right: unset;
612
687
  }
613
688
 
614
- .uk-control-select.uk-control-rtl .uk-select-clear {
689
+ .uk-control-select.uk-control-rtl .uk-select-arrow + .uk-select-clear {
615
690
  left: var(--select-height);
616
- right: unset;
617
691
  }
618
692
 
619
- .uk-control-select.uk-control-small.uk-control-rtl .uk-select-clear {
693
+ .uk-control-select.uk-control-rtl .uk-select-allow-clear .uk-select-selector,
694
+ .uk-control-select.uk-control-rtl .uk-select-show-arrow .uk-select-selector {
695
+ padding-left: var(--select-height);
696
+ }
697
+
698
+ .uk-control-select.uk-control-rtl .uk-select-allow-clear.uk-select-show-arrow .uk-select-selector {
699
+ --arrow-width: var(--select-height);
700
+ --clear-width: calc(var(--select-height) * 0.6777);
701
+ padding-left: calc(var(--arrow-width) + var(--clear-width));
702
+ }
703
+
704
+ /* Small */
705
+ .uk-control-select.uk-control-small.uk-control-rtl .uk-select-arrow + .uk-select-clear {
620
706
  left: var(--select-small-height);
621
707
  }
622
708
 
623
- .uk-control-select.uk-control-medium.uk-control-rtl .uk-select-clear {
709
+ .uk-control-select.uk-control-small.uk-control-rtl .uk-select-allow-clear .uk-select-selector,
710
+ .uk-control-select.uk-control-small.uk-control-rtl .uk-select-show-arrow .uk-select-selector {
711
+ padding-left: var(--select-small-height);
712
+ }
713
+
714
+ .uk-control-select.uk-control-small.uk-control-rtl .uk-select-allow-clear.uk-select-show-arrow .uk-select-selector {
715
+ --arrow-width: var(--select-small-height);
716
+ --clear-width: calc(var(--select-small-height) * 0.6777);
717
+ padding-left: calc(var(--arrow-width) + var(--clear-width));
718
+ }
719
+
720
+ /* Medium */
721
+ .uk-control-select.uk-control-medium.uk-control-rtl .uk-select-arrow .uk-select-clear {
624
722
  left: var(--select-medium-height);
625
723
  }
626
724
 
725
+ .uk-control-select.uk-control-medium.uk-control-rtl .uk-select-allow-clear .uk-select-selector,
726
+ .uk-control-select.uk-control-medium.uk-control-rtl .uk-select-show-arrow .uk-select-selector {
727
+ padding-left: var(--select-medium-height);
728
+ }
729
+
730
+ .uk-control-select.uk-control-medium.uk-control-rtl .uk-select-allow-clear.uk-select-show-arrow .uk-select-selector {
731
+ --arrow-width: var(--select-medium-height);
732
+ --clear-width: calc(var(--select-medium-height) * 0.6777);
733
+ padding-left: calc(var(--arrow-width) + var(--clear-width));
734
+ }
735
+
736
+ /* Large */
627
737
  .uk-control-select.uk-control-large.uk-control-rtl .uk-select-clear {
628
- left: var(--select-large-height);
738
+ left: calc(var(--select-large-height) * 0.8667);
739
+ }
740
+
741
+ .uk-control-select.uk-control-large.uk-control-rtl .uk-select-allow-clear .uk-select-selector,
742
+ .uk-control-select.uk-control-large.uk-control-rtl .uk-select-show-arrow .uk-select-selector {
743
+ padding-left: calc(var(--select-large-height) * 0.8667);
744
+ }
745
+
746
+ .uk-control-select.uk-control-large.uk-control-rtl .uk-select-allow-clear.uk-select-show-arrow .uk-select-selector {
747
+ --arrow-width: calc(var(--select-large-height) * 0.8667);
748
+ --clear-width: calc(var(--select-large-height) * 0.6777);
749
+ padding-left: calc(var(--arrow-width) + var(--clear-width));
629
750
  }
630
751
 
631
- // Multiple overwrites
632
752
  .uk-control-select.uk-control-rtl .uk-select-selection-item-remove {
633
753
  padding-left: var(--select-gutter);
634
754
  padding-right: unset;
@@ -2,9 +2,9 @@ import * as React from 'react';
2
2
  import { type PolymorphicProps } from '../../components/Component';
3
3
  import './index.scss';
4
4
  export type SectionOwnProps = {
5
+ kind?: 'default' | 'muted' | 'primary' | 'secondary' | 'tertiary';
5
6
  preserveColor?: boolean;
6
7
  size?: 'xsmall' | 'small' | 'large' | 'xlarge';
7
- type?: 'default' | 'muted' | 'primary' | 'secondary' | 'tertiary';
8
8
  };
9
9
  export type SectionProps<E extends React.ElementType = React.ElementType> = React.PropsWithChildren<SectionOwnProps & PolymorphicProps<E>> & PolymorphicProps<E, SectionOwnProps>;
10
10
  declare const defaultElement = "section";
@@ -6,11 +6,11 @@ import './index.scss';
6
6
  const defaultElement = 'section';
7
7
  export function Section(props) {
8
8
  const config = useConfig();
9
- const { className, prefixCls = config.prefixCls, preserveColor, size, type, ...restProps } = props;
9
+ const { className, prefixCls = config.prefixCls, preserveColor, size, kind, ...restProps } = props;
10
10
  const rootCls = React.useMemo(() => config.getRootPrefixCls(prefixCls || config.prefixCls, 'section'), [config, prefixCls]);
11
11
  return (React.createElement(Component, { className: classNames(rootCls, {
12
12
  [`${rootCls}-${size}`]: size !== undefined,
13
- [`${rootCls}-${type}`]: type !== undefined,
13
+ [`${rootCls}-${kind}`]: kind !== undefined,
14
14
  [`${prefixCls || config.prefixCls}-preserve-color`]: preserveColor,
15
15
  }, className), component: defaultElement, ...restProps }));
16
16
  }
@@ -2,10 +2,10 @@ import * as React from 'react';
2
2
  import { type PolymorphicProps } from '../../components/Component';
3
3
  import './index.scss';
4
4
  export type TileOwnProps = {
5
+ kind?: 'default' | 'muted' | 'primary' | 'secondary' | 'tertiary';
5
6
  prefixCls?: string;
6
7
  preserveColor?: boolean;
7
8
  size?: 'xsmall' | 'small' | 'large' | 'xlarge';
8
- type?: 'default' | 'muted' | 'primary' | 'secondary' | 'tertiary';
9
9
  };
10
10
  export type TileProps<E extends React.ElementType = React.ElementType> = React.PropsWithChildren<TileOwnProps & PolymorphicProps<E>> & PolymorphicProps<E, TileOwnProps>;
11
11
  declare const defaultElement = "div";
@@ -6,11 +6,11 @@ import './index.scss';
6
6
  const defaultElement = 'div';
7
7
  export function Tile(props) {
8
8
  const config = useConfig();
9
- const { className, prefixCls = config.prefixCls, preserveColor, size, type, ...restProps } = props;
9
+ const { className, prefixCls = config.prefixCls, preserveColor, size, kind, ...restProps } = props;
10
10
  const rootCls = React.useMemo(() => config.getRootPrefixCls(prefixCls || config.prefixCls, 'tile'), [config, prefixCls]);
11
11
  return (React.createElement(Component, { className: classNames(rootCls, {
12
12
  [`${rootCls}-${size}`]: size !== undefined,
13
- [`${rootCls}-${type}`]: type !== undefined,
13
+ [`${rootCls}-${kind}`]: kind !== undefined,
14
14
  [`${prefixCls || config.prefixCls}-preserve-color`]: preserveColor,
15
15
  }, className), component: defaultElement, ...restProps }));
16
16
  }
@@ -881,6 +881,7 @@ $checkbox-checked-control-padding: 10px !default;
881
881
  $checkbox-disabled-background: $control-disabled-background !default;
882
882
  $checkbox-disabled-border: $control-disabled-border !default;
883
883
  $checkbox-disabled-icon-color: $global-muted-color !default;
884
+ $checkbox-checked-icon-border-width: 2px !default;
884
885
  $checkbox-indeterminate-size: $checkbox-size - 10px !default;
885
886
 
886
887
 
@@ -920,7 +921,7 @@ $select-small-height: $control-small-h
920
921
  $select-medium-height: $control-medium-height !default;
921
922
  $select-large-height: $control-large-height !default;
922
923
  $select-arrow-icon-size: 24px !default;
923
- $select-gutter: 7px !default;
924
+ $select-gutter: 5px !default;
924
925
  $select-small-gutter: 5px !default;
925
926
  $select-medium-gutter: 15px !default;
926
927
  $select-large-gutter: 12px !default;