@react-spectrum/inlinealert 3.0.0-nightly-641446f65-240905

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 (198) hide show
  1. package/README.md +3 -0
  2. package/dist/InlineAlert.main.js +105 -0
  3. package/dist/InlineAlert.main.js.map +1 -0
  4. package/dist/InlineAlert.mjs +100 -0
  5. package/dist/InlineAlert.module.js +100 -0
  6. package/dist/InlineAlert.module.js.map +1 -0
  7. package/dist/ar-AE.main.js +9 -0
  8. package/dist/ar-AE.main.js.map +1 -0
  9. package/dist/ar-AE.mjs +11 -0
  10. package/dist/ar-AE.module.js +11 -0
  11. package/dist/ar-AE.module.js.map +1 -0
  12. package/dist/bg-BG.main.js +9 -0
  13. package/dist/bg-BG.main.js.map +1 -0
  14. package/dist/bg-BG.mjs +11 -0
  15. package/dist/bg-BG.module.js +11 -0
  16. package/dist/bg-BG.module.js.map +1 -0
  17. package/dist/cs-CZ.main.js +9 -0
  18. package/dist/cs-CZ.main.js.map +1 -0
  19. package/dist/cs-CZ.mjs +11 -0
  20. package/dist/cs-CZ.module.js +11 -0
  21. package/dist/cs-CZ.module.js.map +1 -0
  22. package/dist/da-DK.main.js +9 -0
  23. package/dist/da-DK.main.js.map +1 -0
  24. package/dist/da-DK.mjs +11 -0
  25. package/dist/da-DK.module.js +11 -0
  26. package/dist/da-DK.module.js.map +1 -0
  27. package/dist/de-DE.main.js +9 -0
  28. package/dist/de-DE.main.js.map +1 -0
  29. package/dist/de-DE.mjs +11 -0
  30. package/dist/de-DE.module.js +11 -0
  31. package/dist/de-DE.module.js.map +1 -0
  32. package/dist/el-GR.main.js +9 -0
  33. package/dist/el-GR.main.js.map +1 -0
  34. package/dist/el-GR.mjs +11 -0
  35. package/dist/el-GR.module.js +11 -0
  36. package/dist/el-GR.module.js.map +1 -0
  37. package/dist/en-US.main.js +9 -0
  38. package/dist/en-US.main.js.map +1 -0
  39. package/dist/en-US.mjs +11 -0
  40. package/dist/en-US.module.js +11 -0
  41. package/dist/en-US.module.js.map +1 -0
  42. package/dist/es-ES.main.js +9 -0
  43. package/dist/es-ES.main.js.map +1 -0
  44. package/dist/es-ES.mjs +11 -0
  45. package/dist/es-ES.module.js +11 -0
  46. package/dist/es-ES.module.js.map +1 -0
  47. package/dist/et-EE.main.js +9 -0
  48. package/dist/et-EE.main.js.map +1 -0
  49. package/dist/et-EE.mjs +11 -0
  50. package/dist/et-EE.module.js +11 -0
  51. package/dist/et-EE.module.js.map +1 -0
  52. package/dist/fi-FI.main.js +9 -0
  53. package/dist/fi-FI.main.js.map +1 -0
  54. package/dist/fi-FI.mjs +11 -0
  55. package/dist/fi-FI.module.js +11 -0
  56. package/dist/fi-FI.module.js.map +1 -0
  57. package/dist/fr-FR.main.js +9 -0
  58. package/dist/fr-FR.main.js.map +1 -0
  59. package/dist/fr-FR.mjs +11 -0
  60. package/dist/fr-FR.module.js +11 -0
  61. package/dist/fr-FR.module.js.map +1 -0
  62. package/dist/he-IL.main.js +9 -0
  63. package/dist/he-IL.main.js.map +1 -0
  64. package/dist/he-IL.mjs +11 -0
  65. package/dist/he-IL.module.js +11 -0
  66. package/dist/he-IL.module.js.map +1 -0
  67. package/dist/hr-HR.main.js +9 -0
  68. package/dist/hr-HR.main.js.map +1 -0
  69. package/dist/hr-HR.mjs +11 -0
  70. package/dist/hr-HR.module.js +11 -0
  71. package/dist/hr-HR.module.js.map +1 -0
  72. package/dist/hu-HU.main.js +9 -0
  73. package/dist/hu-HU.main.js.map +1 -0
  74. package/dist/hu-HU.mjs +11 -0
  75. package/dist/hu-HU.module.js +11 -0
  76. package/dist/hu-HU.module.js.map +1 -0
  77. package/dist/import.mjs +18 -0
  78. package/dist/inlinealert_vars_css.main.js +62 -0
  79. package/dist/inlinealert_vars_css.main.js.map +1 -0
  80. package/dist/inlinealert_vars_css.mjs +64 -0
  81. package/dist/inlinealert_vars_css.module.js +64 -0
  82. package/dist/inlinealert_vars_css.module.js.map +1 -0
  83. package/dist/intlStrings.main.js +108 -0
  84. package/dist/intlStrings.main.js.map +1 -0
  85. package/dist/intlStrings.mjs +110 -0
  86. package/dist/intlStrings.module.js +110 -0
  87. package/dist/intlStrings.module.js.map +1 -0
  88. package/dist/it-IT.main.js +9 -0
  89. package/dist/it-IT.main.js.map +1 -0
  90. package/dist/it-IT.mjs +11 -0
  91. package/dist/it-IT.module.js +11 -0
  92. package/dist/it-IT.module.js.map +1 -0
  93. package/dist/ja-JP.main.js +9 -0
  94. package/dist/ja-JP.main.js.map +1 -0
  95. package/dist/ja-JP.mjs +11 -0
  96. package/dist/ja-JP.module.js +11 -0
  97. package/dist/ja-JP.module.js.map +1 -0
  98. package/dist/ko-KR.main.js +9 -0
  99. package/dist/ko-KR.main.js.map +1 -0
  100. package/dist/ko-KR.mjs +11 -0
  101. package/dist/ko-KR.module.js +11 -0
  102. package/dist/ko-KR.module.js.map +1 -0
  103. package/dist/lt-LT.main.js +9 -0
  104. package/dist/lt-LT.main.js.map +1 -0
  105. package/dist/lt-LT.mjs +11 -0
  106. package/dist/lt-LT.module.js +11 -0
  107. package/dist/lt-LT.module.js.map +1 -0
  108. package/dist/lv-LV.main.js +9 -0
  109. package/dist/lv-LV.main.js.map +1 -0
  110. package/dist/lv-LV.mjs +11 -0
  111. package/dist/lv-LV.module.js +11 -0
  112. package/dist/lv-LV.module.js.map +1 -0
  113. package/dist/main.js +23 -0
  114. package/dist/main.js.map +1 -0
  115. package/dist/module.js +18 -0
  116. package/dist/module.js.map +1 -0
  117. package/dist/nb-NO.main.js +9 -0
  118. package/dist/nb-NO.main.js.map +1 -0
  119. package/dist/nb-NO.mjs +11 -0
  120. package/dist/nb-NO.module.js +11 -0
  121. package/dist/nb-NO.module.js.map +1 -0
  122. package/dist/nl-NL.main.js +9 -0
  123. package/dist/nl-NL.main.js.map +1 -0
  124. package/dist/nl-NL.mjs +11 -0
  125. package/dist/nl-NL.module.js +11 -0
  126. package/dist/nl-NL.module.js.map +1 -0
  127. package/dist/pl-PL.main.js +9 -0
  128. package/dist/pl-PL.main.js.map +1 -0
  129. package/dist/pl-PL.mjs +11 -0
  130. package/dist/pl-PL.module.js +11 -0
  131. package/dist/pl-PL.module.js.map +1 -0
  132. package/dist/pt-BR.main.js +9 -0
  133. package/dist/pt-BR.main.js.map +1 -0
  134. package/dist/pt-BR.mjs +11 -0
  135. package/dist/pt-BR.module.js +11 -0
  136. package/dist/pt-BR.module.js.map +1 -0
  137. package/dist/pt-PT.main.js +9 -0
  138. package/dist/pt-PT.main.js.map +1 -0
  139. package/dist/pt-PT.mjs +11 -0
  140. package/dist/pt-PT.module.js +11 -0
  141. package/dist/pt-PT.module.js.map +1 -0
  142. package/dist/ro-RO.main.js +9 -0
  143. package/dist/ro-RO.main.js.map +1 -0
  144. package/dist/ro-RO.mjs +11 -0
  145. package/dist/ro-RO.module.js +11 -0
  146. package/dist/ro-RO.module.js.map +1 -0
  147. package/dist/ru-RU.main.js +9 -0
  148. package/dist/ru-RU.main.js.map +1 -0
  149. package/dist/ru-RU.mjs +11 -0
  150. package/dist/ru-RU.module.js +11 -0
  151. package/dist/ru-RU.module.js.map +1 -0
  152. package/dist/sk-SK.main.js +9 -0
  153. package/dist/sk-SK.main.js.map +1 -0
  154. package/dist/sk-SK.mjs +11 -0
  155. package/dist/sk-SK.module.js +11 -0
  156. package/dist/sk-SK.module.js.map +1 -0
  157. package/dist/sl-SI.main.js +9 -0
  158. package/dist/sl-SI.main.js.map +1 -0
  159. package/dist/sl-SI.mjs +11 -0
  160. package/dist/sl-SI.module.js +11 -0
  161. package/dist/sl-SI.module.js.map +1 -0
  162. package/dist/sr-SP.main.js +9 -0
  163. package/dist/sr-SP.main.js.map +1 -0
  164. package/dist/sr-SP.mjs +11 -0
  165. package/dist/sr-SP.module.js +11 -0
  166. package/dist/sr-SP.module.js.map +1 -0
  167. package/dist/sv-SE.main.js +9 -0
  168. package/dist/sv-SE.main.js.map +1 -0
  169. package/dist/sv-SE.mjs +11 -0
  170. package/dist/sv-SE.module.js +11 -0
  171. package/dist/sv-SE.module.js.map +1 -0
  172. package/dist/tr-TR.main.js +9 -0
  173. package/dist/tr-TR.main.js.map +1 -0
  174. package/dist/tr-TR.mjs +11 -0
  175. package/dist/tr-TR.module.js +11 -0
  176. package/dist/tr-TR.module.js.map +1 -0
  177. package/dist/types.d.ts +24 -0
  178. package/dist/types.d.ts.map +1 -0
  179. package/dist/uk-UA.main.js +9 -0
  180. package/dist/uk-UA.main.js.map +1 -0
  181. package/dist/uk-UA.mjs +11 -0
  182. package/dist/uk-UA.module.js +11 -0
  183. package/dist/uk-UA.module.js.map +1 -0
  184. package/dist/vars.7182e6d0.css +199 -0
  185. package/dist/vars.7182e6d0.css.map +1 -0
  186. package/dist/zh-CN.main.js +9 -0
  187. package/dist/zh-CN.main.js.map +1 -0
  188. package/dist/zh-CN.mjs +11 -0
  189. package/dist/zh-CN.module.js +11 -0
  190. package/dist/zh-CN.module.js.map +1 -0
  191. package/dist/zh-TW.main.js +9 -0
  192. package/dist/zh-TW.main.js.map +1 -0
  193. package/dist/zh-TW.mjs +11 -0
  194. package/dist/zh-TW.module.js +11 -0
  195. package/dist/zh-TW.module.js.map +1 -0
  196. package/package.json +59 -0
  197. package/src/InlineAlert.tsx +115 -0
  198. package/src/index.ts +16 -0
