@redneckz/wildless-cms-uni-blocks 0.14.430 → 0.14.431
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/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +93 -33
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/CalculatorDeposit/CalculatorDepositContent.d.ts +10 -0
- package/bundle/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +5 -0
- package/bundle/components/CalculatorDeposit/renderDepositParamsForm.d.ts +5 -0
- package/bundle/ui-kit/Calculator/renderRate.d.ts +3 -1
- package/dist/components/CalculatorDeposit/CalculatorDeposit.js +31 -26
- package/dist/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
- package/dist/components/CalculatorDeposit/CalculatorDepositContent.d.ts +10 -0
- package/dist/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +5 -0
- package/dist/components/CalculatorDeposit/getDepositCalculatorParams.js +19 -2
- package/dist/components/CalculatorDeposit/getDepositCalculatorParams.js.map +1 -1
- package/dist/components/CalculatorDeposit/renderDepositParamsForm.d.ts +5 -0
- package/dist/components/CalculatorDeposit/renderDepositParamsForm.js +45 -0
- package/dist/components/CalculatorDeposit/renderDepositParamsForm.js.map +1 -0
- package/dist/components/CalculatorDeposit/renderDepositResult.js +1 -1
- package/dist/components/CalculatorDeposit/renderDepositResult.js.map +1 -1
- package/dist/ui-kit/Calculator/CalculatorStyle.js +3 -3
- package/dist/ui-kit/Calculator/CalculatorStyle.js.map +1 -1
- package/dist/ui-kit/Calculator/renderBinaryRadioButtonGroup.js +1 -2
- package/dist/ui-kit/Calculator/renderBinaryRadioButtonGroup.js.map +1 -1
- package/dist/ui-kit/Calculator/renderRate.d.ts +3 -1
- package/dist/ui-kit/Calculator/renderRate.js +1 -1
- package/dist/ui-kit/Calculator/renderRate.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/CalculatorDeposit/CalculatorDeposit.fixture.d.ts +1 -0
- package/lib/components/CalculatorDeposit/CalculatorDeposit.js +30 -25
- package/lib/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
- package/lib/components/CalculatorDeposit/CalculatorDepositContent.d.ts +10 -0
- package/lib/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +5 -0
- package/lib/components/CalculatorDeposit/getDepositCalculatorParams.js +19 -2
- package/lib/components/CalculatorDeposit/getDepositCalculatorParams.js.map +1 -1
- package/lib/components/CalculatorDeposit/renderDepositParamsForm.d.ts +4 -0
- package/lib/components/CalculatorDeposit/renderDepositParamsForm.js +42 -0
- package/lib/components/CalculatorDeposit/renderDepositParamsForm.js.map +1 -0
- package/lib/components/CalculatorDeposit/renderDepositResult.js +1 -1
- package/lib/components/CalculatorDeposit/renderDepositResult.js.map +1 -1
- package/lib/ui-kit/Calculator/CalculatorStyle.js +3 -3
- package/lib/ui-kit/Calculator/CalculatorStyle.js.map +1 -1
- package/lib/ui-kit/Calculator/renderBinaryRadioButtonGroup.js +1 -2
- package/lib/ui-kit/Calculator/renderBinaryRadioButtonGroup.js.map +1 -1
- package/lib/ui-kit/Calculator/renderRate.d.ts +3 -1
- package/lib/ui-kit/Calculator/renderRate.js +1 -1
- package/lib/ui-kit/Calculator/renderRate.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +93 -33
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/CalculatorDeposit/CalculatorDepositContent.d.ts +10 -0
- package/mobile/bundle/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +5 -0
- package/mobile/bundle/components/CalculatorDeposit/renderDepositParamsForm.d.ts +5 -0
- package/mobile/bundle/ui-kit/Calculator/renderRate.d.ts +3 -1
- package/mobile/dist/components/CalculatorDeposit/CalculatorDeposit.js +31 -26
- package/mobile/dist/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
- package/mobile/dist/components/CalculatorDeposit/CalculatorDepositContent.d.ts +10 -0
- package/mobile/dist/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +5 -0
- package/mobile/dist/components/CalculatorDeposit/getDepositCalculatorParams.js +19 -2
- package/mobile/dist/components/CalculatorDeposit/getDepositCalculatorParams.js.map +1 -1
- package/mobile/dist/components/CalculatorDeposit/renderDepositParamsForm.d.ts +5 -0
- package/mobile/dist/components/CalculatorDeposit/renderDepositParamsForm.js +45 -0
- package/mobile/dist/components/CalculatorDeposit/renderDepositParamsForm.js.map +1 -0
- package/mobile/dist/components/CalculatorDeposit/renderDepositResult.js +1 -1
- package/mobile/dist/components/CalculatorDeposit/renderDepositResult.js.map +1 -1
- package/mobile/dist/ui-kit/Calculator/CalculatorStyle.js +3 -3
- package/mobile/dist/ui-kit/Calculator/CalculatorStyle.js.map +1 -1
- package/mobile/dist/ui-kit/Calculator/renderBinaryRadioButtonGroup.js +1 -2
- package/mobile/dist/ui-kit/Calculator/renderBinaryRadioButtonGroup.js.map +1 -1
- package/mobile/dist/ui-kit/Calculator/renderRate.d.ts +3 -1
- package/mobile/dist/ui-kit/Calculator/renderRate.js +1 -1
- package/mobile/dist/ui-kit/Calculator/renderRate.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/CalculatorDeposit/CalculatorDeposit.js +30 -25
- package/mobile/lib/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
- package/mobile/lib/components/CalculatorDeposit/CalculatorDepositContent.d.ts +10 -0
- package/mobile/lib/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +5 -0
- package/mobile/lib/components/CalculatorDeposit/getDepositCalculatorParams.js +19 -2
- package/mobile/lib/components/CalculatorDeposit/getDepositCalculatorParams.js.map +1 -1
- package/mobile/lib/components/CalculatorDeposit/renderDepositParamsForm.d.ts +5 -0
- package/mobile/lib/components/CalculatorDeposit/renderDepositParamsForm.js +42 -0
- package/mobile/lib/components/CalculatorDeposit/renderDepositParamsForm.js.map +1 -0
- package/mobile/lib/components/CalculatorDeposit/renderDepositResult.js +1 -1
- package/mobile/lib/components/CalculatorDeposit/renderDepositResult.js.map +1 -1
- package/mobile/lib/ui-kit/Calculator/CalculatorStyle.js +3 -3
- package/mobile/lib/ui-kit/Calculator/CalculatorStyle.js.map +1 -1
- package/mobile/lib/ui-kit/Calculator/renderBinaryRadioButtonGroup.js +1 -2
- package/mobile/lib/ui-kit/Calculator/renderBinaryRadioButtonGroup.js.map +1 -1
- package/mobile/lib/ui-kit/Calculator/renderRate.d.ts +3 -1
- package/mobile/lib/ui-kit/Calculator/renderRate.js +1 -1
- package/mobile/lib/ui-kit/Calculator/renderRate.js.map +1 -1
- package/mobile/src/components/CalculatorDeposit/CalculatorDeposit.tsx +45 -41
- package/mobile/src/components/CalculatorDeposit/CalculatorDepositContent.ts +10 -0
- package/mobile/src/components/CalculatorDeposit/getDepositCalculatorParams.ts +23 -0
- package/mobile/src/components/CalculatorDeposit/renderDepositParamsForm.tsx +59 -0
- package/mobile/src/components/CalculatorDeposit/renderDepositResult.tsx +1 -1
- package/mobile/src/ui-kit/Calculator/CalculatorStyle.tsx +3 -3
- package/mobile/src/ui-kit/Calculator/renderBinaryRadioButtonGroup.tsx +2 -3
- package/mobile/src/ui-kit/Calculator/renderRate.tsx +5 -1
- package/package.json +1 -1
- package/src/components/CalculatorDeposit/CalculatorDeposit.fixture.tsx +20 -0
- package/src/components/CalculatorDeposit/CalculatorDeposit.tsx +45 -41
- package/src/components/CalculatorDeposit/CalculatorDepositContent.ts +10 -0
- package/src/components/CalculatorDeposit/getDepositCalculatorParams.ts +23 -0
- package/src/components/CalculatorDeposit/renderDepositParamsForm.tsx +59 -0
- package/src/components/CalculatorDeposit/renderDepositResult.tsx +1 -1
- package/src/ui-kit/Calculator/CalculatorStyle.tsx +3 -3
- package/src/ui-kit/Calculator/renderBinaryRadioButtonGroup.tsx +2 -3
- package/src/ui-kit/Calculator/renderRate.tsx +5 -1
- package/tailwind.config.cjs +1 -1
- package/bundle/ui-kit/Breadcrumb.d.ts +0 -6
- package/dist/ui-kit/Breadcrumb.d.ts +0 -6
- package/dist/ui-kit/Breadcrumb.js +0 -11
- package/dist/ui-kit/Breadcrumb.js.map +0 -1
- package/lib/ui-kit/Breadcrumb.d.ts +0 -6
- package/lib/ui-kit/Breadcrumb.js +0 -9
- package/lib/ui-kit/Breadcrumb.js.map +0 -1
- package/mobile/bundle/ui-kit/Breadcrumb.d.ts +0 -6
- package/mobile/dist/ui-kit/Breadcrumb.d.ts +0 -6
- package/mobile/dist/ui-kit/Breadcrumb.js +0 -11
- package/mobile/dist/ui-kit/Breadcrumb.js.map +0 -1
- package/mobile/lib/ui-kit/Breadcrumb.d.ts +0 -6
- package/mobile/lib/ui-kit/Breadcrumb.js +0 -9
- package/mobile/lib/ui-kit/Breadcrumb.js.map +0 -1
- package/mobile/src/ui-kit/Breadcrumb.tsx +0 -21
- package/src/ui-kit/Breadcrumb.tsx +0 -21
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { FormFieldRegisterer } from '../../hooks/useForm';
|
|
2
|
+
import { renderBinaryRadioButtonGroup } from '../../ui-kit/Calculator/renderBinaryRadioButtonGroup';
|
|
3
|
+
import { renderPayout } from '../../ui-kit/Calculator/renderPayout';
|
|
4
|
+
import type { CalculatorDepositParamsViewSettings } from './CalculatorDepositContent';
|
|
5
|
+
import type { DepositCalculatorParams } from './getDepositCalculatorParams';
|
|
6
|
+
import { renderRegistrationType } from './renderRegistrationType';
|
|
7
|
+
|
|
8
|
+
export const renderDepositParamsForm = (
|
|
9
|
+
params: DepositCalculatorParams & CalculatorDepositParamsViewSettings,
|
|
10
|
+
field: FormFieldRegisterer<any>,
|
|
11
|
+
) => (
|
|
12
|
+
<div className="grid gap-lg">
|
|
13
|
+
<div className="flex gap-lg">
|
|
14
|
+
{params.isShowReplenish
|
|
15
|
+
? renderBinaryRadioButtonGroup({
|
|
16
|
+
title: 'Пополнение',
|
|
17
|
+
...field('isReplenish'),
|
|
18
|
+
value: params.isReplenish,
|
|
19
|
+
orientation: 'vertical',
|
|
20
|
+
items: [
|
|
21
|
+
{ id: 'withReplenish', text: 'С пополнением' },
|
|
22
|
+
{ id: 'withoutReplenish', text: 'Без пополнения' },
|
|
23
|
+
],
|
|
24
|
+
})
|
|
25
|
+
: null}
|
|
26
|
+
{params.isShowWithdrawn
|
|
27
|
+
? renderBinaryRadioButtonGroup({
|
|
28
|
+
title: 'Снятие',
|
|
29
|
+
...field('isWithdrawn'),
|
|
30
|
+
value: params.isWithdrawn,
|
|
31
|
+
orientation: 'vertical',
|
|
32
|
+
items: [
|
|
33
|
+
{ id: 'wthDrawn', text: 'Со снятием' },
|
|
34
|
+
{ id: 'noWithdrawn', text: 'Без снятия' },
|
|
35
|
+
],
|
|
36
|
+
})
|
|
37
|
+
: null}
|
|
38
|
+
</div>
|
|
39
|
+
<div className="border-b border-main-divider w-full" />
|
|
40
|
+
<div className="flex gap-lg">
|
|
41
|
+
{params.isShowMonthlyInterestPayment
|
|
42
|
+
? renderPayout({
|
|
43
|
+
title: 'Выплата процентов',
|
|
44
|
+
...field('isMonthlyInterestPayment'),
|
|
45
|
+
value: params.isMonthlyInterestPayment,
|
|
46
|
+
orientation: 'vertical',
|
|
47
|
+
})
|
|
48
|
+
: null}
|
|
49
|
+
{params.isShowRemoteRegistration
|
|
50
|
+
? renderRegistrationType({
|
|
51
|
+
title: 'Оформление',
|
|
52
|
+
...field('isRemoteRegistration'),
|
|
53
|
+
value: params.isRemoteRegistration,
|
|
54
|
+
orientation: 'vertical',
|
|
55
|
+
})
|
|
56
|
+
: null}
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export const CalculatorStyle = {
|
|
2
|
-
wrapper: 'flex flex-col justify-between @4xl:flex-row gap-x-
|
|
2
|
+
wrapper: 'flex flex-col justify-between @4xl:flex-row gap-x-s gap-y-7 @xl:gap-y-4xl',
|
|
3
3
|
input:
|
|
4
|
-
'flex flex-col
|
|
5
|
-
result: 'flex flex-col gap-y-xl
|
|
4
|
+
'flex flex-col lg:max-w-80 gap-2xl border-b border-b-main-divider @xl:border-none pb-3xl @xl:pb-0',
|
|
5
|
+
result: 'flex flex-col gap-y-xl',
|
|
6
6
|
};
|
|
@@ -4,7 +4,6 @@ import {
|
|
|
4
4
|
type RadioButtonItem,
|
|
5
5
|
} from '../../ui-kit/RadioButtonGroup/RadioButtonGroup';
|
|
6
6
|
import { Text } from '../../ui-kit/Text/Text';
|
|
7
|
-
import { style } from '../../utils/style';
|
|
8
7
|
|
|
9
8
|
export interface BinaryRadioButtonGroupProps {
|
|
10
9
|
items: [truthy: RadioButtonItem, falsy: RadioButtonItem];
|
|
@@ -25,7 +24,7 @@ export const renderBinaryRadioButtonGroup = ({
|
|
|
25
24
|
radioGroupClassName,
|
|
26
25
|
onChange,
|
|
27
26
|
}: BinaryRadioButtonGroupProps) => (
|
|
28
|
-
<div className="
|
|
27
|
+
<div className="grid gap-s whitespace-nowrap">
|
|
29
28
|
{title ? (
|
|
30
29
|
<div className="hidden @5xl:block">
|
|
31
30
|
<Text color="text-secondary-text" font="font-light">
|
|
@@ -45,7 +44,7 @@ export const renderBinaryRadioButtonGroup = ({
|
|
|
45
44
|
orientation={orientation}
|
|
46
45
|
items={items}
|
|
47
46
|
checkedItem={items[value ? 0 : 1].id}
|
|
48
|
-
className={
|
|
47
|
+
className={radioGroupClassName}
|
|
49
48
|
onChange={(_) => onChange && onChange(_ === items[0].id)}
|
|
50
49
|
/>
|
|
51
50
|
</div>
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { type VNode } from '../../model/VNode';
|
|
1
2
|
import { CalculatorValueBlock } from './CalculatorValueBlock';
|
|
2
3
|
import { Rate, type RateProps } from './Rate';
|
|
3
4
|
import { UnknownRate, type UnknownRateProps } from './UnknownRate';
|
|
4
5
|
|
|
5
6
|
interface RenderRateProps extends RateProps, UnknownRateProps {
|
|
6
7
|
isUnknownRateShown?: boolean;
|
|
8
|
+
children?: VNode;
|
|
7
9
|
}
|
|
8
10
|
|
|
9
11
|
export const renderRate = ({
|
|
@@ -13,13 +15,14 @@ export const renderRate = ({
|
|
|
13
15
|
fractionDigits = 2,
|
|
14
16
|
isUnknownRateShown = true,
|
|
15
17
|
color = 'text-secondary-text',
|
|
18
|
+
children,
|
|
16
19
|
...rest
|
|
17
20
|
}: RenderRateProps) =>
|
|
18
21
|
isUnknownRateShown && rate === 0 ? (
|
|
19
22
|
<UnknownRate title={title} {...rest} />
|
|
20
23
|
) : (
|
|
21
24
|
<div>
|
|
22
|
-
<div className="hidden @xl:block">
|
|
25
|
+
<div className="hidden @xl:block min-w-96">
|
|
23
26
|
<Rate
|
|
24
27
|
title={title}
|
|
25
28
|
rate={rate}
|
|
@@ -40,5 +43,6 @@ export const renderRate = ({
|
|
|
40
43
|
{...rest}
|
|
41
44
|
/>
|
|
42
45
|
</div>
|
|
46
|
+
{children}
|
|
43
47
|
</div>
|
|
44
48
|
);
|
package/tailwind.config.cjs
CHANGED
|
@@ -73,7 +73,7 @@ module.exports = {
|
|
|
73
73
|
fontSize: {
|
|
74
74
|
'title-large': ['7.5rem', '10rem'], // 120px 160px
|
|
75
75
|
'title-extra': ['15.625rem', '14.687rem'], // 250px 235px
|
|
76
|
-
'title-huge': ['
|
|
76
|
+
'title-huge': ['11rem', '14rem'], // 176px 224px
|
|
77
77
|
h0: [
|
|
78
78
|
'3.5rem',
|
|
79
79
|
{
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.Breadcrumb = void 0;
|
|
3
|
-
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
-
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
-
const useLink_1 = require("../hooks/useLink");
|
|
6
|
-
exports.Breadcrumb = (0, uni_jsx_1.JSX)(({ className = '', children, ...props }) => {
|
|
7
|
-
const link = (0, useLink_1.useLink)();
|
|
8
|
-
const { text, href, target, onClick } = link(props);
|
|
9
|
-
return href ? ((0, jsx_runtime_1.jsx)("a", { className: `no-underline ${className}`, href: href, target: target, onClick: onClick, children: (0, jsx_runtime_1.jsx)("span", { className: className, children: text || children }) })) : ((0, jsx_runtime_1.jsx)("span", { className: className, children: text || children }));
|
|
10
|
-
});
|
|
11
|
-
//# sourceMappingURL=Breadcrumb.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumb.js","sourceRoot":"","sources":["../../src/ui-kit/Breadcrumb.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,8CAA2C;AAQ9B,QAAA,UAAU,GAAG,IAAA,aAAG,EAAkB,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IACxF,MAAM,IAAI,GAAG,IAAA,iBAAO,GAAE,CAAC;IACvB,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;IAEpD,OAAO,IAAI,CAAC,CAAC,CAAC,CACZ,8BAAG,SAAS,EAAE,gBAAgB,SAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,YACrF,iCAAM,SAAS,EAAE,SAAS,YAAG,IAAI,IAAI,QAAQ,GAAQ,GACnD,CACL,CAAC,CAAC,CAAC,CACF,iCAAM,SAAS,EAAE,SAAS,YAAG,IAAI,IAAI,QAAQ,GAAQ,CACtD,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
package/lib/ui-kit/Breadcrumb.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
-
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
-
import { useLink } from '../hooks/useLink.js';
|
|
4
|
-
export const Breadcrumb = JSX(({ className = '', children, ...props }) => {
|
|
5
|
-
const link = useLink();
|
|
6
|
-
const { text, href, target, onClick } = link(props);
|
|
7
|
-
return href ? (_jsx("a", { className: `no-underline ${className}`, href: href, target: target, onClick: onClick, children: _jsx("span", { className: className, children: text || children }) })) : (_jsx("span", { className: className, children: text || children }));
|
|
8
|
-
});
|
|
9
|
-
//# sourceMappingURL=Breadcrumb.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumb.js","sourceRoot":"","sources":["../../src/ui-kit/Breadcrumb.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAQ3C,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAkB,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IACxF,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IACvB,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;IAEpD,OAAO,IAAI,CAAC,CAAC,CAAC,CACZ,YAAG,SAAS,EAAE,gBAAgB,SAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,YACrF,eAAM,SAAS,EAAE,SAAS,YAAG,IAAI,IAAI,QAAQ,GAAQ,GACnD,CACL,CAAC,CAAC,CAAC,CACF,eAAM,SAAS,EAAE,SAAS,YAAG,IAAI,IAAI,QAAQ,GAAQ,CACtD,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.Breadcrumb = void 0;
|
|
3
|
-
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
-
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
-
const useLink_1 = require("../hooks/useLink");
|
|
6
|
-
exports.Breadcrumb = (0, uni_jsx_1.JSX)(({ className = '', children, ...props }) => {
|
|
7
|
-
const link = (0, useLink_1.useLink)();
|
|
8
|
-
const { text, href, target, onClick } = link(props);
|
|
9
|
-
return href ? ((0, jsx_runtime_1.jsx)("a", { className: `no-underline ${className}`, href: href, target: target, onClick: onClick, children: (0, jsx_runtime_1.jsx)("span", { className: className, children: text || children }) })) : ((0, jsx_runtime_1.jsx)("span", { className: className, children: text || children }));
|
|
10
|
-
});
|
|
11
|
-
//# sourceMappingURL=Breadcrumb.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumb.js","sourceRoot":"","sources":["../../src/ui-kit/Breadcrumb.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,8CAA2C;AAQ9B,QAAA,UAAU,GAAG,IAAA,aAAG,EAAkB,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IACxF,MAAM,IAAI,GAAG,IAAA,iBAAO,GAAE,CAAC;IACvB,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;IAEpD,OAAO,IAAI,CAAC,CAAC,CAAC,CACZ,8BAAG,SAAS,EAAE,gBAAgB,SAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,YACrF,iCAAM,SAAS,EAAE,SAAS,YAAG,IAAI,IAAI,QAAQ,GAAQ,GACnD,CACL,CAAC,CAAC,CAAC,CACF,iCAAM,SAAS,EAAE,SAAS,YAAG,IAAI,IAAI,QAAQ,GAAQ,CACtD,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
-
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
-
import { useLink } from '../hooks/useLink.js';
|
|
4
|
-
export const Breadcrumb = JSX(({ className = '', children, ...props }) => {
|
|
5
|
-
const link = useLink();
|
|
6
|
-
const { text, href, target, onClick } = link(props);
|
|
7
|
-
return href ? (_jsx("a", { className: `no-underline ${className}`, href: href, target: target, onClick: onClick, children: _jsx("span", { className: className, children: text || children }) })) : (_jsx("span", { className: className, children: text || children }));
|
|
8
|
-
});
|
|
9
|
-
//# sourceMappingURL=Breadcrumb.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumb.js","sourceRoot":"","sources":["../../src/ui-kit/Breadcrumb.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAQ3C,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAkB,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IACxF,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IACvB,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;IAEpD,OAAO,IAAI,CAAC,CAAC,CAAC,CACZ,YAAG,SAAS,EAAE,gBAAgB,SAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,YACrF,eAAM,SAAS,EAAE,SAAS,YAAG,IAAI,IAAI,QAAQ,GAAQ,GACnD,CACL,CAAC,CAAC,CAAC,CACF,eAAM,SAAS,EAAE,SAAS,YAAG,IAAI,IAAI,QAAQ,GAAQ,CACtD,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import { useLink } from '../hooks/useLink';
|
|
3
|
-
import { type LinkProps } from '../model/LinkProps';
|
|
4
|
-
|
|
5
|
-
export interface BreadcrumbProps extends LinkProps {
|
|
6
|
-
className?: string;
|
|
7
|
-
onClick?: () => void;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export const Breadcrumb = JSX<BreadcrumbProps>(({ className = '', children, ...props }) => {
|
|
11
|
-
const link = useLink();
|
|
12
|
-
const { text, href, target, onClick } = link(props);
|
|
13
|
-
|
|
14
|
-
return href ? (
|
|
15
|
-
<a className={`no-underline ${className}`} href={href} target={target} onClick={onClick}>
|
|
16
|
-
<span className={className}>{text || children}</span>
|
|
17
|
-
</a>
|
|
18
|
-
) : (
|
|
19
|
-
<span className={className}>{text || children}</span>
|
|
20
|
-
);
|
|
21
|
-
});
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import { useLink } from '../hooks/useLink';
|
|
3
|
-
import { type LinkProps } from '../model/LinkProps';
|
|
4
|
-
|
|
5
|
-
export interface BreadcrumbProps extends LinkProps {
|
|
6
|
-
className?: string;
|
|
7
|
-
onClick?: () => void;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export const Breadcrumb = JSX<BreadcrumbProps>(({ className = '', children, ...props }) => {
|
|
11
|
-
const link = useLink();
|
|
12
|
-
const { text, href, target, onClick } = link(props);
|
|
13
|
-
|
|
14
|
-
return href ? (
|
|
15
|
-
<a className={`no-underline ${className}`} href={href} target={target} onClick={onClick}>
|
|
16
|
-
<span className={className}>{text || children}</span>
|
|
17
|
-
</a>
|
|
18
|
-
) : (
|
|
19
|
-
<span className={className}>{text || children}</span>
|
|
20
|
-
);
|
|
21
|
-
});
|