@mlola-ui/registry 1.0.2 → 1.0.4
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/components/accordion.json +2 -2
- package/components/alert.json +2 -2
- package/components/app-shell.json +1 -1
- package/components/badge.json +2 -2
- package/components/breadcrumb.json +2 -2
- package/components/button.json +1 -1
- package/components/calendar.json +1 -1
- package/components/carousel.json +3 -3
- package/components/checkbox.json +2 -2
- package/components/color-picker.json +5 -5
- package/components/combobox.json +2 -2
- package/components/command-menu.json +1 -1
- package/components/context-menu.json +1 -1
- package/components/date-picker.json +2 -2
- package/components/dropdown-menu.json +2 -2
- package/components/dropzone.json +2 -2
- package/components/empty-state.json +1 -1
- package/components/hover-card.json +1 -1
- package/components/modal.json +2 -2
- package/components/number-input.json +2 -2
- package/components/otp-input.json +1 -1
- package/components/pagination.json +1 -1
- package/components/progress.json +1 -1
- package/components/segmented-control.json +2 -2
- package/components/select.json +3 -3
- package/components/sheet.json +2 -2
- package/components/slider.json +1 -1
- package/components/status-icon.json +1 -1
- package/components/stepper.json +2 -2
- package/components/tabs.json +1 -1
- package/components/tag-input.json +2 -2
- package/components/textarea.json +1 -1
- package/components/time-picker.json +2 -2
- package/components/timeline.json +2 -2
- package/components/toast.json +2 -2
- package/components/toggle.json +1 -1
- package/components/tour.json +2 -2
- package/generated/catalog.ts +40 -40
- package/index.json +1 -1
- package/package.json +1 -1
- package/snapshot/index.json +65 -65
- package/snapshot/items/components/accordion.json +2 -2
- package/snapshot/items/components/alert.json +2 -2
- package/snapshot/items/components/app-shell.json +1 -1
- package/snapshot/items/components/badge.json +2 -2
- package/snapshot/items/components/breadcrumb.json +2 -2
- package/snapshot/items/components/button.json +1 -1
- package/snapshot/items/components/calendar.json +1 -1
- package/snapshot/items/components/carousel.json +3 -3
- package/snapshot/items/components/checkbox.json +2 -2
- package/snapshot/items/components/color-picker.json +5 -5
- package/snapshot/items/components/combobox.json +2 -2
- package/snapshot/items/components/command-menu.json +1 -1
- package/snapshot/items/components/context-menu.json +1 -1
- package/snapshot/items/components/date-picker.json +2 -2
- package/snapshot/items/components/dropdown-menu.json +2 -2
- package/snapshot/items/components/dropzone.json +2 -2
- package/snapshot/items/components/empty-state.json +1 -1
- package/snapshot/items/components/hover-card.json +1 -1
- package/snapshot/items/components/modal.json +2 -2
- package/snapshot/items/components/number-input.json +2 -2
- package/snapshot/items/components/otp-input.json +1 -1
- package/snapshot/items/components/pagination.json +1 -1
- package/snapshot/items/components/progress.json +1 -1
- package/snapshot/items/components/segmented-control.json +2 -2
- package/snapshot/items/components/select.json +3 -3
- package/snapshot/items/components/sheet.json +2 -2
- package/snapshot/items/components/slider.json +1 -1
- package/snapshot/items/components/status-icon.json +1 -1
- package/snapshot/items/components/stepper.json +2 -2
- package/snapshot/items/components/tabs.json +1 -1
- package/snapshot/items/components/tag-input.json +2 -2
- package/snapshot/items/components/textarea.json +1 -1
- package/snapshot/items/components/time-picker.json +2 -2
- package/snapshot/items/components/timeline.json +2 -2
- package/snapshot/items/components/toast.json +2 -2
- package/snapshot/items/components/toggle.json +1 -1
- package/snapshot/items/components/tour.json +2 -2
- package/snapshot/source/packages/components/alert/alert.tsx +1 -1
- package/snapshot/source/packages/components/badge/badge.tsx +2 -2
- package/snapshot/source/packages/components/breadcrumb/breadcrumb.tsx +1 -1
- package/snapshot/source/packages/components/carousel/carousel.tsx +1 -0
- package/snapshot/source/packages/components/checkbox/checkbox.tsx +3 -2
- package/snapshot/source/packages/components/color-picker/color-picker.tsx +15 -13
- package/snapshot/source/packages/components/color-picker/color.ts +1 -1
- package/snapshot/source/packages/components/combobox/combobox.tsx +33 -6
- package/snapshot/source/packages/components/date-picker/date-picker.tsx +5 -3
- package/snapshot/source/packages/components/dropzone/dropzone.tsx +1 -1
- package/snapshot/source/packages/components/empty-state/empty-state.tsx +1 -1
- package/snapshot/source/packages/components/hover-card/hover-card.tsx +1 -1
- package/snapshot/source/packages/components/number-input/number-input.tsx +6 -5
- package/snapshot/source/packages/components/otp-input/otp-input.tsx +6 -4
- package/snapshot/source/packages/components/progress/progress.tsx +1 -1
- package/snapshot/source/packages/components/segmented-control/segmented-control.tsx +5 -3
- package/snapshot/source/packages/components/select/select.tsx +6 -5
- package/snapshot/source/packages/components/tag-input/tag-input.tsx +7 -6
- package/snapshot/source/packages/components/textarea/textarea.tsx +1 -1
- package/snapshot/source/packages/components/time-picker/time-picker.tsx +8 -5
- package/snapshot/source/packages/components/timeline/timeline.tsx +1 -1
- package/snapshot/source/packages/components/toast/toast.tsx +1 -1
- package/snapshot/source/packages/components/toggle/toggle.tsx +1 -0
- package/snapshot/source/packages/components/tour/tour.tsx +3 -3
- package/snapshot/source-manifest.json +24 -24
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
"name": "color-picker",
|
|
5
5
|
"type": "registry:ui",
|
|
6
6
|
"title": "Color Picker",
|
|
7
|
-
"description": "A
|
|
7
|
+
"description": "A color field with a saturation area, hue and opacity, hex, rgb or oklch, an eyedropper, presets and a contrast check",
|
|
8
8
|
"category": "forms",
|
|
9
9
|
"tags": [
|
|
10
10
|
"color",
|
|
11
|
-
"
|
|
11
|
+
"color",
|
|
12
12
|
"picker",
|
|
13
13
|
"oklch",
|
|
14
14
|
"hex",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"popover"
|
|
25
25
|
],
|
|
26
26
|
"engineDependencies": {
|
|
27
|
-
"@mlola-ui/icons": "^1.0.
|
|
27
|
+
"@mlola-ui/icons": "^1.0.4"
|
|
28
28
|
},
|
|
29
29
|
"files": [
|
|
30
30
|
{
|
|
@@ -37,13 +37,13 @@
|
|
|
37
37
|
"path": "packages/components/color-picker/color-picker.tsx",
|
|
38
38
|
"target": "{{aliases.components}}/color-picker.tsx",
|
|
39
39
|
"type": "registry:ui",
|
|
40
|
-
"integrity": "sha256-
|
|
40
|
+
"integrity": "sha256-E+QB6MbSxg+3AZX3A7bOkst4arxgpmFL2ZmochoWCl8="
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
43
|
"path": "packages/components/color-picker/color.ts",
|
|
44
44
|
"target": "{{aliases.components}}/color-picker/color.ts",
|
|
45
45
|
"type": "registry:ui",
|
|
46
|
-
"integrity": "sha256-
|
|
46
|
+
"integrity": "sha256-YqSgYjzn7XfPWAHuyzbwOhbg/ScaSfB7V73e9w+OjJs="
|
|
47
47
|
}
|
|
48
48
|
],
|
|
49
49
|
"themeContract": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"input"
|
|
23
23
|
],
|
|
24
24
|
"engineDependencies": {
|
|
25
|
-
"@mlola-ui/icons": "^1.0.
|
|
25
|
+
"@mlola-ui/icons": "^1.0.4"
|
|
26
26
|
},
|
|
27
27
|
"files": [
|
|
28
28
|
{
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"path": "packages/components/combobox/combobox.tsx",
|
|
48
48
|
"target": "{{aliases.components}}/combobox.tsx",
|
|
49
49
|
"type": "registry:ui",
|
|
50
|
-
"integrity": "sha256-
|
|
50
|
+
"integrity": "sha256-CvuYc/hJoS7yw6QM9vv1SIkwflx0Kwd95UjchtC+AOs="
|
|
51
51
|
}
|
|
52
52
|
],
|
|
53
53
|
"themeContract": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"popover"
|
|
24
24
|
],
|
|
25
25
|
"engineDependencies": {
|
|
26
|
-
"@mlola-ui/icons": "^1.0.
|
|
26
|
+
"@mlola-ui/icons": "^1.0.4"
|
|
27
27
|
},
|
|
28
28
|
"files": [
|
|
29
29
|
{
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"path": "packages/components/date-picker/date-picker.tsx",
|
|
43
43
|
"target": "{{aliases.components}}/date-picker.tsx",
|
|
44
44
|
"type": "registry:ui",
|
|
45
|
-
"integrity": "sha256-
|
|
45
|
+
"integrity": "sha256-rsmDweD3RVfKTXR2i+/pnTb/MsrDAZXmHAYBvcUGxig="
|
|
46
46
|
}
|
|
47
47
|
],
|
|
48
48
|
"themeContract": {
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
"input"
|
|
22
22
|
],
|
|
23
23
|
"engineDependencies": {
|
|
24
|
-
"@mlola-ui/icons": "^1.0.
|
|
24
|
+
"@mlola-ui/icons": "^1.0.4"
|
|
25
25
|
},
|
|
26
26
|
"files": [
|
|
27
27
|
{
|
|
28
28
|
"path": "packages/components/dropzone/dropzone.tsx",
|
|
29
29
|
"target": "{{aliases.components}}/dropzone.tsx",
|
|
30
30
|
"type": "registry:ui",
|
|
31
|
-
"integrity": "sha256-
|
|
31
|
+
"integrity": "sha256-tHCCpEWE6839UeLOszTo+R2vAL4Sp9UxuRdLkFLfnq4="
|
|
32
32
|
}
|
|
33
33
|
],
|
|
34
34
|
"themeContract": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"path": "packages/components/empty-state/empty-state.tsx",
|
|
29
29
|
"target": "{{aliases.components}}/empty-state.tsx",
|
|
30
30
|
"type": "registry:ui",
|
|
31
|
-
"integrity": "sha256-
|
|
31
|
+
"integrity": "sha256-uCKqYpr9vkozXZHpdl4GFtdX9ijcGOriCHvgyarBqRw="
|
|
32
32
|
}
|
|
33
33
|
],
|
|
34
34
|
"themeContract": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"path": "packages/components/hover-card/hover-card.tsx",
|
|
43
43
|
"target": "{{aliases.components}}/hover-card.tsx",
|
|
44
44
|
"type": "registry:ui",
|
|
45
|
-
"integrity": "sha256-
|
|
45
|
+
"integrity": "sha256-AyRbxfqDOYBgGlgjgrtQZm5DipArLEzQn6XnzjPd0ro="
|
|
46
46
|
}
|
|
47
47
|
],
|
|
48
48
|
"themeContract": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"input"
|
|
23
23
|
],
|
|
24
24
|
"engineDependencies": {
|
|
25
|
-
"@mlola-ui/icons": "^1.0.
|
|
25
|
+
"@mlola-ui/icons": "^1.0.4"
|
|
26
26
|
},
|
|
27
27
|
"files": [
|
|
28
28
|
{
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"path": "packages/components/number-input/number-input.tsx",
|
|
36
36
|
"target": "{{aliases.components}}/number-input.tsx",
|
|
37
37
|
"type": "registry:ui",
|
|
38
|
-
"integrity": "sha256-
|
|
38
|
+
"integrity": "sha256-BDOyvCNtMULD/HK7uWHsYbGg79lrRDrVqtGQQrYHpmM="
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
"path": "packages/components/number-input/number.ts",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"path": "packages/components/otp-input/otp-input.tsx",
|
|
33
33
|
"target": "{{aliases.components}}/otp-input.tsx",
|
|
34
34
|
"type": "registry:ui",
|
|
35
|
-
"integrity": "sha256-
|
|
35
|
+
"integrity": "sha256-QURn8g5HqCQXBTdeENPbVxoPlqs3ZtoAPLRlFjQDxmI="
|
|
36
36
|
}
|
|
37
37
|
],
|
|
38
38
|
"themeContract": {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"path": "packages/components/progress/progress.tsx",
|
|
41
41
|
"target": "{{aliases.components}}/progress.tsx",
|
|
42
42
|
"type": "registry:ui",
|
|
43
|
-
"integrity": "sha256-
|
|
43
|
+
"integrity": "sha256-9OjecRNPWn7Bfe+C5IyXaKsW1NJae6X5gco1o0X5XkE="
|
|
44
44
|
}
|
|
45
45
|
],
|
|
46
46
|
"themeContract": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"registryDependencies": [],
|
|
23
23
|
"engineDependencies": {
|
|
24
|
-
"@mlola-ui/behavior": "^1.0.
|
|
24
|
+
"@mlola-ui/behavior": "^1.0.4"
|
|
25
25
|
},
|
|
26
26
|
"files": [
|
|
27
27
|
{
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"path": "packages/components/segmented-control/segmented-control.tsx",
|
|
35
35
|
"target": "{{aliases.components}}/segmented-control.tsx",
|
|
36
36
|
"type": "registry:ui",
|
|
37
|
-
"integrity": "sha256-
|
|
37
|
+
"integrity": "sha256-MCBG5XHFWCwbACctsYKbqe8mvSSR6pf60tyRgdCDKDA="
|
|
38
38
|
}
|
|
39
39
|
],
|
|
40
40
|
"themeContract": {
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
},
|
|
25
25
|
"registryDependencies": [],
|
|
26
26
|
"engineDependencies": {
|
|
27
|
-
"@mlola-ui/behavior": "^1.0.
|
|
28
|
-
"@mlola-ui/icons": "^1.0.
|
|
27
|
+
"@mlola-ui/behavior": "^1.0.4",
|
|
28
|
+
"@mlola-ui/icons": "^1.0.4"
|
|
29
29
|
},
|
|
30
30
|
"files": [
|
|
31
31
|
{
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"path": "packages/components/select/select.tsx",
|
|
51
51
|
"target": "{{aliases.components}}/select.tsx",
|
|
52
52
|
"type": "registry:ui",
|
|
53
|
-
"integrity": "sha256-
|
|
53
|
+
"integrity": "sha256-m8QmKUGC4386XcklosSntal0XwUAFjKosTBQSF0dduQ="
|
|
54
54
|
}
|
|
55
55
|
],
|
|
56
56
|
"themeContract": {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"name": "status-icon",
|
|
5
5
|
"type": "registry:ui",
|
|
6
6
|
"title": "Status Icon",
|
|
7
|
-
"description": "A work item status as one glyph: backlog, todo, in progress, in review, done and canceled, readable without
|
|
7
|
+
"description": "A work item status as one glyph: backlog, todo, in progress, in review, done and canceled, readable without color",
|
|
8
8
|
"category": "data",
|
|
9
9
|
"tags": [
|
|
10
10
|
"status",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"tags": [
|
|
10
10
|
"stepper",
|
|
11
11
|
"steps",
|
|
12
|
-
"
|
|
12
|
+
"multi-step",
|
|
13
13
|
"progress",
|
|
14
14
|
"checkout"
|
|
15
15
|
],
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"registryDependencies": [],
|
|
22
22
|
"engineDependencies": {
|
|
23
|
-
"@mlola-ui/icons": "^1.0.
|
|
23
|
+
"@mlola-ui/icons": "^1.0.4"
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
26
|
{
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"input"
|
|
24
24
|
],
|
|
25
25
|
"engineDependencies": {
|
|
26
|
-
"@mlola-ui/icons": "^1.0.
|
|
26
|
+
"@mlola-ui/icons": "^1.0.4"
|
|
27
27
|
},
|
|
28
28
|
"files": [
|
|
29
29
|
{
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"path": "packages/components/tag-input/tag-input.tsx",
|
|
37
37
|
"target": "{{aliases.components}}/tag-input.tsx",
|
|
38
38
|
"type": "registry:ui",
|
|
39
|
-
"integrity": "sha256
|
|
39
|
+
"integrity": "sha256-EK7xJTe3Y/S5Kn3vS0zBQg9lC+RVoGvky6HOAt+DnAw="
|
|
40
40
|
}
|
|
41
41
|
],
|
|
42
42
|
"themeContract": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"path": "packages/components/textarea/textarea.tsx",
|
|
32
32
|
"target": "{{aliases.components}}/textarea.tsx",
|
|
33
33
|
"type": "registry:ui",
|
|
34
|
-
"integrity": "sha256-
|
|
34
|
+
"integrity": "sha256-C9jMYZ63w+m6bgdLvHjvULRuoCe26q5zbgS4+ahWzr8="
|
|
35
35
|
}
|
|
36
36
|
],
|
|
37
37
|
"themeContract": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"popover"
|
|
23
23
|
],
|
|
24
24
|
"engineDependencies": {
|
|
25
|
-
"@mlola-ui/icons": "^1.0.
|
|
25
|
+
"@mlola-ui/icons": "^1.0.4"
|
|
26
26
|
},
|
|
27
27
|
"files": [
|
|
28
28
|
{
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"path": "packages/components/time-picker/time-picker.tsx",
|
|
36
36
|
"target": "{{aliases.components}}/time-picker.tsx",
|
|
37
37
|
"type": "registry:ui",
|
|
38
|
-
"integrity": "sha256-
|
|
38
|
+
"integrity": "sha256-og8Cbf+e8oFYewfagUgjRzLHSIIlAZh+1OpAn9yNq70="
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
"path": "packages/components/time-picker/times.ts",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"registryDependencies": [],
|
|
26
26
|
"engineDependencies": {
|
|
27
|
-
"@mlola-ui/icons": "^1.0.
|
|
27
|
+
"@mlola-ui/icons": "^1.0.4"
|
|
28
28
|
},
|
|
29
29
|
"files": [
|
|
30
30
|
{
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"path": "packages/components/timeline/timeline.tsx",
|
|
38
38
|
"target": "{{aliases.components}}/timeline.tsx",
|
|
39
39
|
"type": "registry:ui",
|
|
40
|
-
"integrity": "sha256-
|
|
40
|
+
"integrity": "sha256-nVg7lBcAUAzqEb0YrHagJXSaHE2aWWE9bUbQMWQY6PU="
|
|
41
41
|
}
|
|
42
42
|
],
|
|
43
43
|
"themeContract": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"registryDependencies": [],
|
|
28
28
|
"engineDependencies": {
|
|
29
|
-
"@mlola-ui/icons": "^1.0.
|
|
29
|
+
"@mlola-ui/icons": "^1.0.4"
|
|
30
30
|
},
|
|
31
31
|
"files": [
|
|
32
32
|
{
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"path": "packages/components/toast/toast.tsx",
|
|
40
40
|
"target": "{{aliases.components}}/toast.tsx",
|
|
41
41
|
"type": "registry:ui",
|
|
42
|
-
"integrity": "sha256-
|
|
42
|
+
"integrity": "sha256-FvZnwN6Lk/QEHmcNxo7sVlEvR3Lx54aT5cH9lwrthhE="
|
|
43
43
|
}
|
|
44
44
|
],
|
|
45
45
|
"themeContract": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"path": "packages/components/toggle/toggle.tsx",
|
|
36
36
|
"target": "{{aliases.components}}/toggle.tsx",
|
|
37
37
|
"type": "registry:ui",
|
|
38
|
-
"integrity": "sha256-
|
|
38
|
+
"integrity": "sha256-8qPHeSliHNdzQS7OLJ47BrvRR75MYyUGJlK4s21XS/U="
|
|
39
39
|
}
|
|
40
40
|
],
|
|
41
41
|
"themeContract": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"registryDependencies": [],
|
|
22
22
|
"engineDependencies": {
|
|
23
|
-
"@mlola-ui/icons": "^1.0.
|
|
23
|
+
"@mlola-ui/icons": "^1.0.4"
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
26
|
{
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"path": "packages/components/tour/tour.tsx",
|
|
46
46
|
"target": "{{aliases.components}}/tour.tsx",
|
|
47
47
|
"type": "registry:ui",
|
|
48
|
-
"integrity": "sha256-
|
|
48
|
+
"integrity": "sha256-mrAE8aVDBVIibGvQah9Gh3mzIiWDFxB6aObzqFo5xXU="
|
|
49
49
|
}
|
|
50
50
|
],
|
|
51
51
|
"themeContract": {
|
|
@@ -4,7 +4,7 @@ import * as React from "react";
|
|
|
4
4
|
import { cx } from "../_internal/react";
|
|
5
5
|
import { IconCircleCheck, IconCircleX, IconInfo, IconTriangleAlert, IconX } from "@mlola-ui/icons";
|
|
6
6
|
|
|
7
|
-
/** The meaning of the message, from the theme's
|
|
7
|
+
/** The meaning of the message, from the theme's color roles. */
|
|
8
8
|
export type AlertTone = "neutral" | "info" | "success" | "warning" | "danger";
|
|
9
9
|
/** "card" is a neutral card with a solid icon mark; "soft" tints the whole alert, for banners across a page. */
|
|
10
10
|
export type AlertVariant = "card" | "soft";
|
|
@@ -4,7 +4,7 @@ import * as React from "react";
|
|
|
4
4
|
import { cx } from "../_internal/react";
|
|
5
5
|
import { IconX } from "@mlola-ui/icons";
|
|
6
6
|
|
|
7
|
-
/** The meaning of the
|
|
7
|
+
/** The meaning of the color, from the theme's roles. */
|
|
8
8
|
export type BadgeTone = "neutral" | "primary" | "info" | "success" | "warning" | "danger";
|
|
9
9
|
/** The form: a tint, a solid fill, or an outline. */
|
|
10
10
|
export type BadgeVariant = "soft" | "solid" | "outline";
|
|
@@ -26,7 +26,7 @@ const Badge = React.forwardRef<HTMLSpanElement, BadgeProps>(
|
|
|
26
26
|
type="button"
|
|
27
27
|
onClick={onRemove}
|
|
28
28
|
aria-label={`Remove${typeof children === "string" ? ` ${children}` : " badge"}`}
|
|
29
|
-
className="ml-badge-remove"
|
|
29
|
+
className="ml-badge-remove" data-hit="expand"
|
|
30
30
|
>
|
|
31
31
|
<IconX aria-hidden="true" size="0.75em" />
|
|
32
32
|
</button>
|
|
@@ -16,7 +16,7 @@ const BreadcrumbItem = React.forwardRef<HTMLLIElement, React.LiHTMLAttributes<HT
|
|
|
16
16
|
);
|
|
17
17
|
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
18
18
|
const BreadcrumbLink = React.forwardRef<HTMLAnchorElement, React.AnchorHTMLAttributes<HTMLAnchorElement>>(
|
|
19
|
-
({ className, ...props }, ref) => <a ref={ref} className={cx("ml-breadcrumb-link", className)} {...props} />
|
|
19
|
+
({ className, ...props }, ref) => <a ref={ref} className={cx("ml-breadcrumb-link", className)} data-hit="expand" {...props} />
|
|
20
20
|
);
|
|
21
21
|
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
22
22
|
function BreadcrumbPage({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) {
|
|
@@ -28,7 +28,8 @@ const Checkbox = React.forwardRef<HTMLInputElement, CheckboxProps>(
|
|
|
28
28
|
const state = indeterminate ? "indeterminate" : current ? "checked" : "unchecked";
|
|
29
29
|
return (
|
|
30
30
|
<div className={cx("ml-checkbox-field", className)} data-state={state} data-disabled={disabled ? "" : undefined} data-invalid={error ? "" : undefined}>
|
|
31
|
-
|
|
31
|
+
{/* The box is a label around its input, so a touch near the box (data-hit widens it) still toggles it. */}
|
|
32
|
+
<label className="ml-checkbox-control" data-hit="expand">
|
|
32
33
|
<input
|
|
33
34
|
ref={composeRefs(inputRef, ref)}
|
|
34
35
|
id={inputId}
|
|
@@ -46,7 +47,7 @@ const Checkbox = React.forwardRef<HTMLInputElement, CheckboxProps>(
|
|
|
46
47
|
<span aria-hidden="true" className="ml-checkbox-indicator">
|
|
47
48
|
{indeterminate ? <IconMinus aria-hidden="true" size="0.75em" /> : current ? <IconCheck aria-hidden="true" size="0.75em" /> : null}
|
|
48
49
|
</span>
|
|
49
|
-
</
|
|
50
|
+
</label>
|
|
50
51
|
{label || description || error ? (
|
|
51
52
|
<span className="ml-checkbox-copy">
|
|
52
53
|
{label ? (
|
|
@@ -11,16 +11,16 @@ export type { ColorFormat, RGBA };
|
|
|
11
11
|
export { contrastRatio, formatColor, parseColor } from "./color";
|
|
12
12
|
|
|
13
13
|
export interface ColorPickerProps {
|
|
14
|
-
/** Any
|
|
14
|
+
/** Any color the picker reads: hex, rgb() or oklch(). */
|
|
15
15
|
value?: string;
|
|
16
16
|
defaultValue?: string;
|
|
17
|
-
/** Called with the
|
|
17
|
+
/** Called with the color in `format`. */
|
|
18
18
|
onValueChange?: (value: string) => void;
|
|
19
19
|
/** The format the value comes back in. */
|
|
20
20
|
format?: ColorFormat;
|
|
21
21
|
/** Offer an opacity slider. */
|
|
22
22
|
alpha?: boolean;
|
|
23
|
-
/**
|
|
23
|
+
/** Colors one click away, such as the brand palette. */
|
|
24
24
|
swatches?: string[];
|
|
25
25
|
label?: React.ReactNode;
|
|
26
26
|
hint?: React.ReactNode;
|
|
@@ -83,25 +83,25 @@ function Track({ label, value, max, onChange, background, valueText, className }
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
/**
|
|
86
|
-
* A
|
|
86
|
+
* A color field: a swatch and its value that open a picker with a
|
|
87
87
|
* saturation and brightness area, hue and opacity sliders, a typed value in
|
|
88
88
|
* hex, rgb or oklch, the system eyedropper where the browser has one, preset
|
|
89
|
-
* swatches, and the
|
|
89
|
+
* swatches, and the color's contrast against white and black.
|
|
90
90
|
*/
|
|
91
|
-
export function ColorPicker({ value, defaultValue = "#0a84ff", onValueChange, format = "hex", alpha = false, swatches, label, hint, error, disabled, id, className }: ColorPickerProps) {
|
|
91
|
+
export const ColorPicker = React.forwardRef<HTMLButtonElement, ColorPickerProps>(function ColorPicker({ value, defaultValue = "#0a84ff", onValueChange, format = "hex", alpha = false, swatches, label, hint, error, disabled, id, className }: ColorPickerProps, ref) {
|
|
92
92
|
const autoId = React.useId();
|
|
93
93
|
const fieldId = id ?? autoId;
|
|
94
94
|
const [inner, setInner] = React.useState(defaultValue);
|
|
95
95
|
const current = value ?? inner;
|
|
96
96
|
const rgba = parseColor(current) ?? parseColor(defaultValue) ?? BLACK;
|
|
97
|
-
// HSV is kept locally so hue survives
|
|
97
|
+
// HSV is kept locally so hue survives grays and black, where RGB forgets it.
|
|
98
98
|
const [hsv, setHsv] = React.useState<HSVA>(() => rgbToHsv(rgba));
|
|
99
99
|
const [view, setView] = React.useState<ColorFormat>(format);
|
|
100
100
|
const [draft, setDraft] = React.useState<string | null>(null);
|
|
101
101
|
const [open, setOpen] = React.useState(false);
|
|
102
102
|
const shownHex = formatColor(rgba, "hex");
|
|
103
103
|
|
|
104
|
-
// Follow a value set from outside, unless it is the
|
|
104
|
+
// Follow a value set from outside, unless it is the color already shown.
|
|
105
105
|
React.useEffect(() => {
|
|
106
106
|
if (formatColor(hsvToRgb(hsv), "hex") !== shownHex) setHsv(rgbToHsv(rgba));
|
|
107
107
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -127,13 +127,14 @@ export function ColorPicker({ value, defaultValue = "#0a84ff", onValueChange, fo
|
|
|
127
127
|
|
|
128
128
|
const trigger = (
|
|
129
129
|
<button
|
|
130
|
+
ref={ref}
|
|
130
131
|
id={fieldId}
|
|
131
132
|
type="button"
|
|
132
133
|
className="ml-input ml-color-picker-trigger"
|
|
133
134
|
disabled={disabled}
|
|
134
135
|
aria-invalid={error ? true : undefined}
|
|
135
136
|
aria-describedby={fieldDescription(fieldId, { hint, error })}
|
|
136
|
-
aria-label={`${typeof label === "string" ? label : "
|
|
137
|
+
aria-label={`${typeof label === "string" ? label : "Color"}: ${formatColor(rgba, format)}`}
|
|
137
138
|
>
|
|
138
139
|
<span className="ml-color-picker-swatch" style={{ "--ml-color": formatColor(rgba, "rgb") } as React.CSSProperties} aria-hidden="true" />
|
|
139
140
|
<span className="ml-color-picker-value">{formatColor(rgba, format)}</span>
|
|
@@ -142,7 +143,7 @@ export function ColorPicker({ value, defaultValue = "#0a84ff", onValueChange, fo
|
|
|
142
143
|
|
|
143
144
|
return (
|
|
144
145
|
<Field id={fieldId} label={label} hint={hint} error={error} disabled={disabled} className={cx("ml-color-picker", className)}>
|
|
145
|
-
<Popover trigger={trigger} label={typeof label === "string" ? `Choose ${label.toLowerCase()}` : "Choose a
|
|
146
|
+
<Popover trigger={trigger} label={typeof label === "string" ? `Choose ${label.toLowerCase()}` : "Choose a color"} open={open} onOpenChange={setOpen} className="ml-color-picker-popover">
|
|
146
147
|
<div className="ml-color-picker-panel">
|
|
147
148
|
<div
|
|
148
149
|
className="ml-color-picker-area"
|
|
@@ -191,7 +192,7 @@ export function ColorPicker({ value, defaultValue = "#0a84ff", onValueChange, fo
|
|
|
191
192
|
</button>
|
|
192
193
|
<input
|
|
193
194
|
className="ml-color-picker-text"
|
|
194
|
-
aria-label={`
|
|
195
|
+
aria-label={`Color as ${view}`}
|
|
195
196
|
value={draft ?? formatColor(rgba, view)}
|
|
196
197
|
spellCheck={false}
|
|
197
198
|
onChange={(event) => {
|
|
@@ -208,7 +209,7 @@ export function ColorPicker({ value, defaultValue = "#0a84ff", onValueChange, fo
|
|
|
208
209
|
<button
|
|
209
210
|
type="button"
|
|
210
211
|
className="ml-color-picker-eyedropper"
|
|
211
|
-
aria-label="Pick a
|
|
212
|
+
aria-label="Pick a color from the screen"
|
|
212
213
|
onClick={async () => {
|
|
213
214
|
try {
|
|
214
215
|
const result = await new EyeDropper().open();
|
|
@@ -258,4 +259,5 @@ export function ColorPicker({ value, defaultValue = "#0a84ff", onValueChange, fo
|
|
|
258
259
|
</Popover>
|
|
259
260
|
</Field>
|
|
260
261
|
);
|
|
261
|
-
}
|
|
262
|
+
});
|
|
263
|
+
ColorPicker.displayName = "ColorPicker";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Color conversions for the picker: hex, rgb() and oklch() in and out, HSV
|
|
3
3
|
* for the picking surface, and WCAG contrast. sRGB throughout; OKLCH through
|
|
4
4
|
* OKLab, the space the Mlola engine derives its palettes in.
|
|
5
5
|
*/
|