@@ -0,0 +1,199 @@
1
+ .G_feca_i18nFontFamily {
2
+ font-synthesis: weight;
3
+ font-family: adobe-clean, Source Sans Pro, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Ubuntu, Trebuchet MS, Lucida Grande, sans-serif;
4
+ }
5
+
6
+ .G_feca_i18nFontFamily:lang(ar) {
7
+ font-family: myriad-arabic, adobe-clean, Source Sans Pro, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Ubuntu, Trebuchet MS, Lucida Grande, sans-serif;
8
+ }
9
+
10
+ .G_feca_i18nFontFamily:lang(he) {
11
+ font-family: myriad-hebrew, adobe-clean, Source Sans Pro, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Ubuntu, Trebuchet MS, Lucida Grande, sans-serif;
12
+ }
13
+
14
+ .G_feca_i18nFontFamily:lang(zh) {
15
+ font-family: adobe-clean-han-traditional, source-han-traditional, MingLiu, Heiti TC Light, sans-serif;
16
+ }
17
+
18
+ .G_feca_i18nFontFamily:lang(zh-Hans) {
19
+ font-family: adobe-clean-han-simplified-c, source-han-simplified-c, SimSun, Heiti SC Light, sans-serif;
20
+ }
21
+
22
+ .G_feca_i18nFontFamily:lang(zh-Hant) {
23
+ font-family: adobe-clean-han-traditional, source-han-traditional, MingLiu, Microsoft JhengHei UI, Microsoft JhengHei, Heiti TC Light, sans-serif;
24
+ }
25
+
26
+ .G_feca_i18nFontFamily:lang(zh-SG), .G_feca_i18nFontFamily:lang(zh-CN) {
27
+ font-family: adobe-clean-han-simplified-c, source-han-simplified-c, SimSun, Heiti SC Light, sans-serif;
28
+ }
29
+
30
+ .G_feca_i18nFontFamily:lang(ko) {
31
+ font-family: adobe-clean-han-korean, source-han-korean, Malgun Gothic, Apple Gothic, sans-serif;
32
+ }
33
+
34
+ .G_feca_i18nFontFamily:lang(ja) {
35
+ font-family: adobe-clean-han-japanese, Hiragino Kaku Gothic ProN, ヒラギノ角ゴ ProN W3, Osaka, YuGothic, Yu Gothic, メイリオ, Meiryo, MS Pゴシック, MS PGothic, sans-serif;
36
+ }
37
+
38
+ .G_feca_spectrum-FocusRing-ring {
39
+ --spectrum-focus-ring-border-radius: var(--spectrum-textfield-border-radius, var(--spectrum-alias-border-radius-regular));
40
+ --spectrum-focus-ring-gap: var(--spectrum-alias-input-focusring-gap);
41
+ --spectrum-focus-ring-size: var(--spectrum-alias-input-focusring-size);
42
+ --spectrum-focus-ring-border-size: 0px;
43
+ --spectrum-focus-ring-color: var(--spectrum-high-contrast-focus-ring-color, var(--spectrum-alias-focus-ring-color, var(--spectrum-alias-focus-color)));
44
+ }
45
+
46
+ .G_feca_spectrum-FocusRing-ring:after {
47
+ border-radius: calc(var(--spectrum-focus-ring-border-radius) + var(--spectrum-focus-ring-gap));
48
+ content: "";
49
+ margin: calc(-1 * var(--spectrum-focus-ring-border-size));
50
+ pointer-events: none;
51
+ transition: box-shadow var(--spectrum-global-animation-duration-100, .13s) ease-out, margin var(--spectrum-global-animation-duration-100, .13s) ease-out;
52
+ display: block;
53
+ position: absolute;
54
+ inset: 0;
55
+ }
56
+
57
+ .G_feca_spectrum-FocusRing.G_feca_focus-ring:after {
58
+ margin: calc(var(--spectrum-focus-ring-gap) * -1 - var(--spectrum-focus-ring-border-size));
59
+ box-shadow: 0 0 0 var(--spectrum-focus-ring-size) var(--spectrum-focus-ring-color);
60
+ }
61
+
62
+ .G_feca_spectrum-FocusRing--quiet:after {
63
+ border-radius: 0;
64
+ }
65
+
66
+ .G_feca_spectrum-FocusRing--quiet.G_feca_focus-ring:after {
67
+ margin: 0 0 calc(var(--spectrum-focus-ring-gap) * -1 - var(--spectrum-focus-ring-border-size)) 0;
68
+ box-shadow: 0 var(--spectrum-focus-ring-size) 0 var(--spectrum-focus-ring-color);
69
+ }
70
+
71
+ @media (forced-colors: active) {
72
+ .G_feca_spectrum-FocusRing, .G_feca_spectrum-FocusRing-ring, .G_feca_spectrum-FocusRing--quiet {
73
+ --spectrum-high-contrast-focus-ring-color: Highlight;
74
+ }
75
+
76
+ :is(.G_feca_spectrum-FocusRing, .G_feca_spectrum-FocusRing-ring, .G_feca_spectrum-FocusRing--quiet):after {
77
+ forced-color-adjust: none;
78
+ }
79
+ }
80
+
81
+ .G_feca_spectrum-InLineAlert {
82
+ --spectrum-focus-ring-gap: var(--spectrum-alias-focus-ring-gap, var(--spectrum-global-dimension-static-size-25));
83
+ --spectrum-focus-ring-border-size: var(--spectrum-alias-border-size-thick, var(--spectrum-global-dimension-static-size-25));
84
+ --spectrum-focus-ring-border-radius: var(--spectrum-alias-border-radius-regular, var(--spectrum-global-dimension-size-50));
85
+ --spectrum-focus-ring-size: var(--spectrum-button-primary-focus-ring-size-key-focus, var(--spectrum-alias-focus-ring-size));
86
+ box-sizing: border-box;
87
+ padding-block: var(--spectrum-global-dimension-static-size-300, 24px);
88
+ padding-inline: var(--spectrum-global-dimension-static-size-300, 24px);
89
+ border-block-width: var(--spectrum-alias-border-size-thick, var(--spectrum-global-dimension-static-size-25));
90
+ border-inline-width: var(--spectrum-alias-border-size-thick, var(--spectrum-global-dimension-static-size-25));
91
+ border-radius: var(--spectrum-alias-border-radius-regular, var(--spectrum-global-dimension-size-50));
92
+ border-style: solid;
93
+ outline: none;
94
+ min-inline-size: 240px;
95
+ display: inline-block;
96
+ position: relative;
97
+ }
98
+
99
+ .G_feca_spectrum-InLineAlert .G_feca_spectrum-InLineAlert-grid {
100
+ column-gap: var(--spectrum-global-dimension-static-size-300, 24px);
101
+ grid-template: "G_feca_heading G_feca_icon"
102
+ "G_feca_content G_feca_content"
103
+ / 1fr auto;
104
+ width: 100%;
105
+ display: grid;
106
+ }
107
+
108
+ .G_feca_spectrum-InLineAlert.G_feca_spectrum-InLineAlert--neutral .G_feca_spectrum-InLineAlert-grid {
109
+ grid-template-areas: "G_feca_heading"
110
+ "G_feca_content";
111
+ column-gap: 0;
112
+ }
113
+
114
+ .G_feca_spectrum-InLineAlert-icon {
115
+ inline-size: var(--spectrum-global-dimension-size-225);
116
+ block-size: var(--spectrum-global-dimension-size-225);
117
+ grid-area: G_feca_icon;
118
+ }
119
+
120
+ .G_feca_spectrum-InLineAlert-heading {
121
+ font-weight: var(--spectrum-alias-heading-text-font-weight-regular, var(--spectrum-global-font-weight-bold));
122
+ font-style: var(--spectrum-global-font-style-regular, normal);
123
+ font-size: var(--spectrum-alias-heading-xxs-text-size, var(--spectrum-global-dimension-font-size-100));
124
+ line-height: var(--spectrum-alias-heading-text-line-height, var(--spectrum-global-font-line-height-small));
125
+ text-transform: none;
126
+ min-block-size: var(--spectrum-global-dimension-size-250);
127
+ grid-area: G_feca_heading;
128
+ margin-block: 0;
129
+ display: block;
130
+ }
131
+
132
+ .G_feca_spectrum-InLineAlert-content {
133
+ word-wrap: break-word;
134
+ font-weight: var(--spectrum-alias-body-text-font-weight, var(--spectrum-global-font-weight-regular));
135
+ font-style: var(--spectrum-global-font-style-regular, normal);
136
+ font-size: var(--spectrum-global-dimension-font-size-100);
137
+ line-height: var(--spectrum-alias-line-height-body, var(--spectrum-global-font-line-height-medium));
138
+ grid-area: G_feca_content;
139
+ margin-block-start: var(--spectrum-global-dimension-static-size-200, 16px);
140
+ margin-block-end: 0;
141
+ margin-inline: 0;
142
+ padding: 0;
143
+ display: block;
144
+ }
145
+
146
+ @media (forced-colors: active) {
147
+ .G_feca_spectrum-InLineAlert {
148
+ --highcontrast-inlinealert-background-color: Background;
149
+ --highcontrast-inlinealert-heading-color: CanvasText;
150
+ --highcontrast-inlinealert-content-color: CanvasText;
151
+ --highcontrast-inlinealert-border-and-icon-color: ButtonBorder;
152
+ }
153
+ }
154
+
155
+ .G_feca_spectrum-InLineAlert {
156
+ background-color: var(--highcontrast-inlinealert-background-color, var(--spectrum-global-color-gray-50));
157
+ border-color: var(--highcontrast-inlinealert-border-and-icon-color, var(--spectrum-gray-visual-color));
158
+ }
159
+
160
+ .G_feca_spectrum-InLineAlert-heading {
161
+ color: var(--highcontrast-inlinealert-heading-color, var(--spectrum-alias-heading-text-color, var(--spectrum-global-color-gray-900)));
162
+ }
163
+
164
+ .G_feca_spectrum-InLineAlert-content {
165
+ color: var(--highcontrast-inlinealert-content-color, var(--spectrum-alias-text-color, var(--spectrum-global-color-gray-800)));
166
+ }
167
+
168
+ .G_feca_spectrum-InLineAlert--info {
169
+ border-color: var(--highcontrast-inlinealert-border-and-icon-color, var(--spectrum-informative-visual-color));
170
+ }
171
+
172
+ .G_feca_spectrum-InLineAlert--info .G_feca_spectrum-InLineAlert-icon {
173
+ color: var(--highcontrast-inlinealert-border-and-icon-color, var(--spectrum-informative-visual-color));
174
+ }
175
+
176
+ .G_feca_spectrum-InLineAlert--notice {
177
+ border-color: var(--highcontrast-inlinealert-border-and-icon-color, var(--spectrum-notice-visual-color));
178
+ }
179
+
180
+ .G_feca_spectrum-InLineAlert--notice .G_feca_spectrum-InLineAlert-icon {
181
+ color: var(--highcontrast-inlinealert-border-and-icon-color, var(--spectrum-notice-visual-color));
182
+ }
183
+
184
+ .G_feca_spectrum-InLineAlert--positive {
185
+ border-color: var(--highcontrast-inlinealert-border-and-icon-color, var(--spectrum-positive-visual-color));
186
+ }
187
+
188
+ .G_feca_spectrum-InLineAlert--positive .G_feca_spectrum-InLineAlert-icon {
189
+ color: var(--highcontrast-inlinealert-border-and-icon-color, var(--spectrum-positive-visual-color));
190
+ }
191
+
192
+ .G_feca_spectrum-InLineAlert--negative {
193
+ border-color: var(--highcontrast-inlinealert-border-and-icon-color, var(--spectrum-negative-visual-color));
194
+ }
195
+
196
+ .G_feca_spectrum-InLineAlert--negative .G_feca_spectrum-InLineAlert-icon {
197
+ color: var(--highcontrast-inlinealert-border-and-icon-color, var(--spectrum-negative-visual-color));
198
+ }
199
+ /*# sourceMappingURL=vars.7182e6d0.css.map */
@@ -0,0 +1 @@
1
+ {"mappings":"AA4DA;;;;;AAIE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAQA;;;;AAIA;;;;AAKF;;;;;;;;AAOE;;;;;;;;;;;AAqBE;;;;;AAQF;;;;AAKE;;;;;AAOJ;EACE;;;;EAIE;;;;;AAMJ;;;;;;;;;;;;;;;;;;AAwBA;;;;;;;;;AAWA;;;;;;AAKA;;;;;;AAOA;;;;;;;;;;;;AAeA;;;;;;;;;;;;;;AA8BA;EACE;;;;;;;;AAQF;;;;;AAKA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA","sources":["packages/@adobe/spectrum-css-temp/components/inlinealert/vars.css"],"sourcesContent":["/*\nCopyright 2023 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"vars.7182e6d0.css.map"}
@@ -0,0 +1,9 @@
1
+ module.exports = {
2
+ "info": `\u{4FE1}\u{606F}`,
3
+ "negative": `\u{9519}\u{8BEF}`,
4
+ "notice": `\u{8B66}\u{544A}`,
5
+ "positive": `\u{6210}\u{529F}`
6
+ };
7
+
8
+
9
+ //# sourceMappingURL=zh-CN.main.js.map
@@ -0,0 +1 @@
1
+ {"mappings":"AAAA,iBAAiB;IAAG,QAAQ,CAAC,gBAAE,CAAC;IAC9B,YAAY,CAAC,gBAAE,CAAC;IAChB,UAAU,CAAC,gBAAE,CAAC;IACd,YAAY,CAAC,gBAAE,CAAC;AAClB","sources":["packages/@react-spectrum/inlinealert/intl/zh-CN.json"],"sourcesContent":["{\n \"info\": \"信息\",\n \"negative\": \"错误\",\n \"notice\": \"警告\",\n \"positive\": \"成功\"\n}\n"],"names":[],"version":3,"file":"zh-CN.main.js.map"}
package/dist/zh-CN.mjs ADDED
@@ -0,0 +1,11 @@
1
+ var $a1438ca118687381$exports = {};
2
+ $a1438ca118687381$exports = {
3
+ "info": `\u{4FE1}\u{606F}`,
4
+ "negative": `\u{9519}\u{8BEF}`,
5
+ "notice": `\u{8B66}\u{544A}`,
6
+ "positive": `\u{6210}\u{529F}`
7
+ };
8
+
9
+
10
+ export {$a1438ca118687381$exports as default};
11
+ //# sourceMappingURL=zh-CN.module.js.map
@@ -0,0 +1,11 @@
1
+ var $a1438ca118687381$exports = {};
2
+ $a1438ca118687381$exports = {
3
+ "info": `\u{4FE1}\u{606F}`,
4
+ "negative": `\u{9519}\u{8BEF}`,
5
+ "notice": `\u{8B66}\u{544A}`,
6
+ "positive": `\u{6210}\u{529F}`
7
+ };
8
+
9
+
10
+ export {$a1438ca118687381$exports as default};
11
+ //# sourceMappingURL=zh-CN.module.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";AAAA,4BAAiB;IAAG,QAAQ,CAAC,gBAAE,CAAC;IAC9B,YAAY,CAAC,gBAAE,CAAC;IAChB,UAAU,CAAC,gBAAE,CAAC;IACd,YAAY,CAAC,gBAAE,CAAC;AAClB","sources":["packages/@react-spectrum/inlinealert/intl/zh-CN.json"],"sourcesContent":["{\n \"info\": \"信息\",\n \"negative\": \"错误\",\n \"notice\": \"警告\",\n \"positive\": \"成功\"\n}\n"],"names":[],"version":3,"file":"zh-CN.module.js.map"}
@@ -0,0 +1,9 @@
1
+ module.exports = {
2
+ "info": `\u{8CC7}\u{8A0A}`,
3
+ "negative": `\u{932F}\u{8AA4}`,
4
+ "notice": `\u{8B66}\u{544A}`,
5
+ "positive": `\u{6210}\u{529F}`
6
+ };
7
+
8
+
9
+ //# sourceMappingURL=zh-TW.main.js.map
@@ -0,0 +1 @@
1
+ {"mappings":"AAAA,iBAAiB;IAAG,QAAQ,CAAC,gBAAE,CAAC;IAC9B,YAAY,CAAC,gBAAE,CAAC;IAChB,UAAU,CAAC,gBAAE,CAAC;IACd,YAAY,CAAC,gBAAE,CAAC;AAClB","sources":["packages/@react-spectrum/inlinealert/intl/zh-TW.json"],"sourcesContent":["{\n \"info\": \"資訊\",\n \"negative\": \"錯誤\",\n \"notice\": \"警告\",\n \"positive\": \"成功\"\n}\n"],"names":[],"version":3,"file":"zh-TW.main.js.map"}
package/dist/zh-TW.mjs ADDED
@@ -0,0 +1,11 @@
1
+ var $948f0650714aa894$exports = {};
2
+ $948f0650714aa894$exports = {
3
+ "info": `\u{8CC7}\u{8A0A}`,
4
+ "negative": `\u{932F}\u{8AA4}`,
5
+ "notice": `\u{8B66}\u{544A}`,
6
+ "positive": `\u{6210}\u{529F}`
7
+ };
8
+
9
+
10
+ export {$948f0650714aa894$exports as default};
11
+ //# sourceMappingURL=zh-TW.module.js.map
@@ -0,0 +1,11 @@
1
+ var $948f0650714aa894$exports = {};
2
+ $948f0650714aa894$exports = {
3
+ "info": `\u{8CC7}\u{8A0A}`,
4
+ "negative": `\u{932F}\u{8AA4}`,
5
+ "notice": `\u{8B66}\u{544A}`,
6
+ "positive": `\u{6210}\u{529F}`
7
+ };
8
+
9
+
10
+ export {$948f0650714aa894$exports as default};
11
+ //# sourceMappingURL=zh-TW.module.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";AAAA,4BAAiB;IAAG,QAAQ,CAAC,gBAAE,CAAC;IAC9B,YAAY,CAAC,gBAAE,CAAC;IAChB,UAAU,CAAC,gBAAE,CAAC;IACd,YAAY,CAAC,gBAAE,CAAC;AAClB","sources":["packages/@react-spectrum/inlinealert/intl/zh-TW.json"],"sourcesContent":["{\n \"info\": \"資訊\",\n \"negative\": \"錯誤\",\n \"notice\": \"警告\",\n \"positive\": \"成功\"\n}\n"],"names":[],"version":3,"file":"zh-TW.module.js.map"}
package/package.json ADDED
@@ -0,0 +1,59 @@
1
+ {
2
+ "name": "@react-spectrum/inlinealert",
3
+ "version": "3.0.0-nightly-641446f65-240905",
4
+ "description": "Spectrum UI components in React",
5
+ "license": "Apache-2.0",
6
+ "main": "dist/main.js",
7
+ "module": "dist/module.js",
8
+ "types": "dist/types.d.ts",
9
+ "exports": {
10
+ "types": "./dist/types.d.ts",
11
+ "import": "./dist/import.mjs",
12
+ "require": "./dist/main.js"
13
+ },
14
+ "source": "src/index.ts",
15
+ "files": [
16
+ "dist",
17
+ "src"
18
+ ],
19
+ "sideEffects": [
20
+ "*.css"
21
+ ],
22
+ "targets": {
23
+ "main": {
24
+ "includeNodeModules": [
25
+ "@adobe/spectrum-css-temp"
26
+ ]
27
+ },
28
+ "module": {
29
+ "includeNodeModules": [
30
+ "@adobe/spectrum-css-temp"
31
+ ]
32
+ }
33
+ },
34
+ "repository": {
35
+ "type": "git",
36
+ "url": "https://github.com/adobe/react-spectrum"
37
+ },
38
+ "dependencies": {
39
+ "@react-aria/focus": "^3.0.0-nightly-641446f65-240905",
40
+ "@react-aria/i18n": "^3.0.0-nightly-641446f65-240905",
41
+ "@react-aria/utils": "^3.0.0-nightly-641446f65-240905",
42
+ "@react-spectrum/layout": "^3.0.0-nightly-641446f65-240905",
43
+ "@react-spectrum/utils": "^3.0.0-nightly-641446f65-240905",
44
+ "@react-types/shared": "^3.0.0-nightly-641446f65-240905",
45
+ "@spectrum-icons/ui": "^3.0.0-nightly-641446f65-240905",
46
+ "@swc/helpers": "^0.5.0"
47
+ },
48
+ "devDependencies": {
49
+ "@adobe/spectrum-css-temp": "3.0.0-alpha.1"
50
+ },
51
+ "peerDependencies": {
52
+ "@react-spectrum/provider": "^3.0.0-nightly-641446f65-240905",
53
+ "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0"
54
+ },
55
+ "publishConfig": {
56
+ "access": "public"
57
+ },
58
+ "stableVersion": "3.2.7"
59
+ }
@@ -0,0 +1,115 @@
1
+ /*
2
+ * Copyright 2023 Adobe. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
12
+
13
+ import AlertMedium from '@spectrum-icons/ui/AlertMedium';
14
+ import {classNames, SlotProvider, useDOMRef, useStyleProps} from '@react-spectrum/utils';
15
+ import {DOMProps, DOMRef, StyleProps} from '@react-types/shared';
16
+ import {filterDOMProps} from '@react-aria/utils';
17
+ import {FocusRing} from '@react-aria/focus';
18
+ import {Grid} from '@react-spectrum/layout';
19
+ import InfoMedium from '@spectrum-icons/ui/InfoMedium';
20
+ // @ts-ignore
21
+ import intlMessages from '../intl/*.json';
22
+ import React, {ReactNode, useEffect, useRef} from 'react';
23
+ import styles from '@adobe/spectrum-css-temp/components/inlinealert/vars.css';
24
+ import SuccessMedium from '@spectrum-icons/ui/SuccessMedium';
25
+ import {useLocalizedStringFormatter} from '@react-aria/i18n';
26
+ import {useProviderProps} from '@react-spectrum/provider';
27
+
28
+ export interface SpectrumInlineAlertProps extends DOMProps, StyleProps {
29
+ /**
30
+ * The [visual style](https://spectrum.adobe.com/page/in-line-alert/#Options) of the Inline Alert.
31
+ * @default 'neutral'
32
+ */
33
+ variant?: 'neutral' | 'info' | 'positive' | 'notice' | 'negative',
34
+ /**
35
+ * The contents of the Inline Alert.
36
+ */
37
+ children: ReactNode,
38
+ /**
39
+ * Whether to automatically focus the Inline Alert when it first renders.
40
+ */
41
+ autoFocus?: boolean
42
+ }
43
+
44
+ let ICONS = {
45
+ info: InfoMedium,
46
+ positive: SuccessMedium,
47
+ notice: AlertMedium,
48
+ negative: AlertMedium
49
+ };
50
+
51
+ function InlineAlert(props: SpectrumInlineAlertProps, ref: DOMRef<HTMLDivElement>) {
52
+ props = useProviderProps(props);
53
+ let {
54
+ children,
55
+ variant = 'neutral',
56
+ autoFocus,
57
+ ...otherProps
58
+ } = props;
59
+
60
+ let {styleProps} = useStyleProps(otherProps);
61
+ let domRef = useDOMRef(ref);
62
+
63
+ let slots = {
64
+ heading: {UNSAFE_className: styles['spectrum-InLineAlert-heading']},
65
+ content: {UNSAFE_className: styles['spectrum-InLineAlert-content']}
66
+ };
67
+
68
+ let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/inlinealert');
69
+ let Icon: typeof React.Component | null = null;
70
+ let iconAlt: string = '';
71
+ if (variant in ICONS) {
72
+ Icon = ICONS[variant];
73
+ iconAlt = stringFormatter.format(variant);
74
+ }
75
+
76
+ let autoFocusRef = useRef(props.autoFocus);
77
+ useEffect(() => {
78
+ if (autoFocusRef.current && domRef.current) {
79
+ domRef.current.focus();
80
+ }
81
+ autoFocusRef.current = false;
82
+ }, [domRef]);
83
+
84
+ return (
85
+ <FocusRing focusRingClass={styles['focus-ring']}>
86
+ <div
87
+ {...filterDOMProps(props)}
88
+ {...styleProps}
89
+ ref={domRef}
90
+ tabIndex={autoFocus ? -1 : undefined}
91
+ autoFocus={autoFocus}
92
+ className={classNames(
93
+ styles,
94
+ 'spectrum-InLineAlert',
95
+ `spectrum-InLineAlert--${variant}`,
96
+ styleProps.className
97
+ )}
98
+ role="alert">
99
+ <Grid UNSAFE_className={styles['spectrum-InLineAlert-grid']}>
100
+ <SlotProvider slots={slots}>
101
+ {Icon && <Icon UNSAFE_className={styles['spectrum-InLineAlert-icon']} aria-label={iconAlt} />}
102
+ {children}
103
+ </SlotProvider>
104
+ </Grid>
105
+ </div>
106
+ </FocusRing>
107
+ );
108
+ }
109
+
110
+ /**
111
+ * Inline alerts display a non-modal message associated with objects in a view.
112
+ * These are often used in form validation, providing a place to aggregate feedback related to multiple fields.
113
+ */
114
+ const _InlineAlert = React.forwardRef(InlineAlert);
115
+ export {_InlineAlert as InlineAlert};
package/src/index.ts ADDED
@@ -0,0 +1,16 @@
1
+ /*
2
+ * Copyright 2023 Adobe. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
12
+
13
+ /// <reference types="css-module-types" />
14
+
15
+ export {InlineAlert} from './InlineAlert';
16
+ export type {SpectrumInlineAlertProps} from './InlineAlert';