loseta 0.13.0 → 0.14.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.
Files changed (60) hide show
  1. package/package.json +1 -1
  2. package/registry/examples/sidebar.html +1 -1
  3. package/registry/registry.json +345 -9
  4. package/registry/styles/luma/calendar.css +78 -0
  5. package/registry/styles/luma/carousel.css +63 -0
  6. package/registry/styles/luma/chart.css +51 -0
  7. package/registry/styles/luma/combobox.css +59 -0
  8. package/registry/styles/luma/command.css +21 -0
  9. package/registry/styles/luma/primitives/listbox.css +71 -0
  10. package/registry/styles/luma/resizable.css +34 -0
  11. package/registry/styles/luma/select.css +75 -0
  12. package/registry/styles/lyra/calendar.css +78 -0
  13. package/registry/styles/lyra/carousel.css +63 -0
  14. package/registry/styles/lyra/chart.css +51 -0
  15. package/registry/styles/lyra/combobox.css +59 -0
  16. package/registry/styles/lyra/command.css +21 -0
  17. package/registry/styles/lyra/primitives/listbox.css +71 -0
  18. package/registry/styles/lyra/resizable.css +34 -0
  19. package/registry/styles/lyra/select.css +75 -0
  20. package/registry/styles/maia/calendar.css +78 -0
  21. package/registry/styles/maia/carousel.css +63 -0
  22. package/registry/styles/maia/chart.css +51 -0
  23. package/registry/styles/maia/combobox.css +59 -0
  24. package/registry/styles/maia/command.css +21 -0
  25. package/registry/styles/maia/primitives/listbox.css +71 -0
  26. package/registry/styles/maia/resizable.css +34 -0
  27. package/registry/styles/maia/select.css +75 -0
  28. package/registry/styles/mira/calendar.css +78 -0
  29. package/registry/styles/mira/carousel.css +63 -0
  30. package/registry/styles/mira/chart.css +51 -0
  31. package/registry/styles/mira/combobox.css +59 -0
  32. package/registry/styles/mira/command.css +21 -0
  33. package/registry/styles/mira/primitives/listbox.css +71 -0
  34. package/registry/styles/mira/resizable.css +34 -0
  35. package/registry/styles/mira/select.css +75 -0
  36. package/registry/styles/nova/select.css +4 -0
  37. package/registry/styles/rhea/calendar.css +78 -0
  38. package/registry/styles/rhea/carousel.css +63 -0
  39. package/registry/styles/rhea/chart.css +51 -0
  40. package/registry/styles/rhea/combobox.css +59 -0
  41. package/registry/styles/rhea/command.css +21 -0
  42. package/registry/styles/rhea/primitives/listbox.css +71 -0
  43. package/registry/styles/rhea/resizable.css +34 -0
  44. package/registry/styles/rhea/select.css +75 -0
  45. package/registry/styles/sera/calendar.css +82 -0
  46. package/registry/styles/sera/carousel.css +63 -0
  47. package/registry/styles/sera/chart.css +51 -0
  48. package/registry/styles/sera/combobox.css +60 -0
  49. package/registry/styles/sera/command.css +21 -0
  50. package/registry/styles/sera/primitives/listbox.css +71 -0
  51. package/registry/styles/sera/resizable.css +34 -0
  52. package/registry/styles/sera/select.css +76 -0
  53. package/registry/styles/vega/calendar.css +78 -0
  54. package/registry/styles/vega/carousel.css +63 -0
  55. package/registry/styles/vega/chart.css +51 -0
  56. package/registry/styles/vega/combobox.css +59 -0
  57. package/registry/styles/vega/command.css +21 -0
  58. package/registry/styles/vega/primitives/listbox.css +71 -0
  59. package/registry/styles/vega/resizable.css +34 -0
  60. package/registry/styles/vega/select.css +75 -0
