@geoinsight/react-components 1.0.1 → 1.0.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/.pnp.cjs +126 -126
- package/.yarn/install-state.gz +0 -0
- package/.yarn/unplugged/{@swc-core-linux-x64-gnu-npm-1.3.105-928407db1c → @swc-core-linux-x64-gnu-npm-1.3.106-7bb327124d}/node_modules/@swc/core-linux-x64-gnu/package.json +1 -1
- package/.yarn/unplugged/{@swc-core-linux-x64-gnu-npm-1.3.105-928407db1c → @swc-core-linux-x64-gnu-npm-1.3.106-7bb327124d}/node_modules/@swc/core-linux-x64-gnu/swc.linux-x64-gnu.node +0 -0
- package/.yarn/unplugged/{@swc-core-virtual-9a270511cf → @swc-core-virtual-22cde85fc1}/node_modules/@swc/core/CHANGELOG.md +56 -57
- package/.yarn/unplugged/{@swc-core-virtual-9a270511cf → @swc-core-virtual-22cde85fc1}/node_modules/@swc/core/package.json +12 -12
- package/dist/cjs/components/button/index.d.ts +5 -1
- package/dist/cjs/components/menu/index.d.ts +1 -1
- package/dist/cjs/components/menu/menu-button.d.ts +6 -2
- package/dist/cjs/index.css +3 -0
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.js +17 -16
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/button/index.d.ts +5 -1
- package/dist/esm/components/menu/index.d.ts +1 -1
- package/dist/esm/components/menu/menu-button.d.ts +6 -2
- package/dist/esm/index.css +3 -0
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +17 -16
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- /package/.yarn/unplugged/{@swc-core-linux-x64-gnu-npm-1.3.105-928407db1c → @swc-core-linux-x64-gnu-npm-1.3.106-7bb327124d}/node_modules/@swc/core-linux-x64-gnu/.ready +0 -0
- /package/.yarn/unplugged/{@swc-core-linux-x64-gnu-npm-1.3.105-928407db1c → @swc-core-linux-x64-gnu-npm-1.3.106-7bb327124d}/node_modules/@swc/core-linux-x64-gnu/README.md +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-9a270511cf → @swc-core-virtual-22cde85fc1}/node_modules/@swc/core/.ready +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-9a270511cf → @swc-core-virtual-22cde85fc1}/node_modules/@swc/core/LICENSE +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-9a270511cf → @swc-core-virtual-22cde85fc1}/node_modules/@swc/core/README.md +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-9a270511cf → @swc-core-virtual-22cde85fc1}/node_modules/@swc/core/Visitor.d.ts +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-9a270511cf → @swc-core-virtual-22cde85fc1}/node_modules/@swc/core/Visitor.js +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-9a270511cf → @swc-core-virtual-22cde85fc1}/node_modules/@swc/core/binding.d.ts +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-9a270511cf → @swc-core-virtual-22cde85fc1}/node_modules/@swc/core/binding.js +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-9a270511cf → @swc-core-virtual-22cde85fc1}/node_modules/@swc/core/bindings/README.md +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-9a270511cf → @swc-core-virtual-22cde85fc1}/node_modules/@swc/core/bindings/binding_core_wasm/package.json +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-9a270511cf → @swc-core-virtual-22cde85fc1}/node_modules/@swc/core/index.d.ts +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-9a270511cf → @swc-core-virtual-22cde85fc1}/node_modules/@swc/core/index.js +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-9a270511cf → @swc-core-virtual-22cde85fc1}/node_modules/@swc/core/postinstall.js +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-9a270511cf → @swc-core-virtual-22cde85fc1}/node_modules/@swc/core/spack.d.ts +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-9a270511cf → @swc-core-virtual-22cde85fc1}/node_modules/@swc/core/spack.js +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-9a270511cf → @swc-core-virtual-22cde85fc1}/node_modules/@swc/core/util.d.ts +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-9a270511cf → @swc-core-virtual-22cde85fc1}/node_modules/@swc/core/util.js +0 -0
package/.yarn/install-state.gz
CHANGED
|
Binary file
|
|
@@ -5,6 +5,62 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
+
- **(binding/types)** Add `bugfixes` field to EnvConfig ([#8538](https://github.com/swc-project/swc/issues/8538)) ([49ebdf9](https://github.com/swc-project/swc/commit/49ebdf9fb7c9228c711c303c822add29bc3c8364))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
- **(common)** Fix source map generation with `inputSourceMap` ([#8546](https://github.com/swc-project/swc/issues/8546)) ([043ee85](https://github.com/swc-project/swc/commit/043ee85d0852c7c7d6193ad699074a599326aeec))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
- **(es/ast)** Add `definite` and `is_override` to `AutoAccessor` ([#8436](https://github.com/swc-project/swc/issues/8436)) ([572bcae](https://github.com/swc-project/swc/commit/572bcaefc1b6ba9f92c57a35ede61fec9f3221bd))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
- **(es/ast)** Fix definition of `SetterProp` ([#8314](https://github.com/swc-project/swc/issues/8314)) ([bc38ac9](https://github.com/swc-project/swc/commit/bc38ac906c427ba060f3da47c64726fe417162ed))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
- **(es/codegen)** Set `sourceRoot` of sourcemaps ([#6086](https://github.com/swc-project/swc/issues/6086)) ([ae78669](https://github.com/swc-project/swc/commit/ae786692a0d20254bc233472a23035ba1be25e46))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
- **(es/compat)** Support vars from `reserved_word` pass ([#8543](https://github.com/swc-project/swc/issues/8543)) ([fc929e9](https://github.com/swc-project/swc/commit/fc929e962ba18afa98ae4523e50ff630527a218f))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
- **(es/loader)** Don't use browser versions for `jsc.paths` ([#8548](https://github.com/swc-project/swc/issues/8548)) ([fab27da](https://github.com/swc-project/swc/commit/fab27dabed3a4d0478b28c86809cc06482b2c45c))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
- **(es/minifier)** Fix a bug related to inliner and the variable scoping ([#8542](https://github.com/swc-project/swc/issues/8542)) ([aa70131](https://github.com/swc-project/swc/commit/aa70131c558158abd3dcd3fca53dfe444c511ae1))
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
- **(es/module)** Fix resolving of dependencies ([#8533](https://github.com/swc-project/swc/issues/8533)) ([71fb5c1](https://github.com/swc-project/swc/commit/71fb5c12a75bec27cc775069f83b576019d261f2))
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
- **(es/module)** Fix handling of `*` in `jsc.paths` ([#8535](https://github.com/swc-project/swc/issues/8535)) ([2d8bd9e](https://github.com/swc-project/swc/commit/2d8bd9ed894cbc2e0e9063f6a1ab723c3d3bfdc6))
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
- **(es/quote)** Add support for import phase to quote macro ([#8536](https://github.com/swc-project/swc/issues/8536)) ([71930ff](https://github.com/swc-project/swc/commit/71930ffb5625fb58fab3200764ea98b05abab8ba))
|
|
39
|
+
|
|
40
|
+
### Features
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
- **(css/parser)** Implement error reporting for `@value` of CSS Modules ([#8547](https://github.com/swc-project/swc/issues/8547)) ([00619b1](https://github.com/swc-project/swc/commit/00619b17082e857d1d5822f04b9ee82b0a295cc3))
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
- **(es/ast)** Support import phase ([#8279](https://github.com/swc-project/swc/issues/8279)) ([72048ae](https://github.com/swc-project/swc/commit/72048ae1ced64b6d9d326e6d436a60b1191bc266))
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
- **(swc_core)** Expose `preset_env_base` ([#8537](https://github.com/swc-project/swc/issues/8537)) ([793f265](https://github.com/swc-project/swc/commit/793f2651a8c44c43cde8b83d4f98eda6e274676c))
|
|
51
|
+
|
|
52
|
+
### Miscellaneous Tasks
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
- **(common)** Update `sourcemap` ([#8544](https://github.com/swc-project/swc/issues/8544)) ([4630426](https://github.com/swc-project/swc/commit/4630426d6aa77af992787456e476b8862c25a45e))
|
|
57
|
+
|
|
58
|
+
## [1.3.105] - 2024-01-21
|
|
59
|
+
|
|
60
|
+
### Bug Fixes
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
8
64
|
- **(common)** Remove `<` and `>` from `Display` impl of `FileName::Custom` ([#8530](https://github.com/swc-project/swc/issues/8530)) ([014a6cd](https://github.com/swc-project/swc/commit/014a6cda8205183f6c3a5e395b6f89cbf7b388b9))
|
|
9
65
|
|
|
10
66
|
|
|
@@ -1425,15 +1481,9 @@
|
|
|
1425
1481
|
|
|
1426
1482
|
|
|
1427
1483
|
|
|
1428
|
-
- **(es)** Accept `parse` option for `minify()` ([#7543](https://github.com/swc-project/swc/issues/7543)) ([1d84e95](https://github.com/swc-project/swc/commit/1d84e952feefc3cd50e379455bb6648b82c42256))
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
1484
|
- **(es/compat)** Visit arrow body from optional chaining pass ([#7549](https://github.com/swc-project/swc/issues/7549)) ([bc6e950](https://github.com/swc-project/swc/commit/bc6e95052eaf60d71c544c8a88c8440d7a2b437c))
|
|
1432
1485
|
|
|
1433
1486
|
|
|
1434
|
-
- **(es/preset-env)** Don't log `Yield` to the console ([#7548](https://github.com/swc-project/swc/issues/7548)) ([8cfc4f9](https://github.com/swc-project/swc/commit/8cfc4f9e9ab43a5ed25c9b600b9dd7e5790c2d1e))
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
1487
|
- **(es/resolver)** Resolve the super class before registering a class name ([#7550](https://github.com/swc-project/swc/issues/7550)) ([1d9f972](https://github.com/swc-project/swc/commit/1d9f972fb44e0722fce8a83090cbada81decf577))
|
|
1438
1488
|
|
|
1439
1489
|
### Features
|
|
@@ -1446,57 +1496,6 @@
|
|
|
1446
1496
|
|
|
1447
1497
|
|
|
1448
1498
|
|
|
1449
|
-
- **(es)** Add a test for a wrong issue ([#7542](https://github.com/swc-project/swc/issues/7542)) ([70bc605](https://github.com/swc-project/swc/commit/70bc605c6769759b0e896e7e5e91bb070d719552))
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
1499
|
- **(es)** Add one more test for a wrong issue ([#7545](https://github.com/swc-project/swc/issues/7545)) ([862f095](https://github.com/swc-project/swc/commit/862f095e656edf6c0e86f1ad8065d8095e162cfa))
|
|
1453
1500
|
|
|
1454
|
-
|
|
1455
|
-
- **(plugin/runner)** Share `target` directory ([#7544](https://github.com/swc-project/swc/issues/7544)) ([aa82e5f](https://github.com/swc-project/swc/commit/aa82e5fff3452db38599bb0bf7fef7cd72b6a09f))
|
|
1456
|
-
|
|
1457
|
-
## [1.3.65] - 2023-06-19
|
|
1458
|
-
|
|
1459
|
-
### Bug Fixes
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
- **(es/compat)** Fix optional chaining ([#7530](https://github.com/swc-project/swc/issues/7530)) ([990e48e](https://github.com/swc-project/swc/commit/990e48e0e81c339b42b0bf33b62a6f7126b0e2e8))
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
- **(es/module)** Add `"use strict"` while preserving directives ([#7537](https://github.com/swc-project/swc/issues/7537)) ([f42fdd2](https://github.com/swc-project/swc/commit/f42fdd21afad775358138c3aaed4ff3c41bfb16a))
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
- **(es/typescript)** Don't panic of `@jsxFrag null` ([#7540](https://github.com/swc-project/swc/issues/7540)) ([76aa91f](https://github.com/swc-project/swc/commit/76aa91f83cf37a11aa55feba40d6f73819fc811d))
|
|
1470
|
-
|
|
1471
|
-
### Features
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
- **(es/module)** Preserve custom `use` directives ([#7528](https://github.com/swc-project/swc/issues/7528)) ([3e9dd88](https://github.com/swc-project/swc/commit/3e9dd88e37fcb99293a3683ea7a62214950f7860))
|
|
1476
|
-
|
|
1477
|
-
## [1.3.64] - 2023-06-14
|
|
1478
|
-
|
|
1479
|
-
### Bug Fixes
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
- **(es/codegen)** Emit type arguments of jsx element names ([#7522](https://github.com/swc-project/swc/issues/7522)) ([a0da02d](https://github.com/swc-project/swc/commit/a0da02d0ff641863dafc1a7d573419478c3b16dc))
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
- **(es/codegen)** Fix regression of source maps ([#7523](https://github.com/swc-project/swc/issues/7523)) ([f27838d](https://github.com/swc-project/swc/commit/f27838dedcac792ac30380f45ef89b329221de59))
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
- **(es/compat)** Fix handling of `this` of optional chaining pass ([#7527](https://github.com/swc-project/swc/issues/7527)) ([4644d00](https://github.com/swc-project/swc/commit/4644d005d2ca06ad002dc7c6ff6c4d19e1734970))
|
|
1490
|
-
|
|
1491
|
-
## [1.3.63] - 2023-06-13
|
|
1492
|
-
|
|
1493
|
-
### Refactor
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
- **(es/ast)** Reimplement optional chaining ([#7441](https://github.com/swc-project/swc/issues/7441)) ([aa83584](https://github.com/swc-project/swc/commit/aa83584634286d7c741d903ad94ba5228c89bc62))
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
- **(es/ast)** Remove unused fields ([#7518](https://github.com/swc-project/swc/issues/7518)) ([3958f17](https://github.com/swc-project/swc/commit/3958f1792c4598e965f36a11c567c95f69984a9f))
|
|
1501
|
-
|
|
1502
1501
|
<!-- generated by git-cliff -->
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swc/core",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.106",
|
|
4
4
|
"description": "Super-fast alternative for babel",
|
|
5
5
|
"homepage": "https://swc.rs",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"@napi-rs/cli": "^3.0.0-alpha.22",
|
|
97
97
|
"@swc/core": "=1.2.220",
|
|
98
98
|
"@swc/helpers": "^0.5.0",
|
|
99
|
-
"@swc/plugin-jest": "
|
|
99
|
+
"@swc/plugin-jest": "^1.5.113",
|
|
100
100
|
"@taplo/cli": "^0.5.2",
|
|
101
101
|
"@types/jest": "^29.5.11",
|
|
102
102
|
"@types/node": "^20.5.0",
|
|
@@ -173,15 +173,15 @@
|
|
|
173
173
|
"@swc/types": "^0.1.5"
|
|
174
174
|
},
|
|
175
175
|
"optionalDependencies": {
|
|
176
|
-
"@swc/core-darwin-x64": "1.3.
|
|
177
|
-
"@swc/core-win32-x64-msvc": "1.3.
|
|
178
|
-
"@swc/core-linux-x64-gnu": "1.3.
|
|
179
|
-
"@swc/core-linux-x64-musl": "1.3.
|
|
180
|
-
"@swc/core-win32-ia32-msvc": "1.3.
|
|
181
|
-
"@swc/core-linux-arm-gnueabihf": "1.3.
|
|
182
|
-
"@swc/core-linux-arm64-gnu": "1.3.
|
|
183
|
-
"@swc/core-darwin-arm64": "1.3.
|
|
184
|
-
"@swc/core-linux-arm64-musl": "1.3.
|
|
185
|
-
"@swc/core-win32-arm64-msvc": "1.3.
|
|
176
|
+
"@swc/core-darwin-x64": "1.3.106",
|
|
177
|
+
"@swc/core-win32-x64-msvc": "1.3.106",
|
|
178
|
+
"@swc/core-linux-x64-gnu": "1.3.106",
|
|
179
|
+
"@swc/core-linux-x64-musl": "1.3.106",
|
|
180
|
+
"@swc/core-win32-ia32-msvc": "1.3.106",
|
|
181
|
+
"@swc/core-linux-arm-gnueabihf": "1.3.106",
|
|
182
|
+
"@swc/core-linux-arm64-gnu": "1.3.106",
|
|
183
|
+
"@swc/core-darwin-arm64": "1.3.106",
|
|
184
|
+
"@swc/core-linux-arm64-musl": "1.3.106",
|
|
185
|
+
"@swc/core-win32-arm64-msvc": "1.3.106"
|
|
186
186
|
}
|
|
187
187
|
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ButtonAsButton, ButtonAsLink } from "./index.types";
|
|
3
2
|
import "./index.css";
|
|
3
|
+
import { ReactNode } from "react";
|
|
4
|
+
export declare const Anchor: ({ Custom, children, ...rest }: {
|
|
5
|
+
Custom?: import("react").ComponentClass<any, any> | undefined;
|
|
6
|
+
children?: ReactNode[] | undefined;
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
4
8
|
export declare function Button({ children, className, icon, isNewWindow, mode, size, as, CustomAnchor, ...rest }: ButtonAsButton | ButtonAsLink): JSX.Element;
|
|
5
9
|
export default Button;
|
|
@@ -2,7 +2,7 @@ import { MenuButton } from "./menu-button";
|
|
|
2
2
|
import { MenuContent } from "./menu-content";
|
|
3
3
|
import { MenuItem } from "./menu-item";
|
|
4
4
|
import { MenuRoot } from "./menu-root";
|
|
5
|
-
declare const Menu: {
|
|
5
|
+
export declare const Menu: {
|
|
6
6
|
Root: typeof MenuRoot;
|
|
7
7
|
Item: typeof MenuItem;
|
|
8
8
|
Button: typeof MenuButton;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
/** React */
|
|
2
|
-
import { HtmlHTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import React, { HtmlHTMLAttributes, ReactNode } from "react";
|
|
3
3
|
/** CSS */
|
|
4
4
|
import "./index.css";
|
|
5
5
|
/** Props */
|
|
6
6
|
type Props = HtmlHTMLAttributes<HTMLDivElement> & {
|
|
7
|
+
anchor?: React.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
8
|
+
Custom?: React.ComponentClass<any>;
|
|
9
|
+
};
|
|
7
10
|
children: ReactNode;
|
|
11
|
+
buttonClassName?: string;
|
|
8
12
|
nested?: boolean;
|
|
9
13
|
subnested?: boolean;
|
|
10
14
|
dropdown?: boolean;
|
|
@@ -13,5 +17,5 @@ type Props = HtmlHTMLAttributes<HTMLDivElement> & {
|
|
|
13
17
|
handleCallbackClick?: () => void;
|
|
14
18
|
"data-menu-id"?: string;
|
|
15
19
|
};
|
|
16
|
-
export declare function MenuButton({ children, nested, subnested, dropdown, isLink, isSelected, handleCallbackClick, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare function MenuButton({ anchor, children, buttonClassName, nested, subnested, dropdown, isLink, isSelected, handleCallbackClick, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
17
21
|
export {};
|
package/dist/cjs/index.css
CHANGED
|
@@ -262,9 +262,11 @@ h6 {
|
|
|
262
262
|
cursor: pointer;
|
|
263
263
|
display: flex;
|
|
264
264
|
gap: var(--spacing-8);
|
|
265
|
+
height: var(--spacing-40);
|
|
265
266
|
justify-content: flex-end;
|
|
266
267
|
padding: var(--spacing-4) var(--spacing-16);
|
|
267
268
|
margin: var(--spacing-4) 0;
|
|
269
|
+
text-decoration: none;
|
|
268
270
|
}
|
|
269
271
|
|
|
270
272
|
/* .menu-button > svg {
|
|
@@ -382,6 +384,7 @@ h6 {
|
|
|
382
384
|
background-color: var(--color-main-background);
|
|
383
385
|
border: 3px solid var(--color-primary-base);
|
|
384
386
|
border-radius: var(--spacing-32);
|
|
387
|
+
text-decoration: unset;
|
|
385
388
|
}
|
|
386
389
|
|
|
387
390
|
.button__secondary:hover {
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../src/styles/variables.css";
|
|
2
|
-
export
|
|
2
|
+
export { Menu } from "./components/menu";
|
|
3
3
|
export { Button } from "./components/button";
|
|
4
4
|
export { Form } from "./components/form";
|
|
5
5
|
export { FormInput } from "./components/form/form-input";
|
package/dist/cjs/index.js
CHANGED
|
@@ -80,7 +80,14 @@ function useMenu() {
|
|
|
80
80
|
return MenuContext;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
const Anchor = ({ Custom, children, ...rest }) => {
|
|
84
|
+
return Custom ? (jsxRuntime.jsx(Custom, { ...rest, children: children })) : (jsxRuntime.jsx("a", { ...rest, children: children }));
|
|
85
|
+
};
|
|
86
|
+
function Button({ children = "Click me", className = "", icon = undefined, isNewWindow = false, mode = "primary", size = "medium", as = "button", CustomAnchor, ...rest }) {
|
|
87
|
+
return as === "link" ? (jsxRuntime.jsxs(Anchor, { Custom: CustomAnchor, ...(isNewWindow && { target: "_blank" }), className: clsx(`button ${className}`, mode === "secondary" ? `button__${mode}` : "button__link", `button__${size}`), ...rest, children: [children, icon] })) : (jsxRuntime.jsxs("button", { className: clsx("button", `button__${mode}`, `button__${size}`, className), ...rest, children: [children, icon] }));
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function MenuButton({ anchor, children, buttonClassName, nested, subnested, dropdown, isLink, isSelected, handleCallbackClick, ...props }) {
|
|
84
91
|
const { toggle } = react.useContext(useMenu());
|
|
85
92
|
const [isToggled, setIsToggled] = react.useState(false);
|
|
86
93
|
const menuId = react.useMemo(() => props["data-menu-id"], [props]);
|
|
@@ -89,13 +96,19 @@ function MenuButton({ children, nested, subnested, dropdown, isLink, isSelected,
|
|
|
89
96
|
setIsToggled(!isToggled);
|
|
90
97
|
handleCallbackClick && handleCallbackClick();
|
|
91
98
|
};
|
|
92
|
-
return (jsxRuntime.jsxs(
|
|
99
|
+
return anchor ? (jsxRuntime.jsxs(Anchor, { className: clsx("menu-button", {
|
|
100
|
+
"menu-button-dropdown": dropdown,
|
|
101
|
+
"menu-button-nested": nested,
|
|
102
|
+
"menu-button-subnested": subnested,
|
|
103
|
+
"menu-button-is-link": isLink,
|
|
104
|
+
"menu-button-is-selected": isSelected,
|
|
105
|
+
}, buttonClassName), ...anchor, children: [children, dropdown ? (isToggled ? (jsxRuntime.jsx(tfi.TfiAngleDown, { size: "1rem" })) : (jsxRuntime.jsx(tfi.TfiAngleUp, { size: "1rem" }))) : null] })) : (jsxRuntime.jsxs("div", { role: "button", className: clsx("menu-button", {
|
|
93
106
|
"menu-button-dropdown": dropdown,
|
|
94
107
|
"menu-button-nested": nested,
|
|
95
108
|
"menu-button-subnested": subnested,
|
|
96
109
|
"menu-button-is-link": isLink,
|
|
97
110
|
"menu-button-is-selected": isSelected,
|
|
98
|
-
}), onClick: handleClick, ...props, children: [children, dropdown ? (isToggled ? (jsxRuntime.jsx(tfi.TfiAngleDown, { size: "1rem" })) : (jsxRuntime.jsx(tfi.TfiAngleUp, { size: "1rem" }))) : null] }));
|
|
111
|
+
}, buttonClassName), onClick: handleClick, ...props, children: [children, dropdown ? (isToggled ? (jsxRuntime.jsx(tfi.TfiAngleDown, { size: "1rem" })) : (jsxRuntime.jsx(tfi.TfiAngleUp, { size: "1rem" }))) : null] }));
|
|
99
112
|
}
|
|
100
113
|
|
|
101
114
|
function MenuContent({ children, ...props }) {
|
|
@@ -143,18 +156,6 @@ const Menu = {
|
|
|
143
156
|
Content: MenuContent,
|
|
144
157
|
};
|
|
145
158
|
|
|
146
|
-
var index = /*#__PURE__*/Object.freeze({
|
|
147
|
-
__proto__: null,
|
|
148
|
-
default: Menu
|
|
149
|
-
});
|
|
150
|
-
|
|
151
|
-
const Anchor = ({ Custom, children, ...rest }) => {
|
|
152
|
-
return Custom ? (jsxRuntime.jsx(Custom, { ...rest, children: children })) : (jsxRuntime.jsx("a", { ...rest, children: children }));
|
|
153
|
-
};
|
|
154
|
-
function Button({ children = "Click me", className = "", icon = undefined, isNewWindow = false, mode = "primary", size = "medium", as = "button", CustomAnchor, ...rest }) {
|
|
155
|
-
return as === "link" ? (jsxRuntime.jsxs(Anchor, { Custom: CustomAnchor, ...(isNewWindow && { target: "_blank" }), className: clsx(`button ${className}`, mode === "secondary" ? `button button__${mode}` : "button__link", `button__${size}`), ...rest, children: [children, icon] })) : (jsxRuntime.jsxs("button", { className: clsx("button", `button__${mode}`, `button__${size}`, className), ...rest, children: [children, icon] }));
|
|
156
|
-
}
|
|
157
|
-
|
|
158
159
|
// how do I solve reseting the form outside the form
|
|
159
160
|
function Form({ children, onSubmit, submitButton = {
|
|
160
161
|
label: "Submit",
|
|
@@ -642,7 +643,7 @@ exports.LoadingProvider = LoadingProvider;
|
|
|
642
643
|
exports.MapComponent = MapComponent;
|
|
643
644
|
exports.MapControl = MapControl;
|
|
644
645
|
exports.MapProvider = MapProvider;
|
|
645
|
-
exports.Menu =
|
|
646
|
+
exports.Menu = Menu;
|
|
646
647
|
exports.Modal = Modal;
|
|
647
648
|
exports.ModalContext = ModalContext;
|
|
648
649
|
exports.ModalProvider = ModalProvider;
|