@a-type/ui 6.0.52 → 6.0.53

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 (67) hide show
  1. package/dist/colors.module.css +59 -0
  2. package/dist/components/actions/ActionBar.module.css +34 -0
  3. package/dist/components/actions/ActionButton.module.css +6 -0
  4. package/dist/components/avatar/Avatar.module.css +35 -0
  5. package/dist/components/box/Box.module.css +291 -0
  6. package/dist/components/button/Button.module.css +148 -0
  7. package/dist/components/camera/Camera.module.css +65 -0
  8. package/dist/components/card/Card.module.css +183 -0
  9. package/dist/components/checkbox/Checkbox.module.css +74 -0
  10. package/dist/components/chip/Chip.module.css +32 -0
  11. package/dist/components/collapsible/Collapsible.module.css +36 -0
  12. package/dist/components/combobox/Combobox.module.css +170 -0
  13. package/dist/components/datePicker/Calendar.module.css +167 -0
  14. package/dist/components/datePicker/datePicker.module.css +7 -0
  15. package/dist/components/datePicker/dateRangePicker.module.css +38 -0
  16. package/dist/components/dialog/Dialog.module.css +188 -0
  17. package/dist/components/divider/Divider.module.css +10 -0
  18. package/dist/components/dropdownMenu/DropdownMenu.module.css +3 -0
  19. package/dist/components/editableText/EditableText.module.css +44 -0
  20. package/dist/components/emojiPicker/EmojiPicker.module.css +84 -0
  21. package/dist/components/forms/EmojiField.module.css +8 -0
  22. package/dist/components/forms/Field.module.css +62 -0
  23. package/dist/components/forms/Form.module.css +6 -0
  24. package/dist/components/forms/NumberStepperField.module.css +5 -0
  25. package/dist/components/forms/TextField.module.css +11 -0
  26. package/dist/components/horizontalList/HorizontalList.module.css +50 -0
  27. package/dist/components/icon/Icon.module.css +20 -0
  28. package/dist/components/imageUploader/ImageUploader.module.css +67 -0
  29. package/dist/components/img/Img.module.css +42 -0
  30. package/dist/components/input/Input.module.css +100 -0
  31. package/dist/components/layouts/PageContent.module.css +25 -0
  32. package/dist/components/layouts/PageFixedArea.module.css +11 -0
  33. package/dist/components/layouts/PageNav.module.css +31 -0
  34. package/dist/components/layouts/PageNowPlaying.module.css +46 -0
  35. package/dist/components/layouts/PageRoot.module.css +29 -0
  36. package/dist/components/layouts/PageSection.module.css +19 -0
  37. package/dist/components/lightbox/Lightbox.module.css +104 -0
  38. package/dist/components/lists/lists.module.css +31 -0
  39. package/dist/components/marquee/marquee.module.css +32 -0
  40. package/dist/components/navBar/NavBar.module.css +143 -0
  41. package/dist/components/note/Note.module.css +114 -0
  42. package/dist/components/numberStepper/NumberStepper.module.css +32 -0
  43. package/dist/components/particles/ParticleLayer.module.css +8 -0
  44. package/dist/components/peek/Peek.module.css +96 -0
  45. package/dist/components/popover/Popover.module.css +24 -0
  46. package/dist/components/primitives/menus.module.css +262 -0
  47. package/dist/components/progress/Progress.module.css +54 -0
  48. package/dist/components/pwaInstall/PwaInstall.module.css +23 -0
  49. package/dist/components/quickAction/QuickAction.module.css +59 -0
  50. package/dist/components/richEditor/richEditor.module.css +102 -0
  51. package/dist/components/scrollArea/ScrollArea.module.css +187 -0
  52. package/dist/components/select/Select.module.css +46 -0
  53. package/dist/components/skeletons/skeletons.module.css +33 -0
  54. package/dist/components/slider/Slider.module.css +97 -0
  55. package/dist/components/spinner/Spinner.module.css +54 -0
  56. package/dist/components/splashScreen/SplashScreen.module.css +54 -0
  57. package/dist/components/switch/Switch.module.css +63 -0
  58. package/dist/components/tabs/tabs.module.css +139 -0
  59. package/dist/components/textArea/TextArea.module.css +14 -0
  60. package/dist/components/toasts/toasts.module.css +201 -0
  61. package/dist/components/toggleGroup/toggleGroup.module.css +55 -0
  62. package/dist/components/tooltip/Tooltip.module.css +72 -0
  63. package/dist/components/typography/typography.module.css +74 -0
  64. package/dist/components/viewport/Viewport.module.css +44 -0
  65. package/dist/components/viewport/ViewportContent.module.css +8 -0
  66. package/dist/theme.stories.module.css +13 -0
  67. package/package.json +5 -2
