@solexllc/usx-react 0.1.2 → 0.1.4
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.
package/dist/index.cjs
CHANGED
|
@@ -1321,9 +1321,16 @@
|
|
|
1321
1321
|
onClick = void 0,
|
|
1322
1322
|
...props
|
|
1323
1323
|
}) {
|
|
1324
|
-
const icon = /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "arrow_upward", size: iconSize
|
|
1324
|
+
const icon = /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "arrow_upward", size: iconSize, className: classNames(
|
|
1325
|
+
iconPosition === "left" ? "margin-right-05" : "margin-left-05"
|
|
1326
|
+
) });
|
|
1325
1327
|
if (href) {
|
|
1326
|
-
const linkClasses = classNames(
|
|
1328
|
+
const linkClasses = classNames(
|
|
1329
|
+
"usx-link",
|
|
1330
|
+
"usx-no-visited",
|
|
1331
|
+
"flex-align-center",
|
|
1332
|
+
className
|
|
1333
|
+
);
|
|
1327
1334
|
return /* @__PURE__ */ jsxRuntime.jsxs("a", { className: linkClasses, href, ...props, children: [
|
|
1328
1335
|
iconPosition === "left" && icon,
|
|
1329
1336
|
label,
|
package/dist/index.js
CHANGED
|
@@ -1319,9 +1319,16 @@ function BackToTop({
|
|
|
1319
1319
|
onClick = void 0,
|
|
1320
1320
|
...props
|
|
1321
1321
|
}) {
|
|
1322
|
-
const icon = /* @__PURE__ */ jsx(Icon, { name: "arrow_upward", size: iconSize
|
|
1322
|
+
const icon = /* @__PURE__ */ jsx(Icon, { name: "arrow_upward", size: iconSize, className: classNames(
|
|
1323
|
+
iconPosition === "left" ? "margin-right-05" : "margin-left-05"
|
|
1324
|
+
) });
|
|
1323
1325
|
if (href) {
|
|
1324
|
-
const linkClasses = classNames(
|
|
1326
|
+
const linkClasses = classNames(
|
|
1327
|
+
"usx-link",
|
|
1328
|
+
"usx-no-visited",
|
|
1329
|
+
"flex-align-center",
|
|
1330
|
+
className
|
|
1331
|
+
);
|
|
1325
1332
|
return /* @__PURE__ */ jsxs("a", { className: linkClasses, href, ...props, children: [
|
|
1326
1333
|
iconPosition === "left" && icon,
|
|
1327
1334
|
label,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solexllc/usx-react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "React component library for USX.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"dist"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@solexllc/usx": "0.1.
|
|
29
|
-
"@solexllc/usx-theme": "0.
|
|
30
|
-
"@solexllc/usx-uswds-fixes": "0.1.
|
|
28
|
+
"@solexllc/usx": "0.1.4",
|
|
29
|
+
"@solexllc/usx-theme": "0.2.1",
|
|
30
|
+
"@solexllc/usx-uswds-fixes": "0.1.3",
|
|
31
31
|
"classnames": "^2.5.1",
|
|
32
32
|
"prop-types": "^15.8.1"
|
|
33
33
|
},
|
|
@@ -23,11 +23,20 @@ export default function BackToTop({
|
|
|
23
23
|
...props
|
|
24
24
|
}: BackToTopProps) {
|
|
25
25
|
const icon = (
|
|
26
|
-
<Icon name="arrow_upward" size={iconSize}
|
|
26
|
+
<Icon name="arrow_upward" size={iconSize} className={
|
|
27
|
+
ClassNames(
|
|
28
|
+
iconPosition === 'left' ? 'margin-right-05' : 'margin-left-05'
|
|
29
|
+
)
|
|
30
|
+
} />
|
|
27
31
|
);
|
|
28
32
|
|
|
29
33
|
if (href) {
|
|
30
|
-
const linkClasses = ClassNames(
|
|
34
|
+
const linkClasses = ClassNames(
|
|
35
|
+
'usx-link',
|
|
36
|
+
'usx-no-visited',
|
|
37
|
+
'flex-align-center',
|
|
38
|
+
className
|
|
39
|
+
);
|
|
31
40
|
return (
|
|
32
41
|
<a className={linkClasses} href={href} {...props}>
|
|
33
42
|
{iconPosition === 'left' && icon}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{# Django template for BackToTop #}
|
|
2
2
|
{% if href %}
|
|
3
3
|
<a
|
|
4
|
-
class="usx-link usx-no-visited{% if className %} {{ className }}{% endif %}"
|
|
4
|
+
class="usx-link usx-no-visited flex-align-center{% if className %} {{ className }}{% endif %}"
|
|
5
5
|
href="{{ href }}"
|
|
6
6
|
{% if tabindex %}tabindex="{{ tabindex }}"{% endif %}
|
|
7
7
|
>
|
|
8
8
|
{% if iconPosition == 'left' or not iconPosition %}
|
|
9
|
-
<svg class="
|
|
9
|
+
<svg class="margin-right-05usa-icon usa-icon--size-{{ iconSize|default:'2' }}" aria-hidden="true" focusable="false" role="img">
|
|
10
10
|
<use href="./img/sprite.svg#arrow_upward"></use>
|
|
11
11
|
</svg>
|
|
12
12
|
{% endif %}
|
|
13
13
|
{% if label %}{{ label }}{% endif %}
|
|
14
14
|
{% if iconPosition == 'right' %}
|
|
15
|
-
<svg class="usa-icon usa-icon--size-{{ iconSize|default:'2' }}" aria-hidden="true" focusable="false" role="img">
|
|
15
|
+
<svg class="margin-left-05 usa-icon usa-icon--size-{{ iconSize|default:'2' }}" aria-hidden="true" focusable="false" role="img">
|
|
16
16
|
<use href="./img/sprite.svg#arrow_upward"></use>
|
|
17
17
|
</svg>
|
|
18
18
|
{% endif %}
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"onChange": {
|
|
31
31
|
"type": "string",
|
|
32
|
-
"description": "JavaScript function to call when the selected theme changes — applying the theme
|
|
32
|
+
"description": "JavaScript function to call when the selected theme changes — applying the theme is the caller's responsibility. With @solexllc/usx-theme/themes, that's typically `document.documentElement.dataset.theme = value` (plus any persistence)."
|
|
33
33
|
},
|
|
34
34
|
"className": {
|
|
35
35
|
"type": "string",
|