loseta 0.4.0 → 0.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.
Files changed (47) hide show
  1. package/README.md +12 -4
  2. package/dist/add-policy.d.ts +15 -0
  3. package/dist/add-policy.js +53 -0
  4. package/dist/add-policy.js.map +1 -0
  5. package/dist/commands/add.d.ts +4 -0
  6. package/dist/commands/add.js +24 -20
  7. package/dist/commands/add.js.map +1 -1
  8. package/dist/commands/list.d.ts +6 -1
  9. package/dist/commands/list.js +23 -5
  10. package/dist/commands/list.js.map +1 -1
  11. package/dist/registry.d.ts +2 -0
  12. package/dist/registry.js +6 -0
  13. package/dist/registry.js.map +1 -1
  14. package/dist/style-switch.js +11 -0
  15. package/dist/style-switch.js.map +1 -1
  16. package/package.json +1 -1
  17. package/registry/components/accordion.css +65 -0
  18. package/registry/components/aspect-ratio.css +25 -0
  19. package/registry/components/avatar.css +54 -0
  20. package/registry/components/breadcrumb.css +57 -0
  21. package/registry/components/pagination.css +49 -0
  22. package/registry/components/progress.css +13 -0
  23. package/registry/components/separator.css +12 -0
  24. package/registry/components/spinner.css +8 -0
  25. package/registry/components/toggle-group.css +17 -0
  26. package/registry/components/toggle.css +31 -0
  27. package/registry/examples/accordion.html +56 -0
  28. package/registry/examples/aspect-ratio.html +9 -0
  29. package/registry/examples/avatar.html +21 -0
  30. package/registry/examples/breadcrumb.html +23 -0
  31. package/registry/examples/pagination.html +39 -0
  32. package/registry/examples/progress.html +5 -0
  33. package/registry/examples/separator.html +15 -0
  34. package/registry/examples/spinner.html +12 -0
  35. package/registry/examples/toggle-group.html +13 -0
  36. package/registry/examples/toggle.html +13 -0
  37. package/registry/registry.json +308 -1
  38. package/registry/styles/nova/accordion.css +59 -0
  39. package/registry/styles/nova/aspect-ratio.css +6 -0
  40. package/registry/styles/nova/avatar.css +89 -0
  41. package/registry/styles/nova/breadcrumb.css +61 -0
  42. package/registry/styles/nova/pagination.css +46 -0
  43. package/registry/styles/nova/progress.css +67 -0
  44. package/registry/styles/nova/separator.css +14 -0
  45. package/registry/styles/nova/spinner.css +35 -0
  46. package/registry/styles/nova/toggle-group.css +48 -0
  47. package/registry/styles/nova/toggle.css +110 -0
