@commercelayer/app-elements 0.2.1 → 0.3.1
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/LICENSE +1 -1
- package/README.md +15 -14
- package/dist/{InputDateComponent-63c12bde.js → InputDateComponent-a5946691.js} +1 -1
- package/dist/hooks/useOnBlurFromContainer.d.ts +9 -0
- package/dist/main-fea1a0e6.js +41114 -0
- package/dist/main.d.ts +4 -4
- package/dist/main.js +138 -139
- package/dist/providers/CoreSdkProvider/useCoreApi.d.ts +23 -0
- package/dist/providers/TokenProvider/TokenProvider.d.ts +12 -13
- package/dist/style.css +1 -1
- package/dist/ui/atoms/Avatar.d.ts +3 -0
- package/dist/ui/atoms/AvatarLetter/AvatarLetter.d.ts +23 -0
- package/dist/ui/atoms/AvatarLetter/colors.d.ts +2 -0
- package/dist/ui/atoms/AvatarLetter/index.d.ts +1 -0
- package/dist/ui/atoms/Badge.d.ts +5 -6
- package/dist/ui/atoms/Button.d.ts +4 -3
- package/dist/ui/atoms/Card.d.ts +1 -0
- package/dist/ui/atoms/Container.d.ts +6 -8
- package/dist/ui/atoms/CopyToClipboard.d.ts +2 -4
- package/dist/ui/atoms/Hr.d.ts +5 -4
- package/dist/ui/atoms/Icon/Icon.d.ts +18 -0
- package/dist/ui/atoms/{Icon.d.ts → Icon/icons.d.ts} +1 -26
- package/dist/ui/atoms/Icon/index.d.ts +1 -0
- package/dist/ui/atoms/Progress.d.ts +9 -6
- package/dist/ui/atoms/Tag.d.ts +2 -2
- package/dist/ui/composite/{ActionButtons.d.ts → ActionButtons/ActionButtons.d.ts} +2 -2
- package/dist/ui/composite/ActionButtons/index.d.ts +1 -0
- package/dist/ui/composite/Dropdown/Dropdown.d.ts +16 -0
- package/dist/ui/{atoms/dropdown/DropdownMenuDivider.d.ts → composite/Dropdown/DropdownDivider.d.ts} +3 -3
- package/dist/ui/{atoms/dropdown/DropdownMenuItem.d.ts → composite/Dropdown/DropdownItem.d.ts} +3 -3
- package/dist/ui/{atoms/dropdown → composite/Dropdown}/DropdownMenu.d.ts +3 -3
- package/dist/ui/composite/Dropdown/index.d.ts +3 -0
- package/dist/ui/composite/ListDetails.d.ts +2 -2
- package/dist/ui/forms/Input/Input.d.ts +2 -2
- package/dist/ui/forms/InputCurrency/InputCurrency.d.ts +3 -3
- package/dist/ui/forms/InputDate/InputDateComponent.d.ts +10 -10
- package/dist/ui/forms/InputReadonly.d.ts +4 -4
- package/dist/ui/forms/InputSelect/InputSelect.d.ts +1 -1
- package/dist/ui/internals/InputWrapper.d.ts +5 -5
- package/dist/ui/resources/ResourceAddress/ResourceAddress.d.ts +15 -0
- package/dist/ui/resources/ResourceAddress/ResourceAddress.mocks.d.ts +38 -0
- package/dist/ui/resources/ResourceAddress/ResourceAddress.test.d.ts +1 -0
- package/dist/ui/resources/ResourceAddress/ResourceAddressForm.d.ts +48 -0
- package/dist/ui/resources/ResourceAddress/index.d.ts +1 -0
- package/dist/ui/resources/ResourceLineItems/ResourceLineItems.d.ts +3 -0
- package/dist/ui/resources/ResourceTags.d.ts +12 -0
- package/dist/ui/resources/useResourceFilters/types.d.ts +2 -2
- package/dist/utils/array.d.ts +10 -0
- package/dist/utils/text.d.ts +5 -2
- package/package.json +2 -1
- package/dist/main-ef0d4ef2.js +0 -29113
- package/dist/ui/atoms/AvatarLetter.d.ts +0 -16
- package/dist/ui/atoms/BlockCode.d.ts +0 -12
- package/dist/ui/atoms/dropdown/index.d.ts +0 -3
- package/dist/ui/composite/ContextMenu.d.ts +0 -10
- /package/dist/ui/atoms/{AvatarLetter.test.d.ts → AvatarLetter/AvatarLetter.test.d.ts} +0 -0
- /package/dist/ui/atoms/{BlockCode.test.d.ts → AvatarLetter/colors.test.d.ts} +0 -0
- /package/dist/ui/atoms/{Icon.test.d.ts → Icon/Icon.test.d.ts} +0 -0
- /package/dist/ui/composite/{ActionButtons.test.d.ts → ActionButtons/ActionButtons.test.d.ts} +0 -0
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -3,23 +3,24 @@
|
|
|
3
3
|
|
|
4
4
|
# App Elements
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
[](https://www.npmjs.com/package/@commercelayer/app-elements)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
The Commerce Layer admin Dashboard has a hub section for back-office applications built on top of our APIs that facilitates the use of some of the platform's main features.
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
pnpm install
|
|
12
|
-
pnpm dev
|
|
13
|
-
```
|
|
10
|
+
<img width="700" alt="You can access the Hub section from the dashboard sidebar menu" src="https://user-images.githubusercontent.com/1681269/268583888-265c7b96-d6d1-451c-9353-a59a4de6edb6.png">
|
|
14
11
|
|
|
15
|
-
|
|
12
|
+
`App Elements` is the React component library for building these Hub applications. This library contains different components, helpers, and hooks, from simple and small bits like `Button` or `Card` to complex components like `OrderSummary`.
|
|
16
13
|
|
|
17
|
-
|
|
18
|
-
pnpm build:elements --watch
|
|
14
|
+
## Getting started
|
|
19
15
|
|
|
20
|
-
|
|
21
|
-
pnpm link --global
|
|
16
|
+
For a constantly updated list of the available and soon-to-come components provided by Commerce Layer's `app-elements` library, please refer to [the official documentation](https://commercelayer.github.io/app-elements) that will help you get started in a snap.
|
|
22
17
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
## Need help?
|
|
19
|
+
|
|
20
|
+
- Join [Commerce Layer's Slack community](https://slack.commercelayer.app).
|
|
21
|
+
- Ping us [on X (formerly Twitter)](https://x.com/commercelayer).
|
|
22
|
+
- Is there a bug? Create an [issue](https://github.com/commercelayer/app-elements/issues) on this repository.
|
|
23
|
+
|
|
24
|
+
## License
|
|
25
|
+
|
|
26
|
+
This project is published under the [MIT](https://github.com/commercelayer/app-elements/blob/main/LICENSE) license.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as Ma, r as E, a as Rn, t as H, b as Mt, c as Ee, d as P, g as Cr, _ as Qt, s as je, e as cr, f as xa, h as I, i as R, j as N, k as D, l as b, m as Y, n as Sa, o as ur, p as Ln, q as Oa, u as Ea, v as Pa, w as qr, x as _a, y as Kr, z as Ta, A as Na, B as Ya, C as An, D as ae, E as nt, F as pr, G as Hn, H as Ia, I as lr, J as Zr, K as Ra, L as La, M as Aa, N as At, O as Ke, Q as Ha, R as Fa, S as ja } from "./main-
|
|
1
|
+
import { P as Ma, r as E, a as Rn, t as H, b as Mt, c as Ee, d as P, g as Cr, _ as Qt, s as je, e as cr, f as xa, h as I, i as R, j as N, k as D, l as b, m as Y, n as Sa, o as ur, p as Ln, q as Oa, u as Ea, v as Pa, w as qr, x as _a, y as Kr, z as Ta, A as Na, B as Ya, C as An, D as ae, E as nt, F as pr, G as Hn, H as Ia, I as lr, J as Zr, K as Ra, L as La, M as Aa, N as At, O as Ke, Q as Ha, R as Fa, S as ja } from "./main-fea1a0e6.js";
|
|
2
2
|
import * as B from "react";
|
|
3
3
|
import h, { forwardRef as Fn, createElement as Ua, Component as Ba, createRef as Wa } from "react";
|
|
4
4
|
import * as Va from "react-dom";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type OnBlur = (event: React.FocusEvent<HTMLElement, Element>) => void;
|
|
3
|
+
/**
|
|
4
|
+
* Check if the new focused element is a child of the element and trigger the `onBlur` callback.
|
|
5
|
+
* @param onBlur Function that will be triggered when the new focused element is a child of the element.
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export declare const useOnBlurFromContainer: (onBlur: () => void) => OnBlur;
|
|
9
|
+
export {};
|