@stackific/md3 0.1.0 → 0.1.2

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 (113) hide show
  1. package/README.md +1 -43
  2. package/dist/md3.css +1 -1
  3. package/dist/md3.js +1 -621
  4. package/package.json +2 -5
  5. package/src/main.js +0 -5
  6. package/src/runtime/elements/dialogs.js +0 -72
  7. package/src/runtime/elements/fields.js +0 -181
  8. package/src/runtime/elements/menus.js +0 -42
  9. package/src/runtime/elements/pages.js +0 -7
  10. package/src/runtime/elements/progress.js +0 -35
  11. package/src/runtime/elements/sliders.js +0 -78
  12. package/src/runtime/elements/snackbars.js +0 -27
  13. package/src/runtime/helpers/ripples.js +0 -46
  14. package/src/runtime/md3.js +0 -141
  15. package/src/runtime/palette.js +0 -64
  16. package/src/runtime/settings/theme.js +0 -194
  17. package/src/runtime/utils.js +0 -165
  18. package/src/styles/_config.scss +0 -142
  19. package/src/styles/_mixins.scss +0 -80
  20. package/src/styles/elements/_badges.scss +0 -65
  21. package/src/styles/elements/_bars.scss +0 -83
  22. package/src/styles/elements/_buttons.scss +0 -119
  23. package/src/styles/elements/_cards.scss +0 -32
  24. package/src/styles/elements/_chips.scss +0 -46
  25. package/src/styles/elements/_dialogs.scss +0 -143
  26. package/src/styles/elements/_dividers.scss +0 -46
  27. package/src/styles/elements/_expansions.scss +0 -19
  28. package/src/styles/elements/_fields.scss +0 -458
  29. package/src/styles/elements/_grids.scss +0 -35
  30. package/src/styles/elements/_icons.scss +0 -70
  31. package/src/styles/elements/_layouts.scss +0 -24
  32. package/src/styles/elements/_lists.scss +0 -76
  33. package/src/styles/elements/_main-layouts.scss +0 -45
  34. package/src/styles/elements/_media.scss +0 -104
  35. package/src/styles/elements/_menus.scss +0 -289
  36. package/src/styles/elements/_navigations.scss +0 -450
  37. package/src/styles/elements/_overlays.scss +0 -34
  38. package/src/styles/elements/_pages.scss +0 -28
  39. package/src/styles/elements/_progress.scss +0 -141
  40. package/src/styles/elements/_selections.scss +0 -248
  41. package/src/styles/elements/_shapes.scss +0 -151
  42. package/src/styles/elements/_sliders.scss +0 -336
  43. package/src/styles/elements/_snackbars.scss +0 -44
  44. package/src/styles/elements/_tables.scss +0 -67
  45. package/src/styles/elements/_tabs.scss +0 -49
  46. package/src/styles/elements/_tooltips.scss +0 -125
  47. package/src/styles/helpers/_alignments.scss +0 -29
  48. package/src/styles/helpers/_blurs.scss +0 -26
  49. package/src/styles/helpers/_colors.scss +0 -39
  50. package/src/styles/helpers/_directions.scss +0 -30
  51. package/src/styles/helpers/_elevates.scss +0 -20
  52. package/src/styles/helpers/_forms.scss +0 -76
  53. package/src/styles/helpers/_margins.scss +0 -39
  54. package/src/styles/helpers/_opacities.scss +0 -18
  55. package/src/styles/helpers/_paddings.scss +0 -35
  56. package/src/styles/helpers/_positions.scss +0 -44
  57. package/src/styles/helpers/_responsive.scss +0 -24
  58. package/src/styles/helpers/_ripples.scss +0 -40
  59. package/src/styles/helpers/_scrolls.scss +0 -7
  60. package/src/styles/helpers/_shadows.scss +0 -22
  61. package/src/styles/helpers/_sizes.scss +0 -34
  62. package/src/styles/helpers/_spaces.scss +0 -22
  63. package/src/styles/helpers/_typography.scss +0 -132
  64. package/src/styles/helpers/_waves.scss +0 -52
  65. package/src/styles/helpers/_zoom.scss +0 -18
  66. package/src/styles/md3.scss +0 -61
  67. package/src/styles/settings/_fonts.scss +0 -42
  68. package/src/styles/settings/_globals.scss +0 -104
  69. package/src/styles/settings/_reset.scss +0 -82
  70. package/src/styles/settings/_theme.scss +0 -126
  71. package/src/styles/settings/_themes.scss +0 -1525
  72. /package/dist/{shapes → assets}/arch.svg +0 -0
  73. /package/dist/{shapes → assets}/arrow.svg +0 -0
  74. /package/dist/{shapes → assets}/boom.svg +0 -0
  75. /package/dist/{shapes → assets}/bun.svg +0 -0
  76. /package/dist/{shapes → assets}/burst.svg +0 -0
  77. /package/dist/{shapes → assets}/circle.svg +0 -0
  78. /package/dist/{shapes → assets}/clamshell.svg +0 -0
  79. /package/dist/{shapes → assets}/diamond.svg +0 -0
  80. /package/dist/{shapes → assets}/fan.svg +0 -0
  81. /package/dist/{shapes → assets}/flower.svg +0 -0
  82. /package/dist/{shapes → assets}/gem.svg +0 -0
  83. /package/dist/{shapes → assets}/ghost-ish.svg +0 -0
  84. /package/dist/{shapes → assets}/heart.svg +0 -0
  85. /package/dist/{shapes → assets}/leaf-clover4.svg +0 -0
  86. /package/dist/{shapes → assets}/leaf-clover8.svg +0 -0
  87. /package/dist/{shapes → assets}/loading-indicator.svg +0 -0
  88. /package/dist/{fonts → assets}/material-symbols-outlined.woff2 +0 -0
  89. /package/dist/{fonts → assets}/material-symbols-rounded.woff2 +0 -0
  90. /package/dist/{fonts → assets}/material-symbols-sharp.woff2 +0 -0
  91. /package/dist/{fonts → assets}/material-symbols-subset.woff2 +0 -0
  92. /package/dist/{shapes → assets}/oval.svg +0 -0
  93. /package/dist/{shapes → assets}/pentagon.svg +0 -0
  94. /package/dist/{shapes → assets}/pill.svg +0 -0
  95. /package/dist/{shapes → assets}/pixel-circle.svg +0 -0
  96. /package/dist/{shapes → assets}/pixel-triangle.svg +0 -0
  97. /package/dist/{shapes → assets}/puffy-diamond.svg +0 -0
  98. /package/dist/{shapes → assets}/puffy.svg +0 -0
  99. /package/dist/{shapes → assets}/semicircle.svg +0 -0
  100. /package/dist/{shapes → assets}/sided-cookie12.svg +0 -0
  101. /package/dist/{shapes → assets}/sided-cookie4.svg +0 -0
  102. /package/dist/{shapes → assets}/sided-cookie6.svg +0 -0
  103. /package/dist/{shapes → assets}/sided-cookie7.svg +0 -0
  104. /package/dist/{shapes → assets}/sided-cookie9.svg +0 -0
  105. /package/dist/{shapes → assets}/slanted.svg +0 -0
  106. /package/dist/{shapes → assets}/soft-boom.svg +0 -0
  107. /package/dist/{shapes → assets}/soft-burst.svg +0 -0
  108. /package/dist/{shapes → assets}/square.svg +0 -0
  109. /package/dist/{shapes → assets}/sunny.svg +0 -0
  110. /package/dist/{shapes → assets}/triangle.svg +0 -0
  111. /package/dist/{shapes → assets}/very-sunny.svg +0 -0
  112. /package/dist/{shapes → assets}/wavy-circle.svg +0 -0
  113. /package/dist/{shapes → assets}/wavy.svg +0 -0