@@ -0,0 +1,48 @@
1
+ /* Toggle Group */
2
+ @layer loseta.style {
3
+ .toggle-group {
4
+ gap: 0.25rem;
5
+
6
+ &[data-spacing='joined'] {
7
+ gap: 0;
8
+
9
+ > .toggle {
10
+ border-radius: 0;
11
+ }
12
+ }
13
+ }
14
+
15
+ .toggle-group[data-spacing='joined']:not([data-orientation='vertical'])
16
+ > .toggle:not(:first-child) {
17
+ border-inline-start-width: 0;
18
+ }
19
+
20
+ .toggle-group[data-spacing='joined'][data-orientation='vertical']
21
+ > .toggle:not(:first-child) {
22
+ border-block-start-width: 0;
23
+ }
24
+
25
+ .toggle-group[data-spacing='joined']:not([data-orientation='vertical'])
26
+ > .toggle:first-child {
27
+ border-start-start-radius: var(--radius-lg);
28
+ border-end-start-radius: var(--radius-lg);
29
+ }
30
+
31
+ .toggle-group[data-spacing='joined']:not([data-orientation='vertical'])
32
+ > .toggle:last-child {
33
+ border-start-end-radius: var(--radius-lg);
34
+ border-end-end-radius: var(--radius-lg);
35
+ }
36
+
37
+ .toggle-group[data-spacing='joined'][data-orientation='vertical']
38
+ > .toggle:first-child {
39
+ border-start-start-radius: var(--radius-lg);
40
+ border-start-end-radius: var(--radius-lg);
41
+ }
42
+
43
+ .toggle-group[data-spacing='joined'][data-orientation='vertical']
44
+ > .toggle:last-child {
45
+ border-end-start-radius: var(--radius-lg);
46
+ border-end-end-radius: var(--radius-lg);
47
+ }
48
+ }
@@ -0,0 +1,110 @@
1
+ /* Toggle */
2
+ @layer loseta.style {
3
+ .toggle {
4
+ block-size: 2rem;
5
+ min-inline-size: 2rem;
6
+ gap: 0.375rem;
7
+ border-style: solid;
8
+ border-width: 1px;
9
+ border-color: transparent;
10
+ border-radius: var(--radius-lg);
11
+ background-color: transparent;
12
+ padding-inline: 0.5rem;
13
+ color: inherit;
14
+ font-size: var(--text-sm);
15
+ line-height: var(--text-sm--line-height);
16
+ font-weight: 500;
17
+
18
+ > svg {
19
+ width: 1rem;
20
+ height: 1rem;
21
+ }
22
+
23
+ &:hover {
24
+ background-color: var(--muted);
25
+ color: var(--muted-foreground);
26
+ }
27
+
28
+ &[aria-pressed='true'] {
29
+ background-color: var(--accent);
30
+ color: var(--accent-foreground);
31
+ }
32
+
33
+ &[aria-pressed='true']:hover {
34
+ background-color: var(--accent);
35
+ color: var(--accent-foreground);
36
+ }
37
+
38
+ &:focus-visible {
39
+ border-color: var(--ring);
40
+ box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
41
+ }
42
+
43
+ &[aria-invalid='true'] {
44
+ border-color: light-dark(
45
+ var(--destructive),
46
+ color-mix(in oklab, var(--destructive) 50%, transparent)
47
+ );
48
+ box-shadow: 0 0 0 3px light-dark(
49
+ color-mix(in oklab, var(--destructive) 20%, transparent),
50
+ color-mix(in oklab, var(--destructive) 40%, transparent)
51
+ );
52
+ }
53
+
54
+ &[data-size='sm'] {
55
+ block-size: 1.75rem;
56
+ min-inline-size: 1.75rem;
57
+ padding-inline: 0.375rem;
58
+ font-size: var(--text-xs);
59
+ line-height: var(--text-xs--line-height);
60
+ }
61
+
62
+ &[data-size='lg'] {
63
+ block-size: 2.25rem;
64
+ min-inline-size: 2.25rem;
65
+ padding-inline: 0.625rem;
66
+ }
67
+
68
+ &[data-variant='outline'] {
69
+ border-color: light-dark(var(--border), var(--input));
70
+ background-color: light-dark(
71
+ var(--background),
72
+ color-mix(in oklab, var(--input) 30%, transparent)
73
+ );
74
+
75
+ &:hover {
76
+ background-color: var(--accent);
77
+ color: var(--accent-foreground);
78
+ }
79
+ }
80
+ }
81
+
82
+ .toggle:where(.toggle-group[data-size='sm'] > .toggle:not([data-size])) {
83
+ block-size: 1.75rem;
84
+ min-inline-size: 1.75rem;
85
+ padding-inline: 0.375rem;
86
+ font-size: var(--text-xs);
87
+ line-height: var(--text-xs--line-height);
88
+ }
89
+
90
+ .toggle:where(.toggle-group[data-size='lg'] > .toggle:not([data-size])) {
91
+ block-size: 2.25rem;
92
+ min-inline-size: 2.25rem;
93
+ padding-inline: 0.625rem;
94
+ }
95
+
96
+ .toggle:where(.toggle-group[data-variant='outline'] > .toggle:not([data-variant])) {
97
+ border-color: light-dark(var(--border), var(--input));
98
+ background-color: light-dark(
99
+ var(--background),
100
+ color-mix(in oklab, var(--input) 30%, transparent)
101
+ );
102
+ }
103
+
104
+ .toggle:where(
105
+ .toggle-group[data-variant='outline'] > .toggle:not([data-variant])
106
+ ):hover {
107
+ background-color: var(--accent);
108
+ color: var(--accent-foreground);
109
+ }
110
+ }