@rescui/chip-list 0.13.5-RUI-280-Update-select-component-downshift-2f40ef205.67 → 0.13.6-RUI-291-Update-next-js-to-the-latest-version-8f54dec0a.66
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/chip-list-multi.d.ts +54 -45
- package/lib/chip-list-multi.js +9 -1
- package/lib/chip-list.d.ts +56 -29
- package/lib/chip-list.js +13 -0
- package/lib/index.css +65 -46
- package/lib/index.d.ts +6 -6
- package/lib/parts/chip-list-base.d.ts +31 -24
- package/lib/parts/chip-list-base.js +60 -4
- package/lib/parts/chip-list-context.d.ts +3 -4
- package/lib/parts/chip-list-context.js +2 -1
- package/lib/parts/chip-list.p.module.css.js +24 -23
- package/lib/parts/chip.d.ts +36 -34
- package/lib/parts/chip.js +91 -30
- package/lib/parts/deep-map.d.ts +2 -2
- package/lib/parts/types.d.ts +19 -9
- package/lib/parts/use-items-ids.d.ts +14 -10
- package/lib/parts/use-items-ids.js +64 -12
- package/lib/parts/use-roving-tab-index.d.ts +9 -0
- package/lib/parts/use-roving-tab-index.js +73 -0
- package/lib/parts/use-safe-id.d.ts +2 -0
- package/lib/parts/use-safe-id.js +15 -0
- package/package.json +4 -4
package/lib/chip-list-multi.d.ts
CHANGED
|
@@ -1,45 +1,54 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import { Theme } from '@rescui/ui-contexts';
|
|
4
|
-
import { ChipListSizeType, ChipListModeType, ChipListAlignItemsType } from './parts/types';
|
|
5
|
-
export declare const compareValuesDefault: <V>(activeValues: V[], value: V) => boolean;
|
|
6
|
-
export
|
|
7
|
-
className?: string;
|
|
8
|
-
size?: ChipListSizeType;
|
|
9
|
-
/** Increase inner horizontal offset between the chips. Does nothing when `compact={true}` */
|
|
10
|
-
sparse?: boolean;
|
|
11
|
-
/** Decrease horizontal paddings, gap and border-radius values */
|
|
12
|
-
compact?: boolean;
|
|
13
|
-
disabled?: boolean;
|
|
14
|
-
theme?: Theme;
|
|
15
|
-
mode?: ChipListModeType;
|
|
16
|
-
alignItems?: ChipListAlignItemsType;
|
|
17
|
-
value: ValueType[];
|
|
18
|
-
onChange: (value: ValueType[]) => void;
|
|
19
|
-
children: React.ReactNode;
|
|
20
|
-
compareValues?: (activeValue: ValueType[], value: ValueType) => boolean;
|
|
21
|
-
/** Identifier for e2e tests */
|
|
22
|
-
'data-e2e'?: string;
|
|
23
|
-
/**
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { Theme } from '@rescui/ui-contexts';
|
|
4
|
+
import { ChipListSizeType, ChipListModeType, ChipListAlignItemsType } from './parts/types';
|
|
5
|
+
export declare const compareValuesDefault: <V>(activeValues: V[], value: V) => boolean;
|
|
6
|
+
export type ChipListMultiProps<ValueType> = {
|
|
7
|
+
className?: string;
|
|
8
|
+
size?: ChipListSizeType;
|
|
9
|
+
/** Increase inner horizontal offset between the chips. Does nothing when `compact={true}` */
|
|
10
|
+
sparse?: boolean;
|
|
11
|
+
/** Decrease horizontal paddings, gap and border-radius values */
|
|
12
|
+
compact?: boolean;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
theme?: Theme;
|
|
15
|
+
mode?: ChipListModeType;
|
|
16
|
+
alignItems?: ChipListAlignItemsType;
|
|
17
|
+
value: ValueType[];
|
|
18
|
+
onChange: (value: ValueType[]) => void;
|
|
19
|
+
children: React.ReactNode;
|
|
20
|
+
compareValues?: (activeValue: ValueType[], value: ValueType) => boolean;
|
|
21
|
+
/** Identifier for e2e tests */
|
|
22
|
+
'data-e2e'?: string;
|
|
23
|
+
/** Optional name of all `input[type="checkbox"]` children. */
|
|
24
|
+
name?: string;
|
|
25
|
+
/** Optional a11y label for the chip list. Recommended to use either that or `aria-labelledby`. */
|
|
26
|
+
'aria-label'?: string;
|
|
27
|
+
/** Optional a11y label reference for the chip list. Recommended to use either that or `aria-label`. */
|
|
28
|
+
'aria-labelledby'?: string;
|
|
29
|
+
/** CSS style object */
|
|
30
|
+
style?: React.CSSProperties;
|
|
31
|
+
};
|
|
32
|
+
export declare function ChipListMulti<ValueType>({ onChange, compareValues, value, children, size, sparse, compact, disabled, mode, alignItems, name, ...props }: ChipListMultiProps<ValueType>): React.JSX.Element;
|
|
33
|
+
export declare namespace ChipListMulti {
|
|
34
|
+
var displayName: string;
|
|
35
|
+
var propTypes: {
|
|
36
|
+
size: PropTypes.Requireable<string>;
|
|
37
|
+
sparse: PropTypes.Requireable<boolean>;
|
|
38
|
+
compact: PropTypes.Requireable<boolean>;
|
|
39
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
40
|
+
theme: PropTypes.Requireable<string>;
|
|
41
|
+
className: PropTypes.Requireable<string>;
|
|
42
|
+
mode: PropTypes.Requireable<string>;
|
|
43
|
+
alignItems: PropTypes.Requireable<string>;
|
|
44
|
+
value: PropTypes.Validator<any[]>;
|
|
45
|
+
onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
46
|
+
compareValues: PropTypes.Requireable<(...args: any[]) => any>;
|
|
47
|
+
name: PropTypes.Requireable<string>;
|
|
48
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
49
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
50
|
+
'data-e2e': PropTypes.Requireable<string>;
|
|
51
|
+
style: PropTypes.Requireable<object>;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
export default ChipListMulti;
|
package/lib/chip-list-multi.js
CHANGED
|
@@ -3,6 +3,7 @@ import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/ins
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import { ChipListBase } from './parts/chip-list-base.js';
|
|
6
|
+
import { useSafeId } from './parts/use-safe-id.js';
|
|
6
7
|
|
|
7
8
|
const compareValuesDefault = (activeValues, value) => Array.isArray(activeValues) && _includesInstanceProperty(activeValues).call(activeValues, value);
|
|
8
9
|
|
|
@@ -18,8 +19,10 @@ function ChipListMulti(_ref) {
|
|
|
18
19
|
disabled = false,
|
|
19
20
|
mode = 'classic',
|
|
20
21
|
alignItems = 'left',
|
|
22
|
+
name,
|
|
21
23
|
...props
|
|
22
24
|
} = _ref;
|
|
25
|
+
const uniqueId = useSafeId();
|
|
23
26
|
return /*#__PURE__*/React.createElement(ChipListBase, {
|
|
24
27
|
compareValues: compareValues,
|
|
25
28
|
value: value,
|
|
@@ -33,7 +36,9 @@ function ChipListMulti(_ref) {
|
|
|
33
36
|
disabled: disabled,
|
|
34
37
|
mode: mode,
|
|
35
38
|
alignItems: alignItems,
|
|
36
|
-
...props
|
|
39
|
+
...props,
|
|
40
|
+
pattern: "group",
|
|
41
|
+
name: name ?? `rs-chip-list-multi-${uniqueId}`
|
|
37
42
|
}, children);
|
|
38
43
|
}
|
|
39
44
|
|
|
@@ -50,6 +55,9 @@ ChipListMulti.propTypes = {
|
|
|
50
55
|
value: PropTypes.array.isRequired,
|
|
51
56
|
onChange: PropTypes.func.isRequired,
|
|
52
57
|
compareValues: PropTypes.func,
|
|
58
|
+
name: PropTypes.string,
|
|
59
|
+
'aria-label': PropTypes.string,
|
|
60
|
+
'aria-labelledby': PropTypes.string,
|
|
53
61
|
'data-e2e': PropTypes.string,
|
|
54
62
|
style: PropTypes.object
|
|
55
63
|
};
|
package/lib/chip-list.d.ts
CHANGED
|
@@ -1,29 +1,56 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
export declare
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { Theme } from '@rescui/ui-contexts';
|
|
4
|
+
import { ChipListSizeType, ChipListModeType, ChipListAlignItemsType, ChipListPatternType } from './parts/types';
|
|
5
|
+
export declare const compareValuesDefault: <V>(activeValue: V, value: V) => boolean;
|
|
6
|
+
export type ChipListProps<ValueType> = {
|
|
7
|
+
className?: string;
|
|
8
|
+
size?: ChipListSizeType;
|
|
9
|
+
/** Increase inner horizontal offset between the chips. Does nothing when `compact={true}` */
|
|
10
|
+
sparse?: boolean;
|
|
11
|
+
/** Decrease horizontal paddings, gap and border-radius values */
|
|
12
|
+
compact?: boolean;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
theme?: Theme;
|
|
15
|
+
mode?: ChipListModeType;
|
|
16
|
+
alignItems?: ChipListAlignItemsType;
|
|
17
|
+
/** Behavior pattern. `auto` renders chips with `aria-controls` as `tablist`, links as `navigation`, and chips without links as `radiogroup`. */
|
|
18
|
+
pattern?: ChipListPatternType;
|
|
19
|
+
value: ValueType;
|
|
20
|
+
onChange: (value: ValueType) => void;
|
|
21
|
+
children: React.ReactNode;
|
|
22
|
+
compareValues?: (activeValue: ValueType, value: ValueType) => boolean;
|
|
23
|
+
/** Optional name of all `input[type="radio"]` children. */
|
|
24
|
+
name?: string;
|
|
25
|
+
/** Optional a11y label for the chip list. Recommended to use either that or `aria-labelledby`. */
|
|
26
|
+
'aria-label'?: string;
|
|
27
|
+
/** Optional a11y label reference for the chip list. Recommended to use either that or `aria-label`. */
|
|
28
|
+
'aria-labelledby'?: string;
|
|
29
|
+
/** Identifier for e2e tests */
|
|
30
|
+
'data-e2e'?: string;
|
|
31
|
+
/** CSS style object */
|
|
32
|
+
style?: React.CSSProperties;
|
|
33
|
+
};
|
|
34
|
+
export declare function ChipList<ValueType>({ children, compareValues, value, onChange, size, sparse, compact, disabled, mode, alignItems, pattern, name, ...props }: ChipListProps<ValueType>): React.JSX.Element;
|
|
35
|
+
export declare namespace ChipList {
|
|
36
|
+
var displayName: string;
|
|
37
|
+
var propTypes: {
|
|
38
|
+
size: PropTypes.Requireable<string>;
|
|
39
|
+
sparse: PropTypes.Requireable<boolean>;
|
|
40
|
+
compact: PropTypes.Requireable<boolean>;
|
|
41
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
42
|
+
theme: PropTypes.Requireable<string>;
|
|
43
|
+
className: PropTypes.Requireable<string>;
|
|
44
|
+
mode: PropTypes.Requireable<string>;
|
|
45
|
+
alignItems: PropTypes.Requireable<string>;
|
|
46
|
+
pattern: PropTypes.Requireable<string>;
|
|
47
|
+
value: PropTypes.Validator<any>;
|
|
48
|
+
onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
49
|
+
compareValues: PropTypes.Requireable<(...args: any[]) => any>;
|
|
50
|
+
name: PropTypes.Requireable<string>;
|
|
51
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
52
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
53
|
+
'data-e2e': PropTypes.Requireable<string>;
|
|
54
|
+
style: PropTypes.Requireable<object>;
|
|
55
|
+
};
|
|
56
|
+
}
|
package/lib/chip-list.js
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
|
|
2
3
|
import React from 'react';
|
|
3
4
|
import PropTypes from 'prop-types';
|
|
4
5
|
import { ChipListBase } from './parts/chip-list-base.js';
|
|
6
|
+
import { useSafeId } from './parts/use-safe-id.js';
|
|
5
7
|
|
|
6
8
|
const compareValuesDefault = (activeValue, value) => activeValue === value;
|
|
7
9
|
|
|
8
10
|
function ChipList(_ref) {
|
|
11
|
+
var _context;
|
|
12
|
+
|
|
9
13
|
let {
|
|
10
14
|
children,
|
|
11
15
|
compareValues = compareValuesDefault,
|
|
@@ -17,8 +21,11 @@ function ChipList(_ref) {
|
|
|
17
21
|
disabled = false,
|
|
18
22
|
mode = 'classic',
|
|
19
23
|
alignItems = 'left',
|
|
24
|
+
pattern = 'auto',
|
|
25
|
+
name,
|
|
20
26
|
...props
|
|
21
27
|
} = _ref;
|
|
28
|
+
const uniqueId = useSafeId();
|
|
22
29
|
return /*#__PURE__*/React.createElement(ChipListBase, {
|
|
23
30
|
compareValues: (activeValues, compareVal) => compareValues(activeValues[0], compareVal),
|
|
24
31
|
onChange: onChange,
|
|
@@ -29,6 +36,8 @@ function ChipList(_ref) {
|
|
|
29
36
|
disabled: disabled,
|
|
30
37
|
mode: mode,
|
|
31
38
|
alignItems: alignItems,
|
|
39
|
+
pattern: _includesInstanceProperty(_context = ['auto', 'radiogroup', 'navigation', 'tablist']).call(_context, pattern) ? pattern : 'auto',
|
|
40
|
+
name: name ?? `rs-chip-list-${uniqueId}`,
|
|
32
41
|
...props
|
|
33
42
|
}, children);
|
|
34
43
|
}
|
|
@@ -43,9 +52,13 @@ ChipList.propTypes = {
|
|
|
43
52
|
className: PropTypes.string,
|
|
44
53
|
mode: PropTypes.oneOf(['classic', 'rock']),
|
|
45
54
|
alignItems: PropTypes.oneOf(['left', 'center', 'right']),
|
|
55
|
+
pattern: PropTypes.oneOf(['auto', 'radiogroup', 'navigation', 'tablist']),
|
|
46
56
|
value: PropTypes.any.isRequired,
|
|
47
57
|
onChange: PropTypes.func.isRequired,
|
|
48
58
|
compareValues: PropTypes.func,
|
|
59
|
+
name: PropTypes.string,
|
|
60
|
+
'aria-label': PropTypes.string,
|
|
61
|
+
'aria-labelledby': PropTypes.string,
|
|
49
62
|
'data-e2e': PropTypes.string,
|
|
50
63
|
style: PropTypes.object
|
|
51
64
|
};
|
package/lib/index.css
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
.
|
|
1
|
+
._light_1f5r5o2_8{
|
|
2
2
|
--rs-theme-dark:0;
|
|
3
3
|
}
|
|
4
|
-
.
|
|
4
|
+
._dark_1f5r5o2_11{
|
|
5
5
|
--rs-theme-dark:1;
|
|
6
6
|
}
|
|
7
|
-
.
|
|
7
|
+
._alignLeft_1f5r5o2_15{
|
|
8
8
|
--_rs-cl-align:left;
|
|
9
9
|
}
|
|
10
|
-
.
|
|
10
|
+
._alignCenter_1f5r5o2_18{
|
|
11
11
|
--_rs-cl-align:center;
|
|
12
12
|
}
|
|
13
|
-
.
|
|
13
|
+
._alignRight_1f5r5o2_21{
|
|
14
14
|
--_rs-cl-align:right;
|
|
15
15
|
}
|
|
16
|
-
.
|
|
16
|
+
._sizeXs_1f5r5o2_25{
|
|
17
17
|
--_rs-cl-chip-base-border-radius:4px;
|
|
18
18
|
--_rs-cl-chip-compact-border-radius:var(--_rs-cl-chip-base-border-radius);
|
|
19
19
|
--_rs-cl-chip-vertical-padding:2px;
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
--_rs-cl-compact-horizontal-gap:4px;
|
|
28
28
|
--_rs-cl-sparse-horizontal-gap:12px;
|
|
29
29
|
}
|
|
30
|
-
.
|
|
30
|
+
._sizeXs_1f5r5o2_25 [data-rs-internal='chip-list__chip']{
|
|
31
31
|
--_rs-typography-letter-spacing:var(--rs-text-3-letter-spacing, 0.0045em);
|
|
32
32
|
--_rs-typography-text-transform:initial;
|
|
33
33
|
--_rs-typography-font-variant-numeric:initial;
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
--_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
|
|
63
63
|
--_rs-typography-link-border-bottom-width-from-text:1px;
|
|
64
64
|
}
|
|
65
|
-
.
|
|
65
|
+
._sizeS_1f5r5o2_28{
|
|
66
66
|
--_rs-cl-chip-base-border-radius:16px;
|
|
67
67
|
--_rs-cl-chip-compact-border-radius:4px;
|
|
68
68
|
--_rs-cl-chip-vertical-padding:6px;
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
--_rs-cl-compact-horizontal-gap:6px;
|
|
77
77
|
--_rs-cl-sparse-horizontal-gap:12px;
|
|
78
78
|
}
|
|
79
|
-
.
|
|
79
|
+
._sizeS_1f5r5o2_28 [data-rs-internal='chip-list__chip']{
|
|
80
80
|
--_rs-typography-letter-spacing:var(--rs-text-3-letter-spacing, 0.0045em);
|
|
81
81
|
--_rs-typography-text-transform:initial;
|
|
82
82
|
--_rs-typography-font-variant-numeric:initial;
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
--_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
|
|
112
112
|
--_rs-typography-link-border-bottom-width-from-text:1px;
|
|
113
113
|
}
|
|
114
|
-
.
|
|
114
|
+
._sizeM_1f5r5o2_31{
|
|
115
115
|
--_rs-cl-chip-base-border-radius:20px;
|
|
116
116
|
--_rs-cl-chip-compact-border-radius:8px;
|
|
117
117
|
--_rs-cl-chip-vertical-padding:8px;
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
--_rs-cl-compact-horizontal-gap:6px;
|
|
126
126
|
--_rs-cl-sparse-horizontal-gap:16px;
|
|
127
127
|
}
|
|
128
|
-
.
|
|
128
|
+
._sizeM_1f5r5o2_31 [data-rs-internal='chip-list__chip']{
|
|
129
129
|
--_rs-typography-letter-spacing:var(--rs-text-2-letter-spacing, 0.0015em);
|
|
130
130
|
--_rs-typography-text-transform:initial;
|
|
131
131
|
--_rs-typography-font-variant-numeric:initial;
|
|
@@ -164,11 +164,11 @@
|
|
|
164
164
|
--_rs-typography-link-border-bottom-width-from-text:1px;
|
|
165
165
|
}
|
|
166
166
|
@media screen and (max-width: 640px){
|
|
167
|
-
.
|
|
167
|
+
._sizeM_1f5r5o2_31 [data-rs-internal='chip-list__chip']{
|
|
168
168
|
--_rs-typography-text-2-sm-list-li-margin-top-from-text:12px;
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
|
-
.
|
|
171
|
+
._sizeL_1f5r5o2_34{
|
|
172
172
|
--_rs-cl-chip-base-border-radius:26px;
|
|
173
173
|
--_rs-cl-chip-compact-border-radius:12px;
|
|
174
174
|
--_rs-cl-chip-vertical-padding:12px;
|
|
@@ -183,11 +183,11 @@
|
|
|
183
183
|
--_rs-cl-sparse-horizontal-gap:16px;
|
|
184
184
|
}
|
|
185
185
|
@media screen and (max-width: 640px){
|
|
186
|
-
.
|
|
186
|
+
._sizeL_1f5r5o2_34{
|
|
187
187
|
--_rs-cl-vertical-gap:12px;
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
|
-
.
|
|
190
|
+
._sizeL_1f5r5o2_34 [data-rs-internal='chip-list__chip']{
|
|
191
191
|
--_rs-typography-letter-spacing:var(--rs-text-1-letter-spacing, normal);
|
|
192
192
|
--_rs-typography-text-transform:initial;
|
|
193
193
|
--_rs-typography-font-variant-numeric:initial;
|
|
@@ -226,34 +226,34 @@
|
|
|
226
226
|
--_rs-typography-link-border-bottom-width-from-text:1px;
|
|
227
227
|
}
|
|
228
228
|
@media screen and (max-width: 640px){
|
|
229
|
-
.
|
|
229
|
+
._sizeL_1f5r5o2_34 [data-rs-internal='chip-list__chip']{
|
|
230
230
|
--_rs-typography-text-1-sm-list-li-margin-top-from-text:16px;
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
|
-
.
|
|
233
|
+
._innerOffsetL_1f5r5o2_38{
|
|
234
234
|
--_rs-cl-horizontal-gap-from-sparse:var(--_rs-cl-sparse-horizontal-gap);
|
|
235
235
|
}
|
|
236
236
|
@media screen and (max-width: 640px){
|
|
237
|
-
.
|
|
237
|
+
._innerOffsetL_1f5r5o2_38{
|
|
238
238
|
--_rs-cl-horizontal-gap-from-sparse:var(--_rs-cl-base-horizontal-gap);
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
|
-
.
|
|
241
|
+
._innerOffsetM_1f5r5o2_41{
|
|
242
242
|
--_rs-cl-horizontal-gap-from-sparse:initial;
|
|
243
243
|
}
|
|
244
|
-
.
|
|
244
|
+
._classic_1f5r5o2_45{
|
|
245
245
|
--_rs-cl-chip-active-border-color:var(--_rs-color-primary);
|
|
246
246
|
--_rs-cl-chip-selected-border-color:var(--_rs-color-primary);
|
|
247
247
|
--_rs-cl-chip-hover-background:var(--_rs-color-primary-t-fog);
|
|
248
248
|
--_rs-cl-chip-active-background:var(--_rs-color-primary-t-fog);
|
|
249
249
|
}
|
|
250
|
-
.
|
|
250
|
+
._rock_1f5r5o2_48{
|
|
251
251
|
--_rs-cl-chip-active-border-color:rgba(calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(28 + var(--_rs-theme-dark-coefficient, 0)*227));
|
|
252
252
|
--_rs-cl-chip-selected-border-color:rgba(calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(28 + var(--_rs-theme-dark-coefficient, 0)*227));
|
|
253
253
|
--_rs-cl-chip-hover-background:rgba(calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(28 + var(--_rs-theme-dark-coefficient, 0)*227), 0.1);
|
|
254
254
|
--_rs-cl-chip-active-background:rgba(calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(28 + var(--_rs-theme-dark-coefficient, 0)*227), 0.1);
|
|
255
255
|
}
|
|
256
|
-
.
|
|
256
|
+
._compact_1f5r5o2_52{
|
|
257
257
|
--_rs-cl-chip-border-radius-from-compact:var(
|
|
258
258
|
--_rs-cl-chip-compact-border-radius
|
|
259
259
|
);
|
|
@@ -262,7 +262,7 @@
|
|
|
262
262
|
);
|
|
263
263
|
--_rs-cl-horizontal-gap-from-compact:var(--_rs-cl-compact-horizontal-gap);
|
|
264
264
|
}
|
|
265
|
-
.
|
|
265
|
+
._main_1f5r5o2_56{
|
|
266
266
|
--_rs-theme-dark:var(
|
|
267
267
|
--_rs-internal-force-theme-dark-consult-rescui-before-using,
|
|
268
268
|
var(--rs-theme-dark, 0)
|
|
@@ -272,7 +272,7 @@
|
|
|
272
272
|
--_rs-theme-light-coefficient:calc(1 - var(--_rs-theme-dark-coefficient));
|
|
273
273
|
}
|
|
274
274
|
@supports (color: color-mix(in srgb, #fff 50%, #000 50%)){
|
|
275
|
-
.
|
|
275
|
+
._main_1f5r5o2_56{
|
|
276
276
|
--_rs-color-primary:color-mix(in srgb, var(--rs-color-primary-light-theme, #6B57FF) calc(100%*var(--_rs-theme-light-coefficient, 1)), var(--rs-color-primary-dark-theme, #8473FF) calc(100%*var(--_rs-theme-dark-coefficient, 0)));
|
|
277
277
|
--_rs-color-primary-dim:color-mix(in srgb, var(--rs-color-primary-dim-light-theme, #8979ff) calc(100%*var(--_rs-theme-light-coefficient, 1)), var(--rs-color-primary-dim-dark-theme, #6f61d2) calc(100%*var(--_rs-theme-dark-coefficient, 0)));
|
|
278
278
|
--_rs-color-primary-fog:color-mix(in srgb, var(--rs-color-primary-fog-light-theme, #e1ddff) calc(100%*var(--_rs-theme-light-coefficient, 1)), var(--rs-color-primary-fog-dark-theme, #2e2b49) calc(100%*var(--_rs-theme-dark-coefficient, 0)));
|
|
@@ -281,7 +281,7 @@
|
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
283
|
@supports not (color: color-mix(in srgb, #fff 50%, #000 50%)){
|
|
284
|
-
.
|
|
284
|
+
._main_1f5r5o2_56{
|
|
285
285
|
--_rs-color-primary:rgb(calc(var(--_rs-theme-light-coefficient, 1)*107 + var(--_rs-theme-dark-coefficient, 0)*132), calc(var(--_rs-theme-light-coefficient, 1)*87 + var(--_rs-theme-dark-coefficient, 0)*115), 255);
|
|
286
286
|
--_rs-color-primary-dim:rgb(calc(var(--_rs-theme-light-coefficient, 1)*137 + var(--_rs-theme-dark-coefficient, 0)*111), calc(var(--_rs-theme-light-coefficient, 1)*121 + var(--_rs-theme-dark-coefficient, 0)*97), calc(var(--_rs-theme-light-coefficient, 1)*255 + var(--_rs-theme-dark-coefficient, 0)*210));
|
|
287
287
|
--_rs-color-primary-fog:rgb(calc(var(--_rs-theme-light-coefficient, 1)*225 + var(--_rs-theme-dark-coefficient, 0)*46), calc(var(--_rs-theme-light-coefficient, 1)*221 + var(--_rs-theme-dark-coefficient, 0)*43), calc(var(--_rs-theme-light-coefficient, 1)*255 + var(--_rs-theme-dark-coefficient, 0)*73));
|
|
@@ -289,7 +289,7 @@
|
|
|
289
289
|
--_rs-color-primary-t-fog:rgba(calc(var(--_rs-theme-light-coefficient, 1)*107 + var(--_rs-theme-dark-coefficient, 0)*132), calc(var(--_rs-theme-light-coefficient, 1)*87 + var(--_rs-theme-dark-coefficient, 0)*115), 255, calc(var(--_rs-theme-light-coefficient, 1)*0.2 + var(--_rs-theme-dark-coefficient, 0)*0.3));
|
|
290
290
|
}
|
|
291
291
|
}
|
|
292
|
-
.
|
|
292
|
+
._main_1f5r5o2_56 {
|
|
293
293
|
--_rs-cl-chip-border-radius:var(
|
|
294
294
|
--_rs-cl-chip-border-radius-from-compact,
|
|
295
295
|
var(--_rs-cl-chip-base-border-radius)
|
|
@@ -303,7 +303,7 @@
|
|
|
303
303
|
var(--_rs-cl-horizontal-gap-from-sparse, var(--_rs-cl-base-horizontal-gap))
|
|
304
304
|
);
|
|
305
305
|
}
|
|
306
|
-
.
|
|
306
|
+
._chipsContainer_1f5r5o2_62{
|
|
307
307
|
position:relative;
|
|
308
308
|
|
|
309
309
|
display:flex;
|
|
@@ -312,17 +312,17 @@
|
|
|
312
312
|
|
|
313
313
|
gap:var(--_rs-cl-vertical-gap) var(--_rs-cl-horizontal-gap);
|
|
314
314
|
}
|
|
315
|
-
.
|
|
315
|
+
._alignIconLeft_1f5r5o2_72{
|
|
316
316
|
--_rs-cl-chip-icon-flex-direction:row;
|
|
317
317
|
--_rs-cl-chip-icon-position-multiplier-left:1;
|
|
318
318
|
--_rs-cl-chip-icon-position-multiplier-right:0;
|
|
319
319
|
}
|
|
320
|
-
.
|
|
320
|
+
._alignIconRight_1f5r5o2_75{
|
|
321
321
|
--_rs-cl-chip-icon-flex-direction:row-reverse;
|
|
322
322
|
--_rs-cl-chip-icon-position-multiplier-left:0;
|
|
323
323
|
--_rs-cl-chip-icon-position-multiplier-right:1;
|
|
324
324
|
}
|
|
325
|
-
.
|
|
325
|
+
._chip_1f5r5o2_62{
|
|
326
326
|
letter-spacing:var(
|
|
327
327
|
--rs-text-base-letter-spacing,
|
|
328
328
|
var(--_rs-typography-letter-spacing)
|
|
@@ -369,27 +369,30 @@
|
|
|
369
369
|
background:transparent;
|
|
370
370
|
box-shadow:none;
|
|
371
371
|
|
|
372
|
-
transition:color 100ms, background-color 100ms;
|
|
372
|
+
transition:color 100ms var(--rs-transition-function, ease), background-color 100ms var(--rs-transition-function, ease);
|
|
373
373
|
-webkit-font-smoothing:inherit;
|
|
374
374
|
-moz-osx-font-smoothing:inherit;
|
|
375
375
|
-webkit-appearance:none;
|
|
376
376
|
}
|
|
377
|
-
.
|
|
377
|
+
._chip_1f5r5o2_62::-moz-focus-inner{
|
|
378
378
|
padding:0;
|
|
379
379
|
|
|
380
380
|
border:none;
|
|
381
381
|
}
|
|
382
|
-
.
|
|
383
|
-
.
|
|
384
|
-
.
|
|
382
|
+
._chip_1f5r5o2_62:hover,
|
|
383
|
+
._chip_1f5r5o2_62:focus,
|
|
384
|
+
._chip_1f5r5o2_62:active{
|
|
385
385
|
outline:none;
|
|
386
386
|
|
|
387
387
|
text-decoration:none;
|
|
388
388
|
}
|
|
389
|
-
.
|
|
389
|
+
._chip_1f5r5o2_62:focus[data-focus-method='key']{
|
|
390
390
|
box-shadow:var(--_rs-color-primary-t-dim) 0 0 0 4px;
|
|
391
391
|
}
|
|
392
|
-
.
|
|
392
|
+
._chip_1f5r5o2_62:has(:focus[data-focus-method='key']){
|
|
393
|
+
box-shadow:var(--_rs-color-primary-t-dim) 0 0 0 4px;
|
|
394
|
+
}
|
|
395
|
+
._chip_1f5r5o2_62:focus{
|
|
393
396
|
--_rs-cl-chip-border-color:rgba(
|
|
394
397
|
calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(28 + var(--_rs-theme-dark-coefficient, 0)*227),
|
|
395
398
|
calc(0.3 + var(--_rs-theme-dark-coefficient)*0.1)
|
|
@@ -398,7 +401,7 @@
|
|
|
398
401
|
color:rgba(calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(28 + var(--_rs-theme-dark-coefficient, 0)*227));
|
|
399
402
|
}
|
|
400
403
|
@media (hover: hover){
|
|
401
|
-
.
|
|
404
|
+
._chip_1f5r5o2_62:hover{
|
|
402
405
|
--_rs-cl-chip-border-color:rgba(
|
|
403
406
|
calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(28 + var(--_rs-theme-dark-coefficient, 0)*227),
|
|
404
407
|
calc(0.3 + var(--_rs-theme-dark-coefficient)*0.1)
|
|
@@ -409,20 +412,20 @@
|
|
|
409
412
|
background:var(--_rs-cl-chip-hover-background);
|
|
410
413
|
}
|
|
411
414
|
}
|
|
412
|
-
.
|
|
415
|
+
._chip_1f5r5o2_62:active{
|
|
413
416
|
--_rs-cl-chip-border-color:var(--_rs-cl-chip-active-border-color);
|
|
414
417
|
|
|
415
418
|
color:rgba(calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(28 + var(--_rs-theme-dark-coefficient, 0)*227));
|
|
416
419
|
|
|
417
420
|
background:var(--_rs-cl-chip-active-background);
|
|
418
421
|
}
|
|
419
|
-
.
|
|
422
|
+
._chip_1f5r5o2_62._selected_1f5r5o2_176{
|
|
420
423
|
--_rs-cl-chip-border-color:var(--_rs-cl-chip-selected-border-color);
|
|
421
424
|
--_rs-cl-chip-border-width:2px;
|
|
422
425
|
|
|
423
426
|
color:rgba(calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(28 + var(--_rs-theme-dark-coefficient, 0)*227));
|
|
424
427
|
}
|
|
425
|
-
.
|
|
428
|
+
._disabled_1f5r5o2_183 ._chip_1f5r5o2_62{
|
|
426
429
|
--_rs-cl-chip-border-color:rgba(calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(28 + var(--_rs-theme-dark-coefficient, 0)*227), 0.2);
|
|
427
430
|
|
|
428
431
|
pointer-events:none;
|
|
@@ -431,10 +434,10 @@
|
|
|
431
434
|
|
|
432
435
|
background:transparent;
|
|
433
436
|
}
|
|
434
|
-
.
|
|
437
|
+
._disabled_1f5r5o2_183 ._chip_1f5r5o2_62._selected_1f5r5o2_176{
|
|
435
438
|
--_rs-cl-chip-border-color:rgba(calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(28 + var(--_rs-theme-dark-coefficient, 0)*227), 0.4);
|
|
436
439
|
}
|
|
437
|
-
.
|
|
440
|
+
._chip_1f5r5o2_62::before{
|
|
438
441
|
position:absolute;
|
|
439
442
|
top:0;
|
|
440
443
|
right:0;
|
|
@@ -449,9 +452,9 @@
|
|
|
449
452
|
content:'';
|
|
450
453
|
pointer-events:none;
|
|
451
454
|
|
|
452
|
-
transition:border-color 100ms;
|
|
455
|
+
transition:border-color 100ms var(--rs-transition-function, ease);
|
|
453
456
|
}
|
|
454
|
-
.
|
|
457
|
+
._chip_1f5r5o2_62 ._icon_1f5r5o2_216{
|
|
455
458
|
flex:0 0 auto;
|
|
456
459
|
|
|
457
460
|
width:auto;
|
|
@@ -460,7 +463,23 @@
|
|
|
460
463
|
margin:0;
|
|
461
464
|
fill:currentColor;
|
|
462
465
|
}
|
|
463
|
-
.
|
|
466
|
+
._hiddenInput_1f5r5o2_227{
|
|
467
|
+
position:absolute;
|
|
468
|
+
|
|
469
|
+
overflow:hidden;
|
|
470
|
+
clip:rect(0 0 0 0);
|
|
471
|
+
|
|
472
|
+
width:1px;
|
|
473
|
+
height:1px;
|
|
474
|
+
margin:-1px;
|
|
475
|
+
padding:0;
|
|
476
|
+
|
|
477
|
+
border:none;
|
|
478
|
+
|
|
479
|
+
white-space:nowrap;
|
|
480
|
+
clip-path:inset(50%);
|
|
481
|
+
}
|
|
482
|
+
._withoutText_1f5r5o2_244{
|
|
464
483
|
--_rs-cl-chip-horizontal-real-padding:var(--_rs-cl-chip-icon-only-padding);
|
|
465
484
|
--_rs-cl-chip-vertical-real-padding:var(--_rs-cl-chip-icon-only-padding);
|
|
466
485
|
}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { ChipList } from './chip-list';
|
|
2
|
-
export type { ChipListProps } from './chip-list';
|
|
3
|
-
export { ChipListMulti } from './chip-list-multi';
|
|
4
|
-
export type { ChipListMultiProps } from './chip-list-multi';
|
|
5
|
-
export { default as Chip } from './parts/chip';
|
|
6
|
-
export type { ChipProps } from './parts/chip';
|
|
1
|
+
export { ChipList } from './chip-list';
|
|
2
|
+
export type { ChipListProps } from './chip-list';
|
|
3
|
+
export { ChipListMulti } from './chip-list-multi';
|
|
4
|
+
export type { ChipListMultiProps } from './chip-list-multi';
|
|
5
|
+
export { default as Chip } from './parts/chip';
|
|
6
|
+
export type { ChipProps } from './parts/chip';
|