@pismo/marola 0.0.1-alpha.32 → 0.0.1-alpha.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/README.md +5 -17
- package/dist/{Button-2b1peDFT.js → Button-C3Qm852g.js} +23 -23
- package/dist/Dialog.module-BO0mdB7d.js +15 -0
- package/dist/ListContext-D6-YwtZn.js +18 -0
- package/dist/Tabs.module-_kSbSyth.js +66 -0
- package/dist/assets/CallToActionButton.css +1 -0
- package/dist/assets/Dialog.css +1 -1
- package/dist/assets/LoadingSpinner.css +1 -1
- package/dist/assets/Tabs.css +1 -1
- package/dist/assets/Typography.css +1 -1
- package/dist/assets/main.css +1 -0
- package/dist/components/CallToActionButton/CallToActionButton.d.ts +21 -0
- package/dist/components/CallToActionButton/CallToActionButton.js +57 -0
- package/dist/components/Dialog/Actions.js +1 -1
- package/dist/components/Dialog/Backdrop.d.ts +1 -1
- package/dist/components/Dialog/Backdrop.js +9 -2
- package/dist/components/Dialog/CloseIconButton.js +124 -12
- package/dist/components/Dialog/Dialog.d.ts +5 -6
- package/dist/components/Dialog/Dialog.js +20103 -445
- package/dist/components/Dialog/{DialogTitle.d.ts → Title.d.ts} +3 -3
- package/dist/components/Dialog/Title.js +14 -0
- package/dist/components/LoadingSpinner/LoadingSpinner.d.ts +0 -2
- package/dist/components/LoadingSpinner/LoadingSpinner.js +13 -12
- package/dist/components/Tabs/Tab.d.ts +1 -6
- package/dist/components/Tabs/Tab.js +173 -118
- package/dist/components/Tabs/TabPanel.d.ts +1 -5
- package/dist/components/Tabs/TabPanel.js +10 -8
- package/dist/components/Tabs/Tabs.d.ts +2 -8
- package/dist/components/Tabs/Tabs.js +701 -250
- package/dist/components/Typography/Typography.d.ts +6 -17
- package/dist/components/Typography/Typography.js +64 -55
- package/dist/{index-CH45lKw7.js → index-BZ1lkM_M.js} +159 -162
- package/dist/main.d.ts +5 -27
- package/dist/main.js +21 -75
- package/dist/types/helpers.d.ts +7 -14
- package/dist/useButton-CbmjmH5z.js +186 -0
- package/dist/useCompoundItem-B7wfGDHQ.js +41 -0
- package/package.json +9 -50
- package/src/playground/Playground.tsx +20 -0
- package/dist/ClickAwayListener-BSW-Nd-y.js +0 -107
- package/dist/Dialog.module-DFEmFdYT.js +0 -30
- package/dist/Group-B3p31ftp.js +0 -26
- package/dist/Popup-B6ZSGIEI.js +0 -1248
- package/dist/Portal-DIeBsWdL.js +0 -73
- package/dist/SelectButton-C8JQKaf4.js +0 -61
- package/dist/Tabs.module-jkH1Qjn7.js +0 -22
- package/dist/Toggle-BCgIItCc.js +0 -142
- package/dist/assets/Advice.css +0 -1
- package/dist/assets/Button.css +0 -1
- package/dist/assets/Checkbox.css +0 -1
- package/dist/assets/EllipsisTooltip.css +0 -1
- package/dist/assets/Group.css +0 -1
- package/dist/assets/IconButton.css +0 -1
- package/dist/assets/Input.css +0 -1
- package/dist/assets/InputSearch.css +0 -1
- package/dist/assets/PageHeader.css +0 -1
- package/dist/assets/Pagination.css +0 -1
- package/dist/assets/SelectButton.css +0 -1
- package/dist/assets/Skeleton.css +0 -1
- package/dist/assets/Snackbar.css +0 -1
- package/dist/assets/SortTooltip.css +0 -1
- package/dist/assets/Stepper.css +0 -1
- package/dist/assets/Table.css +0 -1
- package/dist/assets/TextDisplay.css +0 -1
- package/dist/assets/Toggle.css +0 -1
- package/dist/assets/Toggle2.css +0 -1
- package/dist/assets/Tooltip.css +0 -1
- package/dist/combineHooksSlotProps-DVjg9PRh.js +0 -80
- package/dist/components/Advice/Advice.d.ts +0 -30
- package/dist/components/Advice/Advice.js +0 -47
- package/dist/components/Advice/Advice.stories.d.ts +0 -18
- package/dist/components/Button/Button.d.ts +0 -32
- package/dist/components/Button/Button.js +0 -65
- package/dist/components/Button/Button.stories.d.ts +0 -62
- package/dist/components/Checkbox/Checkbox.d.ts +0 -34
- package/dist/components/Checkbox/Checkbox.js +0 -71
- package/dist/components/Checkbox/Checkbox.stories.d.ts +0 -31
- package/dist/components/Chip/Chip.d.ts +0 -39
- package/dist/components/Chip/Chip.js +0 -19
- package/dist/components/Chip/Chip.stories.d.ts +0 -42
- package/dist/components/Chip/chip.test.d.ts +0 -1
- package/dist/components/Dialog/Dialog.stories.d.ts +0 -343
- package/dist/components/Dialog/DialogTitle.js +0 -29
- package/dist/components/EllipsisTooltip/EllipsisTooltip.d.ts +0 -7
- package/dist/components/EllipsisTooltip/EllipsisTooltip.js +0 -23
- package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +0 -31
- package/dist/components/Icon/Icon.d.ts +0 -11
- package/dist/components/Icon/Icon.js +0 -127
- package/dist/components/Icon/Icon.stories.d.ts +0 -15
- package/dist/components/Icon/types.d.ts +0 -5
- package/dist/components/Icon/types.js +0 -1
- package/dist/components/IconButton/Icon.stories.d.ts +0 -15
- package/dist/components/IconButton/IconButton.d.ts +0 -38
- package/dist/components/IconButton/IconButton.js +0 -63
- package/dist/components/Input/Input.d.ts +0 -44
- package/dist/components/Input/Input.js +0 -508
- package/dist/components/Input/Input.stories.d.ts +0 -43
- package/dist/components/InputSearch/InputSearch.d.ts +0 -9
- package/dist/components/InputSearch/InputSearch.js +0 -34
- package/dist/components/InputSearch/InputSearch.stories.d.ts +0 -39
- package/dist/components/LoadingSpinner/LoadingSpinner.stories.d.ts +0 -14
- package/dist/components/PageHeader/PageHeader.d.ts +0 -66
- package/dist/components/PageHeader/PageHeader.js +0 -87
- package/dist/components/PageHeader/PageHeader.stories.d.ts +0 -14
- package/dist/components/Pagination/Pagination.d.ts +0 -55
- package/dist/components/Pagination/Pagination.js +0 -237
- package/dist/components/Pagination/Pagination.stories.d.ts +0 -17
- package/dist/components/Select/Select.d.ts +0 -26
- package/dist/components/Select/Select.js +0 -857
- package/dist/components/Select/Select.stories.d.ts +0 -22
- package/dist/components/Select/SelectButton.d.ts +0 -12
- package/dist/components/Select/SelectButton.js +0 -8
- package/dist/components/Skeleton/Skeleton.d.ts +0 -25
- package/dist/components/Skeleton/Skeleton.js +0 -23
- package/dist/components/Skeleton/Skeleton.stories.d.ts +0 -14
- package/dist/components/Skeleton/SkeletonCircle.stories.d.ts +0 -14
- package/dist/components/Skeleton/SkeletonTable.stories.d.ts +0 -16
- package/dist/components/Snackbar/Snackbar.d.ts +0 -27
- package/dist/components/Snackbar/Snackbar.js +0 -639
- package/dist/components/Snackbar/Snackbar.stories.d.ts +0 -319
- package/dist/components/SortTooltip/SortTooltip.d.ts +0 -28
- package/dist/components/SortTooltip/SortTooltip.js +0 -93
- package/dist/components/Stepper/Stepper.d.ts +0 -26
- package/dist/components/Stepper/Stepper.js +0 -48
- package/dist/components/Stepper/Stepper.stories.d.ts +0 -16
- package/dist/components/Table/Table.d.ts +0 -56
- package/dist/components/Table/Table.js +0 -137
- package/dist/components/Table/Table.stories.d.ts +0 -29
- package/dist/components/Table/TableContext.d.ts +0 -19
- package/dist/components/Table/TableContext.js +0 -21
- package/dist/components/Table/_Table.TBody.stories.d.ts +0 -14
- package/dist/components/Table/_Table.THead.stories.d.ts +0 -14
- package/dist/components/Table/_Table.Td.stories.d.ts +0 -16
- package/dist/components/Table/_Table.Th.stories.d.ts +0 -15
- package/dist/components/Table/_Table.Tr.stories.d.ts +0 -15
- package/dist/components/Tabs/Tab.stories.d.ts +0 -15
- package/dist/components/Tabs/TabPanel.stories.d.ts +0 -14
- package/dist/components/Tabs/Tabs.stories.d.ts +0 -14
- package/dist/components/TextDisplay/TextDisplay.d.ts +0 -23
- package/dist/components/TextDisplay/TextDisplay.js +0 -37
- package/dist/components/TextDisplay/TextDisplay.stories.d.ts +0 -13
- package/dist/components/TextDisplay/textDisplay.test.d.ts +0 -1
- package/dist/components/Toggle/Toggle.d.ts +0 -11
- package/dist/components/Toggle/Toggle.js +0 -266
- package/dist/components/Toggle/Toggle.stories.d.ts +0 -21
- package/dist/components/ToggleGroup/Group.d.ts +0 -18
- package/dist/components/ToggleGroup/Group.js +0 -7
- package/dist/components/ToggleGroup/Group.test.d.ts +0 -1
- package/dist/components/ToggleGroup/Toggle.d.ts +0 -15
- package/dist/components/ToggleGroup/Toggle.js +0 -17
- package/dist/components/ToggleGroup/Toggle.test.d.ts +0 -1
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +0 -2
- package/dist/components/ToggleGroup/ToggleGroup.js +0 -6
- package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +0 -25
- package/dist/components/Tooltip/Tooltip.d.ts +0 -33
- package/dist/components/Tooltip/Tooltip.js +0 -141
- package/dist/components/Tooltip/Tooltip.stories.d.ts +0 -35
- package/dist/components/Typography/Typography.stories.d.ts +0 -32
- package/dist/components/Typography/typography.test.d.ts +0 -1
- package/dist/contexts/SnackbarProvider/SnackbarProvider.d.ts +0 -11
- package/dist/contexts/SnackbarProvider/SnackbarProvider.js +0 -50
- package/dist/contexts/SnackbarProvider/SnackbarProvider.stories.d.ts +0 -21
- package/dist/index-CjW42-M-.js +0 -19584
- package/dist/marola.css +0 -1
- package/dist/test-utils/assertStyles.d.ts +0 -1
- package/dist/test-utils/assertStyles.js +0 -11
- package/dist/useButton-DNk3wrQp.js +0 -105
- package/dist/useCompoundItem-D1iRfg8D.js +0 -84
- package/dist/useControlled-CCMYYdCM.js +0 -31
- package/dist/useEventCallback-xTG9piMa.js +0 -45
- package/dist/useIsFocusVisible-BH4IAdcw.js +0 -69
- package/dist/useList-B0hog_3-.js +0 -436
- package/dist/useTimeout-DxF9kiZL.js +0 -36
- package/dist/utils/styleStrings.d.ts +0 -6
- package/dist/utils/styleStrings.js +0 -10
- package/dist/utils/styleStrings.test.d.ts +0 -1
package/README.md
CHANGED
|
@@ -1,35 +1,23 @@
|
|
|
1
1
|
# Marola - component library
|
|
2
|
-
|
|
3
|
-

