@poppyui/core 0.1.0 → 0.1.2-next.0c371f0

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 (56) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +225 -166
  3. package/dist/components/accordion.css +1 -1
  4. package/dist/components/button.css +3 -3
  5. package/dist/components/checkbox.css +2 -2
  6. package/dist/components/drawer.css +4 -4
  7. package/dist/components/dropdown.css +3 -3
  8. package/dist/components/input.css +2 -2
  9. package/dist/components/modal.css +6 -6
  10. package/dist/components/progress.css +1 -1
  11. package/dist/components/radio.css +1 -1
  12. package/dist/components/skeleton.css +1 -1
  13. package/dist/components/stat.css +1 -1
  14. package/dist/components/tabs.css +2 -2
  15. package/dist/components/toast.css +2 -2
  16. package/dist/components/toggle.css +1 -1
  17. package/dist/core.css +2 -0
  18. package/dist/poppy.css +32 -30
  19. package/dist/poppy.min.css +1 -1
  20. package/package.json +53 -53
  21. package/src/base/base.css +40 -40
  22. package/src/components/accordion.css +98 -98
  23. package/src/components/alert.css +58 -58
  24. package/src/components/avatar.css +67 -67
  25. package/src/components/badge.css +87 -87
  26. package/src/components/breadcrumbs.css +68 -68
  27. package/src/components/button.css +139 -139
  28. package/src/components/card.css +87 -87
  29. package/src/components/checkbox.css +77 -77
  30. package/src/components/divider.css +46 -46
  31. package/src/components/drawer.css +84 -84
  32. package/src/components/dropdown.css +100 -100
  33. package/src/components/field.css +71 -71
  34. package/src/components/input.css +127 -127
  35. package/src/components/join.css +70 -70
  36. package/src/components/kbd.css +35 -35
  37. package/src/components/loading.css +74 -74
  38. package/src/components/menu.css +147 -147
  39. package/src/components/modal.css +83 -83
  40. package/src/components/navbar.css +54 -54
  41. package/src/components/progress.css +91 -91
  42. package/src/components/radio.css +65 -65
  43. package/src/components/range.css +83 -83
  44. package/src/components/skeleton.css +43 -43
  45. package/src/components/stat.css +54 -54
  46. package/src/components/steps.css +100 -100
  47. package/src/components/table.css +65 -65
  48. package/src/components/tabs.css +125 -125
  49. package/src/components/toast.css +80 -80
  50. package/src/components/toggle.css +76 -76
  51. package/src/components/tooltip.css +59 -59
  52. package/src/core.css +7 -7
  53. package/src/poppy.css +34 -34
  54. package/src/themes/dark.css +33 -31
  55. package/src/themes/light.css +33 -32
  56. package/src/tokens/tokens.css +52 -52
