@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,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
+ }
@@ -0,0 +1,133 @@
1
+ /**
2
+ * Tooltip Component
3
+ * Dark background with light text
4
+ */
5
+
6
+ /* ========================================
7
+ * Base Tooltip
8
+ * ======================================== */
9
+ :where(.zid-tooltip) {
10
+ position: relative;
11
+ display: inline-block;
12
+ }
13
+
14
+ /* ========================================
15
+ * Tooltip Content
16
+ * ======================================== */
17
+ .zid-tooltip__content {
18
+ position: absolute;
19
+ z-index: 1500;
20
+ padding: var(--zid-spacing-1) var(--zid-spacing-1-5);
21
+ background-color: var(--zid-color-neutral-1000);
22
+ color: var(--zid-color-neutral-50);
23
+ font-family: var(--zid-font-family);
24
+ font-size: var(--zid-font-size-sm);
25
+ line-height: var(--zid-line-height-normal);
26
+ border-radius: var(--zid-radius-sm);
27
+ white-space: nowrap;
28
+ opacity: 0;
29
+ visibility: hidden;
30
+ transition: opacity var(--zid-transition-fast),
31
+ visibility var(--zid-transition-fast);
32
+ pointer-events: none;
33
+ }
34
+
35
+ .zid-tooltip:hover .zid-tooltip__content,
36
+ .zid-tooltip--open .zid-tooltip__content {
37
+ opacity: 1;
38
+ visibility: visible;
39
+ }
40
+
41
+ /* ========================================
42
+ * Tooltip Positions
43
+ * ======================================== */
44
+ .zid-tooltip__content--top {
45
+ bottom: 100%;
46
+ left: 50%;
47
+ transform: translateX(-50%);
48
+ margin-bottom: var(--zid-spacing-1);
49
+ }
50
+
51
+ .zid-tooltip__content--bottom {
52
+ top: 100%;
53
+ left: 50%;
54
+ transform: translateX(-50%);
55
+ margin-top: var(--zid-spacing-1);
56
+ }
57
+
58
+ .zid-tooltip__content--left {
59
+ right: 100%;
60
+ top: 50%;
61
+ transform: translateY(-50%);
62
+ margin-right: var(--zid-spacing-1);
63
+ }
64
+
65
+ .zid-tooltip__content--right {
66
+ left: 100%;
67
+ top: 50%;
68
+ transform: translateY(-50%);
69
+ margin-left: var(--zid-spacing-1);
70
+ }
71
+
72
+ /* ========================================
73
+ * Tooltip Arrow
74
+ * ======================================== */
75
+ .zid-tooltip__content::after {
76
+ content: '';
77
+ position: absolute;
78
+ border: 6px solid transparent;
79
+ }
80
+
81
+ .zid-tooltip__content--top::after {
82
+ top: 100%;
83
+ left: 50%;
84
+ transform: translateX(-50%);
85
+ border-top-color: var(--zid-color-neutral-1000);
86
+ }
87
+
88
+ .zid-tooltip__content--bottom::after {
89
+ bottom: 100%;
90
+ left: 50%;
91
+ transform: translateX(-50%);
92
+ border-bottom-color: var(--zid-color-neutral-1000);
93
+ }
94
+
95
+ .zid-tooltip__content--left::after {
96
+ left: 100%;
97
+ top: 50%;
98
+ transform: translateY(-50%);
99
+ border-left-color: var(--zid-color-neutral-1000);
100
+ }
101
+
102
+ .zid-tooltip__content--right::after {
103
+ right: 100%;
104
+ top: 50%;
105
+ transform: translateY(-50%);
106
+ border-right-color: var(--zid-color-neutral-1000);
107
+ }
108
+
109
+ /* ========================================
110
+ * Tooltip Title
111
+ * ======================================== */
112
+ .zid-tooltip__title {
113
+ font-weight: 600;
114
+ font-size: 13px;
115
+ line-height: 20px;
116
+ margin-bottom: var(--zid-spacing-0-5);
117
+ }
118
+
119
+ /* ========================================
120
+ * Tooltip Description
121
+ * ======================================== */
122
+ .zid-tooltip__description {
123
+ font-weight: 400;
124
+ font-size: 12px;
125
+ }
126
+
127
+ /* ========================================
128
+ * Multiline Tooltip
129
+ * ======================================== */
130
+ .zid-tooltip__content--multiline {
131
+ white-space: normal;
132
+ max-width: 300px;
133
+ }
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Typography Tokens
3
+ * Derived from MUI theme typography
4
+ */
5
+
6
+ :root {
7
+ /* ========================================
8
+ * Font Family
9
+ * ======================================== */
10
+ --zid-font-family: 'IBM Plex Sans Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
11
+
12
+ /* ========================================
13
+ * Font Sizes
14
+ * ======================================== */
15
+ --zid-font-size-xs: 0.75rem; /* 12px */
16
+ --zid-font-size-sm: 0.875rem; /* 14px */
17
+ --zid-font-size-base: 1rem; /* 16px */
18
+ --zid-font-size-lg: 1.125rem; /* 18px */
19
+ --zid-font-size-xl: 1.25rem; /* 20px */
20
+ --zid-font-size-2xl: 1.5rem; /* 24px */
21
+ --zid-font-size-3xl: 1.875rem; /* 30px */
22
+ --zid-font-size-4xl: 2.25rem; /* 36px */
23
+
24
+ /* ========================================
25
+ * Font Weights
26
+ * ======================================== */
27
+ --zid-font-weight-regular: 400;
28
+ --zid-font-weight-medium: 500;
29
+ --zid-font-weight-semibold: 600;
30
+ --zid-font-weight-bold: 700;
31
+
32
+ /* ========================================
33
+ * Line Heights
34
+ * ======================================== */
35
+ --zid-line-height-tight: 1.25;
36
+ --zid-line-height-normal: 1.5;
37
+ --zid-line-height-relaxed: 1.75;
38
+
39
+ /* ========================================
40
+ * Letter Spacing
41
+ * ======================================== */
42
+ --zid-letter-spacing-tight: -0.5px;
43
+ --zid-letter-spacing-normal: 0;
44
+ --zid-letter-spacing-wide: 0.15px;
45
+ --zid-letter-spacing-wider: 0.25px;
46
+ }