|
|
2
|
+

|
|
4
3
|
|
|
5
4
|
### Commands
|
|
6
5
|
|
|
7
|
-
`yarn dev` - run the playground, launches a server where a developer can test and develop components, watches for file
|
|
6
|
+
`yarn dev` - run the playground, launches a server where a developer can test and develop components, watches for file
|
|
8
7
|
changes
|
|
9
8
|
|
|
10
9
|
`yarn build` - builds the components ready for publish
|
|
11
10
|
|
|
12
|
-
`yarn test` -
|
|
13
|
-
|
|
14
|
-
`yarn test:unit` - runs vitest for unit tests
|
|
15
|
-
|
|
16
|
-
`yarn test:unit:visual` - runs vitest for unit tests in a browser, then when tests are run it will show the output in
|
|
17
|
-
browser
|
|
18
|
-
|
|
19
|
-
`yarn test:unit:watch` - runs vitest and watches for any change and reruns
|
|
11
|
+
`yarn test` - not yet implemented
|
|
20
12
|
|
|
21
13
|
`yarn lint` - performs an eslint across the project code and reports any problems in the terminal
|
|
22
14
|
|
|
23
|
-
`yarn preview` -
|
|
15
|
+
`yarn preview` - runs `build` and serves the files in the `dist` serves what would be in a `publish`
|
|
24
16
|
|
|
25
17
|
`yarn publish` - runs a prePublish build (the `build` command) then publishes the contents of the `dist` directory
|
|
26
18
|
|
|
27
|
-
`yarn storybook` - start storybook
|
|
28
|
-
|
|
29
|
-
`yarn build-storybook` - build storybook static files
|
|
30
|
-
|
|
31
19
|
### Tips
|
|
32
20
|
|
|
33
21
|
#### Node version
|
|
34
22
|
|
|
35
|
-
This project uses a .nvmrc file, to auto switch node version follow [these steps](https://github.com/nvm-sh/nvm?tab=readme-ov-file#zsh) from the nvm project .
|
|
23
|
+
This project uses a .nvmrc file, to auto switch node version follow [these steps](https://github.com/nvm-sh/nvm?tab=readme-ov-file#zsh) from the nvm project .
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { g as T, a as _,
|
|
1
|
+
import { g as T, a as _, b as x, _ as i, c as B, P as o, d as O, f as D } from "./index-BZ1lkM_M.js";
|
|
2
2
|
import * as c from "react";
|
|
3
3
|
import { jsx as F } from "react/jsx-runtime";
|
|
4
|
-
import { u as S } from "./useButton-
|
|
4
|
+
import { u as S } from "./useButton-CbmjmH5z.js";
|
|
5
5
|
const m = "Button";
|
|
6
6
|
function U(s) {
|
|
7
7
|
return T(m, s);
|
|
@@ -9,14 +9,14 @@ function U(s) {
|
|
|
9
9
|
_(m, ["root", "active", "disabled", "focusVisible"]);
|
|
10
10
|
const W = ["action", "children", "disabled", "focusableWhenDisabled", "onFocusVisible", "slotProps", "slots", "rootElementName"], j = (s) => {
|
|
11
11
|
const {
|
|
12
|
-
active:
|
|
12
|
+
active: e,
|
|
13
13
|
disabled: n,
|
|
14
14
|
focusVisible: r
|
|
15
15
|
} = s;
|
|
16
16
|
return O({
|
|
17
|
-
root: ["root", n && "disabled", r && "focusVisible",
|
|
17
|
+
root: ["root", n && "disabled", r && "focusVisible", e && "active"]
|
|
18
18
|
}, D(U));
|
|
19
|
-
}, w = /* @__PURE__ */ c.forwardRef(function(
|
|
19
|
+
}, w = /* @__PURE__ */ c.forwardRef(function(e, n) {
|
|
20
20
|
var r;
|
|
21
21
|
const {
|
|
22
22
|
action: u,
|
|
@@ -25,7 +25,7 @@ const W = ["action", "children", "disabled", "focusableWhenDisabled", "onFocusVi
|
|
|
25
25
|
slotProps: P = {},
|
|
26
26
|
slots: l = {},
|
|
27
27
|
rootElementName: N = "button"
|
|
28
|
-
} =
|
|
28
|
+
} = e, t = x(e, W), g = c.useRef();
|
|
29
29
|
let a = N;
|
|
30
30
|
typeof l.root == "string" ? a = l.root : (t.href || t.to) && (a = "a");
|
|
31
31
|
const {
|
|
@@ -33,7 +33,7 @@ const W = ["action", "children", "disabled", "focusableWhenDisabled", "onFocusVi
|
|
|
33
33
|
focusVisible: E,
|
|
34
34
|
setFocusVisible: d,
|
|
35
35
|
getRootProps: V
|
|
36
|
-
} = S(i({},
|
|
36
|
+
} = S(i({}, e, {
|
|
37
37
|
focusableWhenDisabled: f,
|
|
38
38
|
rootElementName: a
|
|
39
39
|
}));
|
|
@@ -42,7 +42,7 @@ const W = ["action", "children", "disabled", "focusableWhenDisabled", "onFocusVi
|
|
|
42
42
|
d(!0), g.current.focus();
|
|
43
43
|
}
|
|
44
44
|
}), [d]);
|
|
45
|
-
const p = i({},
|
|
45
|
+
const p = i({}, e, {
|
|
46
46
|
active: y,
|
|
47
47
|
focusableWhenDisabled: f,
|
|
48
48
|
focusVisible: E
|
|
@@ -69,61 +69,61 @@ process.env.NODE_ENV !== "production" && (w.propTypes = {
|
|
|
69
69
|
/**
|
|
70
70
|
* A ref for imperative actions. It currently only supports `focusVisible()` action.
|
|
71
71
|
*/
|
|
72
|
-
action:
|
|
73
|
-
current:
|
|
74
|
-
focusVisible:
|
|
72
|
+
action: o.oneOfType([o.func, o.shape({
|
|
73
|
+
current: o.shape({
|
|
74
|
+
focusVisible: o.func.isRequired
|
|
75
75
|
})
|
|
76
76
|
})]),
|
|
77
77
|
/**
|
|
78
78
|
* @ignore
|
|
79
79
|
*/
|
|
80
|
-
children:
|
|
80
|
+
children: o.node,
|
|
81
81
|
/**
|
|
82
82
|
* @ignore
|
|
83
83
|
*/
|
|
84
|
-
className:
|
|
84
|
+
className: o.string,
|
|
85
85
|
/**
|
|
86
86
|
* If `true`, the component is disabled.
|
|
87
87
|
* @default false
|
|
88
88
|
*/
|
|
89
|
-
disabled:
|
|
89
|
+
disabled: o.bool,
|
|
90
90
|
/**
|
|
91
91
|
* If `true`, allows a disabled button to receive focus.
|
|
92
92
|
* @default false
|
|
93
93
|
*/
|
|
94
|
-
focusableWhenDisabled:
|
|
94
|
+
focusableWhenDisabled: o.bool,
|
|
95
95
|
/**
|
|
96
96
|
* @ignore
|
|
97
97
|
*/
|
|
98
|
-
href:
|
|
98
|
+
href: o.string,
|
|
99
99
|
/**
|
|
100
100
|
* @ignore
|
|
101
101
|
*/
|
|
102
|
-
onFocusVisible:
|
|
102
|
+
onFocusVisible: o.func,
|
|
103
103
|
/**
|
|
104
104
|
* The HTML element that is ultimately rendered, for example 'button' or 'a'
|
|
105
105
|
* @default 'button'
|
|
106
106
|
*/
|
|
107
|
-
rootElementName:
|
|
107
|
+
rootElementName: o.string,
|
|
108
108
|
/**
|
|
109
109
|
* The props used for each slot inside the Button.
|
|
110
110
|
* @default {}
|
|
111
111
|
*/
|
|
112
|
-
slotProps:
|
|
113
|
-
root:
|
|
112
|
+
slotProps: o.shape({
|
|
113
|
+
root: o.oneOfType([o.func, o.object])
|
|
114
114
|
}),
|
|
115
115
|
/**
|
|
116
116
|
* The components used for each slot inside the Button.
|
|
117
117
|
* Either a string to use a HTML element or a component.
|
|
118
118
|
* @default {}
|
|
119
119
|
*/
|
|
120
|
-
slots:
|
|
121
|
-
root:
|
|
120
|
+
slots: o.shape({
|
|
121
|
+
root: o.elementType
|
|
122
122
|
}),
|
|
123
123
|
/**
|
|
124
124
|
* @ignore
|
|
125
125
|
*/
|
|
126
|
-
to:
|
|
126
|
+
to: o.string
|
|
127
127
|
});
|
|
128
128
|
export {
|
|
129
129
|
w as B
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import './assets/Dialog.css';
|
|
2
|
+
const _ = "_dialog_cknma_1", a = "_dialog__backdrop_cknma_11", i = "_dialog__panel_cknma_19", o = "_dialog__title_cknma_35", l = "_dialog__subtitle_cknma_42", d = "_dialog__divider_cknma_51", t = "_dialog__actions_cknma_64", c = {
|
|
3
|
+
dialog: _,
|
|
4
|
+
dialog__backdrop: a,
|
|
5
|
+
dialog__panel: i,
|
|
6
|
+
dialog__title: o,
|
|
7
|
+
"dialog__title--small": "_dialog__title--small_cknma_39",
|
|
8
|
+
dialog__subtitle: l,
|
|
9
|
+
dialog__divider: d,
|
|
10
|
+
"dialog__close-icon": "_dialog__close-icon_cknma_55",
|
|
11
|
+
dialog__actions: t
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
c as s
|
|
15
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as t from "react";
|
|
2
|
+
const e = {
|
|
3
|
+
blur: "list:blur",
|
|
4
|
+
focus: "list:focus",
|
|
5
|
+
itemClick: "list:itemClick",
|
|
6
|
+
itemHover: "list:itemHover",
|
|
7
|
+
itemsChange: "list:itemsChange",
|
|
8
|
+
keyDown: "list:keyDown",
|
|
9
|
+
resetHighlight: "list:resetHighlight",
|
|
10
|
+
highlightLast: "list:highlightLast",
|
|
11
|
+
textNavigation: "list:textNavigation",
|
|
12
|
+
clearSelection: "list:clearSelection"
|
|
13
|
+
}, i = /* @__PURE__ */ t.createContext(null);
|
|
14
|
+
process.env.NODE_ENV !== "production" && (i.displayName = "ListContext");
|
|
15
|
+
export {
|
|
16
|
+
e as L,
|
|
17
|
+
i as a
|
|
18
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import './assets/Tabs.css';
|
|
2
|
+
import * as n from "react";
|
|
3
|
+
const f = /* @__PURE__ */ n.createContext(null);
|
|
4
|
+
process.env.NODE_ENV !== "production" && (f.displayName = "CompoundComponentContext");
|
|
5
|
+
function p(e) {
|
|
6
|
+
const c = Array.from(e.keys()).map((t) => {
|
|
7
|
+
const a = e.get(t);
|
|
8
|
+
return {
|
|
9
|
+
key: t,
|
|
10
|
+
subitem: a
|
|
11
|
+
};
|
|
12
|
+
});
|
|
13
|
+
return c.sort((t, a) => {
|
|
14
|
+
const u = t.subitem.ref.current, r = a.subitem.ref.current;
|
|
15
|
+
return u === null || r === null || u === r ? 0 : u.compareDocumentPosition(r) & Node.DOCUMENT_POSITION_PRECEDING ? 1 : -1;
|
|
16
|
+
}), new Map(c.map((t) => [t.key, t.subitem]));
|
|
17
|
+
}
|
|
18
|
+
function I() {
|
|
19
|
+
const [e, c] = n.useState(/* @__PURE__ */ new Map()), t = n.useRef(/* @__PURE__ */ new Set()), a = n.useCallback(function(o) {
|
|
20
|
+
t.current.delete(o), c((b) => {
|
|
21
|
+
const s = new Map(b);
|
|
22
|
+
return s.delete(o), s;
|
|
23
|
+
});
|
|
24
|
+
}, []), u = n.useCallback(function(o, b) {
|
|
25
|
+
let s;
|
|
26
|
+
return typeof o == "function" ? s = o(t.current) : s = o, t.current.add(s), c((d) => {
|
|
27
|
+
const m = new Map(d);
|
|
28
|
+
return m.set(s, b), m;
|
|
29
|
+
}), {
|
|
30
|
+
id: s,
|
|
31
|
+
deregister: () => a(s)
|
|
32
|
+
};
|
|
33
|
+
}, [a]), r = n.useMemo(() => p(e), [e]), i = n.useCallback(function(o) {
|
|
34
|
+
return Array.from(r.keys()).indexOf(o);
|
|
35
|
+
}, [r]);
|
|
36
|
+
return {
|
|
37
|
+
contextValue: n.useMemo(() => ({
|
|
38
|
+
getItemIndex: i,
|
|
39
|
+
registerItem: u,
|
|
40
|
+
totalSubitemCount: e.size
|
|
41
|
+
}), [i, u, e.size]),
|
|
42
|
+
subitems: r
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
const l = /* @__PURE__ */ n.createContext(null);
|
|
46
|
+
process.env.NODE_ENV !== "production" && (l.displayName = "TabsContext");
|
|
47
|
+
function k() {
|
|
48
|
+
const e = n.useContext(l);
|
|
49
|
+
if (e == null)
|
|
50
|
+
throw new Error("No TabsContext provided");
|
|
51
|
+
return e;
|
|
52
|
+
}
|
|
53
|
+
const C = "_tabs_5kfuv_1", x = "_tabs__tab_5kfuv_5", y = {
|
|
54
|
+
tabs: C,
|
|
55
|
+
tabs__tab: x,
|
|
56
|
+
"tabs__tab--disabled": "_tabs__tab--disabled_5kfuv_22",
|
|
57
|
+
"tabs__tab--selected": "_tabs__tab--selected_5kfuv_31",
|
|
58
|
+
"tabs__tab-panel": "_tabs__tab-panel_5kfuv_35"
|
|
59
|
+
};
|
|
60
|
+
export {
|
|
61
|
+
f as C,
|
|
62
|
+
l as T,
|
|
63
|
+
k as a,
|
|
64
|
+
y as s,
|
|
65
|
+
I as u
|
|
66
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._h1_j1yzk_1{font-size:var(--heading-font-size-xl);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-xl);margin:0}._h1--bold_j1yzk_7{font-weight:var(--typography-heading-bold)}._h2_j1yzk_11{font-size:var(--heading-font-size-l);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-l);margin:0}._h2--bold_j1yzk_17{font-weight:var(--typography-heading-bold)}._h3_j1yzk_21{font-size:var(--heading-font-size);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height);margin:0}._h3--bold_j1yzk_27{font-weight:var(--typography-heading-bold)}._h4_j1yzk_31{font-size:var(--heading-font-size-s);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-s);margin:0}._h4--bold_j1yzk_37{font-weight:var(--typography-heading-bold)}._body_j1yzk_41{font-size:var(--body-font-size);line-height:var(--body-line-height);font-weight:var(--body-weight)}._body--large_j1yzk_46{font-size:var(--body-font-size-large);line-height:var(--body-line-height-large)}._body--medium_j1yzk_50{font-size:var(--body-font-size-medium);line-height:var(--body-line-height-medium)}._body--small_j1yzk_54{font-size:var(--body-font-size-small);line-height:var(--body-line-height-small)}._body--tiny_j1yzk_58{font-size:var(--body-font-size-tiny);line-height:var(--body-line-height-tiny)}._body--bold_j1yzk_62{font-weight:var(--body-bold)}._body--strikethrough_j1yzk_65{text-decoration:line-through}._body--underlined_j1yzk_68{text-decoration:underline}._body--strikethrough-underlined_j1yzk_71{text-decoration:underline line-through}._quote_j1yzk_75{font-size:var(--quote-font-size);line-height:var(--quote-line-height);font-weight:var(--quote-font-weight)}._quote--large_j1yzk_80{font-size:var(--quote-font-size-large);line-height:var(--quote-line-height-large);font-weight:var(--quote-font-weight-large)}._form__input_j1yzk_86{font-size:var(--form-input-font-size);line-height:var(--form-input-line-height);font-weight:var(--form-input-font-weight)}._form__hint_j1yzk_91{font-size:var(--form-hint-font-size);line-height:var(--form-hint-line-height);font-weight:var(--form-hint-font-weight)}._form__label_j1yzk_96{font-size:var(--form-label-font-size);line-height:var(--form-label-line-height);font-weight:var(--form-label-font-weight)}._form__dropdown_j1yzk_101{font-size:var(--form-dropdown-font-size);line-height:var(--form-dropdown-line-height);font-weight:var(--form-dropdown-font-weight)}._table__header_j1yzk_107{font-size:var(--table-font-size);line-height:var(--table-line-height);font-weight:var(--table-header-font-weight)}._table__body_j1yzk_112{font-size:var(--table-font-size);line-height:var(--table-line-height);font-weight:var(--table-body-font-weight)}._table__body--secondary_j1yzk_117{font-size:var(--table-font-size);line-height:var(--table-line-height);line-height:var(--table-body-secondary-line-height)}._button_j1yzk_123{font-size:var(--button-font-size);line-height:var(--button-line-height);font-weight:var(--button-font-weight)}._button_j1yzk_123{font-size:var(--button-font-size);line-height:var(--button-line-height);font-weight:var(--button-font-weight);padding:calc(var(--spacing) * 1.25) calc(var(--spacing) * 4.375);border-radius:calc(var(--spacing) * 12.5);border:none;cursor:pointer}._button--primary_j1yzk_138{background-color:var(--accent);color:var(--white-100)}._button--primary_j1yzk_138:hover{background-color:var(--accent-dark)}._button--primary_j1yzk_138:focus{background-color:var(--accent-lighter);color:var(--black-100)}._button--primary_j1yzk_138:active{background-color:var(--accent-light)}._button--primary_j1yzk_138:disabled{background-color:var(--black-10);color:var(--gray-50);cursor:default}._button--secondary_j1yzk_157{background-color:var(--white-100);color:var(--accent)}._button--secondary_j1yzk_157:hover{background-color:var(--gray-5)}._button--secondary_j1yzk_157:focus{color:var(--black-100)}._button--secondary_j1yzk_157:active{color:var(--accent-light)}._button--secondary_j1yzk_157:disabled{color:var(--gray-50);cursor:default}._button__loading-container_j1yzk_174{align-items:center;display:flex;gap:var(--spacing)}
|
package/dist/assets/Dialog.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._dialog_cknma_1{position:fixed;z-index:1300;top:0;right:0;bottom:0;left:0;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center}._dialog__backdrop_cknma_11{z-index:-1;position:fixed;background-color:rgba(var(--black-100-rgb),.05);width:100%;height:100%;-webkit-tap-highlight-color:transparent}._dialog__panel_cknma_19{font-weight:500;text-align:start;position:relative;display:flex;flex-direction:column;gap:8px;overflow:hidden;background-color:var(--white-100);border-radius:8px;border:1px solid rgb(218,226,237);box-shadow:0 10px 20px rgba(var(--black-100-rgb),.2);padding:24px;width:680px;color:var(--gray-75)}._dialog__title_cknma_35{padding-bottom:var(--spacing);padding-top:var(--spacing)}._dialog__title--small_cknma_39{font-size:var(--small-font)}._dialog__subtitle_cknma_42{font-family:Lato,sans-serif;font-size:20px;font-weight:700;line-height:26px;letter-spacing:0;text-align:left;color:var(--secondary-orange-dark)}._dialog__divider_cknma_51{width:100%;border-top:1px solid var(--gray-10)}._dialog__close-icon_cknma_55{padding:0;margin:0;border:none;background:none;position:absolute;right:calc(var(--spacing) * 2);top:calc(var(--spacing) * 3.375)}._dialog__actions_cknma_64{justify-content:center;margin-bottom:calc(var(--spacing) * 2);gap:var(--spacing);display:flex}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
._ls-
|
|
1
|
+
._ls-ring_19dsy_1{display:inline-block;position:relative;width:18px;height:18px}._ls-ring_19dsy_1>div{box-sizing:border-box;display:block;position:absolute;width:14px;height:14px;margin:auto;border:2px solid var(--white-100);border-radius:50%;animation:_ls-ring_19dsy_1 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:var(--white-100) transparent transparent transparent;top:0;right:0;bottom:0;left:0}._ls-ring_19dsy_1 div:nth-child(1){animation:none;opacity:40%;border-color:var(--white-100)}._ls-ring_19dsy_1 div:nth-child(2){animation-delay:-.45s}._ls-ring_19dsy_1 div:nth-child(3){animation-delay:-.3s}._ls-ring_19dsy_1 div:nth-child(4){animation-delay:-.15s}._ls-ring--invert_19dsy_34>div{border:2px solid var(--accent);border-color:var(--accent) transparent transparent transparent}._ls-ring--invert_19dsy_34 div:nth-child(1){animation:none;opacity:40%;border-color:var(--accent)}@keyframes _ls-ring_19dsy_1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
|
package/dist/assets/Tabs.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._tabs_5kfuv_1{width:100%;gap:var(--spacing)}._tabs__tab_5kfuv_5{background-color:var(--white-100);height:48px;padding:0 var(--spacing) 0 0;color:var(--gray-75);min-width:94px;border:none;cursor:pointer}._tabs__tab_5kfuv_5:hover{color:var(--hover);border-bottom:2px solid var(--hover)}._tabs__tab_5kfuv_5:active{color:var(--active);border-bottom:2px solid var(--active)}._tabs__tab--disabled_5kfuv_22{color:#00000040;border-bottom:2px solid rgba(0,0,0,.25);cursor:default}._tabs__tab--disabled_5kfuv_22:focus,._tabs__tab--disabled_5kfuv_22:active,._tabs__tab--disabled_5kfuv_22:hover{color:#00000040;border-bottom:2px solid rgba(0,0,0,.25)}._tabs__tab--selected_5kfuv_31{color:var(--accent);border-bottom:2px solid var(--accent)}._tabs__tab-panel_5kfuv_35{margin-top:calc(var(--spacing) * 2);width:100%}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._h1_111i6_1{font-size:var(--heading-font-size-xl);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-xl);margin:0}._h1--bold_111i6_7{font-weight:var(--typography-heading-bold)}._h2_111i6_11{font-size:var(--heading-font-size-l);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-l);margin:0}._h2--bold_111i6_17{font-weight:var(--typography-heading-bold)}._h3_111i6_21{font-size:var(--heading-font-size);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height);margin:0}._h3--bold_111i6_27{font-weight:var(--typography-heading-bold)}._h4_111i6_31{font-size:var(--heading-font-size-s);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-s);margin:0}._h4--bold_111i6_37{font-weight:var(--typography-heading-bold)}._body_111i6_41{font-size:var(--body-font-size);line-height:var(--body-line-height);font-weight:var(--body-weight)}._body--large_111i6_46{font-size:var(--body-font-size-large);line-height:var(--body-line-height-large)}._body--medium_111i6_50{font-size:var(--body-font-size-medium);line-height:var(--body-line-height-medium)}._body--small_111i6_54{font-size:var(--body-font-size-small);line-height:var(--body-line-height-small)}._body--tiny_111i6_58{font-size:var(--body-font-size-tiny);line-height:var(--body-line-height-tiny)}._body--bold_111i6_62{font-weight:var(--body-bold)}._body--strikethrough_111i6_65{text-decoration:line-through}._body--underlined_111i6_68{text-decoration:underline}._body--strikethrough-underlined_111i6_71{text-decoration:underline line-through}._quote_111i6_75{font-size:var(--quote-font-size);line-height:var(--quote-line-height);font-weight:var(--quote-font-weight)}._quote--large_111i6_80{font-size:var(--quote-font-size-large);line-height:var(--quote-line-height-large);font-weight:var(--quote-font-weight-large)}._form__input_111i6_86{font-size:var(--form-input-font-size);line-height:var(--form-input-line-height);font-weight:var(--form-input-font-weight)}._form__hint_111i6_91{font-size:var(--form-hint-font-size);line-height:var(--form-hint-line-height);font-weight:var(--form-hint-font-weight)}._form__label_111i6_96{font-size:var(--form-label-font-size);line-height:var(--form-label-line-height);font-weight:var(--form-label-font-weight)}._form__dropdown_111i6_101{font-size:var(--form-dropdown-font-size);line-height:var(--form-dropdown-line-height);font-weight:var(--form-dropdown-font-weight)}._table__header_111i6_107{font-size:var(--table-font-size);line-height:var(--table-line-height);font-weight:var(--table-header-font-weight)}._table__body_111i6_112{font-size:var(--table-font-size);line-height:var(--table-line-height);font-weight:var(--table-body-font-weight)}._table__body--secondary_111i6_117{font-size:var(--table-font-size);line-height:var(--table-line-height);line-height:var(--table-body-secondary-line-height)}._button_111i6_123{font-size:var(--button-font-size);line-height:var(--button-line-height);font-weight:var(--button-font-weight)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@font-face{font-family:Lato;src:url(../assets/fonts/Lato/Lato-Black.woff2) format("woff2");font-weight:900;font-style:normal}@font-face{font-family:Lato;src:url(../assets/fonts/Lato/Lato-BlackItalic.woff2) format("woff2");font-weight:900;font-style:italic}@font-face{font-family:Lato;src:url(../assets/fonts/Lato/Lato-Bold.woff2) format("woff2");font-weight:700;font-style:normal}@font-face{font-family:Lato;src:url(../assets/fonts/Lato/Lato-BoldItalic.woff2) format("woff2");font-weight:700;font-style:italic}@font-face{font-family:Lato;src:url(../assets/fonts/Lato/Lato-Italic.woff2) format("woff2");font-weight:400;font-style:italic}@font-face{font-family:Lato;src:url(../assets/fonts/Lato/Lato-Light.woff2) format("woff2");font-weight:300;font-style:normal}@font-face{font-family:Lato;src:url(../assets/fonts/Lato/Lato-LightItalic.woff2) format("woff2");font-weight:300;font-style:italic}@font-face{font-family:Lato;src:url(../assets/fonts/Lato/Lato-Regular.woff2) format("woff2");font-weight:400;font-style:normal}@font-face{font-family:Lato;src:url(../assets/fonts/Lato/Lato-Thin.woff2) format("woff2");font-weight:100;font-style:normal}@font-face{font-family:Lato;src:url(../assets/fonts/Lato/Lato-ThinItalic.woff2) format("woff2");font-weight:100;font-style:italic}body{font-family:Lato,Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:root{--secondary-orange: #FFA945;--secondary-orange-rgb: 255, 169, 69;--secondary-orange-dark: #FE8D53;--secondary-orange-dark-rgb: 254, 141, 83;--secondary-orange-light: #525061;--secondary-orange-light-rgb: 82, 80, 97;--secondary-green: #99DEC3;--secondary-green-rgb: 153, 222, 195;--secondary-green-dark: #6ACBB1;--secondary-green-dark-rgb: 106, 203, 177;--secondary-green-darker: #31AA7E;--secondary-green-darker-rgb: 49, 170, 126;--secondary-green-light: #BAEDD9;--secondary-green-light-rgb: 186, 237, 217;--accent: #1897F3;--accent-rgb: 24, 151, 243;--accent-dark: #1672C7;--accent-dark-rgb: 22, 114, 199;--accent-light: #4FB1F9;--accent-light-rgb: 79, 177, 249;--accent-lighter: #8AE1FD;--accent-lighter-rgb: 138, 225, 253;--alert: #DF4561;--alert-rgb: 223, 69, 97;--alert-dark: #BB2B45;--alert-dark-rgb: 187, 43, 69;--accent-alert-light: #F37C91;--accent-alert-light-rgb: 243, 124, 145;--cream: #FAFAFA;--cream-rgb: 250, 250, 250;--hover: #42B7FF;--hover-rgb: 66, 183, 255;--active: #0A75CC;--active-rgb: 10, 117, 204}:root{--gray-100: #16161E;--gray-100-rgb: 22, 22, 30;--gray-95: #3F3D4B;--gray-95-rgb: 63, 61, 75;--gray-90: #525061;--gray-90-rgb: 82, 80, 97;--gray-75: #838192;--gray-75-rgb: 131, 129, 146;--gray-50: #BCBAC8;--gray-50-rgb: 188, 186, 200;--gray-25: #DBDAE2;--gray-25-rgb: 219, 218, 226;--gray-10: #EBEAF0;--gray-10-rgb: 235, 234, 240;--gray-5: #F7F7FC;--gray-5-rgb: 247, 247, 252;--black-100: #000000;--black-100-rgb: 0, 0, 0;--black-75: #616161;--black-75-rgb: 97, 97, 97;--black-50: #838192;--black-50-rgb: 131, 129, 146;--black-25: #BCBAC8;--black-25-rgb: 188, 186, 200;--black-10: #EBEAF0;--black-10-rgb: 235, 234, 240;--white-100: #FFFFFF;--white-100-rgb: 255, 255, 255}:root{--heading-font-weight: 700;--heading-font-size-xl: 3.75rem;--heading-line-height-xl: 4.875rem;--heading-font-size-l: 3rem;--heading-line-height-l: 3.9375rem;--heading-font-size: 2.25rem;--heading-line-height: 2.875rem;--heading-font-size-s: 1.5rem;--heading-line-height-s: 2rem;--body-font-size: 1rem;--body-line-height: 1.3125rem;--body-weight: normal;--body-bold: bold;--body-font-size-large: 1.5rem;--body-line-height-large: 1.625rem;--body-font-size-medium: 1.125;--body-line-height-medium: 1rem;--body-font-size-small: .875rem;--body-line-height-small: 1.125rem;--body-font-size-tiny: .75rem;--body-line-height-tiny: 1rem;--quote-font-size-large: 1.5rem;--quote-line-height-large: 2rem;--quote-font-weight-large: normal;--quote-font-size: 1rem;--quote-line-height: 1.3125rem;--quote-font-weight: normal;--form-input-font-size:1rem;--form-input-line-height:1.3125rem;--form-input-font-weight:bold;--form-hint-font-size:.875rem;--form-hint-line-height:1.3125rem;--form-hint-font-weight:normal;--form-label-font-size:.875rem;--form-label-line-height:1.3125rem;--form-label-font-weight:normal;--form-dropdown-font-size:1rem;--form-dropdown-line-height:1.3125rem;--form-dropdown-font-weight:normal;--table-font-size:.875rem;--table-line-height:1.0625rem;--table-header-font-weight:bold;--table-body-font-weight:normal;--table-body-secondary-line-height:1.3125rem;--button-font-size:1rem;--button-line-height:1.25rem;--button-font-weight: bold}:root{--spacing: 8px}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Either } from '../../types/helpers';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
type variation = "primary" | "secondary";
|
|
5
|
+
type CallToActionButtonCoreProps = {
|
|
6
|
+
isLoading?: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
variation?: variation;
|
|
11
|
+
};
|
|
12
|
+
interface CallToActionButtonPropsWithLink extends CallToActionButtonCoreProps {
|
|
13
|
+
link: string;
|
|
14
|
+
}
|
|
15
|
+
interface CallToActionButtonPropsWithOnClick extends CallToActionButtonCoreProps {
|
|
16
|
+
onClick: () => void;
|
|
17
|
+
type?: HTMLButtonElement["type"];
|
|
18
|
+
}
|
|
19
|
+
export type CallToActionButtonProps = Either<CallToActionButtonPropsWithLink, CallToActionButtonPropsWithOnClick>;
|
|
20
|
+
export declare const CallToActionButton: import('react').ForwardRefExoticComponent<CallToActionButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
21
|
+
export default CallToActionButton;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import '../../assets/CallToActionButton.css';
|
|
2
|
+
import { jsx as d, jsxs as h } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as u, useMemo as c } from "react";
|
|
4
|
+
import { LoadingSpinner as k } from "../LoadingSpinner/LoadingSpinner.js";
|
|
5
|
+
import { c as m } from "../../clsx-DB4S2d7J.js";
|
|
6
|
+
import { B as j } from "../../Button-C3Qm852g.js";
|
|
7
|
+
const z = "_h1_j1yzk_1", f = "_h2_j1yzk_11", p = "_h3_j1yzk_21", g = "_h4_j1yzk_31", q = "_body_j1yzk_41", w = "_quote_j1yzk_75", x = "_form__input_j1yzk_86", N = "_form__hint_j1yzk_91", v = "_form__label_j1yzk_96", B = "_form__dropdown_j1yzk_101", C = "_table__header_j1yzk_107", L = "_table__body_j1yzk_112", A = "_button_j1yzk_123", _ = {
|
|
8
|
+
h1: z,
|
|
9
|
+
"h1--bold": "_h1--bold_j1yzk_7",
|
|
10
|
+
h2: f,
|
|
11
|
+
"h2--bold": "_h2--bold_j1yzk_17",
|
|
12
|
+
h3: p,
|
|
13
|
+
"h3--bold": "_h3--bold_j1yzk_27",
|
|
14
|
+
h4: g,
|
|
15
|
+
"h4--bold": "_h4--bold_j1yzk_37",
|
|
16
|
+
body: q,
|
|
17
|
+
"body--large": "_body--large_j1yzk_46",
|
|
18
|
+
"body--medium": "_body--medium_j1yzk_50",
|
|
19
|
+
"body--small": "_body--small_j1yzk_54",
|
|
20
|
+
"body--tiny": "_body--tiny_j1yzk_58",
|
|
21
|
+
"body--bold": "_body--bold_j1yzk_62",
|
|
22
|
+
"body--strikethrough": "_body--strikethrough_j1yzk_65",
|
|
23
|
+
"body--underlined": "_body--underlined_j1yzk_68",
|
|
24
|
+
"body--strikethrough-underlined": "_body--strikethrough-underlined_j1yzk_71",
|
|
25
|
+
quote: w,
|
|
26
|
+
"quote--large": "_quote--large_j1yzk_80",
|
|
27
|
+
form__input: x,
|
|
28
|
+
form__hint: N,
|
|
29
|
+
form__label: v,
|
|
30
|
+
form__dropdown: B,
|
|
31
|
+
table__header: C,
|
|
32
|
+
table__body: L,
|
|
33
|
+
"table__body--secondary": "_table__body--secondary_j1yzk_117",
|
|
34
|
+
button: A,
|
|
35
|
+
"button--primary": "_button--primary_j1yzk_138",
|
|
36
|
+
"button--secondary": "_button--secondary_j1yzk_157",
|
|
37
|
+
"button__loading-container": "_button__loading-container_j1yzk_174"
|
|
38
|
+
}, D = u((r, e) => {
|
|
39
|
+
const {
|
|
40
|
+
onClick: y,
|
|
41
|
+
link: b,
|
|
42
|
+
isLoading: l,
|
|
43
|
+
children: o,
|
|
44
|
+
type: a = "button",
|
|
45
|
+
disabled: s,
|
|
46
|
+
className: t,
|
|
47
|
+
variation: n = "primary"
|
|
48
|
+
} = r, i = c(() => m([_.button, _[`button--${n}`], t]), [t]);
|
|
49
|
+
return /* @__PURE__ */ d(j, { type: a, href: b, onClick: y, disabled: s, className: i, ref: e, children: l ? /* @__PURE__ */ h("div", { className: _["button__loading-container"], children: [
|
|
50
|
+
/* @__PURE__ */ d(k, { ...n === "secondary" && { invert: !0 } }),
|
|
51
|
+
o
|
|
52
|
+
] }) : o });
|
|
53
|
+
});
|
|
54
|
+
export {
|
|
55
|
+
D as CallToActionButton,
|
|
56
|
+
D as default
|
|
57
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { s as t } from "../../Dialog.module-
|
|
2
|
+
import { s as t } from "../../Dialog.module-BO0mdB7d.js";
|
|
3
3
|
const i = ({ children: s }) => /* @__PURE__ */ o("div", { className: t.dialog__actions, children: s });
|
|
4
4
|
export {
|
|
5
5
|
i as default
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as t } from "react";
|
|
3
|
-
import { s as e } from "../../Dialog.module-
|
|
3
|
+
import { s as e } from "../../Dialog.module-BO0mdB7d.js";
|
|
4
4
|
const i = t((o, r) => {
|
|
5
5
|
const { open: m, className: p, ...s } = o;
|
|
6
|
-
return /* @__PURE__ */ a(
|
|
6
|
+
return /* @__PURE__ */ a(
|
|
7
|
+
"div",
|
|
8
|
+
{
|
|
9
|
+
className: e.dialog__backdrop,
|
|
10
|
+
ref: r,
|
|
11
|
+
...s
|
|
12
|
+
}
|
|
13
|
+
);
|
|
7
14
|
});
|
|
8
15
|
export {
|
|
9
16
|
i as default
|
|
@@ -1,20 +1,132 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { jsx as j } from "react/jsx-runtime";
|
|
2
|
+
import { s as O } from "../../Dialog.module-BO0mdB7d.js";
|
|
3
|
+
import { h as C, i as W } from "../../index-BZ1lkM_M.js";
|
|
4
|
+
import I from "react";
|
|
5
|
+
import { B as P } from "../../Button-C3Qm852g.js";
|
|
6
|
+
var N = { exports: {} };
|
|
7
|
+
(function(w, b) {
|
|
8
|
+
(function(x, y) {
|
|
9
|
+
w.exports = y(I);
|
|
10
|
+
})(C, (x) => (() => {
|
|
11
|
+
var y = { 639: (t) => {
|
|
12
|
+
t.exports = x;
|
|
13
|
+
} }, E = {};
|
|
14
|
+
function s(t) {
|
|
15
|
+
var o = E[t];
|
|
16
|
+
if (o !== void 0)
|
|
17
|
+
return o.exports;
|
|
18
|
+
var c = E[t] = { exports: {} };
|
|
19
|
+
return y[t](c, c.exports, s), c.exports;
|
|
20
|
+
}
|
|
21
|
+
s.n = (t) => {
|
|
22
|
+
var o = t && t.__esModule ? () => t.default : () => t;
|
|
23
|
+
return s.d(o, { a: o }), o;
|
|
24
|
+
}, s.d = (t, o) => {
|
|
25
|
+
for (var c in o)
|
|
26
|
+
s.o(o, c) && !s.o(t, c) && Object.defineProperty(t, c, { enumerable: !0, get: o[c] });
|
|
27
|
+
}, s.o = (t, o) => Object.prototype.hasOwnProperty.call(t, o), s.r = (t) => {
|
|
28
|
+
typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t, "__esModule", { value: !0 });
|
|
29
|
+
};
|
|
30
|
+
var _ = {};
|
|
31
|
+
return (() => {
|
|
32
|
+
s.r(_), s.d(_, { default: () => B });
|
|
33
|
+
var t = s(639), o = s.n(t), c = function(i, a, l, r) {
|
|
34
|
+
return new (l || (l = Promise))(function(p, u) {
|
|
35
|
+
function h(n) {
|
|
36
|
+
try {
|
|
37
|
+
d(r.next(n));
|
|
38
|
+
} catch (e) {
|
|
39
|
+
u(e);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function f(n) {
|
|
43
|
+
try {
|
|
44
|
+
d(r.throw(n));
|
|
45
|
+
} catch (e) {
|
|
46
|
+
u(e);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
function d(n) {
|
|
50
|
+
var e;
|
|
51
|
+
n.done ? p(n.value) : (e = n.value, e instanceof l ? e : new l(function(m) {
|
|
52
|
+
m(e);
|
|
53
|
+
})).then(h, f);
|
|
54
|
+
}
|
|
55
|
+
d((r = r.apply(i, a || [])).next());
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
function T() {
|
|
59
|
+
return typeof globalThis < "u" && globalThis.WAVES_ICONS_BASE_URL ? globalThis.WAVES_ICONS_BASE_URL : typeof window < "u" && window.WAVES_ICONS_BASE_URL ? window.WAVES_ICONS_BASE_URL : "https://waves-icons.pismolabs.io/bin";
|
|
60
|
+
}
|
|
61
|
+
function A(i, a, l) {
|
|
62
|
+
const r = a && Number.isNaN(Number(a)) ? a : a ? `${a}px` : "1em", p = l || "currentColor", u = { fill: p, color: p, width: r, height: r };
|
|
63
|
+
return i && Object.keys(u).forEach((h) => {
|
|
64
|
+
i.setAttribute(h, u[h]);
|
|
65
|
+
}), i && Object.assign(i.style, u), i;
|
|
66
|
+
}
|
|
67
|
+
const B = ({ icon: i, color: a, size: l }) => {
|
|
68
|
+
const r = (0, t.useRef)(null), [p, u] = (0, t.useState)(null), h = (f) => {
|
|
69
|
+
const d = A(f, `${l || ""}`, a);
|
|
70
|
+
r != null && r.current && (r.current.innerHTML = "", r.current.append(d)), u(d);
|
|
71
|
+
};
|
|
72
|
+
return (0, t.useEffect)(() => {
|
|
73
|
+
(function(f, d = !1) {
|
|
74
|
+
return c(this, void 0, void 0, function* () {
|
|
75
|
+
return function(n) {
|
|
76
|
+
return c(this, void 0, void 0, function* () {
|
|
77
|
+
return fetch(n, { cache: "force-cache" }).then((e) => e.status >= 200 && e.status <= 299 ? e.text() : Promise.resolve(`
|
|
78
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
79
|
+
<svg role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000">
|
|
80
|
+
<!-- Waves Icon Not Found -->
|
|
81
|
+
</svg>
|
|
82
|
+
`)).catch(console.error);
|
|
83
|
+
});
|
|
84
|
+
}(f.startsWith("http") ? f : function(n, e = "svg", m) {
|
|
85
|
+
return m || (m = T()), `${m}/${n}.${e}`;
|
|
86
|
+
}(f)).then((n) => {
|
|
87
|
+
try {
|
|
88
|
+
const e = d ? n : function(m, S) {
|
|
89
|
+
S || (S = `
|
|
90
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
91
|
+
<svg role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000">
|
|
92
|
+
<!-- Waves Icon Not Found -->
|
|
93
|
+
</svg>
|
|
94
|
+
`);
|
|
95
|
+
const g = Object.assign(document.createElement("template"), { innerHTML: S }).content.querySelector("svg");
|
|
96
|
+
return Array.from(g.attributes).map(({ name: v }) => v).find((v) => {
|
|
97
|
+
v.startsWith("on") && g.removeAttribute(v);
|
|
98
|
+
}), g.querySelectorAll(["a", "animate", "color-profile", "cursor", "discard", "fedropshadow", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"].join(",")).forEach((v) => {
|
|
99
|
+
v.remove();
|
|
100
|
+
}), g.setAttribute("data-waves-icon", m), g;
|
|
101
|
+
}(f, n);
|
|
102
|
+
return Promise.resolve(e);
|
|
103
|
+
} catch (e) {
|
|
104
|
+
return Promise.reject(e);
|
|
105
|
+
}
|
|
106
|
+
}).catch(console.error);
|
|
107
|
+
});
|
|
108
|
+
})(i).then(h).catch(console.error);
|
|
109
|
+
}, [i]), (0, t.useEffect)(() => {
|
|
110
|
+
A(p, `${l || ""}`, a);
|
|
111
|
+
}, [l, a]), o().createElement("span", { ref: r });
|
|
112
|
+
};
|
|
113
|
+
})(), _;
|
|
114
|
+
})());
|
|
115
|
+
})(N);
|
|
116
|
+
var L = N.exports;
|
|
117
|
+
const R = /* @__PURE__ */ W(L), V = ({ handleOnClose: w, className: b }) => {
|
|
118
|
+
const x = b != null ? O["dialog__close-icon "] + b : O["dialog__close-icon"];
|
|
119
|
+
return /* @__PURE__ */ j(
|
|
120
|
+
P,
|
|
9
121
|
{
|
|
10
|
-
className:
|
|
122
|
+
className: x,
|
|
11
123
|
"aria-description": "Close dialog",
|
|
12
|
-
onClick:
|
|
124
|
+
onClick: w,
|
|
13
125
|
"data-testid": "dialog-close-button",
|
|
14
|
-
children: /* @__PURE__ */
|
|
126
|
+
children: /* @__PURE__ */ j(R, { icon: "fa/duotone/circle-xmark", size: 32, color: "var(--gray-75)" })
|
|
15
127
|
}
|
|
16
128
|
);
|
|
17
129
|
};
|
|
18
130
|
export {
|
|
19
|
-
|
|
131
|
+
V as default
|
|
20
132
|
};
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
import { default as DialogTitle } from './
|
|
1
|
+
import { default as DialogTitle } from './Title';
|
|
2
2
|
import { default as Content } from './Content';
|
|
3
3
|
import { default as Actions } from './Actions';
|
|
4
4
|
import { ModalProps } from '@mui/base';
|
|
5
5
|
import { JSXElementConstructor, ReactElement, ReactNode } from 'react';
|
|
6
6
|
|
|
7
|
-
export type CloseReason =
|
|
7
|
+
export type CloseReason = "backdropClick" | "escapeKeyDown" | "closeButtonClick";
|
|
8
8
|
export interface DialogProps extends ModalProps {
|
|
9
|
-
/** main content */
|
|
10
|
-
children: ReactElement<
|
|
9
|
+
/** main children content */
|
|
10
|
+
children: ReactElement<any, string | JSXElementConstructor<any>>;
|
|
11
11
|
/** display title label */
|
|
12
12
|
dialogTitle: ReactNode;
|
|
13
13
|
/** display subtitle */
|
|
14
14
|
dialogSubtitle?: ReactNode;
|
|
15
15
|
/** if true, show skeleton */
|
|
16
16
|
isLoading?: boolean;
|
|
17
|
-
|
|
18
|
-
onClose?: () => void;
|
|
17
|
+
onClose: () => void;
|
|
19
18
|
}
|
|
20
19
|
declare const Dialog: ({ children, dialogTitle, dialogSubtitle, isLoading, onClose, ...props }: DialogProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
20
|
export { Dialog, DialogTitle, Content, Actions };
|