@zidsa/zidmui 1.4.41 → 1.5.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.
@@ -0,0 +1,126 @@
1
+ /**
2
+ * Checkbox Component
3
+ * States: checked, unchecked, disabled, indeterminate
4
+ */
5
+
6
+ /* ========================================
7
+ * Base Checkbox
8
+ * ======================================== */
9
+ :where(.zid-checkbox) {
10
+ display: inline-flex;
11
+ align-items: center;
12
+ gap: var(--zid-spacing-1);
13
+ cursor: pointer;
14
+ font-family: var(--zid-font-family);
15
+ font-size: var(--zid-font-size-base);
16
+ color: var(--zid-text-primary);
17
+ }
18
+
19
+ /* ========================================
20
+ * Checkbox Input (visually hidden)
21
+ * ======================================== */
22
+ .zid-checkbox__input {
23
+ position: absolute;
24
+ opacity: 0;
25
+ width: 0;
26
+ height: 0;
27
+ }
28
+
29
+ /* ========================================
30
+ * Checkbox Box
31
+ * ======================================== */
32
+ .zid-checkbox__box {
33
+ display: flex;
34
+ align-items: center;
35
+ justify-content: center;
36
+ width: 20px;
37
+ height: 20px;
38
+ border: 2px solid var(--zid-color-neutral-400);
39
+ border-radius: var(--zid-radius-sm);
40
+ background-color: var(--zid-bg-paper);
41
+ transition: background-color var(--zid-transition-fast),
42
+ border-color var(--zid-transition-fast),
43
+ box-shadow var(--zid-transition-fast);
44
+ }
45
+
46
+ .zid-checkbox__box svg {
47
+ width: 14px;
48
+ height: 14px;
49
+ opacity: 0;
50
+ transform: scale(0.5);
51
+ transition: opacity var(--zid-transition-fast),
52
+ transform var(--zid-transition-fast);
53
+ }
54
+
55
+ /* ========================================
56
+ * Checked State
57
+ * ======================================== */
58
+ .zid-checkbox__input:checked + .zid-checkbox__box {
59
+ background-color: var(--zid-color-primary-1000);
60
+ border-color: var(--zid-color-primary-1000);
61
+ }
62
+
63
+ .zid-checkbox__input:checked + .zid-checkbox__box svg {
64
+ opacity: 1;
65
+ transform: scale(1);
66
+ color: var(--zid-base-white);
67
+ }
68
+
69
+ /* ========================================
70
+ * Indeterminate State
71
+ * ======================================== */
72
+ .zid-checkbox--indeterminate .zid-checkbox__box {
73
+ background-color: var(--zid-color-primary-1000);
74
+ border-color: var(--zid-color-primary-1000);
75
+ }
76
+
77
+ .zid-checkbox--indeterminate .zid-checkbox__box svg {
78
+ opacity: 1;
79
+ transform: scale(1);
80
+ color: var(--zid-base-white);
81
+ }
82
+
83
+ /* ========================================
84
+ * Hover State
85
+ * ======================================== */
86
+ .zid-checkbox:hover:not(.zid-checkbox--disabled) .zid-checkbox__box {
87
+ border-color: var(--zid-color-neutral-500);
88
+ }
89
+
90
+ .zid-checkbox:hover:not(.zid-checkbox--disabled) .zid-checkbox__input:checked + .zid-checkbox__box {
91
+ background-color: var(--zid-color-primary-900);
92
+ border-color: var(--zid-color-primary-900);
93
+ }
94
+
95
+ /* ========================================
96
+ * Focus Visible State
97
+ * ======================================== */
98
+ .zid-checkbox__input:focus-visible + .zid-checkbox__box {
99
+ outline: 2px solid var(--zid-color-primary-1000);
100
+ outline-offset: 2px;
101
+ }
102
+
103
+ /* ========================================
104
+ * Disabled State
105
+ * ======================================== */
106
+ .zid-checkbox--disabled {
107
+ cursor: not-allowed;
108
+ color: var(--zid-text-disabled);
109
+ }
110
+
111
+ .zid-checkbox--disabled .zid-checkbox__box {
112
+ background-color: var(--zid-action-disabled-background);
113
+ border-color: var(--zid-color-neutral-300);
114
+ }
115
+
116
+ .zid-checkbox--disabled .zid-checkbox__input:checked + .zid-checkbox__box {
117
+ background-color: var(--zid-color-neutral-300);
118
+ border-color: var(--zid-color-neutral-300);
119
+ }
120
+
121
+ /* ========================================
122
+ * Label
123
+ * ======================================== */
124
+ .zid-checkbox__label {
125
+ user-select: none;
126
+ }
@@ -0,0 +1,203 @@
1
+ /**
2
+ * Color Tokens
3
+ * Derived from MUI theme palette
4
+ */
5
+
6
+ :root {
7
+ /* ========================================
8
+ * Base Colors
9
+ * ======================================== */
10
+ --zid-base-white: #FFFFFF;
11
+ --zid-base-black: #000000;
12
+ --zid-base-neutral: #F5F4F6;
13
+ --zid-base-silver: #E8E4EB;
14
+ --zid-base-blur: rgba(255, 255, 255, 0.8);
15
+
16
+ /* ========================================
17
+ * Primary Scale
18
+ * ======================================== */
19
+ --zid-color-primary-50: #FBF9FF;
20
+ --zid-color-primary-100: #F8F5FF;
21
+ --zid-color-primary-200: #F1EAFF;
22
+ --zid-color-primary-300: #E2D2FF;
23
+ --zid-color-primary-400: #D2B8FF;
24
+ --zid-color-primary-500: #C199FF;
25
+ --zid-color-primary-600: #AE72FF;
26
+ --zid-color-primary-700: #9C66E4;
27
+ --zid-color-primary-800: #8758C6;
28
+ --zid-color-primary-900: #6E48A1;
29
+ --zid-color-primary-1000: #4E3372;
30
+
31
+ /* ========================================
32
+ * Secondary Scale
33
+ * ======================================== */
34
+ --zid-color-secondary-50: #F4F3F5;
35
+ --zid-color-secondary-100: #EBE8ED;
36
+ --zid-color-secondary-200: #D8D2DD;
37
+ --zid-color-secondary-300: #B1A4BB;
38
+ --zid-color-secondary-400: #8A7798;
39
+ --zid-color-secondary-500: #634976;
40
+ --zid-color-secondary-600: #3C1C54;
41
+ --zid-color-secondary-700: #36194B;
42
+ --zid-color-secondary-800: #2E1641;
43
+ --zid-color-secondary-900: #261235;
44
+ --zid-color-secondary-1000: #1B0D26;
45
+
46
+ /* ========================================
47
+ * Neutral Scale
48
+ * ======================================== */
49
+ --zid-color-neutral-50: #F8F8F8;
50
+ --zid-color-neutral-100: #F2F2F2;
51
+ --zid-color-neutral-200: #E4E4E5;
52
+ --zid-color-neutral-300: #C6C6C8;
53
+ --zid-color-neutral-400: #A3A1A6;
54
+ --zid-color-neutral-500: #75727B;
55
+ --zid-color-neutral-600: #1F0433;
56
+ --zid-color-neutral-700: #1C042E;
57
+ --zid-color-neutral-800: #180328;
58
+ --zid-color-neutral-900: #140320;
59
+ --zid-color-neutral-1000: #0E0217;
60
+
61
+
62
+ /* ========================================
63
+ * Green Scale
64
+ * ======================================== */
65
+ --zid-color-green-50: #FAFDFA;
66
+ --zid-color-green-100: #F7FDF7;
67
+ --zid-color-green-200: #EFFBEE;
68
+ --zid-color-green-300: #DDF8DC;
69
+ --zid-color-green-400: #CAF4C8;
70
+ --zid-color-green-500: #B6F0B1;
71
+ --zid-color-green-600: #9EEC98;
72
+ --zid-color-green-700: #8DD388;
73
+ --zid-color-green-800: #7AB776;
74
+ --zid-color-green-900: #649560;
75
+ --zid-color-green-1000: #476A44;
76
+
77
+ /* ========================================
78
+ * Blue Scale
79
+ * ======================================== */
80
+ --zid-color-blue-50: #F9FDFD;
81
+ --zid-color-blue-100: #F4FCFC;
82
+ --zid-color-blue-200: #E9FAFA;
83
+ --zid-color-blue-300: #D1F4F4;
84
+ --zid-color-blue-400: #B5EFEF;
85
+ --zid-color-blue-500: #95E9E9;
86
+ --zid-color-blue-600: #6BE3E3;
87
+ --zid-color-blue-700: #60CBCB;
88
+ --zid-color-blue-800: #53B0B0;
89
+ --zid-color-blue-900: #449090;
90
+ --zid-color-blue-1000: #306666;
91
+
92
+ /* ========================================
93
+ * Yellow Scale
94
+ * ======================================== */
95
+ --zid-color-yellow-50: #FEFDF9;
96
+ --zid-color-yellow-100: #FEFDF5;
97
+ --zid-color-yellow-200: #FEFAEB;
98
+ --zid-color-yellow-300: #FDF5D6;
99
+ --zid-color-yellow-400: #FBF0BF;
100
+ --zid-color-yellow-500: #FAEBA4;
101
+ --zid-color-yellow-600: #F9E683;
102
+ --zid-color-yellow-700: #DFCE75;
103
+ --zid-color-yellow-800: #C1B265;
104
+ --zid-color-yellow-900: #9D9153;
105
+ --zid-color-yellow-1000: #6F673B;
106
+
107
+ /* ========================================
108
+ * Orange Scale
109
+ * ======================================== */
110
+ --zid-color-orange-50: #FFFAF8;
111
+ --zid-color-orange-100: #FFF6F3;
112
+ --zid-color-orange-200: #FFEDE6;
113
+ --zid-color-orange-300: #FFD8C9;
114
+ --zid-color-orange-400: #FFC2A7;
115
+ --zid-color-orange-500: #FFA97D;
116
+ --zid-color-orange-600: #FF8C3A;
117
+ --zid-color-orange-700: #E47D34;
118
+ --zid-color-orange-800: #C66C2D;
119
+ --zid-color-orange-900: #A15925;
120
+ --zid-color-orange-1000: #723F1A;
121
+
122
+ /* ========================================
123
+ * Red Scale
124
+ * ======================================== */
125
+ --zid-color-red-50: #FFF8F9;
126
+ --zid-color-red-100: #FFF3F4;
127
+ --zid-color-red-200: #FEE5E9;
128
+ --zid-color-red-300: #FDC9D0;
129
+ --zid-color-red-400: #FCA7B4;
130
+ --zid-color-red-500: #FB7C93;
131
+ --zid-color-red-600: #FA3768;
132
+ --zid-color-red-700: #E0315D;
133
+ --zid-color-red-800: #C22B51;
134
+ --zid-color-red-900: #9E2342;
135
+ --zid-color-red-1000: #70192F;
136
+
137
+ /* ========================================
138
+ * Semantic Tokens - Primary
139
+ * ======================================== */
140
+ --zid-primary-main: #AE72FF;
141
+ --zid-primary-dark: #8758C6;
142
+ --zid-primary-light: #D2B8FF;
143
+ --zid-primary-contrast-text: #FFFFFF;
144
+
145
+ /* ========================================
146
+ * Semantic Tokens - Secondary
147
+ * ======================================== */
148
+ --zid-secondary-main: #3C1C54;
149
+ --zid-secondary-dark: #2E1641;
150
+ --zid-secondary-light: #8A7798;
151
+ --zid-secondary-contrast-text: #FFFFFF;
152
+
153
+ /* ========================================
154
+ * Semantic Tokens - Error
155
+ * ======================================== */
156
+ --zid-error-main: #FA3768;
157
+ --zid-error-dark: #C22B51;
158
+ --zid-error-light: #FCA7B4;
159
+ --zid-error-contrast-text: #FFFFFF;
160
+
161
+ /* ========================================
162
+ * Semantic Tokens - Warning
163
+ * ======================================== */
164
+ --zid-warning-main: #F9E683;
165
+ --zid-warning-dark: #DFCE75;
166
+ --zid-warning-light: #FBF0BF;
167
+ --zid-warning-contrast-text: #6F673B;
168
+
169
+ /* ========================================
170
+ * Semantic Tokens - Info
171
+ * ======================================== */
172
+ --zid-info-main: #60CBCB;
173
+ --zid-info-dark: #449090;
174
+ --zid-info-light: #95E9E9;
175
+ --zid-info-contrast-text: #FFFFFF;
176
+
177
+ /* ========================================
178
+ * Semantic Tokens - Success
179
+ * ======================================== */
180
+ --zid-success-main: #9EEC98;
181
+ --zid-success-dark: #649560;
182
+ --zid-success-light: #DDF8DC;
183
+ --zid-success-contrast-text: #000000;
184
+
185
+ /* ========================================
186
+ * Text Colors
187
+ * ======================================== */
188
+ --zid-text-primary: var(--zid-color-neutral-1000);
189
+ --zid-text-secondary: var(--zid-color-neutral-600);
190
+ --zid-text-tertiary: var(--zid-color-neutral-500);
191
+ --zid-text-disabled: var(--zid-color-neutral-400);
192
+
193
+ /* ========================================
194
+ * Background Colors
195
+ * ======================================== */
196
+ --zid-bg-default: #F8F8F8;
197
+ --zid-bg-paper: var(--zid-base-white);
198
+
199
+ /* ========================================
200
+ * Divider
201
+ * ======================================== */
202
+ --zid-divider: var(--zid-color-secondary-50);
203
+ }
@@ -0,0 +1,159 @@
1
+ /**
2
+ * Alert Component
3
+ * Matches MUI Alert styling exactly
4
+ * Severity variants: success, info, warning, error
5
+ */
6
+
7
+ /* ========================================
8
+ * Base Alert
9
+ * ======================================== */
10
+ :where(.zid-alert) {
11
+ display: flex;
12
+ padding: 6px 16px;
13
+ font-family: var(--zid-font-family);
14
+ font-size: 0.875rem;
15
+ line-height: 1.43;
16
+ letter-spacing: 0.01071em;
17
+ border-radius: 12px;
18
+ border-style: solid;
19
+ border-width: 1px;
20
+ flex-wrap: wrap;
21
+ }
22
+
23
+ /* ========================================
24
+ * Alert Icon
25
+ * ======================================== */
26
+ .zid-alert__icon {
27
+ display: flex;
28
+ flex: 0;
29
+ padding-block: 6px;
30
+ align-items: flex-start;
31
+ margin-right: 12px;
32
+ opacity: 0.9;
33
+ }
34
+
35
+ .zid-alert__icon svg {
36
+ width: 22px;
37
+ height: 22px;
38
+ fill: currentColor;
39
+ }
40
+
41
+ /* ========================================
42
+ * Alert Content
43
+ * ======================================== */
44
+ .zid-alert__content {
45
+ flex: 1;
46
+ padding-block: 6px;
47
+ display: flex;
48
+ flex-direction: column;
49
+ gap: 4px;
50
+ }
51
+
52
+ .zid-alert__title {
53
+ font-weight: 500;
54
+ font-size: 0.875rem;
55
+ line-height: 1.57;
56
+ letter-spacing: 0.00714em;
57
+ margin: 0;
58
+ }
59
+
60
+ .zid-alert__message {
61
+ font-size: 0.875rem;
62
+ line-height: 1.43;
63
+ letter-spacing: 0.01071em;
64
+ }
65
+
66
+ /* ========================================
67
+ * Alert Close Button
68
+ * ======================================== */
69
+ .zid-alert__close {
70
+ display: flex;
71
+ align-items: flex-start;
72
+ padding-top: 2px;
73
+ margin-right: 0;
74
+ margin-left: auto;
75
+ border: none;
76
+ background: transparent;
77
+ cursor: pointer;
78
+ padding: 4px;
79
+ border-radius: 50%;
80
+ transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
81
+ }
82
+
83
+ .zid-alert__close:hover {
84
+ background-color: rgba(0, 0, 0, 0.04);
85
+ }
86
+
87
+ .zid-alert__close svg {
88
+ width: 20px;
89
+ height: 20px;
90
+ fill: currentColor;
91
+ }
92
+
93
+ /* ========================================
94
+ * Success Variant
95
+ * ======================================== */
96
+ .zid-alert--success {
97
+ background-color: #F7FDF7;
98
+ border-color: #CAF4C8;
99
+ color: inherit;
100
+ }
101
+
102
+ .zid-alert--success .zid-alert__icon {
103
+ color: #9EEC98;
104
+ }
105
+
106
+ .zid-alert--success .zid-alert__close {
107
+ color: #476A44;
108
+ }
109
+
110
+ /* ========================================
111
+ * Info Variant
112
+ * ======================================== */
113
+ .zid-alert--info {
114
+ background-color: #F4FCFC;
115
+ border-color: #B5EFEF;
116
+ color: inherit;
117
+ }
118
+
119
+ .zid-alert--info .zid-alert__icon {
120
+ color: #449090;
121
+ }
122
+
123
+ .zid-alert--info .zid-alert__close {
124
+ color: #306666;
125
+ }
126
+
127
+ /* ========================================
128
+ * Warning Variant
129
+ * ======================================== */
130
+ .zid-alert--warning {
131
+ background-color: #FEFDF5;
132
+ border-color: #FAEBA4;
133
+ color: inherit;
134
+ }
135
+
136
+ .zid-alert--warning .zid-alert__icon {
137
+ color: #DFCE75;
138
+ }
139
+
140
+ .zid-alert--warning .zid-alert__close {
141
+ color: #6F673B;
142
+ }
143
+
144
+ /* ========================================
145
+ * Error Variant
146
+ * ======================================== */
147
+ .zid-alert--error {
148
+ background-color: #FFF3F4;
149
+ border-color: #FDC9D0;
150
+ color: inherit;
151
+ }
152
+
153
+ .zid-alert--error .zid-alert__icon {
154
+ color: #FCA7B4;
155
+ }
156
+
157
+ .zid-alert--error .zid-alert__close {
158
+ color: #70192F;
159
+ }