@zidsa/zidmui 1.4.41 → 1.5.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.
@@ -0,0 +1,174 @@
1
+ /**
2
+ * Select Component
3
+ * States: default, hover, focus, error, disabled
4
+ * Sizes: sm, md, lg
5
+ */
6
+
7
+ /* ========================================
8
+ * Base Select
9
+ * ======================================== */
10
+ :where(.zid-select) {
11
+ position: relative;
12
+ display: flex;
13
+ align-items: center;
14
+ gap: var(--zid-spacing-1);
15
+ font-family: var(--zid-font-family);
16
+ font-size: var(--zid-font-size-base);
17
+ line-height: var(--zid-line-height-normal);
18
+ color: var(--zid-text-primary);
19
+ background-color: var(--zid-bg-paper);
20
+ border: 1px solid #EBE8ED;
21
+ border-radius: var(--zid-radius-standard);
22
+ cursor: pointer;
23
+ transition: border-color var(--zid-transition-fast),
24
+ box-shadow var(--zid-transition-fast);
25
+ width: 100%;
26
+ }
27
+
28
+ /* ========================================
29
+ * Size Modifiers
30
+ * ======================================== */
31
+ .zid-select--sm {
32
+ padding: var(--zid-spacing-0-5) var(--zid-spacing-1);
33
+ font-size: var(--zid-font-size-sm);
34
+ min-height: 32px;
35
+ }
36
+
37
+ .zid-select--md {
38
+ padding: var(--zid-spacing-1) var(--zid-spacing-1-5);
39
+ font-size: var(--zid-font-size-base);
40
+ min-height: 40px;
41
+ }
42
+
43
+ .zid-select--lg {
44
+ padding: var(--zid-spacing-1-5) var(--zid-spacing-2);
45
+ font-size: var(--zid-font-size-lg);
46
+ min-height: 48px;
47
+ }
48
+
49
+ /* ========================================
50
+ * Native Select Element
51
+ * ======================================== */
52
+ .zid-select__native {
53
+ flex: 1;
54
+ border: none;
55
+ outline: none;
56
+ background: transparent;
57
+ font-family: inherit;
58
+ font-size: inherit;
59
+ line-height: inherit;
60
+ color: inherit;
61
+ padding: 0;
62
+ margin: 0;
63
+ cursor: pointer;
64
+ appearance: none;
65
+ -webkit-appearance: none;
66
+ -moz-appearance: none;
67
+ }
68
+
69
+ /* ========================================
70
+ * Select Arrow Icon
71
+ * ======================================== */
72
+ .zid-select__icon {
73
+ display: flex;
74
+ align-items: center;
75
+ justify-content: center;
76
+ color: var(--zid-text-secondary);
77
+ flex-shrink: 0;
78
+ pointer-events: none;
79
+ transition: transform var(--zid-transition-fast);
80
+ }
81
+
82
+ .zid-select--open .zid-select__icon {
83
+ transform: rotate(180deg);
84
+ }
85
+
86
+ /* ========================================
87
+ * Placeholder
88
+ * ======================================== */
89
+ .zid-select__placeholder {
90
+ color: var(--zid-text-disabled);
91
+ }
92
+
93
+ /* ========================================
94
+ * Hover State
95
+ * ======================================== */
96
+ .zid-select:hover:not(.zid-select--disabled):not(.zid-select--error) {
97
+ border-color: #D8D2DD;
98
+ }
99
+
100
+ /* ========================================
101
+ * Focus State
102
+ * ======================================== */
103
+ .zid-select:focus-within:not(.zid-select--disabled):not(.zid-select--error) {
104
+ border-color: var(--zid-primary-main);
105
+ outline: 2px solid var(--zid-primary-main);
106
+ outline-offset: 2px;
107
+ }
108
+
109
+ /* ========================================
110
+ * Error State
111
+ * ======================================== */
112
+ .zid-select--error {
113
+ border-color: var(--zid-error-main);
114
+ }
115
+
116
+ .zid-select--error:focus-within {
117
+ border-color: var(--zid-error-main);
118
+ outline: 2px solid var(--zid-error-main);
119
+ outline-offset: 2px;
120
+ }
121
+
122
+ /* ========================================
123
+ * Disabled State
124
+ * ======================================== */
125
+ .zid-select--disabled {
126
+ background-color: var(--zid-action-disabled-background);
127
+ border-color: var(--zid-color-neutral-200);
128
+ color: var(--zid-text-disabled);
129
+ cursor: not-allowed;
130
+ }
131
+
132
+ .zid-select--disabled .zid-select__native {
133
+ cursor: not-allowed;
134
+ }
135
+
136
+ /* ========================================
137
+ * Select Menu (Dropdown)
138
+ * ======================================== */
139
+ .zid-select-menu {
140
+ position: absolute;
141
+ top: 100%;
142
+ left: 0;
143
+ right: 0;
144
+ margin-top: var(--zid-spacing-0-5);
145
+ background-color: var(--zid-bg-paper);
146
+ border: 1px solid var(--zid-divider);
147
+ border-radius: var(--zid-radius-standard);
148
+ box-shadow: var(--zid-shadow-4);
149
+ z-index: 1000;
150
+ max-height: 300px;
151
+ overflow-y: auto;
152
+ }
153
+
154
+ /* ========================================
155
+ * Select Option
156
+ * ======================================== */
157
+ .zid-select-option {
158
+ padding: var(--zid-spacing-1) var(--zid-spacing-1-5);
159
+ cursor: pointer;
160
+ transition: background-color var(--zid-transition-fast);
161
+ }
162
+
163
+ .zid-select-option:hover {
164
+ background-color: var(--zid-action-hover);
165
+ }
166
+
167
+ .zid-select-option--selected {
168
+ background-color: var(--zid-action-selected);
169
+ }
170
+
171
+ .zid-select-option--disabled {
172
+ color: var(--zid-text-disabled);
173
+ cursor: not-allowed;
174
+ }
@@ -0,0 +1,162 @@
1
+ /**
2
+ * Status Component
3
+ * Color variants: success, error, warning, info, neutral, disabled, orange, blue
4
+ * Sizes: sm, md
5
+ */
6
+
7
+ /* ========================================
8
+ * Base Status
9
+ * ======================================== */
10
+ :where(.zid-status) {
11
+ display: inline-flex;
12
+ align-items: center;
13
+ justify-content: center;
14
+ font-family: var(--zid-font-family);
15
+ font-weight: var(--zid-font-weight-regular);
16
+ font-size: 0.75rem;
17
+ line-height: 1.125rem;
18
+ border-radius: var(--zid-radius-full);
19
+ white-space: nowrap;
20
+ min-width: 60px;
21
+ }
22
+
23
+ /* ========================================
24
+ * Size Modifiers
25
+ * ======================================== */
26
+ .zid-status--sm {
27
+ padding: var(--zid-spacing-0-5) var(--zid-spacing-1);
28
+ font-size: 0.75rem;
29
+ line-height: 1.125rem;
30
+ }
31
+
32
+ .zid-status--md {
33
+ padding: var(--zid-spacing-0-5) var(--zid-spacing-1-5);
34
+ font-size: 0.75rem;
35
+ line-height: 1.125rem;
36
+ }
37
+
38
+ /* ========================================
39
+ * Success Variant
40
+ * ======================================== */
41
+ .zid-status--success {
42
+ background-color: var(--zid-color-green-300);
43
+ color: var(--zid-color-green-900);
44
+ }
45
+
46
+ /* ========================================
47
+ * Error Variant
48
+ * ======================================== */
49
+ .zid-status--error {
50
+ background-color: var(--zid-color-red-200);
51
+ color: var(--zid-color-red-900);
52
+ }
53
+
54
+ /* ========================================
55
+ * Warning Variant
56
+ * ======================================== */
57
+ .zid-status--warning {
58
+ background-color: var(--zid-color-yellow-300);
59
+ color: var(--zid-color-yellow-1000);
60
+ }
61
+
62
+ /* ========================================
63
+ * Info Variant
64
+ * ======================================== */
65
+ .zid-status--info {
66
+ background-color: var(--zid-color-primary-200);
67
+ color: var(--zid-color-primary-800);
68
+ }
69
+
70
+ /* ========================================
71
+ * Neutral Variant
72
+ * ======================================== */
73
+ .zid-status--neutral {
74
+ background-color: var(--zid-color-neutral-100);
75
+ color: var(--zid-color-neutral-600);
76
+ }
77
+
78
+ /* ========================================
79
+ * Disabled Variant
80
+ * ======================================== */
81
+ .zid-status--disabled {
82
+ background-color: var(--zid-color-neutral-50);
83
+ color: var(--zid-color-neutral-400);
84
+ }
85
+
86
+ /* ========================================
87
+ * Orange Variant
88
+ * ======================================== */
89
+ .zid-status--orange {
90
+ background-color: var(--zid-color-orange-200);
91
+ color: var(--zid-color-orange-700);
92
+ }
93
+
94
+ /* ========================================
95
+ * Blue Variant
96
+ * ======================================== */
97
+ .zid-status--blue {
98
+ background-color: var(--zid-color-blue-300);
99
+ color: var(--zid-color-blue-900);
100
+ }
101
+
102
+ /* ========================================
103
+ * Status with Icon
104
+ * ======================================== */
105
+ .zid-status__icon {
106
+ display: flex;
107
+ align-items: center;
108
+ justify-content: center;
109
+ margin-right: var(--zid-spacing-0-5);
110
+ }
111
+
112
+ .zid-status__icon svg {
113
+ width: 12px;
114
+ height: 12px;
115
+ }
116
+
117
+ .zid-status--md .zid-status__icon svg {
118
+ width: 14px;
119
+ height: 14px;
120
+ }
121
+
122
+ /* ========================================
123
+ * Status with Dot
124
+ * ======================================== */
125
+ .zid-status__dot {
126
+ width: 6px;
127
+ height: 6px;
128
+ border-radius: var(--zid-radius-full);
129
+ margin-right: var(--zid-spacing-0-5);
130
+ }
131
+
132
+ .zid-status--success .zid-status__dot {
133
+ background-color: var(--zid-color-green-700);
134
+ }
135
+
136
+ .zid-status--error .zid-status__dot {
137
+ background-color: var(--zid-color-red-700);
138
+ }
139
+
140
+ .zid-status--warning .zid-status__dot {
141
+ background-color: var(--zid-color-yellow-700);
142
+ }
143
+
144
+ .zid-status--info .zid-status__dot {
145
+ background-color: var(--zid-color-primary-600);
146
+ }
147
+
148
+ .zid-status--neutral .zid-status__dot {
149
+ background-color: var(--zid-color-neutral-500);
150
+ }
151
+
152
+ .zid-status--disabled .zid-status__dot {
153
+ background-color: var(--zid-color-neutral-300);
154
+ }
155
+
156
+ .zid-status--orange .zid-status__dot {
157
+ background-color: var(--zid-color-orange-600);
158
+ }
159
+
160
+ .zid-status--blue .zid-status__dot {
161
+ background-color: var(--zid-color-blue-700);
162
+ }
@@ -0,0 +1,155 @@
1
+ /**
2
+ * Switch Component
3
+ * States: checked, unchecked, disabled
4
+ * Colors: primary, secondary
5
+ */
6
+
7
+ /* ========================================
8
+ * Base Switch
9
+ * ======================================== */
10
+ :where(.zid-switch) {
11
+ display: inline-flex;
12
+ align-items: center;
13
+ gap: var(--zid-spacing-1);
14
+ cursor: pointer;
15
+ font-family: var(--zid-font-family);
16
+ font-size: var(--zid-font-size-base);
17
+ color: var(--zid-text-primary);
18
+ }
19
+
20
+ /* ========================================
21
+ * Switch Input (visually hidden)
22
+ * ======================================== */
23
+ .zid-switch__input {
24
+ position: absolute;
25
+ opacity: 0;
26
+ width: 0;
27
+ height: 0;
28
+ }
29
+
30
+ /* ========================================
31
+ * Switch Track
32
+ * ======================================== */
33
+ .zid-switch__track {
34
+ position: relative;
35
+ width: 44px;
36
+ height: 24px;
37
+ background-color: var(--zid-color-neutral-400);
38
+ border-radius: var(--zid-radius-full);
39
+ transition: background-color var(--zid-transition-fast),
40
+ box-shadow var(--zid-transition-fast);
41
+ }
42
+
43
+ /* ========================================
44
+ * Switch Thumb
45
+ * ======================================== */
46
+ .zid-switch__thumb {
47
+ position: absolute;
48
+ top: 2px;
49
+ left: 2px;
50
+ width: 20px;
51
+ height: 20px;
52
+ background-color: var(--zid-color-neutral-50);
53
+ border-radius: var(--zid-radius-full);
54
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
55
+ transition: transform var(--zid-transition-fast),
56
+ background-color var(--zid-transition-fast);
57
+ }
58
+
59
+ /* ========================================
60
+ * Checked State - Primary (Success/Green)
61
+ * ======================================== */
62
+ .zid-switch--primary .zid-switch__input:checked + .zid-switch__track {
63
+ background-color: var(--zid-success-main);
64
+ }
65
+
66
+ .zid-switch--primary .zid-switch__input:checked + .zid-switch__track .zid-switch__thumb {
67
+ transform: translateX(20px);
68
+ background-color: var(--zid-bg-paper);
69
+ }
70
+
71
+ /* ========================================
72
+ * Checked State - Secondary (Primary Purple)
73
+ * ======================================== */
74
+ .zid-switch--secondary .zid-switch__input:checked + .zid-switch__track {
75
+ background-color: var(--zid-primary-main);
76
+ }
77
+
78
+ .zid-switch--secondary .zid-switch__input:checked + .zid-switch__track .zid-switch__thumb {
79
+ transform: translateX(20px);
80
+ background-color: var(--zid-bg-paper);
81
+ }
82
+
83
+ /* ========================================
84
+ * Checked State - Error
85
+ * ======================================== */
86
+ .zid-switch--error .zid-switch__input:checked + .zid-switch__track {
87
+ background-color: var(--zid-error-main);
88
+ }
89
+
90
+ .zid-switch--error .zid-switch__input:checked + .zid-switch__track .zid-switch__thumb {
91
+ transform: translateX(20px);
92
+ background-color: var(--zid-bg-paper);
93
+ }
94
+
95
+ /* ========================================
96
+ * Hover State
97
+ * ======================================== */
98
+ .zid-switch:hover:not(.zid-switch--disabled) .zid-switch__track {
99
+ background-color: var(--zid-color-neutral-500);
100
+ }
101
+
102
+ .zid-switch--primary:hover:not(.zid-switch--disabled) .zid-switch__input:checked + .zid-switch__track {
103
+ background-color: var(--zid-success-dark);
104
+ }
105
+
106
+ .zid-switch--secondary:hover:not(.zid-switch--disabled) .zid-switch__input:checked + .zid-switch__track {
107
+ background-color: var(--zid-primary-dark);
108
+ }
109
+
110
+ .zid-switch--error:hover:not(.zid-switch--disabled) .zid-switch__input:checked + .zid-switch__track {
111
+ background-color: var(--zid-error-dark);
112
+ }
113
+
114
+ /* ========================================
115
+ * Focus Visible State
116
+ * ======================================== */
117
+ .zid-switch__input:focus-visible + .zid-switch__track {
118
+ outline: 2px solid var(--zid-primary-main);
119
+ outline-offset: 2px;
120
+ }
121
+
122
+ .zid-switch--primary .zid-switch__input:focus-visible:checked + .zid-switch__track {
123
+ box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.5);
124
+ }
125
+
126
+ .zid-switch--error .zid-switch__input:focus-visible:checked + .zid-switch__track {
127
+ box-shadow: 0 0 0 3px rgba(250, 55, 104, 0.5);
128
+ }
129
+
130
+ /* ========================================
131
+ * Disabled State
132
+ * ======================================== */
133
+ .zid-switch--disabled {
134
+ cursor: not-allowed;
135
+ color: var(--zid-text-disabled);
136
+ }
137
+
138
+ .zid-switch--disabled .zid-switch__track {
139
+ background-color: var(--zid-color-neutral-200);
140
+ }
141
+
142
+ .zid-switch--disabled .zid-switch__thumb {
143
+ background-color: var(--zid-color-neutral-100);
144
+ }
145
+
146
+ .zid-switch--disabled .zid-switch__input:checked + .zid-switch__track {
147
+ background-color: var(--zid-color-neutral-300);
148
+ }
149
+
150
+ /* ========================================
151
+ * Label
152
+ * ======================================== */
153
+ .zid-switch__label {
154
+ user-select: none;
155
+ }
@@ -0,0 +1,132 @@
1
+ /**
2
+ * Table Component
3
+ * Header, rows, cells with hover states
4
+ */
5
+
6
+ /* ========================================
7
+ * Base Table
8
+ * ======================================== */
9
+ :where(.zid-table) {
10
+ width: 100%;
11
+ border-collapse: collapse;
12
+ font-family: var(--zid-font-family);
13
+ font-size: var(--zid-font-size-base);
14
+ color: var(--zid-text-primary);
15
+ }
16
+
17
+ /* ========================================
18
+ * Table Head
19
+ * ======================================== */
20
+ .zid-table__head {
21
+ background-color: var(--zid-color-neutral-50);
22
+ }
23
+
24
+ .zid-table__head .zid-table__cell {
25
+ font-weight: var(--zid-font-weight-semibold);
26
+ color: var(--zid-text-secondary);
27
+ text-align: left;
28
+ }
29
+
30
+ /* ========================================
31
+ * Table Row
32
+ * ======================================== */
33
+ .zid-table__row {
34
+ border-bottom: 1px solid var(--zid-divider);
35
+ transition: background-color var(--zid-transition-fast);
36
+ }
37
+
38
+ .zid-table__body .zid-table__row:hover {
39
+ background-color: var(--zid-action-hover);
40
+ }
41
+
42
+ .zid-table__row--selected {
43
+ background-color: var(--zid-action-selected);
44
+ }
45
+
46
+ .zid-table__body .zid-table__row--selected:hover {
47
+ background-color: var(--zid-action-selected);
48
+ }
49
+
50
+ /* ========================================
51
+ * Table Cell
52
+ * ======================================== */
53
+ .zid-table__cell {
54
+ padding: var(--zid-spacing-1-5) var(--zid-spacing-2);
55
+ vertical-align: middle;
56
+ line-height: var(--zid-line-height-normal);
57
+ }
58
+
59
+ /* ========================================
60
+ * Cell Alignment
61
+ * ======================================== */
62
+ .zid-table__cell--left {
63
+ text-align: left;
64
+ }
65
+
66
+ .zid-table__cell--center {
67
+ text-align: center;
68
+ }
69
+
70
+ .zid-table__cell--right {
71
+ text-align: right;
72
+ }
73
+
74
+ /* ========================================
75
+ * Compact Table
76
+ * ======================================== */
77
+ .zid-table--compact .zid-table__cell {
78
+ padding: var(--zid-spacing-1) var(--zid-spacing-1-5);
79
+ }
80
+
81
+ /* ========================================
82
+ * Bordered Table
83
+ * ======================================== */
84
+ .zid-table--bordered {
85
+ border: 1px solid var(--zid-divider);
86
+ }
87
+
88
+ .zid-table--bordered .zid-table__cell {
89
+ border: 1px solid var(--zid-divider);
90
+ }
91
+
92
+ /* ========================================
93
+ * Striped Table
94
+ * ======================================== */
95
+ .zid-table--striped .zid-table__body .zid-table__row:nth-child(even) {
96
+ background-color: var(--zid-color-neutral-50);
97
+ }
98
+
99
+ .zid-table--striped .zid-table__body .zid-table__row:nth-child(even):hover {
100
+ background-color: var(--zid-action-hover);
101
+ }
102
+
103
+ /* ========================================
104
+ * Sticky Header
105
+ * ======================================== */
106
+ .zid-table--sticky-header .zid-table__head {
107
+ position: sticky;
108
+ top: 0;
109
+ z-index: 1;
110
+ }
111
+
112
+ /* ========================================
113
+ * Table Container
114
+ * ======================================== */
115
+ .zid-table-container {
116
+ overflow-x: auto;
117
+ border-radius: var(--zid-radius-standard);
118
+ border: 1px solid var(--zid-divider);
119
+ }
120
+
121
+ .zid-table-container .zid-table {
122
+ border: none;
123
+ }
124
+
125
+ /* ========================================
126
+ * Empty State
127
+ * ======================================== */
128
+ .zid-table__empty {
129
+ text-align: center;
130
+ padding: var(--zid-spacing-6);
131
+ color: var(--zid-text-secondary);
132
+ }