@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,83 +0,0 @@
1
- // <header> and <footer> top/bottom bars + .fixed sticky behavior.
2
-
3
- header,
4
- footer {
5
- display: grid;
6
- align-content: center;
7
- border-radius: 0;
8
- padding: 0 1rem;
9
- }
10
-
11
- :is(dialog, article) > :is(header, footer) {
12
- padding-inline: 0;
13
- inset: 0;
14
- }
15
-
16
- header { min-block-size: 4rem; }
17
- footer { min-block-size: 5rem; }
18
-
19
- :is(header, footer, menu > *).fixed {
20
- position: sticky;
21
- inset: 0;
22
- z-index: 11;
23
- background-color: inherit;
24
- }
25
-
26
- header.fixed {
27
- inset: calc(-1 * var(--_padding, 0)) 0 0 0;
28
- margin-block-start: calc(-1 * var(--_padding, 0));
29
- }
30
-
31
- footer.fixed {
32
- inset: 0 0 calc(-1 * var(--_padding, 0)) 0;
33
- margin-block-end: calc(-1 * var(--_padding, 0));
34
- }
35
-
36
- :is(header, footer).fixed.min {
37
- margin-inline: auto;
38
- }
39
-
40
- dialog > :is(header, footer) {
41
- background: none;
42
- }
43
-
44
- dialog > :is(header, footer).fixed {
45
- background-color: inherit;
46
- }
47
-
48
- :is(main, header, footer, section).responsive {
49
- max-inline-size: min(100vw, 75rem);
50
- margin: 0 auto;
51
-
52
- &.max {
53
- max-inline-size: none;
54
- }
55
- }
56
-
57
- :has(> main) > :is(header, footer).fixed {
58
- transform: none;
59
- box-sizing: content-box;
60
- position: sticky;
61
- inset: 0;
62
- z-index: 12;
63
- }
64
-
65
- :has(> main) > header { padding-block-start: var(--top, 0); }
66
- :has(> main) > footer { padding-block-end: var(--bottom, 0); }
67
-
68
- nav.top ~ header,
69
- nav.bottom ~ footer {
70
- padding-block: 0;
71
- }
72
-
73
- nav.top ~ header.fixed {
74
- inset-block: calc(var(--top, 0) + 4.5rem) 0;
75
- }
76
-
77
- nav.bottom ~ footer.fixed {
78
- inset-block: 0 calc(var(--bottom, 0) + 4.5rem);
79
- }
80
-
81
- :is(nav, .row) > header {
82
- background-color: inherit;
83
- }
@@ -1,119 +0,0 @@
1
- // .button / <button> baseline + size/shape/state variants.
2
-
3
- @use "sass:map";
4
-
5
- .button,
6
- button {
7
- --_padding: 1rem;
8
- --_size: 2.5rem;
9
- --_round: calc(var(--_size) / 2) !important;
10
- box-sizing: content-box;
11
- display: inline-flex;
12
- align-items: center;
13
- justify-content: center;
14
- block-size: var(--_size);
15
- font-size: 0.875rem;
16
- font-weight: 500;
17
- color: var(--on-primary);
18
- padding: 0 var(--_padding);
19
- background-color: var(--primary);
20
- border-radius: 1.25rem;
21
- transition:
22
- transform var(--speed3),
23
- border-radius var(--speed2),
24
- padding var(--speed3);
25
- user-select: none;
26
- gap: 0.5rem;
27
- line-height: normal;
28
- }
29
-
30
- $-button-sizes: (
31
- "small": (size: 2rem, padding: 0.75rem),
32
- "large": (size: 3rem, padding: 1.25rem),
33
- );
34
-
35
- @each $name, $values in $-button-sizes {
36
- :is(button, .button).#{$name} {
37
- --_size: #{map.get($values, size)};
38
- --_padding: #{map.get($values, padding)};
39
- }
40
- }
41
-
42
- :is(.button, button):is(.extra, .extend) {
43
- --_size: 3.5rem;
44
- font-size: 1rem;
45
- --_padding: 1.5rem;
46
- }
47
-
48
- :is(button, .button):is(.square, .circle) {
49
- --_padding: 0;
50
- }
51
-
52
- :is(button, .button).border {
53
- border-color: var(--outline-variant);
54
- color: var(--primary);
55
- }
56
-
57
- .extend {
58
- > span:not([class]) {
59
- display: none;
60
- }
61
-
62
- &:is(:hover, .active) {
63
- inline-size: auto;
64
- --_padding: 1.5rem;
65
- padding: 0 var(--_padding);
66
-
67
- > i + span {
68
- display: inherit;
69
- margin-inline-start: var(--_padding);
70
- }
71
-
72
- > :is(img, svg) + span {
73
- display: inherit;
74
- margin-inline-start: calc(1rem + var(--_padding, 0));
75
- }
76
- }
77
- }
78
-
79
- :is(.button, button)[disabled] {
80
- opacity: 0.5;
81
- cursor: not-allowed;
82
- }
83
-
84
- .button[disabled] {
85
- pointer-events: none;
86
- }
87
-
88
- :is(.button, button)[disabled]::before,
89
- :is(.button, button)[disabled]::after {
90
- display: none;
91
- }
92
-
93
- :is(.button, button):not(.chip, .extend) {
94
- &.fill {
95
- background-color: var(--secondary-container) !important;
96
- color: var(--on-secondary-container) !important;
97
- }
98
-
99
- &.active {
100
- background-color: var(--primary-container);
101
- color: var(--on-primary-container);
102
- }
103
-
104
- &.fill.active {
105
- background-color: var(--secondary) !important;
106
- color: var(--on-secondary) !important;
107
- }
108
-
109
- &.border.active {
110
- background-color: var(--inverse-surface) !important;
111
- color: var(--inverse-on-surface) !important;
112
- border-color: var(--inverse-surface) !important;
113
- }
114
- }
115
-
116
- :is(.button, button):not(.chip):active,
117
- :is(.button, button):not(.chip).active {
118
- border-radius: 0.5rem !important;
119
- }
@@ -1,32 +0,0 @@
1
- // <article> = card surface. Sizes loop over a small map.
2
-
3
- article {
4
- --_padding: 1rem;
5
- box-shadow: var(--elevate1);
6
- background-color: var(--surface-container-low);
7
- color: var(--on-surface);
8
- padding: var(--_padding);
9
- border-radius: 0.75rem;
10
- display: block;
11
- transition:
12
- transform var(--speed3),
13
- border-radius var(--speed3),
14
- padding var(--speed3);
15
-
16
- &.border {
17
- box-shadow: none;
18
- border: 0.0625rem solid var(--outline-variant);
19
- }
20
- }
21
-
22
- $-card-sizes: (
23
- "small": 12rem,
24
- "medium": 20rem,
25
- "large": 32rem,
26
- );
27
-
28
- @each $name, $value in $-card-sizes {
29
- article.#{$name} {
30
- block-size: $value;
31
- }
32
- }
@@ -1,46 +0,0 @@
1
- // .chip — pill-shaped action element with three size tiers.
2
-
3
- @use "sass:map";
4
-
5
- .chip {
6
- --_padding: 0.75rem;
7
- --_size: 2rem;
8
- --_round: calc(var(--_size) / 2) !important;
9
- box-sizing: border-box;
10
- display: inline-flex;
11
- align-items: center;
12
- justify-content: center;
13
- block-size: var(--_size);
14
- min-inline-size: var(--_size);
15
- font-size: 0.875rem;
16
- font-weight: 500;
17
- background-color: transparent;
18
- border: 0.0625rem solid var(--outline-variant);
19
- color: var(--on-surface-variant);
20
- padding: 0 var(--_padding);
21
- border-radius: 0.5rem;
22
- transition:
23
- transform var(--speed3),
24
- border-radius var(--speed3),
25
- padding var(--speed3);
26
- user-select: none;
27
- gap: 0.5rem;
28
- line-height: normal;
29
- letter-spacing: normal;
30
-
31
- &.fill {
32
- border: none;
33
- }
34
- }
35
-
36
- $-chip-sizes: (
37
- "medium": (size: 2.5rem, padding: 1rem),
38
- "large": (size: 3rem, padding: 1.25rem),
39
- );
40
-
41
- @each $name, $values in $-chip-sizes {
42
- .chip.#{$name} {
43
- --_size: #{map.get($values, size)};
44
- --_padding: #{map.get($values, padding)};
45
- }
46
- }
@@ -1,143 +0,0 @@
1
- // <dialog> modal surface with size + edge-pin (top/right/bottom/left/max) variants.
2
-
3
- dialog {
4
- --_padding: 1.5rem;
5
- --_top: calc(var(--_padding, 0) + var(--top, 0));
6
- --_bottom: calc(var(--_padding, 0) + var(--bottom, 0));
7
- display: block;
8
- visibility: hidden;
9
- border: none;
10
- opacity: 0;
11
- position: fixed;
12
- box-shadow: var(--elevate2);
13
- color: var(--on-surface);
14
- background-color: var(--surface-container-high);
15
- padding: var(--_padding);
16
- z-index: 100;
17
- inset: 10% auto auto 50%;
18
- min-inline-size: 20rem;
19
- max-inline-size: 100%;
20
- max-block-size: 80%;
21
- overflow-x: hidden;
22
- overflow-y: auto;
23
- transition: all var(--speed3), 0s background-color;
24
- border-radius: 1.75rem;
25
- transform: translate(-50%, -4rem);
26
- outline: none;
27
-
28
- &:is(.active, [open]),
29
- &:popover-open {
30
- visibility: visible;
31
- opacity: 1;
32
- transform: translate(-50%, 0);
33
- }
34
-
35
- &:is(.top, .right, .bottom, .left, .max) {
36
- --_padding: 1rem;
37
- }
38
- }
39
-
40
- // Base size variants come BEFORE the edge-pin (.top/.bottom/.left/.right/.max)
41
- // rules so an edge-pinned `.large` dialog uses the side variant's block-size
42
- // (100%) instead of `.large`'s default 75%. Matches upstream cascade.
43
- $-dialog-base-sizes: (
44
- "small": 25%,
45
- "medium": 50%,
46
- "large": 75%,
47
- );
48
-
49
- @each $name, $value in $-dialog-base-sizes {
50
- dialog.#{$name} {
51
- inline-size: $value;
52
- block-size: $value;
53
- }
54
- }
55
-
56
- dialog {
57
- &:is(.top, .bottom) {
58
- opacity: 1;
59
- block-size: auto;
60
- inline-size: 100%;
61
- min-inline-size: auto;
62
- max-block-size: 100%;
63
- }
64
-
65
- &.top {
66
- inset: 0 auto auto 0;
67
- transform: translateY(-100%);
68
- border-radius: 0 0 1rem 1rem;
69
- padding-block-start: var(--_top);
70
- }
71
-
72
- &.bottom {
73
- inset: auto auto 0 0;
74
- transform: translateY(100%);
75
- border-radius: 1rem 1rem 0 0;
76
- padding-block-end: var(--_bottom);
77
- }
78
-
79
- &:is(.left, .right) {
80
- opacity: 1;
81
- inset: 0 auto auto 0;
82
- inline-size: auto;
83
- block-size: 100%;
84
- max-block-size: 100%;
85
- background-color: var(--surface);
86
- padding-block: var(--_top) var(--_bottom);
87
- }
88
-
89
- &.max {
90
- inset: 0 auto auto 0;
91
- inline-size: 100%;
92
- block-size: 100%;
93
- max-inline-size: 100%;
94
- max-block-size: 100%;
95
- transform: translateY(4rem);
96
- background-color: var(--surface);
97
- border-radius: 0;
98
- padding-block: var(--_top) var(--_bottom);
99
- }
100
-
101
- &:is(.active, [open]):is(.left, .right, .top, .bottom, .max),
102
- &:popover-open:is(.left, .right, .top, .bottom, .max) {
103
- transform: translate(0, 0);
104
- }
105
- }
106
-
107
- [dir="rtl"] dialog.right,
108
- dialog.left {
109
- inset: 0 auto auto 0;
110
- border-radius: 0 1rem 1rem 0;
111
- transform: translateX(-100%);
112
- }
113
-
114
- [dir="rtl"] dialog.left,
115
- dialog.right {
116
- inset: 0 0 auto auto;
117
- border-radius: 1rem 0 0 1rem;
118
- transform: translateX(100%);
119
- }
120
-
121
- $-dialog-side-sizes: (
122
- "small": 20rem,
123
- "medium": 32rem,
124
- "large": 44rem,
125
- );
126
-
127
- @each $name, $value in $-dialog-side-sizes {
128
- dialog.#{$name}:is(.left, .right) {
129
- inline-size: $value;
130
- }
131
- }
132
-
133
- $-dialog-vert-sizes: (
134
- "small": 16rem,
135
- "medium": 24rem,
136
- "large": 32rem,
137
- );
138
-
139
- @each $name, $value in $-dialog-vert-sizes {
140
- dialog.#{$name}:is(.top, .bottom) {
141
- block-size: $value;
142
- }
143
- }
@@ -1,46 +0,0 @@
1
- // <hr> + .divider — horizontal/vertical rule. Size modifiers share a margin map.
2
-
3
- hr,
4
- [class*="divider"] {
5
- all: unset;
6
- inline-size: -webkit-fill-available;
7
- min-block-size: auto;
8
- block-size: 0.0625rem;
9
- background-color: var(--outline-variant);
10
- display: block;
11
-
12
- + * {
13
- margin: 0 !important;
14
- }
15
- }
16
-
17
- $-divider-margins: (
18
- "small": 0.5rem,
19
- "medium": 1rem,
20
- "large": 1.5rem,
21
- );
22
-
23
- @each $name, $value in $-divider-margins {
24
- hr.#{$name},
25
- .#{$name}-divider {
26
- margin: #{$value} 0 !important;
27
- }
28
- }
29
-
30
- li:has(> :is(hr, .divider)) {
31
- padding: 0 !important;
32
- align-self: normal !important;
33
- min-inline-size: auto !important;
34
- min-block-size: auto !important;
35
- inline-size: -webkit-fill-available;
36
- background: none !important;
37
- }
38
-
39
- :is(hr, .divider).vertical,
40
- li:has(> :is(hr, .divider).vertical) {
41
- padding: 0 !important;
42
- align-self: center !important;
43
- min-inline-size: auto;
44
- min-block-size: 1.5rem;
45
- inline-size: 0.0625rem;
46
- }
@@ -1,19 +0,0 @@
1
- // <details>/<summary> expansion behavior.
2
-
3
- summary {
4
- list-style-type: none;
5
- cursor: pointer;
6
-
7
- &::-webkit-details-marker {
8
- display: none;
9
- }
10
-
11
- > * {
12
- pointer-events: none;
13
- margin: 0;
14
- }
15
- }
16
-
17
- li > details > summary + .list {
18
- margin: 0 !important;
19
- }