@@ -1,42 +0,0 @@
1
- // Material Symbols font faces. Each declaration tries the local copy first
2
- // (resolves against Vite's publicDir for the consuming project), then falls
3
- // back to a public CDN so the same SCSS works whether it runs inside this
4
- // repo's demo or inside any consumer's project.
5
-
6
- $-cdn: "https://cdn.jsdelivr.net/npm/beercss@4.0.21/dist/cdn";
7
-
8
- @font-face {
9
- font-family: "Material Symbols Outlined";
10
- font-style: normal;
11
- font-weight: 400;
12
- font-display: swap;
13
- src: url("/fonts/material-symbols-outlined.woff2") format("woff2"),
14
- url("#{$-cdn}/material-symbols-outlined.woff2") format("woff2");
15
- }
16
-
17
- @font-face {
18
- font-family: "Material Symbols Rounded";
19
- font-style: normal;
20
- font-weight: 400;
21
- font-display: swap;
22
- src: url("/fonts/material-symbols-rounded.woff2") format("woff2"),
23
- url("#{$-cdn}/material-symbols-rounded.woff2") format("woff2");
24
- }
25
-
26
- @font-face {
27
- font-family: "Material Symbols Sharp";
28
- font-style: normal;
29
- font-weight: 400;
30
- font-display: swap;
31
- src: url("/fonts/material-symbols-sharp.woff2") format("woff2"),
32
- url("#{$-cdn}/material-symbols-sharp.woff2") format("woff2");
33
- }
34
-
35
- @font-face {
36
- font-family: "Material Symbols Subset";
37
- font-style: normal;
38
- font-weight: 400;
39
- font-display: swap;
40
- src: url("/fonts/material-symbols-subset.woff2") format("woff2"),
41
- url("#{$-cdn}/material-symbols-subset.woff2") format("woff2");
42
- }
@@ -1,104 +0,0 @@
1
- // Root custom-properties, base typography, scrollbar, keyframes.
2
-
3
- :root {
4
- --size: 1rem;
5
- --font: Inter, Roboto, "Helvetica Neue", "Arial Nova", "Nimbus Sans", "Noto Sans", Arial, sans-serif;
6
- --font-icon: "Material Symbols Outlined";
7
- --speed1: 0.1s;
8
- --speed2: 0.2s;
9
- --speed3: 0.3s;
10
- --speed4: 0.4s;
11
- --active: rgb(128 128 128 / 0.192);
12
- --overlay: rgb(0 0 0 / 0.5);
13
- --elevate1: 0 0.125rem 0.125rem 0 rgb(0 0 0 / 0.32);
14
- --elevate2: 0 0.25rem 0.5rem 0 rgb(0 0 0 / 0.4);
15
- --elevate3: 0 0.375rem 0.75rem 0 rgb(0 0 0 / 0.48);
16
- --top: env(safe-area-inset-top);
17
- --bottom: env(safe-area-inset-bottom);
18
- --left: env(safe-area-inset-left);
19
- --right: env(safe-area-inset-right);
20
- --image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR4AWJiYGAQBgAAAP//ZyYa+wAAAAZJREFUAwAAIgAWeX9MsQAAAABJRU5ErkJggg==);
21
- }
22
-
23
- :root[data-mode="dark"] {
24
- --image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR4AWL6//+/FAAAAP//qSv5QwAAAAZJREFUAwAJIAMaJWjIvQAAAABJRU5ErkJggg==);
25
- }
26
-
27
- @media (prefers-color-scheme: dark) {
28
- :root[data-mode="auto"] {
29
- --image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR4AWL6//+/FAAAAP//qSv5QwAAAAZJREFUAwAJIAMaJWjIvQAAAABJRU5ErkJggg==);
30
- }
31
- }
32
-
33
- html {
34
- font-size: var(--size);
35
- }
36
-
37
- body {
38
- color: var(--on-surface);
39
- background-color: var(--surface);
40
- overflow-x: hidden;
41
- font-family: var(--font);
42
- font-size: 0.875rem;
43
- line-height: 1.5rem;
44
- letter-spacing: 0.0313rem;
45
- }
46
-
47
- @media (pointer: fine) {
48
- body ::-webkit-scrollbar,
49
- body ::-webkit-scrollbar-thumb,
50
- body ::-webkit-scrollbar-button {
51
- background: none;
52
- inline-size: 0.4rem;
53
- block-size: 0.4rem;
54
- }
55
-
56
- body :is(:focus, :hover)::-webkit-scrollbar-thumb,
57
- body :has(:focus, :hover)::-webkit-scrollbar-thumb {
58
- background: var(--outline);
59
- border-radius: 1rem;
60
- }
61
- }
62
-
63
- @media (pointer: coarse) {
64
- body:has(dialog[open], dialog.active),
65
- body:has(input[type="range"]:focus) {
66
- overflow: hidden;
67
- }
68
- }
69
-
70
- @keyframes to-page {
71
- from {
72
- opacity: 0;
73
- transform: var(--_transform);
74
- }
75
-
76
- to {
77
- opacity: 1;
78
- transform: translate(0, 0);
79
- }
80
- }
81
-
82
- @keyframes to-linear-progress {
83
- 0% { margin: 0 0 0 -100%; }
84
- 50% { margin: 0 0 0 0; }
85
- 100% { margin: 0 0 0 100%; }
86
- }
87
-
88
- @keyframes to-indeterminate-progress {
89
- 0% { padding: 0 100% 0 0; }
90
- 50% { padding: 0 0 0 0; }
91
- 100% { padding: 0 0 0 100%; }
92
- }
93
-
94
- @keyframes to-rotate {
95
- from { transform: rotate(0deg); }
96
- to { transform: rotate(360deg); }
97
- }
98
-
99
- @keyframes to-ripple {
100
- to {
101
- transform: scale(4);
102
- opacity: 0;
103
- }
104
- }
@@ -1,82 +0,0 @@
1
- // Tag-level resets and shared focus / cursor behavior.
2
-
3
- * {
4
- -webkit-tap-highlight-color: transparent;
5
- position: relative;
6
- vertical-align: middle;
7
- color: inherit;
8
- margin: 0;
9
- padding: 0;
10
- border-radius: inherit;
11
- box-sizing: border-box;
12
- }
13
-
14
- *::after,
15
- *::before {
16
- all: unset;
17
- }
18
-
19
- label {
20
- font-size: 0.75rem;
21
- vertical-align: baseline;
22
- }
23
-
24
- a,
25
- b,
26
- i,
27
- span,
28
- strong,
29
- em,
30
- code {
31
- vertical-align: baseline;
32
- }
33
-
34
- a,
35
- button,
36
- .button {
37
- cursor: pointer;
38
- text-decoration: none;
39
- display: inline-flex;
40
- align-items: center;
41
- border: none;
42
- font-family: inherit;
43
- outline: inherit;
44
- justify-content: center;
45
- }
46
-
47
- :is(nav, .tabs, .field) > a,
48
- button,
49
- .button,
50
- .chip,
51
- i,
52
- label {
53
- user-select: none;
54
- }
55
-
56
- :not(.grid, nav, .row) > :not(progress.max) + :is(
57
- address, article, blockquote, code, .field, fieldset, form, .grid,
58
- h1, h2, h3, h4, h5, h6, nav, ol, p, pre, .row, section, aside, table, .tabs, ul
59
- ):not([class*="margin"], .right, .left, .top, .bottom) {
60
- margin-block-start: 1rem;
61
- }
62
-
63
- :has(> [class*="margin"]) {
64
- padding: 0.1px;
65
- }
66
-
67
- :is(a, button, .button, .chip, summary):focus-visible {
68
- outline: 0.125rem solid var(--primary);
69
- outline-offset: 0.25rem;
70
- }
71
-
72
- :is(nav, .row, li).group > :focus-visible {
73
- z-index: 1;
74
- }
75
-
76
- :is(button, .button, .chip) > :is(span, i, img, svg) {
77
- pointer-events: none;
78
- }
79
-
80
- :is(div:not([class]), div[class="active"]):has(> :not(.responsive) ~ :is(menu, .tooltip, input)) {
81
- display: inline-flex;
82
- }
@@ -1,126 +0,0 @@
1
- // Semantic colour utilities driven by M3 roles. Looped so the
2
- // six paired roles, four container variants, and seven surface tonal
3
- // stops share one definition each.
4
-
5
- @use "sass:list";
6
- @use "../config" as *;
7
-
8
- .transparent {
9
- background-color: transparent !important;
10
- box-shadow: none !important;
11
- color: inherit !important;
12
- }
13
-
14
- // .primary, .secondary, .tertiary, .error, .background → bg + on-bg text
15
- @each $role in $theme-roles-paired {
16
- .#{$role} { @include paired-color($role); }
17
- }
18
-
19
- // -text and -border emitted only for primary/secondary/tertiary/error
20
- // (upstream omits .background-text / .background-border).
21
- @each $role in $theme-roles-with-edges {
22
- .#{$role}-text { @include text-color($role); }
23
- .#{$role}-border { @include border-color($role); }
24
- }
25
-
26
- // .primary-container, .secondary-container, .tertiary-container, .error-container
27
- @each $role in $theme-roles-container {
28
- .#{$role}-container {
29
- background-color: var(--#{$role}-container) !important;
30
- color: var(--on-#{$role}-container) !important;
31
- }
32
- }
33
-
34
- // Surface umbrella — every tonal stop falls back to surface/on-surface text.
35
- $-surface-umbrella: ".surface";
36
- @each $stop in $surface-stops {
37
- $-surface-umbrella: "#{$-surface-umbrella}, .#{$stop}" !global;
38
- }
39
-
40
- #{$-surface-umbrella} {
41
- background-color: var(--surface) !important;
42
- color: var(--on-surface) !important;
43
- }
44
-
45
- .surface-variant {
46
- background-color: var(--surface-variant) !important;
47
- color: var(--on-surface-variant) !important;
48
- }
49
-
50
- .inverse-surface {
51
- background-color: var(--inverse-surface);
52
- color: var(--inverse-on-surface);
53
- }
54
-
55
- .inverse-primary {
56
- background-color: var(--inverse-primary);
57
- color: var(--primary);
58
- }
59
-
60
- .inverse-primary-text {
61
- color: var(--inverse-primary) !important;
62
- }
63
-
64
- .inverse-primary-border {
65
- border-color: var(--inverse-primary) !important;
66
- }
67
-
68
- // Tonal stops re-bind background (text stays on-surface from the umbrella above).
69
- @each $stop in $surface-stops {
70
- .#{$stop} {
71
- background-color: var(--#{$stop}) !important;
72
- }
73
- }
74
-
75
- .black {
76
- background-color: #000 !important;
77
- }
78
-
79
- .black-border {
80
- border-color: #000 !important;
81
- }
82
-
83
- .black-text {
84
- color: #000 !important;
85
- }
86
-
87
- .white {
88
- background-color: #fff !important;
89
- }
90
-
91
- .white-border {
92
- border-color: #fff !important;
93
- }
94
-
95
- .white-text {
96
- color: #fff !important;
97
- }
98
-
99
- .transparent-border {
100
- border-color: transparent !important;
101
- }
102
-
103
- .transparent-text {
104
- color: transparent !important;
105
- }
106
-
107
- .fill:not(i) {
108
- background-color: var(--surface-variant) !important;
109
- color: var(--on-surface-variant) !important;
110
- }
111
-
112
- // nav/menu active-state recoloring per container/base role.
113
- // Upstream emits these only for primary/secondary/tertiary (no error).
114
- @each $role in $theme-roles-nav-active {
115
- nav.#{$role}-container > button,
116
- :is(nav, menu).#{$role} > :is(button, a, li).active {
117
- background-color: var(--#{$role}-container) !important;
118
- color: var(--on-#{$role}-container) !important;
119
- }
120
-
121
- nav.#{$role} > button,
122
- :is(nav, menu).#{$role}-container > :is(button, a, li).active {
123
- background-color: var(--#{$role}) !important;
124
- color: var(--on-#{$role}) !important;
125
- }
126
- }