mn-angular-lib 1.0.79 → 1.0.81
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/package.json
CHANGED
|
@@ -2,39 +2,23 @@
|
|
|
2
2
|
* Self-contained checkbox styling — a faithful reproduction of daisyui's
|
|
3
3
|
* `checkbox` component WITHOUT depending on daisyui.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* expressed as utility classes on a native <input>.
|
|
9
|
-
* CSS also means it compiles with the component and does not rely on the
|
|
10
|
-
* consumer's Tailwind scanning the library.
|
|
11
|
-
*
|
|
12
|
-
* Colors come from the theme CSS variables the consuming app already provides
|
|
13
|
-
* (--color-primary, --color-base-content, etc. — see demo-app styles.css).
|
|
14
|
-
* The depth shadows hardcode daisyui's default depth (0.1 opacity) and the
|
|
15
|
-
* `--fx-noise` layer is dropped.
|
|
5
|
+
* Size, color, and border-radius are handled entirely by Tailwind utility
|
|
6
|
+
* classes generated in mn-checkboxVariants.ts. This file is responsible only
|
|
7
|
+
* for structural rules and the ::before pseudo-element checkmark animation,
|
|
8
|
+
* which cannot be expressed as utility classes on a native <input>.
|
|
16
9
|
*/
|
|
17
10
|
|
|
18
11
|
.mn-checkbox {
|
|
19
|
-
/* Defaults; size/color modifier classes override these. */
|
|
20
|
-
--mn-checkbox-size: 1.5rem;
|
|
21
|
-
--mn-checkbox-input-color: var(--color-primary);
|
|
22
|
-
--mn-checkbox-check-color: var(--color-primary-content, #fff);
|
|
23
|
-
|
|
24
12
|
position: relative;
|
|
25
13
|
display: inline-block;
|
|
26
14
|
flex-shrink: 0;
|
|
27
15
|
box-sizing: border-box;
|
|
28
|
-
width: var(--mn-checkbox-size);
|
|
29
|
-
height: var(--mn-checkbox-size);
|
|
30
|
-
padding: 0.25rem;
|
|
31
16
|
vertical-align: middle;
|
|
32
17
|
cursor: pointer;
|
|
33
18
|
appearance: none;
|
|
34
19
|
-webkit-appearance: none;
|
|
35
|
-
|
|
36
|
-
border:
|
|
37
|
-
border-radius: 0.25rem;
|
|
20
|
+
border-width: 1px;
|
|
21
|
+
border-style: solid;
|
|
38
22
|
box-shadow: 0 1px oklch(0% 0 0 / 0.1) inset,
|
|
39
23
|
0 0 #0000 inset,
|
|
40
24
|
0 0 #0000;
|
|
@@ -60,13 +44,13 @@
|
|
|
60
44
|
}
|
|
61
45
|
|
|
62
46
|
.mn-checkbox:focus-visible {
|
|
63
|
-
outline: 2px
|
|
47
|
+
outline-width: 2px;
|
|
48
|
+
outline-style: solid;
|
|
64
49
|
outline-offset: 2px;
|
|
65
50
|
}
|
|
66
51
|
|
|
67
52
|
.mn-checkbox:checked,
|
|
68
53
|
.mn-checkbox[aria-checked='true'] {
|
|
69
|
-
background-color: var(--mn-checkbox-input-color);
|
|
70
54
|
box-shadow: 0 0 #0000 inset,
|
|
71
55
|
0 8px 0 -4px oklch(100% 0 0 / 0.1) inset,
|
|
72
56
|
0 1px oklch(0% 0 0 / 0.1);
|
|
@@ -78,10 +62,6 @@
|
|
|
78
62
|
clip-path: polygon(20% 100%, 20% 80%, 50% 80%, 50% 0%, 70% 0%, 70% 100%);
|
|
79
63
|
}
|
|
80
64
|
|
|
81
|
-
.mn-checkbox:indeterminate {
|
|
82
|
-
background-color: var(--mn-checkbox-input-color);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
65
|
.mn-checkbox:indeterminate::before {
|
|
86
66
|
opacity: 1;
|
|
87
67
|
rotate: 0deg;
|
|
@@ -93,96 +73,3 @@
|
|
|
93
73
|
cursor: not-allowed;
|
|
94
74
|
opacity: 0.2;
|
|
95
75
|
}
|
|
96
|
-
|
|
97
|
-
/* ========== Sizes (daisyui dimensions verbatim) ========== */
|
|
98
|
-
|
|
99
|
-
.mn-checkbox-xs {
|
|
100
|
-
--mn-checkbox-size: 1rem;
|
|
101
|
-
padding: 0.125rem;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.mn-checkbox-sm {
|
|
105
|
-
--mn-checkbox-size: 1.25rem;
|
|
106
|
-
padding: 0.1875rem;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.mn-checkbox-md {
|
|
110
|
-
--mn-checkbox-size: 1.5rem;
|
|
111
|
-
padding: 0.25rem;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.mn-checkbox-lg {
|
|
115
|
-
--mn-checkbox-size: 1.75rem;
|
|
116
|
-
padding: 0.3125rem;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.mn-checkbox-xl {
|
|
120
|
-
--mn-checkbox-size: 2rem;
|
|
121
|
-
padding: 0.375rem;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
/* ========== Colors ========== */
|
|
125
|
-
/* Content tokens carry a #fff fallback because not every theme defines the
|
|
126
|
-
* full *-content palette; without it currentColor would inherit body text. */
|
|
127
|
-
|
|
128
|
-
.mn-checkbox-primary {
|
|
129
|
-
--mn-checkbox-input-color: var(--color-primary);
|
|
130
|
-
--mn-checkbox-check-color: var(--color-primary-content, #fff);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.mn-checkbox-secondary {
|
|
134
|
-
--mn-checkbox-input-color: var(--color-secondary);
|
|
135
|
-
--mn-checkbox-check-color: var(--color-secondary-content, #fff);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.mn-checkbox-accent {
|
|
139
|
-
--mn-checkbox-input-color: var(--color-accent);
|
|
140
|
-
--mn-checkbox-check-color: var(--color-accent-content, #fff);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
.mn-checkbox-neutral {
|
|
144
|
-
--mn-checkbox-input-color: var(--color-neutral);
|
|
145
|
-
--mn-checkbox-check-color: var(--color-neutral-content, #fff);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
.mn-checkbox-info {
|
|
149
|
-
--mn-checkbox-input-color: var(--color-info);
|
|
150
|
-
--mn-checkbox-check-color: var(--color-info-content, #fff);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
.mn-checkbox-success {
|
|
154
|
-
--mn-checkbox-input-color: var(--color-success);
|
|
155
|
-
--mn-checkbox-check-color: var(--color-success-content, #fff);
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
.mn-checkbox-warning {
|
|
159
|
-
--mn-checkbox-input-color: var(--color-warning);
|
|
160
|
-
--mn-checkbox-check-color: var(--color-warning-content, #fff);
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
.mn-checkbox-error {
|
|
164
|
-
--mn-checkbox-input-color: var(--color-error);
|
|
165
|
-
--mn-checkbox-check-color: var(--color-error-content, #fff);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
/* ========== Border radius ========== */
|
|
169
|
-
|
|
170
|
-
.mn-checkbox-radius-none {
|
|
171
|
-
border-radius: 0;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
.mn-checkbox-radius-xs {
|
|
175
|
-
border-radius: 0.125rem;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
.mn-checkbox-radius-sm {
|
|
179
|
-
border-radius: 0.25rem;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
.mn-checkbox-radius-md {
|
|
183
|
-
border-radius: 0.375rem;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
.mn-checkbox-radius-lg {
|
|
187
|
-
border-radius: 0.5rem;
|
|
188
|
-
}
|
|
@@ -4155,6 +4155,15 @@ type GridLayout = {
|
|
|
4155
4155
|
type GridSkeleton = TemplateRef<unknown> | {
|
|
4156
4156
|
lines: Partial<MnSkeletonProps>[];
|
|
4157
4157
|
};
|
|
4158
|
+
/**
|
|
4159
|
+
* Configures an {@link import('./mn-grid.component').MnGrid}.
|
|
4160
|
+
*
|
|
4161
|
+
* Empty state (inherited from {@link MnCollectionDataSource}): provide **either**
|
|
4162
|
+
* a default text via `emptyMessage` / `emptyMessageKey`, **or** a whole custom
|
|
4163
|
+
* component/markup via `emptyTemplate`. A supplied `emptyTemplate` is rendered
|
|
4164
|
+
* unwrapped — it fully controls its own layout — while the text variant gets the
|
|
4165
|
+
* grid's default centered placeholder.
|
|
4166
|
+
*/
|
|
4158
4167
|
type GridDataSource<T> = MnCollectionDataSource<T> & {
|
|
4159
4168
|
/** Template used to render each card. Receives the item as `$implicit` and `data`. */
|
|
4160
4169
|
cardTemplate: TemplateRef<unknown>;
|