package/src/core.css CHANGED
@@ -1,7 +1,7 @@
1
- /* Tokens, themes and base without components; import this before cherry-picked components. */
2
- @layer poppy.tokens, poppy.base, poppy.components;
3
-
4
- @import "./tokens/tokens.css";
5
- @import "./themes/light.css";
6
- @import "./themes/dark.css";
7
- @import "./base/base.css";
1
+ /* Tokens, themes and base without components; import this before cherry-picked components. */
2
+ @layer poppy.tokens, poppy.base, poppy.components;
3
+
4
+ @import "./tokens/tokens.css";
5
+ @import "./themes/light.css";
6
+ @import "./themes/dark.css";
7
+ @import "./base/base.css";
package/src/poppy.css CHANGED
@@ -1,34 +1,34 @@
1
- /* PoppyUI entry. Every rule sits in a poppy.* layer so unlayered consumer CSS always wins. */
2
- @layer poppy.tokens, poppy.base, poppy.components;
3
-
4
- @import "./core.css";
5
- @import "./components/button.css";
6
- @import "./components/modal.css";
7
- @import "./components/dropdown.css";
8
- @import "./components/alert.css";
9
- @import "./components/avatar.css";
10
- @import "./components/badge.css";
11
- @import "./components/card.css";
12
- @import "./components/divider.css";
13
- @import "./components/kbd.css";
14
- @import "./components/loading.css";
15
- @import "./components/progress.css";
16
- @import "./components/skeleton.css";
17
- @import "./components/stat.css";
18
- @import "./components/table.css";
19
- @import "./components/tooltip.css";
20
- @import "./components/input.css";
21
- @import "./components/checkbox.css";
22
- @import "./components/radio.css";
23
- @import "./components/toggle.css";
24
- @import "./components/range.css";
25
- @import "./components/field.css";
26
- @import "./components/accordion.css";
27
- @import "./components/tabs.css";
28
- @import "./components/breadcrumbs.css";
29
- @import "./components/menu.css";
30
- @import "./components/steps.css";
31
- @import "./components/drawer.css";
32
- @import "./components/join.css";
33
- @import "./components/navbar.css";
34
- @import "./components/toast.css";
1
+ /* PoppyUI entry. Every rule sits in a poppy.* layer so unlayered consumer CSS always wins. */
2
+ @layer poppy.tokens, poppy.base, poppy.components;
3
+
4
+ @import "./core.css";
5
+ @import "./components/button.css";
6
+ @import "./components/modal.css";
7
+ @import "./components/dropdown.css";
8
+ @import "./components/alert.css";
9
+ @import "./components/avatar.css";
10
+ @import "./components/badge.css";
11
+ @import "./components/card.css";
12
+ @import "./components/divider.css";
13
+ @import "./components/kbd.css";
14
+ @import "./components/loading.css";
15
+ @import "./components/progress.css";
16
+ @import "./components/skeleton.css";
17
+ @import "./components/stat.css";
18
+ @import "./components/table.css";
19
+ @import "./components/tooltip.css";
20
+ @import "./components/input.css";
21
+ @import "./components/checkbox.css";
22
+ @import "./components/radio.css";
23
+ @import "./components/toggle.css";
24
+ @import "./components/range.css";
25
+ @import "./components/field.css";
26
+ @import "./components/accordion.css";
27
+ @import "./components/tabs.css";
28
+ @import "./components/breadcrumbs.css";
29
+ @import "./components/menu.css";
30
+ @import "./components/steps.css";
31
+ @import "./components/drawer.css";
32
+ @import "./components/join.css";
33
+ @import "./components/navbar.css";
34
+ @import "./components/toast.css";
@@ -1,31 +1,33 @@
1
- /* Dark theme: applied by [data-theme="dark"] on any ancestor. */
2
- @layer poppy.tokens, poppy.base, poppy.components;
3
-
4
- @layer poppy.tokens {
5
- [data-theme="dark"] {
6
- color-scheme: dark;
7
-
8
- --color-base-100: oklch(21% 0.015 280);
9
- --color-base-200: oklch(25% 0.018 280);
10
- --color-base-300: oklch(31% 0.02 280);
11
- --color-base-content: oklch(94% 0.01 280);
12
- --color-muted: oklch(76% 0.02 280);
13
- --color-border: oklch(40% 0.02 280);
14
-
15
- --color-primary: oklch(76% 0.15 350);
16
- --color-primary-content: oklch(20% 0.04 350);
17
- --color-secondary: oklch(80% 0.09 265);
18
- --color-secondary-content: oklch(20% 0.04 265);
19
- --color-danger: oklch(72% 0.16 27);
20
- --color-danger-content: oklch(20% 0.04 27);
21
- --color-success: oklch(76% 0.14 155);
22
- --color-success-content: oklch(20% 0.04 155);
23
- --color-warning: oklch(83% 0.14 80);
24
- --color-warning-content: oklch(22% 0.04 80);
25
- --color-info: oklch(76% 0.12 240);
26
- --color-info-content: oklch(20% 0.04 240);
27
-
28
- --color-focus: oklch(76% 0.15 350);
29
- --color-backdrop: oklch(5% 0 0 / 0.6);
30
- }
31
- }
1
+ /* Dark theme: applied by [data-theme="dark"] on any ancestor. */
2
+ @layer poppy.tokens, poppy.base, poppy.components;
3
+
4
+ @layer poppy.tokens {
5
+ [data-theme="dark"] {
6
+ color-scheme: dark;
7
+
8
+ --color-base-100: oklch(21% 0.015 280);
9
+ --color-base-200: oklch(25% 0.018 280);
10
+ --color-base-300: oklch(31% 0.02 280);
11
+ --color-base-content: oklch(94% 0.01 280);
12
+ --color-muted: oklch(76% 0.02 280);
13
+ --color-border: oklch(40% 0.02 280);
14
+ /* Translucent so fields sit lifted on any surface (page, card, fieldset). */
15
+ --color-field: oklch(94% 0.01 280 / 0.06);
16
+
17
+ --color-primary: oklch(76% 0.15 350);
18
+ --color-primary-content: oklch(20% 0.04 350);
19
+ --color-secondary: oklch(80% 0.09 265);
20
+ --color-secondary-content: oklch(20% 0.04 265);
21
+ --color-danger: oklch(72% 0.16 27);
22
+ --color-danger-content: oklch(20% 0.04 27);
23
+ --color-success: oklch(76% 0.14 155);
24
+ --color-success-content: oklch(20% 0.04 155);
25
+ --color-warning: oklch(83% 0.14 80);
26
+ --color-warning-content: oklch(22% 0.04 80);
27
+ --color-info: oklch(76% 0.12 240);
28
+ --color-info-content: oklch(20% 0.04 240);
29
+
30
+ --color-focus: oklch(76% 0.15 350);
31
+ --color-backdrop: oklch(5% 0 0 / 0.6);
32
+ }
33
+ }
@@ -1,32 +1,33 @@
1
- /* Light theme: the default, and applied by [data-theme="light"] on any ancestor. */
2
- @layer poppy.tokens, poppy.base, poppy.components;
3
-
4
- @layer poppy.tokens {
5
- :root,
6
- [data-theme="light"] {
7
- color-scheme: light;
8
-
9
- --color-base-100: oklch(100% 0 0);
10
- --color-base-200: oklch(96.5% 0.006 280);
11
- --color-base-300: oklch(91% 0.012 280);
12
- --color-base-content: oklch(24% 0.02 280);
13
- --color-muted: oklch(46% 0.02 280);
14
- --color-border: oklch(84% 0.015 280);
15
-
16
- --color-primary: oklch(52% 0.2 350);
17
- --color-primary-content: oklch(100% 0 0);
18
- --color-secondary: oklch(44% 0.12 265);
19
- --color-secondary-content: oklch(100% 0 0);
20
- --color-danger: oklch(50% 0.19 27);
21
- --color-danger-content: oklch(100% 0 0);
22
- --color-success: oklch(50% 0.13 155);
23
- --color-success-content: oklch(100% 0 0);
24
- --color-warning: oklch(80% 0.15 80);
25
- --color-warning-content: oklch(25% 0.05 80);
26
- --color-info: oklch(52% 0.14 240);
27
- --color-info-content: oklch(100% 0 0);
28
-
29
- --color-focus: oklch(52% 0.2 350);
30
- --color-backdrop: oklch(20% 0.02 280 / 0.45);
31
- }
32
- }
1
+ /* Light theme: the default, and applied by [data-theme="light"] on any ancestor. */
2
+ @layer poppy.tokens, poppy.base, poppy.components;
3
+
4
+ @layer poppy.tokens {
5
+ :root,
6
+ [data-theme="light"] {
7
+ color-scheme: light;
8
+
9
+ --color-base-100: oklch(100% 0 0);
10
+ --color-base-200: oklch(96.5% 0.006 280);
11
+ --color-base-300: oklch(91% 0.012 280);
12
+ --color-base-content: oklch(24% 0.02 280);
13
+ --color-muted: oklch(46% 0.02 280);
14
+ --color-border: oklch(84% 0.015 280);
15
+ --color-field: var(--color-base-100);
16
+
17
+ --color-primary: oklch(52% 0.2 350);
18
+ --color-primary-content: oklch(100% 0 0);
19
+ --color-secondary: oklch(44% 0.12 265);
20
+ --color-secondary-content: oklch(100% 0 0);
21
+ --color-danger: oklch(50% 0.19 27);
22
+ --color-danger-content: oklch(100% 0 0);
23
+ --color-success: oklch(50% 0.13 155);
24
+ --color-success-content: oklch(100% 0 0);
25
+ --color-warning: oklch(80% 0.15 80);
26
+ --color-warning-content: oklch(25% 0.05 80);
27
+ --color-info: oklch(52% 0.14 240);
28
+ --color-info-content: oklch(100% 0 0);
29
+
30
+ --color-focus: oklch(52% 0.2 350);
31
+ --color-backdrop: oklch(20% 0.02 280 / 0.45);
32
+ }
33
+ }
@@ -1,52 +1,52 @@
1
- /* Theme-independent design tokens. Colors live in src/themes/. */
2
- @layer poppy.tokens, poppy.base, poppy.components;
3
-
4
- @layer poppy.tokens {
5
- :root {
6
- /* Radius */
7
- --radius-sm: 0.25rem;
8
- --radius-md: 0.5rem;
9
- --radius-lg: 1rem;
10
- --radius-full: 9999px;
11
-
12
- /* Spacing */
13
- --space-1: 0.25rem;
14
- --space-2: 0.5rem;
15
- --space-3: 0.75rem;
16
- --space-4: 1rem;
17
- --space-6: 1.5rem;
18
- --space-8: 2rem;
19
-
20
- /* Type */
21
- /* Poppins is not bundled: load it yourself (see README). Falls back to the system UI font. */
22
- --font-sans: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
23
- --font-mono: ui-monospace, "Cascadia Code", Menlo, monospace;
24
- --text-sm: 0.875rem;
25
- --text-md: 1rem;
26
- --text-lg: 1.125rem;
27
- --text-xl: 1.25rem;
28
- --leading: 1.5;
29
- --weight-medium: 500;
30
- --weight-semibold: 600;
31
-
32
- /* Motion */
33
- --duration-fast: 120ms;
34
- --duration-normal: 200ms;
35
- --ease-out: cubic-bezier(0.2, 0, 0, 1);
36
-
37
- /* Elevation */
38
- --shadow-md: 0 4px 12px oklch(0% 0 0 / 0.12);
39
- --shadow-lg: 0 16px 48px oklch(0% 0 0 / 0.24);
40
-
41
- /* Focus ring */
42
- --focus-width: 2px;
43
- --focus-offset: 2px;
44
- }
45
-
46
- @media (prefers-reduced-motion: reduce) {
47
- :root {
48
- --duration-fast: 0ms;
49
- --duration-normal: 0ms;
50
- }
51
- }
52
- }
1
+ /* Theme-independent design tokens. Colors live in src/themes/. */
2
+ @layer poppy.tokens, poppy.base, poppy.components;
3
+
4
+ @layer poppy.tokens {
5
+ :root {
6
+ /* Radius */
7
+ --radius-sm: 0.25rem;
8
+ --radius-md: 0.5rem;
9
+ --radius-lg: 1rem;
10
+ --radius-full: 9999px;
11
+
12
+ /* Spacing */
13
+ --space-1: 0.25rem;
14
+ --space-2: 0.5rem;
15
+ --space-3: 0.75rem;
16
+ --space-4: 1rem;
17
+ --space-6: 1.5rem;
18
+ --space-8: 2rem;
19
+
20
+ /* Type */
21
+ /* Poppins is not bundled: load it yourself (see README). Falls back to the system UI font. */
22
+ --font-sans: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
23
+ --font-mono: ui-monospace, "Cascadia Code", Menlo, monospace;
24
+ --text-sm: 0.875rem;
25
+ --text-md: 1rem;
26
+ --text-lg: 1.125rem;
27
+ --text-xl: 1.25rem;
28
+ --leading: 1.5;
29
+ --weight-medium: 500;
30
+ --weight-semibold: 600;
31
+
32
+ /* Motion */
33
+ --duration-fast: 120ms;
34
+ --duration-normal: 200ms;
35
+ --ease-out: cubic-bezier(0.2, 0, 0, 1);
36
+
37
+ /* Elevation */
38
+ --shadow-md: 0 4px 12px oklch(0% 0 0 / 0.12);
39
+ --shadow-lg: 0 16px 48px oklch(0% 0 0 / 0.24);
40
+
41
+ /* Focus ring */
42
+ --focus-width: 2px;
43
+ --focus-offset: 2px;
44
+ }
45
+
46
+ @media (prefers-reduced-motion: reduce) {
47
+ :root {
48
+ --duration-fast: 0ms;
49
+ --duration-normal: 0ms;
50
+ }
51
+ }
52
+ }