@@ -0,0 +1,59 @@
1
+ /* Combobox */
2
+ @layer loseta.style {
3
+ .combobox {
4
+ > input {
5
+ height: 2.25rem;
6
+ border-style: solid;
7
+ border-width: 1px;
8
+ border-color: var(--input);
9
+ border-radius: var(--radius-3xl);
10
+ background-color: light-dark(
11
+ transparent,
12
+ color-mix(in oklab, var(--input) 30%, transparent)
13
+ );
14
+ padding-inline: 0.75rem;
15
+ font-size: var(--text-base);
16
+ line-height: 1.5;
17
+ transition-property: color, background-color, border-color, box-shadow;
18
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
19
+ transition-duration: 150ms;
20
+
21
+ &:focus-visible {
22
+ border-color: var(--ring);
23
+ box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
24
+ }
25
+
26
+ &[aria-invalid='true'] {
27
+ border-color: light-dark(
28
+ var(--destructive),
29
+ color-mix(in oklab, var(--destructive) 50%, transparent)
30
+ );
31
+ box-shadow: 0 0 0 3px light-dark(
32
+ color-mix(in oklab, var(--destructive) 20%, transparent),
33
+ color-mix(in oklab, var(--destructive) 40%, transparent)
34
+ );
35
+ }
36
+
37
+ @media (width >= 48rem) {
38
+ font-size: var(--text-sm);
39
+ line-height: var(--text-sm--line-height);
40
+ }
41
+ }
42
+
43
+ &:has(> [data-slot='clear']) > input {
44
+ padding-inline-end: 2rem;
45
+ }
46
+
47
+ > [data-slot='clear'] {
48
+ width: 1.75rem;
49
+ height: 1.75rem;
50
+ border-radius: var(--radius-full);
51
+ color: var(--muted-foreground);
52
+
53
+ &:hover {
54
+ background-color: var(--muted);
55
+ color: var(--foreground);
56
+ }
57
+ }
58
+ }
59
+ }
@@ -0,0 +1,21 @@
1
+ /* Command */
2
+ @layer loseta.style {
3
+ .command {
4
+ gap: 0.625rem;
5
+
6
+ [data-slot='shortcut'] {
7
+ font-size: var(--text-xs);
8
+ line-height: var(--text-xs--line-height);
9
+ letter-spacing: 0.1em;
10
+ color: var(--muted-foreground);
11
+ }
12
+
13
+ [role='listbox'] [role='option'] {
14
+ padding-inline-end: 0.75rem;
15
+ }
16
+
17
+ [role='listbox'] [role='option']:is(:hover, [data-highlighted]) [data-slot='shortcut'] {
18
+ color: var(--accent-foreground);
19
+ }
20
+ }
21
+ }
@@ -0,0 +1,71 @@
1
+ /* Listbox primitive */
2
+ @layer loseta.style {
3
+ [data-popover]:has(> [role='listbox']) {
4
+ gap: 0;
5
+ width: 100%;
6
+ overflow-x: hidden;
7
+ overflow-y: auto;
8
+ border-radius: var(--radius-3xl);
9
+ background-color: var(--popover);
10
+ padding: 0.375rem;
11
+ color: var(--popover-foreground);
12
+ box-shadow: 0 0 0 1px color-mix(in oklab, var(--foreground) 10%, transparent), var(--shadow-lg);
13
+ transition-duration: 100ms;
14
+ }
15
+
16
+ [role='listbox'] {
17
+ & [role='option'] {
18
+ gap: 0.625rem;
19
+ border-radius: var(--radius-2xl);
20
+ padding-inline: 0.75rem;
21
+ padding-inline-end: 2rem;
22
+ padding-block: 0.5rem;
23
+ font-size: var(--text-sm);
24
+ line-height: var(--text-sm--line-height);
25
+
26
+ & svg {
27
+ width: 1rem;
28
+ height: 1rem;
29
+ }
30
+
31
+ &[aria-selected='true'] {
32
+ font-weight: 500;
33
+ }
34
+
35
+ &:hover:not([aria-disabled='true']):not(:disabled),
36
+ &[data-highlighted] {
37
+ background-color: var(--accent);
38
+ color: var(--accent-foreground);
39
+ }
40
+
41
+ &[aria-disabled='true'] {
42
+ color: var(--muted-foreground);
43
+ }
44
+ }
45
+
46
+ & [data-slot='indicator'] {
47
+ position: absolute;
48
+ inset-inline-end: 0.75rem;
49
+ display: flex;
50
+ align-items: center;
51
+ justify-content: center;
52
+ }
53
+
54
+ & [data-slot='label'] {
55
+ padding-inline: 0.75rem;
56
+ padding-block: 0.5rem;
57
+ font-size: var(--text-xs);
58
+ line-height: var(--text-xs--line-height);
59
+ font-weight: 500;
60
+ color: var(--muted-foreground);
61
+ }
62
+
63
+ & [data-slot='empty'] {
64
+ padding-inline: 0.75rem;
65
+ padding-block: 0.75rem;
66
+ font-size: var(--text-sm);
67
+ line-height: var(--text-sm--line-height);
68
+ color: var(--muted-foreground);
69
+ }
70
+ }
71
+ }
@@ -0,0 +1,34 @@
1
+ /* Resizable */
2
+ @layer loseta.style {
3
+ .resizable {
4
+ border-style: solid;
5
+ border-width: 1px;
6
+ border-color: var(--border);
7
+ border-radius: var(--radius-4xl);
8
+ background-color: var(--background);
9
+
10
+ > .resizable-panel {
11
+ padding: 1.25rem;
12
+ font-size: var(--text-sm);
13
+ line-height: var(--text-sm--line-height);
14
+ }
15
+
16
+ > [data-slot='handle'] {
17
+ flex-basis: 0.75rem;
18
+ background-color: var(--background);
19
+
20
+ &::before {
21
+ background-color: var(--border);
22
+ }
23
+
24
+ &:hover::before,
25
+ &:focus-visible::before {
26
+ background-color: var(--ring);
27
+ }
28
+
29
+ &:focus-visible {
30
+ box-shadow: inset 0 0 0 1px var(--ring);
31
+ }
32
+ }
33
+ }
34
+ }
@@ -0,0 +1,75 @@
1
+ /* Select */
2
+ @layer loseta.style {
3
+ .select {
4
+ > button {
5
+ height: 2.25rem;
6
+ border-style: solid;
7
+ border-width: 1px;
8
+ border-color: var(--input);
9
+ border-radius: var(--radius-3xl);
10
+ background-color: light-dark(
11
+ transparent,
12
+ color-mix(in oklab, var(--input) 30%, transparent)
13
+ );
14
+ padding-inline: 0.75rem;
15
+ font-size: var(--text-sm);
16
+ line-height: var(--text-sm--line-height);
17
+ font-weight: 400;
18
+ text-align: start;
19
+ transition-property: color, background-color, border-color, box-shadow;
20
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
21
+ transition-duration: 150ms;
22
+
23
+ &:hover {
24
+ background-color: light-dark(
25
+ var(--muted),
26
+ color-mix(in oklab, var(--input) 50%, transparent)
27
+ );
28
+ }
29
+
30
+ &:focus-visible {
31
+ border-color: var(--ring);
32
+ box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
33
+ }
34
+
35
+ &[aria-invalid='true'] {
36
+ border-color: light-dark(
37
+ var(--destructive),
38
+ color-mix(in oklab, var(--destructive) 50%, transparent)
39
+ );
40
+ box-shadow: 0 0 0 3px light-dark(
41
+ color-mix(in oklab, var(--destructive) 20%, transparent),
42
+ color-mix(in oklab, var(--destructive) 40%, transparent)
43
+ );
44
+ }
45
+
46
+ > svg {
47
+ width: 1rem;
48
+ height: 1rem;
49
+ color: var(--muted-foreground);
50
+ }
51
+ }
52
+
53
+ &[data-size='sm'] > button {
54
+ height: 2rem;
55
+ font-size: var(--text-xs);
56
+ line-height: var(--text-xs--line-height);
57
+ }
58
+
59
+ [data-slot='value'] {
60
+ flex: 1 1 auto;
61
+ overflow: hidden;
62
+ text-align: start;
63
+ text-overflow: ellipsis;
64
+ white-space: nowrap;
65
+ }
66
+
67
+ [data-slot='value'][data-placeholder] {
68
+ color: var(--muted-foreground);
69
+ }
70
+
71
+ &:is(:hover, :focus-visible, [aria-expanded='true']) [data-slot='value'][data-placeholder] {
72
+ color: var(--foreground);
73
+ }
74
+ }
75
+ }
@@ -0,0 +1,78 @@
1
+ /* Calendar */
2
+ @layer loseta.style {
3
+ .calendar {
4
+ width: 18rem;
5
+ gap: 0.375rem;
6
+
7
+ > header {
8
+ gap: 0.375rem;
9
+ }
10
+
11
+ > header > button {
12
+ width: 1.75rem;
13
+ height: 1.75rem;
14
+ border-radius: 0;
15
+ color: var(--muted-foreground);
16
+
17
+ &:hover {
18
+ background-color: var(--muted);
19
+ color: var(--foreground);
20
+ }
21
+
22
+ &:focus-visible {
23
+ box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
24
+ }
25
+
26
+ > svg {
27
+ width: 1rem;
28
+ height: 1rem;
29
+ }
30
+ }
31
+
32
+ [data-slot='title'] {
33
+ font-size: var(--text-sm);
34
+ line-height: var(--text-sm--line-height);
35
+ font-weight: 500;
36
+ }
37
+
38
+ th {
39
+ padding-block: 0.25rem;
40
+ font-size: var(--text-xs);
41
+ line-height: var(--text-xs--line-height);
42
+ color: var(--muted-foreground);
43
+ }
44
+
45
+ td > button {
46
+ width: 2rem;
47
+ height: 2rem;
48
+ border-radius: 0;
49
+ font-size: var(--text-xs);
50
+ line-height: var(--text-xs--line-height);
51
+ transition-property: color, background-color, box-shadow;
52
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
53
+ transition-duration: 150ms;
54
+
55
+ &:hover {
56
+ background-color: var(--muted);
57
+ }
58
+
59
+ &:focus-visible {
60
+ box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
61
+ }
62
+
63
+ &[aria-disabled='true'] {
64
+ opacity: 50%;
65
+ color: var(--muted-foreground);
66
+ }
67
+ }
68
+
69
+ td[aria-selected='true'] > button {
70
+ background-color: var(--primary);
71
+ color: var(--primary-foreground);
72
+ }
73
+
74
+ td > button[aria-current='date'] {
75
+ box-shadow: inset 0 0 0 1px var(--ring);
76
+ }
77
+ }
78
+ }
@@ -0,0 +1,63 @@
1
+ /* Carousel */
2
+ @layer loseta.style {
3
+ .carousel {
4
+ gap: 0.5rem;
5
+
6
+ .carousel-viewport {
7
+ border-radius: 0;
8
+ }
9
+
10
+ .carousel-button {
11
+ width: 2rem;
12
+ height: 2rem;
13
+ border-style: solid;
14
+ border-width: 1px;
15
+ border-color: var(--border);
16
+ border-radius: 0;
17
+ color: var(--muted-foreground);
18
+ transition-property: color, background-color, border-color, box-shadow;
19
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
20
+ transition-duration: 150ms;
21
+
22
+ &:hover {
23
+ background-color: var(--muted);
24
+ color: var(--foreground);
25
+ }
26
+
27
+ &:focus-visible {
28
+ border-color: var(--ring);
29
+ box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
30
+ }
31
+
32
+ > svg {
33
+ width: 1rem;
34
+ height: 1rem;
35
+ }
36
+ }
37
+
38
+ .carousel-indicator {
39
+ color: var(--muted-foreground);
40
+ transition-property: color;
41
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
42
+ transition-duration: 150ms;
43
+
44
+ &::before {
45
+ width: 0.5rem;
46
+ height: 0.5rem;
47
+ border-radius: 0;
48
+ }
49
+
50
+ &:hover {
51
+ color: var(--foreground);
52
+ }
53
+
54
+ &:focus-visible {
55
+ box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
56
+ }
57
+
58
+ &[aria-current='true'] {
59
+ color: var(--primary);
60
+ }
61
+ }
62
+ }
63
+ }
@@ -0,0 +1,51 @@
1
+ /* Chart */
2
+ @layer loseta.style {
3
+ .chart {
4
+ gap: 0.5rem;
5
+
6
+ > [data-slot='plot'] {
7
+ aspect-ratio: 16 / 9;
8
+ }
9
+
10
+ > [data-slot='legend'] {
11
+ gap: 0.5rem;
12
+ font-size: var(--text-xs);
13
+ line-height: var(--text-xs--line-height);
14
+ color: var(--muted-foreground);
15
+ }
16
+
17
+ [data-slot='legend-item'] {
18
+ color: var(--muted-foreground);
19
+ }
20
+
21
+ [data-slot='swatch'] {
22
+ width: 0.5rem;
23
+ height: 0.5rem;
24
+ border-radius: 0;
25
+ }
26
+
27
+ [data-slot='tooltip'] {
28
+ display: flex;
29
+ flex-direction: column;
30
+ gap: 0.125rem;
31
+ border-style: solid;
32
+ border-width: 1px;
33
+ border-color: var(--border);
34
+ border-radius: 0;
35
+ background-color: var(--popover);
36
+ padding: 0.375rem 0.5rem;
37
+ color: var(--popover-foreground);
38
+ box-shadow: var(--shadow-md);
39
+ font-size: var(--text-xs);
40
+ line-height: var(--text-xs--line-height);
41
+
42
+ [data-slot='title'] {
43
+ font-weight: 500;
44
+ }
45
+
46
+ [data-slot='description'] {
47
+ color: var(--muted-foreground);
48
+ }
49
+ }
50
+ }
51
+ }
@@ -0,0 +1,59 @@
1
+ /* Combobox */
2
+ @layer loseta.style {
3
+ .combobox {
4
+ > input {
5
+ height: 2rem;
6
+ border-style: solid;
7
+ border-width: 1px;
8
+ border-color: var(--input);
9
+ border-radius: 0;
10
+ background-color: light-dark(
11
+ transparent,
12
+ color-mix(in oklab, var(--input) 30%, transparent)
13
+ );
14
+ padding-inline: 0.625rem;
15
+ font-size: var(--text-xs);
16
+ line-height: 1.5;
17
+ transition-property: color, background-color, border-color, box-shadow;
18
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
19
+ transition-duration: 150ms;
20
+
21
+ &:focus-visible {
22
+ border-color: var(--ring);
23
+ box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
24
+ }
25
+
26
+ &[aria-invalid='true'] {
27
+ border-color: light-dark(
28
+ var(--destructive),
29
+ color-mix(in oklab, var(--destructive) 50%, transparent)
30
+ );
31
+ box-shadow: 0 0 0 3px light-dark(
32
+ color-mix(in oklab, var(--destructive) 20%, transparent),
33
+ color-mix(in oklab, var(--destructive) 40%, transparent)
34
+ );
35
+ }
36
+
37
+ @media (width >= 48rem) {
38
+ font-size: var(--text-xs);
39
+ line-height: var(--text-xs--line-height);
40
+ }
41
+ }
42
+
43
+ &:has(> [data-slot='clear']) > input {
44
+ padding-inline-end: 2rem;
45
+ }
46
+
47
+ > [data-slot='clear'] {
48
+ width: 1.5rem;
49
+ height: 1.5rem;
50
+ border-radius: 0;
51
+ color: var(--muted-foreground);
52
+
53
+ &:hover {
54
+ background-color: var(--muted);
55
+ color: var(--foreground);
56
+ }
57
+ }
58
+ }
59
+ }
@@ -0,0 +1,21 @@
1
+ /* Command */
2
+ @layer loseta.style {
3
+ .command {
4
+ gap: 0.375rem;
5
+
6
+ [data-slot='shortcut'] {
7
+ font-size: var(--text-xs);
8
+ line-height: var(--text-xs--line-height);
9
+ letter-spacing: 0.05em;
10
+ color: var(--muted-foreground);
11
+ }
12
+
13
+ [role='listbox'] [role='option'] {
14
+ padding-inline-end: 0.5rem;
15
+ }
16
+
17
+ [role='listbox'] [role='option']:is(:hover, [data-highlighted]) [data-slot='shortcut'] {
18
+ color: var(--accent-foreground);
19
+ }
20
+ }
21
+ }
@@ -0,0 +1,71 @@
1
+ /* Listbox primitive */
2
+ @layer loseta.style {
3
+ [data-popover]:has(> [role='listbox']) {
4
+ gap: 0;
5
+ width: 100%;
6
+ overflow-x: hidden;
7
+ overflow-y: auto;
8
+ border-radius: 0;
9
+ background-color: var(--popover);
10
+ padding: 0.25rem;
11
+ color: var(--popover-foreground);
12
+ box-shadow: 0 0 0 1px color-mix(in oklab, var(--foreground) 10%, transparent), var(--shadow-md);
13
+ transition-duration: 100ms;
14
+ }
15
+
16
+ [role='listbox'] {
17
+ & [role='option'] {
18
+ gap: 0.5rem;
19
+ border-radius: 0;
20
+ padding-inline: 0.5rem;
21
+ padding-inline-end: 1.5rem;
22
+ padding-block: 0.5rem;
23
+ font-size: var(--text-xs);
24
+ line-height: var(--text-xs--line-height);
25
+
26
+ & svg {
27
+ width: 1rem;
28
+ height: 1rem;
29
+ }
30
+
31
+ &[aria-selected='true'] {
32
+ font-weight: 500;
33
+ }
34
+
35
+ &:hover:not([aria-disabled='true']):not(:disabled),
36
+ &[data-highlighted] {
37
+ background-color: var(--accent);
38
+ color: var(--accent-foreground);
39
+ }
40
+
41
+ &[aria-disabled='true'] {
42
+ color: var(--muted-foreground);
43
+ }
44
+ }
45
+
46
+ & [data-slot='indicator'] {
47
+ position: absolute;
48
+ inset-inline-end: 0.5rem;
49
+ display: flex;
50
+ align-items: center;
51
+ justify-content: center;
52
+ }
53
+
54
+ & [data-slot='label'] {
55
+ padding-inline: 0.5rem;
56
+ padding-block: 0.25rem;
57
+ font-size: var(--text-xs);
58
+ line-height: var(--text-xs--line-height);
59
+ font-weight: 500;
60
+ color: var(--muted-foreground);
61
+ }
62
+
63
+ & [data-slot='empty'] {
64
+ padding-inline: 0.5rem;
65
+ padding-block: 0.5rem;
66
+ font-size: var(--text-xs);
67
+ line-height: var(--text-xs--line-height);
68
+ color: var(--muted-foreground);
69
+ }
70
+ }
71
+ }
@@ -0,0 +1,34 @@
1
+ /* Resizable */
2
+ @layer loseta.style {
3
+ .resizable {
4
+ border-style: solid;
5
+ border-width: 1px;
6
+ border-color: var(--border);
7
+ border-radius: 0;
8
+ background-color: var(--background);
9
+
10
+ > .resizable-panel {
11
+ padding: 0.75rem;
12
+ font-size: var(--text-xs);
13
+ line-height: var(--text-xs--line-height);
14
+ }
15
+
16
+ > [data-slot='handle'] {
17
+ flex-basis: 0.375rem;
18
+ background-color: var(--background);
19
+
20
+ &::before {
21
+ background-color: var(--border);
22
+ }
23
+
24
+ &:hover::before,
25
+ &:focus-visible::before {
26
+ background-color: var(--ring);
27
+ }
28
+
29
+ &:focus-visible {
30
+ box-shadow: inset 0 0 0 1px var(--ring);
31
+ }
32
+ }
33
+ }
34
+ }