@@ -0,0 +1,201 @@
1
+ .toaster {
2
+ pointer-events: none;
3
+ overflow: clip;
4
+ }
5
+
6
+ .toast {
7
+ --gap: var(--m-space-sm);
8
+ --peek: var(--m-space-sm);
9
+ --scale: calc(max(0, 1 - var(--toast-index) * 0.1));
10
+ --height: var(--toast-frontmost-height, var(--toast-height));
11
+ --shrink: calc(1 - var(--scale));
12
+ --offset-y: calc(
13
+ var(--toast-offset-y) + calc(var(--toast-index) * var(--gap)) +
14
+ var(--toast-swipe-movement-y)
15
+ );
16
+
17
+ /* basic positioning */
18
+ position: fixed;
19
+ left: auto;
20
+ top: var(--m-space-xs);
21
+ z-index: calc(100000 - var(--toast-index));
22
+ margin-right: 0;
23
+ width: 100%;
24
+ transform-origin: top;
25
+ /* all toasts copy height of frontmost */
26
+ height: var(--height);
27
+ display: flex;
28
+ flex-direction: column;
29
+ align-items: center;
30
+ gap: var(--m-space-xs);
31
+
32
+ /* styling happens in content element */
33
+
34
+ /* misc */
35
+ pointer-events: none;
36
+ user-select: none;
37
+
38
+ /* animation and interaction */
39
+ transform: translateX(var(--toast-swipe-movement-x))
40
+ translateY(
41
+ calc(var(--toast-swipe-movement-y) + var(--toast-index) * var(--peek)) +
42
+ (var(--shrink) * var(--height))
43
+ )
44
+ scale(var(--scale));
45
+ transition:
46
+ transform var(--m-duration) var(--m-easing),
47
+ opacity var(--m-duration) var(--m-easing),
48
+ height var(--m-duration-short) var(--m-easing);
49
+
50
+ &::after {
51
+ position: absolute;
52
+ content: '';
53
+ left: 0;
54
+ top: 100%;
55
+ height: --fn-literal(calc(var(--gap) + 1px));
56
+ width: 100%;
57
+ }
58
+
59
+ &[data-limited] {
60
+ opacity: 0;
61
+ }
62
+ &[data-expanded] {
63
+ height: var(--toast-height);
64
+ transform: translateX(var(--toast-swipe-movement-x))
65
+ translateY(var(--offset-y)) scale(1);
66
+ }
67
+
68
+ &[data-starting-style] {
69
+ transform: translateY(-150%);
70
+ }
71
+ &[data-ending-style] {
72
+ opacity: 0;
73
+
74
+ &[data-swipe-direction='up'] {
75
+ transform: translateY(calc(var(--toast-swipe-movement-y) - 150%));
76
+ }
77
+ &[data-swipe-direction='down'] {
78
+ transform: translateY(calc(var(--toast-swipe-movement-y) + 150%));
79
+ }
80
+ &[data-swipe-direction='left'] {
81
+ transform: translateX(calc(var(--toast-swipe-movement-x) - 150%))
82
+ translateY(var(--offset-y));
83
+ }
84
+ &[data-swipe-direction='right'] {
85
+ transform: translateX(calc(var(--toast-swipe-movement-x) + 150%))
86
+ translateY(var(--offset-y));
87
+ }
88
+ }
89
+
90
+ &:focus {
91
+ outline: none;
92
+ }
93
+ &:focus-visible {
94
+ box-shadow: --fn-focus-ring();
95
+ }
96
+ }
97
+
98
+ .toastContent {
99
+ max-width: 400px;
100
+ pointer-events: auto;
101
+ display: flex;
102
+ flex-direction: column;
103
+ gap: var(--m-space-sm);
104
+
105
+ &[data-behind]:not([data-expanded]) {
106
+ pointer-events: none;
107
+ }
108
+ }
109
+
110
+ .toastMain {
111
+ position: relative;
112
+ display: flex;
113
+ flex-direction: row;
114
+
115
+ @apply --mx-shadow(var(--m-shadow-md));
116
+ @apply --mx-surface-secondary;
117
+
118
+ padding-inline-start: var(--m-space-md);
119
+ padding-inline-end: var(--m-space-sm);
120
+ padding-block: var(--m-space-sm);
121
+ gap: var(--m-space-sm);
122
+
123
+ [data-behind]:not([data-expanded]) & {
124
+ max-height: var(--height);
125
+ @apply --mx-bg-heavier(2);
126
+ }
127
+ }
128
+
129
+ .toastMainBody {
130
+ display: flex;
131
+ flex-direction: row;
132
+ align-items: center;
133
+ gap: var(--m-space-xs);
134
+ @apply --mx-fg(inherit);
135
+
136
+ transition: opacity var(--m-duration) var(--m-easing);
137
+
138
+ /* Hide content when not in front */
139
+ [data-behind]:not([data-expanded]) & {
140
+ opacity: 0;
141
+ }
142
+
143
+ [data-expanded] & {
144
+ opacity: 1;
145
+ }
146
+ }
147
+
148
+ .toastMainBodyContent {
149
+ display: flex;
150
+ flex-direction: column;
151
+ gap: var(--m-space-xs);
152
+ @apply --mx-fg(inherit);
153
+ }
154
+
155
+ .toastTitle {
156
+ @apply --mx-fg(inherit);
157
+ @apply --mx-prose-secondary;
158
+ font-weight: var(--m-text-weight-bold);
159
+ margin: 0;
160
+ }
161
+
162
+ .toastDescriptionRow {
163
+ display: flex;
164
+ gap: var(--m-space-sm);
165
+ }
166
+
167
+ .icon {
168
+ position: relative;
169
+ top: --fn-literal(4px);
170
+ }
171
+
172
+ .toastDescription {
173
+ margin: 0;
174
+ @apply --mx-fg(inherit);
175
+ @apply --mx-prose-ambient;
176
+ }
177
+
178
+ .toastClose {
179
+ margin-block-end: auto;
180
+
181
+ [data-behind]:not([data-expanded]) & {
182
+ visibility: hidden;
183
+ }
184
+ }
185
+
186
+ .toastActions {
187
+ margin-inline-start: auto;
188
+ display: flex;
189
+ align-items: center;
190
+ gap: var(--m-space-xs);
191
+
192
+ font-size: var(--m-prose-ambient-size);
193
+ line-height: var(--m-prose-ambient-lineHeight);
194
+ font-weight: var(--m-prose-ambient-weight);
195
+
196
+ transition: opacity var(--m-duration) var(--m-easing);
197
+
198
+ [data-behind]:not([data-expanded]) & {
199
+ opacity: 0;
200
+ }
201
+ }
@@ -0,0 +1,55 @@
1
+ .root {
2
+ width: fit-content;
3
+ display: inline-flex;
4
+ gap: var(--m-space-sm);
5
+ border-radius: var(--m-radius-lg);
6
+
7
+ @apply --mx-bg(--fn-color-faded(var(--m-color-main-light), 20%));
8
+ }
9
+
10
+ .item {
11
+ display: flex;
12
+ cursor: pointer;
13
+ align-items: center;
14
+ justify-content: center;
15
+ white-space: nowrap;
16
+ transition: all var(--m-duration) var(--m-easing);
17
+
18
+ @apply --mx-fg(var(--m-color-neutral-ink));
19
+
20
+ padding: var(--m-action-padding);
21
+
22
+ @apply --mx-borderColor(transparent);
23
+ border-radius: var(--m-radius-lg);
24
+
25
+ &[data-pressed] {
26
+ @apply --mx-shadow;
27
+ --mx-shadow-value: var(--m-shadow-sm);
28
+ @apply --mx-bg(var(--m-color-main));
29
+ @apply --mx-borderColor(var(--m-color-neutral-ink));
30
+ }
31
+
32
+ &:not([data-pressed]) {
33
+ @apply --mx-bg(--fn-color-faded(var(--m-color-neutral), 30%));
34
+ }
35
+
36
+ &:hover:not([data-pressed]) {
37
+ @apply --mx-bg-lighter(2);
38
+ --mx-ring-value: --fn-ring(var(--mx-bg-ref), 2px);
39
+ @apply --mx-borderColor(--fn-color-faded(var(--m-color-main-ink), 20%));
40
+ }
41
+
42
+ &:active:not([data-pressed]) {
43
+ @apply --mx-bg-lighter(1);
44
+ --mx-ring-value: --fn-ring(var(--mx-bg-ref), 4px);
45
+ @apply --mx-borderColor(--fn-color-faded(var(--m-color-main-ink), 30%));
46
+ }
47
+
48
+ &:focus {
49
+ outline: none;
50
+ }
51
+
52
+ &:focus-visible {
53
+ --mx-ring-value: --fn-focus-ring();
54
+ }
55
+ }
@@ -0,0 +1,72 @@
1
+ .popup {
2
+ position: relative;
3
+ display: flex;
4
+ user-select: none;
5
+
6
+ padding: var(--m-surface-padding);
7
+ border-radius: var(--m-surface-radius);
8
+
9
+ font-size: var(--m-prose-ambient-size);
10
+
11
+ transition:
12
+ opacity 0.2s ease,
13
+ transform 0.2s ease;
14
+
15
+ transform-origin: var(--transform-origin);
16
+
17
+ @apply --mx-shadow;
18
+ --mx-shadow-value: var(--m-shadow-sm);
19
+
20
+ &[data-color='contrast'] {
21
+ @apply --mx-fg(var(--m-color-neutral-paper));
22
+ @apply --mx-bg(var(--m-color-neutral-ink));
23
+ }
24
+
25
+ &[data-color='white'],
26
+ &[data-color='neutral'] {
27
+ @apply --mx-fg(var(--m-color-neutral-ink));
28
+ @apply --mx-bg(var(--m-color-neutral-paper));
29
+ @apply --mx-borderColor(var(--m-color-neutral));
30
+ border-style: solid;
31
+ border-width: var(--m-lineWidth-sm);
32
+ }
33
+
34
+ &[data-color='attention'] {
35
+ @apply --mx-bg(var(--m-color-main-heavy));
36
+ @apply --mx-fg(var(--m-color-neutral-paper));
37
+ }
38
+
39
+ opacity: 0;
40
+ transform: scale(0.95);
41
+ &[data-open] {
42
+ opacity: 1;
43
+ transform: scale(1);
44
+ }
45
+
46
+ &[data-instant] {
47
+ transition: none;
48
+ }
49
+
50
+ --y: 0px;
51
+ --x: 0px;
52
+ transform: translate(var(--x), var(--y));
53
+
54
+ &[data-starting-style] {
55
+ opacity: 0;
56
+ &[data-side='bottom'] {
57
+ --y: 4px;
58
+ }
59
+ &[data-side='top'] {
60
+ --y: -4px;
61
+ }
62
+ &[data-side='left'] {
63
+ --x: -4px;
64
+ }
65
+ &[data-side='right'] {
66
+ --x: 4px;
67
+ }
68
+ }
69
+ &[data-ending-style] {
70
+ opacity: 0;
71
+ }
72
+ }
@@ -0,0 +1,74 @@
1
+ .typography {
2
+ @apply --mx-fg(inherit);
3
+
4
+ &[data-emphasis='primary'] {
5
+ font-size: var(--m-prose-primary-size);
6
+ line-height: var(--m-prose-primary-lineHeight);
7
+ font-weight: var(--m-prose-primary-weight);
8
+ }
9
+
10
+ &[data-emphasis='secondary'] {
11
+ font-size: var(--m-prose-secondary-size);
12
+ line-height: var(--m-prose-secondary-lineHeight);
13
+ font-weight: var(--m-prose-secondary-weight);
14
+ }
15
+
16
+ &[data-emphasis='ambient'] {
17
+ font-size: var(--m-prose-ambient-size);
18
+ line-height: var(--m-prose-ambient-lineHeight);
19
+ font-weight: var(--m-prose-ambient-weight);
20
+ }
21
+
22
+ &[data-italic] {
23
+ font-style: italic;
24
+ }
25
+ &[data-underline] {
26
+ text-decoration: underline;
27
+ }
28
+ &[data-strikethrough] {
29
+ text-decoration: line-through;
30
+ }
31
+ &[data-bold] {
32
+ font-weight: var(--m-text-weight-bold);
33
+ }
34
+ &[data-thin] {
35
+ font-weight: var(--m-text-weight-thin);
36
+ }
37
+ &[data-normal] {
38
+ font-weight: var(--m-text-weight-normal);
39
+ }
40
+ &[data-uppercase] {
41
+ text-transform: uppercase;
42
+ }
43
+ &[data-truncate] {
44
+ overflow: hidden;
45
+ text-overflow: ellipsis;
46
+ white-space: nowrap;
47
+ max-width: 100%;
48
+ }
49
+ &[data-wrap] {
50
+ text-wrap: wrap;
51
+ }
52
+ &[data-dim] {
53
+ @apply --mx-fg-lighter(2.5);
54
+ }
55
+
56
+ &[data-color='neutral'] {
57
+ @apply --mx-fg(var(--m-color-neutral-ink));
58
+ }
59
+ &[data-color='main'] {
60
+ @apply --mx-fg(var(--m-color-main-heavy));
61
+ }
62
+ &[data-color='attention'] {
63
+ @apply --mx-fg(var(--m-color-palette-attention-heavy));
64
+ }
65
+ &[data-color='success'] {
66
+ @apply --mx-fg(var(--m-color-palette-success-heavy));
67
+ }
68
+ }
69
+
70
+ @layer components {
71
+ .removeMargin {
72
+ margin-block: 0;
73
+ }
74
+ }
@@ -0,0 +1,44 @@
1
+ .root {
2
+ min-height: 32px;
3
+ min-width: 32px;
4
+ }
5
+
6
+ .positioner {
7
+ contain: strict;
8
+ position: relative;
9
+ height: 100%;
10
+ width: 100%;
11
+ display: flex;
12
+ touch-action: none;
13
+ user-select: none;
14
+ overflow: clip;
15
+
16
+ &:focus {
17
+ outline: none;
18
+ }
19
+ &:focus-visible {
20
+ @apply --mx-shadow;
21
+ --mx-ring-value: --fn-ring(var(--m-color-main-ink), 1px);
22
+ }
23
+ }
24
+
25
+ .controlContent {
26
+ position: absolute;
27
+
28
+ &[data-position='top-left'] {
29
+ top: var(--m-space-sm);
30
+ left: var(--m-space-sm);
31
+ }
32
+ &[data-position='top-right'] {
33
+ top: var(--m-space-sm);
34
+ right: var(--m-space-sm);
35
+ }
36
+ &[data-position='bottom-left'] {
37
+ bottom: var(--m-space-sm);
38
+ left: var(--m-space-sm);
39
+ }
40
+ &[data-position='bottom-right'] {
41
+ bottom: var(--m-space-sm);
42
+ right: var(--m-space-sm);
43
+ }
44
+ }
@@ -0,0 +1,8 @@
1
+ .root {
2
+ position: absolute;
3
+ transform-origin: center;
4
+ touch-action: none;
5
+ user-select: none;
6
+ overflow: visible;
7
+ overscroll-behavior: none;
8
+ }
@@ -0,0 +1,13 @@
1
+ .grid {
2
+ display: grid;
3
+ grid-template-columns: repeat(2, 1fr);
4
+ gap: var(--m-space-lg);
5
+ width: 100%;
6
+ min-width: 0;
7
+ flex: 1 0 auto;
8
+
9
+ & > * {
10
+ min-width: 0;
11
+ width: 100%;
12
+ }
13
+ }
package/package.json CHANGED
@@ -1,10 +1,13 @@
1
1
  {
2
2
  "name": "@a-type/ui",
3
- "version": "6.0.52",
3
+ "version": "6.0.53",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "url": "https://github.com/a-type/ui"
7
7
  },
8
+ "engines": {
9
+ "node": ">=24"
10
+ },
8
11
  "files": [
9
12
  "/dist",
10
13
  "/src"
@@ -101,7 +104,7 @@
101
104
  "scripts": {
102
105
  "build:transpile": "tsc --build tsconfig.json",
103
106
  "build:copy": "node --experimental-strip-types ./scripts/copy.ts",
104
- "build:css": "postcss ./src/**/*.css --dir ./dist --base ./src --config scripts",
107
+ "build:css": "postcss ./dist/**/*.css --replace --config scripts --verbose",
105
108
  "build": "pnpm run build:transpile && pnpm run build:copy && pnpm run build:css",
106
109
  "prepublish": "pnpm run build",
107
110
  "icons": "node ./scripts/generateIcons.js",