ywana-core8 0.1.74 → 0.1.76
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/ACCORDION_EVALUATION.md +583 -0
- package/CHECKBOX_EVALUATION.md +273 -0
- package/CHIP_EVALUATION.md +542 -0
- package/COLOR_EVALUATION.md +524 -0
- package/COMPONENTS_EVALUATION.md +477 -0
- package/FORM_EVALUATION.md +459 -0
- package/HEADER_EVALUATION.md +436 -0
- package/ICON_EVALUATION.md +254 -0
- package/LIST_EVALUATION.md +574 -0
- package/PROGRESS_EVALUATION.md +450 -0
- package/RADIO_EVALUATION.md +439 -0
- package/RADIO_VISUAL_FIX.md +183 -0
- package/SECTION_IMPROVEMENTS.md +153 -0
- package/SWITCH_EVALUATION.md +335 -0
- package/SWITCH_VISUAL_FIX.md +232 -0
- package/TAB_EVALUATION.md +626 -0
- package/TEXTFIELD_EVALUATION.md +747 -0
- package/TOOLTIP_FIX.md +157 -0
- package/TREE_EVALUATION.md +708 -0
- package/dist/index.cjs +7900 -1615
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +6094 -1122
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +7929 -1645
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +7900 -1615
- package/dist/index.umd.js.map +1 -1
- package/jest.config.js +24 -0
- package/package.json +10 -1
- package/src/html/accordion.css +208 -4
- package/src/html/accordion.example.js +390 -0
- package/src/html/accordion.js +284 -28
- package/src/html/accordion.unit.test.js +334 -0
- package/src/html/button.css +157 -16
- package/src/html/button.example.js +374 -0
- package/src/html/button.js +240 -60
- package/src/html/button.test.js +422 -0
- package/src/html/checkbox.css +74 -2
- package/src/html/checkbox.example.js +316 -0
- package/src/html/checkbox.js +113 -26
- package/src/html/checkbox.test.js +285 -0
- package/src/html/chip.css +230 -19
- package/src/html/chip.example.js +355 -0
- package/src/html/chip.js +321 -25
- package/src/html/chip.test.js +425 -0
- package/src/html/color.css +435 -6
- package/src/html/color.example.js +527 -0
- package/src/html/color.js +458 -9
- package/src/html/color.test.js +362 -4
- package/src/html/components.example.js +492 -0
- package/src/html/components_enhanced.test.js +581 -0
- package/src/html/form.css +70 -3
- package/src/html/form.example.js +385 -0
- package/src/html/form.js +232 -34
- package/src/html/form.test.js +369 -0
- package/src/html/header2.css +264 -0
- package/src/html/header2.example.js +411 -0
- package/src/html/header2.js +203 -0
- package/src/html/header2.test.js +377 -0
- package/src/html/icon.css +20 -2
- package/src/html/icon.example.js +268 -0
- package/src/html/icon.js +86 -16
- package/src/html/icon.test.js +231 -0
- package/src/html/index.js +1 -1
- package/src/html/list.css +393 -1
- package/src/html/list.example.js +404 -0
- package/src/html/list.js +583 -40
- package/src/html/list.test.js +383 -0
- package/src/html/progress.css +707 -17
- package/src/html/progress.example.js +424 -0
- package/src/html/progress.js +906 -9
- package/src/html/progress.test.js +313 -0
- package/src/html/property.css +399 -0
- package/src/html/property.example.js +553 -0
- package/src/html/property.js +393 -15
- package/src/html/property.test.js +351 -2
- package/src/html/radio-visual-test.js +289 -0
- package/src/html/radio.css +137 -11
- package/src/html/radio.example.js +389 -0
- package/src/html/radio.js +234 -10
- package/src/html/radio.test.js +318 -0
- package/src/html/section.example.js +99 -0
- package/src/html/section.js +40 -3
- package/src/html/section.test.js +131 -0
- package/src/html/selector.css +329 -3
- package/src/html/selector.js +369 -23
- package/src/html/switch-debug.js +197 -0
- package/src/html/switch-test-visual.js +294 -0
- package/src/html/switch.css +200 -0
- package/src/html/switch.example.js +461 -0
- package/src/html/switch.js +283 -23
- package/src/html/switch.test.js +355 -0
- package/src/html/tab.css +288 -0
- package/src/html/tab.example.js +446 -0
- package/src/html/tab.js +387 -22
- package/src/html/tab_enhanced.js +378 -0
- package/src/html/tab_enhanced.test.js +504 -0
- package/src/html/table2.css +576 -0
- package/src/html/table2.example.js +703 -0
- package/src/html/table2.js +1252 -0
- package/src/html/table2.migration.md +328 -0
- package/src/html/table2.test.js +582 -0
- package/src/html/text.css +375 -0
- package/src/html/text.js +311 -20
- package/src/html/textfield.js +1 -1
- package/src/html/textfield2.css +842 -0
- package/src/html/textfield2.example.js +499 -0
- package/src/html/textfield2.js +1130 -0
- package/src/html/textfield2.test.js +950 -0
- package/src/html/thumbnail.css +289 -2
- package/src/html/thumbnail.js +214 -9
- package/src/html/tokenfield.css +449 -1
- package/src/html/tokenfield.example.js +503 -0
- package/src/html/tokenfield.js +561 -56
- package/src/html/tokenfield.test.js +423 -0
- package/src/html/tooltip-positioning-demo.js +187 -0
- package/src/html/tooltip.css +25 -2
- package/src/html/tree.css +228 -0
- package/src/html/tree.example.js +475 -0
- package/src/html/tree.js +712 -28
- package/src/html/tree_enhanced.test.js +495 -0
- package/table2.test.js +454 -0
- package/src/html/button.tsx +0 -38
package/src/html/section.js
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import React, { useEffect, useState } from 'react'
|
2
|
+
import PropTypes from 'prop-types'
|
2
3
|
import { Icon } from './icon';
|
3
4
|
import { Header } from './header';
|
4
5
|
import './section.css'
|
@@ -20,12 +21,48 @@ export const Section = (props) => {
|
|
20
21
|
}
|
21
22
|
|
22
23
|
return (
|
23
|
-
<section className={`section ${className}`}>
|
24
|
-
<Header icon={icon}
|
24
|
+
<section className={`section ${className || ''}`} role="region" aria-expanded={isOpen}>
|
25
|
+
<Header icon={icon} title={title}>
|
26
|
+
{canCollapse ? (
|
27
|
+
<Icon
|
28
|
+
icon={isOpen ? "expand_less" : "expand_more"}
|
29
|
+
clickable
|
30
|
+
action={toggle}
|
31
|
+
tooltip={{
|
32
|
+
text: isOpen ? 'Contraer sección' : 'Expandir sección',
|
33
|
+
top: '-3rem',
|
34
|
+
left: '-2rem'
|
35
|
+
}}
|
36
|
+
/>
|
37
|
+
) : ''}
|
25
38
|
{actions}
|
26
|
-
{canCollapse ? <Icon icon="expand_more" onIcon="expand_less" clickable action={toggle} /> : ''}
|
27
39
|
</Header>
|
28
40
|
{isOpen ? (<main>{children}</main>) : ''}
|
29
41
|
</section>
|
30
42
|
)
|
43
|
+
}
|
44
|
+
|
45
|
+
// PropTypes para validación y documentación
|
46
|
+
Section.propTypes = {
|
47
|
+
/** Icono a mostrar en el header */
|
48
|
+
icon: PropTypes.string,
|
49
|
+
/** Título de la sección */
|
50
|
+
title: PropTypes.string,
|
51
|
+
/** Si la sección puede colapsarse */
|
52
|
+
canCollapse: PropTypes.bool,
|
53
|
+
/** Estado inicial de apertura */
|
54
|
+
open: PropTypes.bool,
|
55
|
+
/** Acciones adicionales para el header */
|
56
|
+
actions: PropTypes.node,
|
57
|
+
/** Contenido de la sección */
|
58
|
+
children: PropTypes.node,
|
59
|
+
/** Clases CSS adicionales */
|
60
|
+
className: PropTypes.string
|
61
|
+
}
|
62
|
+
|
63
|
+
Section.defaultProps = {
|
64
|
+
title: '',
|
65
|
+
canCollapse: true,
|
66
|
+
open: false,
|
67
|
+
className: ''
|
31
68
|
}
|
@@ -0,0 +1,131 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import { Section } from './section'
|
3
|
+
|
4
|
+
// Pruebas unitarias simples para el componente Section
|
5
|
+
describe('Section Component', () => {
|
6
|
+
// Mock de los componentes dependientes
|
7
|
+
const mockIcon = jest.fn()
|
8
|
+
const mockHeader = jest.fn()
|
9
|
+
|
10
|
+
beforeEach(() => {
|
11
|
+
jest.clearAllMocks()
|
12
|
+
|
13
|
+
// Mock del componente Icon
|
14
|
+
jest.doMock('./icon', () => ({
|
15
|
+
Icon: mockIcon
|
16
|
+
}))
|
17
|
+
|
18
|
+
// Mock del componente Header
|
19
|
+
jest.doMock('./header', () => ({
|
20
|
+
Header: mockHeader
|
21
|
+
}))
|
22
|
+
})
|
23
|
+
|
24
|
+
test('component exports correctly', () => {
|
25
|
+
expect(Section).toBeDefined()
|
26
|
+
expect(typeof Section).toBe('function')
|
27
|
+
})
|
28
|
+
|
29
|
+
test('component has correct PropTypes', () => {
|
30
|
+
expect(Section.propTypes).toBeDefined()
|
31
|
+
expect(Section.propTypes.title).toBeDefined()
|
32
|
+
expect(Section.propTypes.canCollapse).toBeDefined()
|
33
|
+
expect(Section.propTypes.open).toBeDefined()
|
34
|
+
expect(Section.propTypes.icon).toBeDefined()
|
35
|
+
expect(Section.propTypes.actions).toBeDefined()
|
36
|
+
expect(Section.propTypes.children).toBeDefined()
|
37
|
+
expect(Section.propTypes.className).toBeDefined()
|
38
|
+
})
|
39
|
+
|
40
|
+
test('component has correct defaultProps', () => {
|
41
|
+
expect(Section.defaultProps).toBeDefined()
|
42
|
+
expect(Section.defaultProps.title).toBe('')
|
43
|
+
expect(Section.defaultProps.canCollapse).toBe(true)
|
44
|
+
expect(Section.defaultProps.open).toBe(false)
|
45
|
+
expect(Section.defaultProps.className).toBe('')
|
46
|
+
})
|
47
|
+
|
48
|
+
test('component structure is correct', () => {
|
49
|
+
// Verificar que el componente es una función
|
50
|
+
expect(typeof Section).toBe('function')
|
51
|
+
|
52
|
+
// Verificar que el componente tiene las propiedades esperadas
|
53
|
+
expect(Section.propTypes).toBeDefined()
|
54
|
+
expect(Section.defaultProps).toBeDefined()
|
55
|
+
|
56
|
+
// Verificar que el componente puede ser instanciado como elemento React
|
57
|
+
const element = React.createElement(Section, {
|
58
|
+
title: 'Test Title',
|
59
|
+
icon: 'test-icon',
|
60
|
+
canCollapse: true,
|
61
|
+
open: false,
|
62
|
+
className: 'test-class'
|
63
|
+
})
|
64
|
+
|
65
|
+
expect(element).toBeDefined()
|
66
|
+
expect(element.type).toBe(Section)
|
67
|
+
})
|
68
|
+
|
69
|
+
test('toggle function works correctly', () => {
|
70
|
+
const props = {
|
71
|
+
title: 'Test Title',
|
72
|
+
open: false
|
73
|
+
}
|
74
|
+
|
75
|
+
// Simular el comportamiento del toggle
|
76
|
+
let isOpen = props.open
|
77
|
+
const toggle = () => {
|
78
|
+
isOpen = !isOpen
|
79
|
+
}
|
80
|
+
|
81
|
+
expect(isOpen).toBe(false)
|
82
|
+
toggle()
|
83
|
+
expect(isOpen).toBe(true)
|
84
|
+
toggle()
|
85
|
+
expect(isOpen).toBe(false)
|
86
|
+
})
|
87
|
+
|
88
|
+
test('className handling works correctly', () => {
|
89
|
+
// Simular el manejo de className
|
90
|
+
const testClassName = (className) => {
|
91
|
+
return `section ${className || ''}`
|
92
|
+
}
|
93
|
+
|
94
|
+
expect(testClassName('custom-class')).toBe('section custom-class')
|
95
|
+
expect(testClassName(undefined)).toBe('section ')
|
96
|
+
expect(testClassName('')).toBe('section ')
|
97
|
+
})
|
98
|
+
|
99
|
+
test('icon logic works correctly', () => {
|
100
|
+
// Simular la lógica del icono
|
101
|
+
const getIconName = (isOpen) => {
|
102
|
+
return isOpen ? "expand_less" : "expand_more"
|
103
|
+
}
|
104
|
+
|
105
|
+
expect(getIconName(false)).toBe('expand_more')
|
106
|
+
expect(getIconName(true)).toBe('expand_less')
|
107
|
+
})
|
108
|
+
|
109
|
+
test('tooltip text and positioning logic works correctly', () => {
|
110
|
+
// Simular la lógica del tooltip
|
111
|
+
const getTooltipConfig = (isOpen) => {
|
112
|
+
return {
|
113
|
+
text: isOpen ? 'Contraer sección' : 'Expandir sección',
|
114
|
+
top: '-3rem',
|
115
|
+
left: '-2rem'
|
116
|
+
}
|
117
|
+
}
|
118
|
+
|
119
|
+
const closedTooltip = getTooltipConfig(false)
|
120
|
+
const openTooltip = getTooltipConfig(true)
|
121
|
+
|
122
|
+
expect(closedTooltip.text).toBe('Expandir sección')
|
123
|
+
expect(openTooltip.text).toBe('Contraer sección')
|
124
|
+
|
125
|
+
// Verificar que el posicionamiento evita superposición
|
126
|
+
expect(closedTooltip.top).toBe('-3rem')
|
127
|
+
expect(closedTooltip.left).toBe('-2rem')
|
128
|
+
expect(openTooltip.top).toBe('-3rem')
|
129
|
+
expect(openTooltip.left).toBe('-2rem')
|
130
|
+
})
|
131
|
+
})
|
package/src/html/selector.css
CHANGED
@@ -1,10 +1,21 @@
|
|
1
1
|
.multiselector {
|
2
|
+
display: flex;
|
3
|
+
flex-direction: column;
|
4
|
+
gap: 1rem;
|
5
|
+
padding: 1rem;
|
6
|
+
}
|
7
|
+
|
8
|
+
.multiselector__options {
|
2
9
|
display: flex;
|
3
10
|
flex-flow: wrap;
|
4
|
-
|
11
|
+
gap: 0.5rem;
|
12
|
+
list-style: none;
|
13
|
+
margin: 0;
|
14
|
+
padding: 0;
|
5
15
|
}
|
6
16
|
|
7
|
-
.multiselector>li
|
17
|
+
.multiselector>li,
|
18
|
+
.toggle-button {
|
8
19
|
color: var(--primary-color, blue);
|
9
20
|
border: solid 1px var(--primary-color, blue);
|
10
21
|
cursor: pointer;
|
@@ -12,9 +23,324 @@
|
|
12
23
|
justify-content: center;
|
13
24
|
align-items: center;
|
14
25
|
padding: .3rem .9rem;
|
26
|
+
gap: 0.5rem;
|
27
|
+
border-radius: 4px;
|
28
|
+
transition: all 0.2s ease;
|
29
|
+
outline: none;
|
30
|
+
position: relative;
|
31
|
+
background-color: transparent;
|
15
32
|
}
|
16
33
|
|
17
|
-
li.selected
|
34
|
+
li.selected,
|
35
|
+
.toggle-button.selected {
|
18
36
|
color: var(--paper-color);
|
19
37
|
background-color: var(--primary-color);
|
20
38
|
}
|
39
|
+
|
40
|
+
/* Enhanced Selector Styles - New functionality while maintaining compatibility */
|
41
|
+
|
42
|
+
/* MultiSelector variants */
|
43
|
+
.multiselector--outlined .toggle-button {
|
44
|
+
border: 2px solid var(--primary-color, #2196f3);
|
45
|
+
background-color: transparent;
|
46
|
+
}
|
47
|
+
|
48
|
+
.multiselector--filled .toggle-button {
|
49
|
+
border: none;
|
50
|
+
background-color: var(--background-color-light, #f5f5f5);
|
51
|
+
color: var(--text-color, #333);
|
52
|
+
}
|
53
|
+
|
54
|
+
.multiselector--filled .toggle-button.selected {
|
55
|
+
background-color: var(--primary-color, #2196f3);
|
56
|
+
color: white;
|
57
|
+
}
|
58
|
+
|
59
|
+
/* Size variants */
|
60
|
+
.multiselector--small .toggle-button {
|
61
|
+
padding: 0.25rem 0.5rem;
|
62
|
+
font-size: 0.8rem;
|
63
|
+
}
|
64
|
+
|
65
|
+
.multiselector--medium .toggle-button {
|
66
|
+
padding: 0.3rem 0.9rem;
|
67
|
+
font-size: 0.9rem;
|
68
|
+
}
|
69
|
+
|
70
|
+
.multiselector--large .toggle-button {
|
71
|
+
padding: 0.5rem 1.2rem;
|
72
|
+
font-size: 1rem;
|
73
|
+
}
|
74
|
+
|
75
|
+
/* States */
|
76
|
+
.multiselector--disabled {
|
77
|
+
opacity: 0.6;
|
78
|
+
pointer-events: none;
|
79
|
+
}
|
80
|
+
|
81
|
+
.toggle-button--disabled {
|
82
|
+
opacity: 0.6;
|
83
|
+
cursor: not-allowed;
|
84
|
+
pointer-events: none;
|
85
|
+
}
|
86
|
+
|
87
|
+
.toggle-button:hover:not(.toggle-button--disabled) {
|
88
|
+
background-color: var(--primary-color-light, rgba(33, 150, 243, 0.1));
|
89
|
+
transform: translateY(-1px);
|
90
|
+
}
|
91
|
+
|
92
|
+
.toggle-button:focus {
|
93
|
+
outline: 2px solid var(--primary-color, #2196f3);
|
94
|
+
outline-offset: 2px;
|
95
|
+
}
|
96
|
+
|
97
|
+
.toggle-button:active:not(.toggle-button--disabled) {
|
98
|
+
transform: translateY(0);
|
99
|
+
}
|
100
|
+
|
101
|
+
/* Toggle button elements */
|
102
|
+
.toggle-button__icon {
|
103
|
+
flex-shrink: 0;
|
104
|
+
}
|
105
|
+
|
106
|
+
.toggle-button__label {
|
107
|
+
flex: 1;
|
108
|
+
text-align: center;
|
109
|
+
}
|
110
|
+
|
111
|
+
.toggle-button__check {
|
112
|
+
flex-shrink: 0;
|
113
|
+
margin-left: 0.25rem;
|
114
|
+
}
|
115
|
+
|
116
|
+
/* Search */
|
117
|
+
.multiselector__search {
|
118
|
+
position: relative;
|
119
|
+
margin-bottom: 0.5rem;
|
120
|
+
}
|
121
|
+
|
122
|
+
.multiselector__search-input {
|
123
|
+
width: 100%;
|
124
|
+
padding: 0.5rem 2.5rem 0.5rem 0.75rem;
|
125
|
+
border: 1px solid var(--divider-color, #e0e0e0);
|
126
|
+
border-radius: 4px;
|
127
|
+
font-size: 0.9rem;
|
128
|
+
outline: none;
|
129
|
+
transition: border-color 0.2s ease;
|
130
|
+
}
|
131
|
+
|
132
|
+
.multiselector__search-input:focus {
|
133
|
+
border-color: var(--primary-color, #2196f3);
|
134
|
+
}
|
135
|
+
|
136
|
+
.multiselector__search-icon {
|
137
|
+
position: absolute;
|
138
|
+
right: 0.75rem;
|
139
|
+
top: 50%;
|
140
|
+
transform: translateY(-50%);
|
141
|
+
color: var(--text-color-light, #666);
|
142
|
+
pointer-events: none;
|
143
|
+
}
|
144
|
+
|
145
|
+
/* Controls */
|
146
|
+
.multiselector__controls {
|
147
|
+
display: flex;
|
148
|
+
justify-content: flex-end;
|
149
|
+
margin-bottom: 0.5rem;
|
150
|
+
}
|
151
|
+
|
152
|
+
.multiselector__clear-button {
|
153
|
+
display: flex;
|
154
|
+
align-items: center;
|
155
|
+
gap: 0.25rem;
|
156
|
+
background: none;
|
157
|
+
border: 1px solid var(--divider-color, #e0e0e0);
|
158
|
+
color: var(--text-color-light, #666);
|
159
|
+
padding: 0.25rem 0.5rem;
|
160
|
+
border-radius: 4px;
|
161
|
+
cursor: pointer;
|
162
|
+
font-size: 0.8rem;
|
163
|
+
transition: all 0.2s ease;
|
164
|
+
}
|
165
|
+
|
166
|
+
.multiselector__clear-button:hover:not(:disabled) {
|
167
|
+
background-color: var(--error-color-light, #ffebee);
|
168
|
+
border-color: var(--error-color, #f44336);
|
169
|
+
color: var(--error-color, #f44336);
|
170
|
+
}
|
171
|
+
|
172
|
+
.multiselector__clear-button:disabled {
|
173
|
+
opacity: 0.6;
|
174
|
+
cursor: not-allowed;
|
175
|
+
}
|
176
|
+
|
177
|
+
/* Summary */
|
178
|
+
.multiselector__summary {
|
179
|
+
display: flex;
|
180
|
+
justify-content: space-between;
|
181
|
+
align-items: center;
|
182
|
+
padding: 0.5rem;
|
183
|
+
background-color: var(--background-color-light, #f5f5f5);
|
184
|
+
border-radius: 4px;
|
185
|
+
font-size: 0.8rem;
|
186
|
+
margin-top: 0.5rem;
|
187
|
+
}
|
188
|
+
|
189
|
+
.multiselector__count {
|
190
|
+
color: var(--text-color-light, #666);
|
191
|
+
}
|
192
|
+
|
193
|
+
.multiselector__warning {
|
194
|
+
color: var(--warning-color, #ff9800);
|
195
|
+
font-weight: 500;
|
196
|
+
}
|
197
|
+
|
198
|
+
/* Loading and empty states */
|
199
|
+
.multiselector__loading,
|
200
|
+
.multiselector__empty {
|
201
|
+
display: flex;
|
202
|
+
flex-direction: column;
|
203
|
+
align-items: center;
|
204
|
+
justify-content: center;
|
205
|
+
padding: 2rem;
|
206
|
+
gap: 0.5rem;
|
207
|
+
color: var(--text-color-light, #666);
|
208
|
+
text-align: center;
|
209
|
+
}
|
210
|
+
|
211
|
+
/* Responsive Design */
|
212
|
+
@media (max-width: 768px) {
|
213
|
+
.multiselector {
|
214
|
+
padding: 0.75rem;
|
215
|
+
}
|
216
|
+
|
217
|
+
.multiselector__options {
|
218
|
+
gap: 0.25rem;
|
219
|
+
}
|
220
|
+
|
221
|
+
.toggle-button {
|
222
|
+
padding: 0.25rem 0.5rem;
|
223
|
+
font-size: 0.8rem;
|
224
|
+
}
|
225
|
+
|
226
|
+
.multiselector--large .toggle-button {
|
227
|
+
padding: 0.4rem 0.8rem;
|
228
|
+
font-size: 0.9rem;
|
229
|
+
}
|
230
|
+
|
231
|
+
.multiselector__search-input {
|
232
|
+
padding: 0.4rem 2rem 0.4rem 0.6rem;
|
233
|
+
font-size: 0.8rem;
|
234
|
+
}
|
235
|
+
|
236
|
+
.multiselector__summary {
|
237
|
+
flex-direction: column;
|
238
|
+
gap: 0.25rem;
|
239
|
+
align-items: flex-start;
|
240
|
+
}
|
241
|
+
}
|
242
|
+
|
243
|
+
/* Dark Theme Support */
|
244
|
+
@media (prefers-color-scheme: dark) {
|
245
|
+
.toggle-button {
|
246
|
+
border-color: var(--primary-color-dark, #64b5f6);
|
247
|
+
color: var(--primary-color-dark, #64b5f6);
|
248
|
+
}
|
249
|
+
|
250
|
+
.toggle-button.selected {
|
251
|
+
background-color: var(--primary-color-dark, #64b5f6);
|
252
|
+
color: var(--text-color-dark, #000);
|
253
|
+
}
|
254
|
+
|
255
|
+
.multiselector--filled .toggle-button {
|
256
|
+
background-color: var(--background-color-light-dark, #424242);
|
257
|
+
color: var(--text-color-dark, #ffffff);
|
258
|
+
}
|
259
|
+
|
260
|
+
.toggle-button:hover:not(.toggle-button--disabled) {
|
261
|
+
background-color: var(--primary-color-dark-light, rgba(100, 181, 246, 0.1));
|
262
|
+
}
|
263
|
+
|
264
|
+
.multiselector__search-input {
|
265
|
+
background-color: var(--background-color-dark, #303030);
|
266
|
+
border-color: var(--divider-color-dark, #616161);
|
267
|
+
color: var(--text-color-dark, #ffffff);
|
268
|
+
}
|
269
|
+
|
270
|
+
.multiselector__search-input:focus {
|
271
|
+
border-color: var(--primary-color-dark, #64b5f6);
|
272
|
+
}
|
273
|
+
|
274
|
+
.multiselector__clear-button {
|
275
|
+
border-color: var(--divider-color-dark, #616161);
|
276
|
+
color: var(--text-color-light-dark, #cccccc);
|
277
|
+
}
|
278
|
+
|
279
|
+
.multiselector__summary {
|
280
|
+
background-color: var(--background-color-light-dark, #424242);
|
281
|
+
}
|
282
|
+
|
283
|
+
.multiselector__loading,
|
284
|
+
.multiselector__empty {
|
285
|
+
color: var(--text-color-light-dark, #cccccc);
|
286
|
+
}
|
287
|
+
}
|
288
|
+
|
289
|
+
/* High Contrast Mode */
|
290
|
+
@media (prefers-contrast: high) {
|
291
|
+
.toggle-button {
|
292
|
+
border-width: 2px;
|
293
|
+
}
|
294
|
+
|
295
|
+
.toggle-button:focus {
|
296
|
+
outline-width: 3px;
|
297
|
+
}
|
298
|
+
|
299
|
+
.toggle-button.selected {
|
300
|
+
border-color: currentColor;
|
301
|
+
}
|
302
|
+
|
303
|
+
.multiselector__search-input:focus {
|
304
|
+
outline: 2px solid currentColor;
|
305
|
+
}
|
306
|
+
}
|
307
|
+
|
308
|
+
/* Reduced Motion */
|
309
|
+
@media (prefers-reduced-motion: reduce) {
|
310
|
+
.toggle-button,
|
311
|
+
.multiselector__search-input,
|
312
|
+
.multiselector__clear-button {
|
313
|
+
transition: none;
|
314
|
+
}
|
315
|
+
|
316
|
+
.toggle-button:hover:not(.toggle-button--disabled) {
|
317
|
+
transform: none;
|
318
|
+
}
|
319
|
+
}
|
320
|
+
|
321
|
+
/* Print Styles */
|
322
|
+
@media print {
|
323
|
+
.multiselector {
|
324
|
+
break-inside: avoid;
|
325
|
+
}
|
326
|
+
|
327
|
+
.toggle-button {
|
328
|
+
border: 1px solid black !important;
|
329
|
+
background: white !important;
|
330
|
+
color: black !important;
|
331
|
+
}
|
332
|
+
|
333
|
+
.toggle-button.selected {
|
334
|
+
background: #f0f0f0 !important;
|
335
|
+
font-weight: bold !important;
|
336
|
+
}
|
337
|
+
|
338
|
+
.multiselector__search,
|
339
|
+
.multiselector__controls {
|
340
|
+
display: none !important;
|
341
|
+
}
|
342
|
+
|
343
|
+
.toggle-button__check {
|
344
|
+
display: none !important;
|
345
|
+
}
|
346
|
+
}
|