period-ui 0.4.8 → 0.4.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/atoms/badge/badge-styles.d.ts +7 -0
- package/dist/components/atoms/badge/badge-styles.d.ts.map +1 -1
- package/dist/components/atoms/badge/badge-styles.js +30 -1
- package/dist/components/atoms/badge/badge-styles.js.map +1 -1
- package/dist/components/atoms/badge/badge-types.d.ts +5 -0
- package/dist/components/atoms/badge/badge-types.d.ts.map +1 -1
- package/dist/components/atoms/badge/badge-types.js +7 -1
- package/dist/components/atoms/badge/badge-types.js.map +1 -1
- package/dist/components/atoms/badge/badge.d.ts +3 -1
- package/dist/components/atoms/badge/badge.d.ts.map +1 -1
- package/dist/components/atoms/badge/badge.js +8 -1
- package/dist/components/atoms/badge/badge.js.map +1 -1
- package/dist/components/atoms/segmented-button/components/index.d.ts +2 -0
- package/dist/components/atoms/segmented-button/components/index.d.ts.map +1 -0
- package/dist/components/atoms/segmented-button/components/index.js +18 -0
- package/dist/components/atoms/segmented-button/components/index.js.map +1 -0
- package/dist/components/atoms/segmented-button/components/segment-styles.d.ts +9 -0
- package/dist/components/atoms/segmented-button/components/segment-styles.d.ts.map +1 -0
- package/dist/components/atoms/segmented-button/components/segment-styles.js +43 -0
- package/dist/components/atoms/segmented-button/components/segment-styles.js.map +1 -0
- package/dist/components/atoms/segmented-button/components/segment.d.ts +15 -0
- package/dist/components/atoms/segmented-button/components/segment.d.ts.map +1 -0
- package/dist/components/atoms/segmented-button/components/segment.js +15 -0
- package/dist/components/atoms/segmented-button/components/segment.js.map +1 -0
- package/dist/components/atoms/segmented-button/index.d.ts +4 -0
- package/dist/components/atoms/segmented-button/index.d.ts.map +1 -0
- package/dist/components/atoms/segmented-button/index.js +20 -0
- package/dist/components/atoms/segmented-button/index.js.map +1 -0
- package/dist/components/atoms/segmented-button/segmented-button-styles.d.ts +5 -0
- package/dist/components/atoms/segmented-button/segmented-button-styles.d.ts.map +1 -0
- package/dist/components/atoms/segmented-button/segmented-button-styles.js +20 -0
- package/dist/components/atoms/segmented-button/segmented-button-styles.js.map +1 -0
- package/dist/components/atoms/segmented-button/segmented-button-types.d.ts +8 -0
- package/dist/components/atoms/segmented-button/segmented-button-types.d.ts.map +1 -0
- package/dist/components/atoms/segmented-button/segmented-button-types.js +3 -0
- package/dist/components/atoms/segmented-button/segmented-button-types.js.map +1 -0
- package/dist/components/atoms/segmented-button/segmented-button.d.ts +13 -0
- package/dist/components/atoms/segmented-button/segmented-button.d.ts.map +1 -0
- package/dist/components/atoms/segmented-button/segmented-button.js +51 -0
- package/dist/components/atoms/segmented-button/segmented-button.js.map +1 -0
- package/dist/components/atoms/segmented-button/use-segmented-button.d.ts +21 -0
- package/dist/components/atoms/segmented-button/use-segmented-button.d.ts.map +1 -0
- package/dist/components/atoms/segmented-button/use-segmented-button.js +106 -0
- package/dist/components/atoms/segmented-button/use-segmented-button.js.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4961 -4677
- package/package.json +1 -1
|
@@ -2,4 +2,11 @@ export declare const badgeStyles: (props?: ({
|
|
|
2
2
|
variant?: "alert" | "error" | "info" | "success" | "neutral" | "advertisement" | null | undefined;
|
|
3
3
|
hasShadow?: boolean | null | undefined;
|
|
4
4
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
5
|
+
export declare const badgeDotStyles: (props?: ({
|
|
6
|
+
variant?: "alert" | "error" | "info" | "success" | "neutral" | "advertisement" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
8
|
+
export declare const badgeMediumStyles: (props?: ({
|
|
9
|
+
variant?: "alert" | "error" | "info" | "success" | "neutral" | "advertisement" | null | undefined;
|
|
10
|
+
isSingleCharacter?: boolean | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
5
12
|
//# sourceMappingURL=badge-styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge-styles.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/badge/badge-styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW;;;mFAsBvB,CAAC"}
|
|
1
|
+
{"version":3,"file":"badge-styles.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/badge/badge-styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW;;;mFAsBvB,CAAC;AAWF,eAAO,MAAM,cAAc;;mFAOzB,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;mFAe7B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.badgeStyles = void 0;
|
|
3
|
+
exports.badgeMediumStyles = exports.badgeDotStyles = exports.badgeStyles = void 0;
|
|
4
4
|
const class_variance_authority_1 = require("class-variance-authority");
|
|
5
5
|
exports.badgeStyles = (0, class_variance_authority_1.cva)(['inline-flex flex-row items-center justify-center gap-2', 'w-fit rounded-full', 'py-2 px-4'], {
|
|
6
6
|
variants: {
|
|
@@ -22,4 +22,33 @@ exports.badgeStyles = (0, class_variance_authority_1.cva)(['inline-flex flex-row
|
|
|
22
22
|
hasShadow: false,
|
|
23
23
|
},
|
|
24
24
|
});
|
|
25
|
+
const solidVariantColors = {
|
|
26
|
+
info: 'bg-blue-01',
|
|
27
|
+
success: 'bg-green-01',
|
|
28
|
+
error: 'bg-red-01',
|
|
29
|
+
alert: 'bg-yellow-01',
|
|
30
|
+
neutral: 'bg-gray-02',
|
|
31
|
+
advertisement: 'bg-purple-01',
|
|
32
|
+
};
|
|
33
|
+
exports.badgeDotStyles = (0, class_variance_authority_1.cva)(['inline-block w-2 h-2 rounded-full'], {
|
|
34
|
+
variants: {
|
|
35
|
+
variant: solidVariantColors,
|
|
36
|
+
},
|
|
37
|
+
defaultVariants: {
|
|
38
|
+
variant: 'neutral',
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
exports.badgeMediumStyles = (0, class_variance_authority_1.cva)(['inline-flex items-center justify-center', 'h-4 md:h-5 rounded-full py-[1px]'], {
|
|
42
|
+
variants: {
|
|
43
|
+
variant: solidVariantColors,
|
|
44
|
+
isSingleCharacter: {
|
|
45
|
+
true: 'md:w-5 w-4 px-0',
|
|
46
|
+
false: 'w-fit px-1',
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
defaultVariants: {
|
|
50
|
+
variant: 'neutral',
|
|
51
|
+
isSingleCharacter: false,
|
|
52
|
+
},
|
|
53
|
+
});
|
|
25
54
|
//# sourceMappingURL=badge-styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge-styles.js","sourceRoot":"","sources":["../../../../src/components/atoms/badge/badge-styles.ts"],"names":[],"mappings":";;;AAAA,uEAA+C;AAElC,QAAA,WAAW,GAAG,IAAA,8BAAG,EAC5B,CAAC,wDAAwD,EAAE,oBAAoB,EAAE,WAAW,CAAC,EAC7F;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,IAAI,EAAE,yBAAyB;YAC/B,OAAO,EAAE,2BAA2B;YACpC,KAAK,EAAE,uBAAuB;YAC9B,KAAK,EAAE,6BAA6B;YACpC,OAAO,EAAE,yBAAyB;YAClC,aAAa,EAAE,6BAA6B;SAC7C;QACD,SAAS,EAAE;YACT,IAAI,EAAE,kBAAkB;YACxB,KAAK,EAAE,EAAE;SACV;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;QAClB,SAAS,EAAE,KAAK;KACjB;CACF,CACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"badge-styles.js","sourceRoot":"","sources":["../../../../src/components/at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-types.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/badge/badge-types.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY;IACtB,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,aAAa,kBAAkB;CAChC"}
|
|
1
|
+
{"version":3,"file":"badge-types.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/badge/badge-types.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY;IACtB,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,aAAa,kBAAkB;CAChC;AAED,oBAAY,SAAS;IACnB,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,KAAK,UAAU;CAChB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BadgeVariant = void 0;
|
|
3
|
+
exports.BadgeSize = exports.BadgeVariant = void 0;
|
|
4
4
|
var BadgeVariant;
|
|
5
5
|
(function (BadgeVariant) {
|
|
6
6
|
BadgeVariant["INFO"] = "info";
|
|
@@ -10,4 +10,10 @@ var BadgeVariant;
|
|
|
10
10
|
BadgeVariant["NEUTRAL"] = "neutral";
|
|
11
11
|
BadgeVariant["ADVERTISEMENT"] = "advertisement";
|
|
12
12
|
})(BadgeVariant || (exports.BadgeVariant = BadgeVariant = {}));
|
|
13
|
+
var BadgeSize;
|
|
14
|
+
(function (BadgeSize) {
|
|
15
|
+
BadgeSize["SMALL"] = "SMALL";
|
|
16
|
+
BadgeSize["MEDIUM"] = "MEDIUM";
|
|
17
|
+
BadgeSize["LARGE"] = "LARGE";
|
|
18
|
+
})(BadgeSize || (exports.BadgeSize = BadgeSize = {}));
|
|
13
19
|
//# sourceMappingURL=badge-types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge-types.js","sourceRoot":"","sources":["../../../../src/components/atoms/badge/badge-types.ts"],"names":[],"mappings":";;;AAAA,IAAY,YAOX;AAPD,WAAY,YAAY;IACtB,6BAAa,CAAA;IACb,mCAAmB,CAAA;IACnB,+BAAe,CAAA;IACf,+BAAe,CAAA;IACf,mCAAmB,CAAA;IACnB,+CAA+B,CAAA;AACjC,CAAC,EAPW,YAAY,4BAAZ,YAAY,QAOvB"}
|
|
1
|
+
{"version":3,"file":"badge-types.js","sourceRoot":"","sources":["../../../../src/components/atoms/badge/badge-types.ts"],"names":[],"mappings":";;;AAAA,IAAY,YAOX;AAPD,WAAY,YAAY;IACtB,6BAAa,CAAA;IACb,mCAAmB,CAAA;IACnB,+BAAe,CAAA;IACf,+BAAe,CAAA;IACf,mCAAmB,CAAA;IACnB,+CAA+B,CAAA;AACjC,CAAC,EAPW,YAAY,4BAAZ,YAAY,QAOvB;AAED,IAAY,SAIX;AAJD,WAAY,SAAS;IACnB,4BAAe,CAAA;IACf,8BAAiB,CAAA;IACjB,4BAAe,CAAA;AACjB,CAAC,EAJW,SAAS,yBAAT,SAAS,QAIpB"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { ComponentProps } from 'react';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
import { IconSymbol } from '../billo-icon';
|
|
4
|
+
import { BadgeSize } from './badge-types';
|
|
4
5
|
import { badgeStyles } from './badge-styles';
|
|
5
6
|
type Props = ComponentProps<'span'> & VariantProps<typeof badgeStyles> & {
|
|
6
|
-
label
|
|
7
|
+
label?: string;
|
|
7
8
|
icon?: IconSymbol;
|
|
9
|
+
size?: BadgeSize;
|
|
8
10
|
};
|
|
9
11
|
export declare const Badge: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
10
12
|
export type { Props as BadgeProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/badge/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAc,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,OAAO,EAAkC,UAAU,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/badge/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAc,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,OAAO,EAAkC,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3E,OAAO,EAAE,SAAS,EAAgB,MAAM,eAAe,CAAC;AACxD,OAAO,EAAqC,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAEhF,KAAK,KAAK,GAAG,cAAc,CAAC,MAAM,CAAC,GACjC,YAAY,CAAC,OAAO,WAAW,CAAC,GAAG;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB,CAAC;AAEJ,eAAO,MAAM,KAAK,gHAoDhB,CAAC;AAEH,YAAY,EAAE,KAAK,IAAI,UAAU,EAAE,CAAC"}
|
|
@@ -8,7 +8,14 @@ const billo_icon_1 = require("../billo-icon");
|
|
|
8
8
|
const text_1 = require("../text");
|
|
9
9
|
const badge_types_1 = require("./badge-types");
|
|
10
10
|
const badge_styles_1 = require("./badge-styles");
|
|
11
|
-
exports.Badge = (0, react_1.forwardRef)(function Badge({ label, icon, variant = badge_types_1.BadgeVariant.NEUTRAL,
|
|
11
|
+
exports.Badge = (0, react_1.forwardRef)(function Badge({ label, icon, hasShadow, className, size = badge_types_1.BadgeSize.LARGE, variant = badge_types_1.BadgeVariant.NEUTRAL, ...props }, forwardedRef) {
|
|
12
|
+
if (size === badge_types_1.BadgeSize.SMALL) {
|
|
13
|
+
return ((0, jsx_runtime_1.jsx)("span", { ref: forwardedRef, "aria-hidden": "true", className: (0, tailwind_utils_1.tailwind)((0, badge_styles_1.badgeDotStyles)({ variant }), className), ...props }));
|
|
14
|
+
}
|
|
15
|
+
if (size === badge_types_1.BadgeSize.MEDIUM) {
|
|
16
|
+
const isSingleCharacter = label?.length === 1;
|
|
17
|
+
return ((0, jsx_runtime_1.jsx)("span", { ref: forwardedRef, className: (0, tailwind_utils_1.tailwind)((0, badge_styles_1.badgeMediumStyles)({ variant, isSingleCharacter }), className), ...props, children: (0, jsx_runtime_1.jsx)(text_1.Text, { as: "span", variant: text_1.TextVariant.BODY_SEMIBOLD, color: text_1.TextColors.WHITE, children: label }) }));
|
|
18
|
+
}
|
|
12
19
|
return ((0, jsx_runtime_1.jsxs)("span", { ref: forwardedRef, className: (0, tailwind_utils_1.tailwind)((0, badge_styles_1.badgeStyles)({ variant, hasShadow }), className), ...props, children: [icon && (0, jsx_runtime_1.jsx)(billo_icon_1.BilloIcon, { icon: icon, size: billo_icon_1.IconSize.SM, color: billo_icon_1.IconColor.NONE }), (0, jsx_runtime_1.jsx)(text_1.Text, { as: "span", variant: text_1.TextVariant.BODY, color: text_1.TextColors.NONE, children: label })] }));
|
|
13
20
|
});
|
|
14
21
|
//# sourceMappingURL=badge.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.js","sourceRoot":"","sources":["../../../../src/components/atoms/badge/badge.tsx"],"names":[],"mappings":";;;;AAAA,iCAAmD;AAEnD,kEAAyD;AACzD,8CAA2E;AAC3E,kCAAwD;AACxD,+
|
|
1
|
+
{"version":3,"file":"badge.js","sourceRoot":"","sources":["../../../../src/components/atoms/badge/badge.tsx"],"names":[],"mappings":";;;;AAAA,iCAAmD;AAEnD,kEAAyD;AACzD,8CAA2E;AAC3E,kCAAwD;AACxD,+CAAwD;AACxD,iDAAgF;AASnE,QAAA,KAAK,GAAG,IAAA,kBAAU,EAAyB,SAAS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BAAW,CAAC,IAAI,EAAE,KAAK,EAAE,iBAAU,CAAC,IAAI,YAC9D,KAAK,GACD,IACF,CACR,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/segmented-button/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./segment"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/atoms/segmented-button/components/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IconColor } from '../../billo-icon';
|
|
2
|
+
import { TextColors } from '../../text';
|
|
3
|
+
export declare const segmentStyles: (props?: ({
|
|
4
|
+
isSelected?: boolean | null | undefined;
|
|
5
|
+
fullWidth?: boolean | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
7
|
+
export declare function getSegmentTextColor(isSelected: boolean, isDisabled: boolean): TextColors;
|
|
8
|
+
export declare function getSegmentIconColor(isSelected: boolean, isDisabled: boolean): IconColor;
|
|
9
|
+
//# sourceMappingURL=segment-styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segment-styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/segmented-button/components/segment-styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,eAAO,MAAM,aAAa;;;mFAyBzB,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,GAAG,UAAU,CAMxF;AAED,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,GAAG,SAAS,CAMvF"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.segmentStyles = void 0;
|
|
4
|
+
exports.getSegmentTextColor = getSegmentTextColor;
|
|
5
|
+
exports.getSegmentIconColor = getSegmentIconColor;
|
|
6
|
+
const class_variance_authority_1 = require("class-variance-authority");
|
|
7
|
+
const billo_icon_1 = require("../../billo-icon");
|
|
8
|
+
const text_1 = require("../../text");
|
|
9
|
+
exports.segmentStyles = (0, class_variance_authority_1.cva)([
|
|
10
|
+
'relative z-10 flex items-center justify-center gap-2',
|
|
11
|
+
'py-[10px] px-4 rounded-full',
|
|
12
|
+
'transition-colors duration-300 ease-in-out',
|
|
13
|
+
'cursor-pointer disabled:cursor-not-allowed',
|
|
14
|
+
'focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-01',
|
|
15
|
+
], {
|
|
16
|
+
variants: {
|
|
17
|
+
isSelected: {
|
|
18
|
+
true: 'hover:bg-gray-05 focus-visible:bg-gray-05 disabled:hover:bg-transparent disabled:focus-visible:bg-transparent',
|
|
19
|
+
false: 'hover:bg-gray-04 focus-visible:bg-gray-04 disabled:hover:bg-transparent disabled:focus-visible:bg-transparent',
|
|
20
|
+
},
|
|
21
|
+
fullWidth: {
|
|
22
|
+
true: 'flex-1',
|
|
23
|
+
false: '',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
defaultVariants: {
|
|
27
|
+
isSelected: false,
|
|
28
|
+
fullWidth: false,
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
function getSegmentTextColor(isSelected, isDisabled) {
|
|
32
|
+
if (isSelected) {
|
|
33
|
+
return isDisabled ? text_1.TextColors.BLUE_03 : text_1.TextColors.BLUE;
|
|
34
|
+
}
|
|
35
|
+
return isDisabled ? text_1.TextColors.BLACK_03 : text_1.TextColors.BLACK;
|
|
36
|
+
}
|
|
37
|
+
function getSegmentIconColor(isSelected, isDisabled) {
|
|
38
|
+
if (isSelected) {
|
|
39
|
+
return isDisabled ? billo_icon_1.IconColor.BLUE_03 : billo_icon_1.IconColor.BLUE_01;
|
|
40
|
+
}
|
|
41
|
+
return isDisabled ? billo_icon_1.IconColor.GRAY_03 : billo_icon_1.IconColor.GRAY_01;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=segment-styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segment-styles.js","sourceRoot":"","sources":["../../../../../src/components/atoms/segmented-button/components/segment-styles.ts"],"names":[],"mappings":";;;AA+BA,kDAMC;AAED,kDAMC;AA7CD,uEAA+C;AAC/C,iDAA6C;AAC7C,qCAAwC;AAE3B,QAAA,aAAa,GAAG,IAAA,8BAAG,EAC9B;IACE,sDAAsD;IACtD,6BAA6B;IAC7B,4CAA4C;IAC5C,4CAA4C;IAC5C,sFAAsF;CACvF,EACD;IACE,QAAQ,EAAE;QACR,UAAU,EAAE;YACV,IAAI,EAAE,+GAA+G;YACrH,KAAK,EACH,+GAA+G;SAClH;QACD,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,EAAE;SACV;KACF;IACD,eAAe,EAAE;QACf,UAAU,EAAE,KAAK;QACjB,SAAS,EAAE,KAAK;KACjB;CACF,CACF,CAAC;AAEF,SAAgB,mBAAmB,CAAC,UAAmB,EAAE,UAAmB;IAC1E,IAAI,UAAU,EAAE,CAAC;QACf,OAAO,UAAU,CAAC,CAAC,CAAC,iBAAU,CAAC,OAAO,CAAC,CAAC,CAAC,iBAAU,CAAC,IAAI,CAAC;IAC3D,CAAC;IAED,OAAO,UAAU,CAAC,CAAC,CAAC,iBAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,iBAAU,CAAC,KAAK,CAAC;AAC7D,CAAC;AAED,SAAgB,mBAAmB,CAAC,UAAmB,EAAE,UAAmB;IAC1E,IAAI,UAAU,EAAE,CAAC;QACf,OAAO,UAAU,CAAC,CAAC,CAAC,sBAAS,CAAC,OAAO,CAAC,CAAC,CAAC,sBAAS,CAAC,OAAO,CAAC;IAC5D,CAAC;IAED,OAAO,UAAU,CAAC,CAAC,CAAC,sBAAS,CAAC,OAAO,CAAC,CAAC,CAAC,sBAAS,CAAC,OAAO,CAAC;AAC5D,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IconSize, IconSymbol } from '../../../../components';
|
|
2
|
+
type Props = {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
icon?: IconSymbol;
|
|
6
|
+
iconSize: IconSize;
|
|
7
|
+
width?: number;
|
|
8
|
+
fullWidth?: boolean;
|
|
9
|
+
isSelected: boolean;
|
|
10
|
+
isDisabled: boolean;
|
|
11
|
+
onSelect: (value: string) => void;
|
|
12
|
+
};
|
|
13
|
+
export declare const Segment: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<HTMLButtonElement>>;
|
|
14
|
+
export type { Props as SegmentProps };
|
|
15
|
+
//# sourceMappingURL=segment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segment.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/segmented-button/components/segment.tsx"],"names":[],"mappings":"AACA,OAAO,EAAa,QAAQ,EAAE,UAAU,EAAqB,MAAM,wBAAwB,CAAC;AAI5F,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,QAAQ,EAAE,QAAQ,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC,CAAC;AAEF,eAAO,MAAM,OAAO,qGA6BlB,CAAC;AAEH,YAAY,EAAE,KAAK,IAAI,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Segment = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const components_1 = require("../../../../components");
|
|
7
|
+
const tailwind_utils_1 = require("../../../../utils/tailwind-utils");
|
|
8
|
+
const segment_styles_1 = require("./segment-styles");
|
|
9
|
+
exports.Segment = (0, react_1.forwardRef)(function Segment({ value, label, icon, iconSize, width, fullWidth = false, isSelected, isDisabled, onSelect }, forwardedRef) {
|
|
10
|
+
const textColor = (0, segment_styles_1.getSegmentTextColor)(isSelected, isDisabled);
|
|
11
|
+
const iconColor = (0, segment_styles_1.getSegmentIconColor)(isSelected, isDisabled);
|
|
12
|
+
const style = fullWidth ? { minWidth: width } : { width };
|
|
13
|
+
return ((0, jsx_runtime_1.jsxs)("button", { ref: forwardedRef, type: "button", role: "radio", "aria-checked": isSelected, disabled: isDisabled, onClick: () => onSelect(value), style: style, className: (0, tailwind_utils_1.tailwind)((0, segment_styles_1.segmentStyles)({ isSelected, fullWidth })), children: [icon && (0, jsx_runtime_1.jsx)(components_1.BilloIcon, { icon: icon, size: iconSize, color: iconColor }), (0, jsx_runtime_1.jsx)(components_1.Text, { as: "span", variant: components_1.TextVariant.BODY_SEMIBOLD, color: textColor, children: label })] }));
|
|
14
|
+
});
|
|
15
|
+
//# sourceMappingURL=segment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segment.js","sourceRoot":"","sources":["../../../../../src/components/atoms/segmented-button/components/segment.tsx"],"names":[],"mappings":";;;;AAAA,iCAAmC;AACnC,uDAA4F;AAC5F,qEAA4D;AAC5D,qDAA2F;AAc9E,QAAA,OAAO,GAAG,IAAA,kBAAU,EAA2B,SAAS,OAAO,CAC1E,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,GAAG,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,EAC5F,YAAY;IAEZ,MAAM,SAAS,GAAG,IAAA,oCAAmB,EAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IAC9D,MAAM,SAAS,GAAG,IAAA,oCAAmB,EAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IAI9D,MAAM,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC;IAE1D,OAAO,CACL,oCACE,GAAG,EAAE,YAAY,EACjB,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,OAAO,kBACE,UAAU,EACxB,QAAQ,EAAE,UAAU,EACpB,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,EAC9B,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,IAAA,yBAAQ,EAAC,IAAA,8BAAa,EAAC,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC,CAAC,aAE5D,IAAI,IAAI,uBAAC,sBAAS,IAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,GAAI,EAEpE,uBAAC,iBAAI,IAAC,EAAE,EAAC,MAAM,EAAC,OAAO,EAAE,wBAAW,CAAC,aAAa,EAAE,KAAK,EAAE,SAAS,YACjE,KAAK,GACD,IACA,CACV,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/segmented-button/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./components"), exports);
|
|
18
|
+
__exportStar(require("./segmented-button"), exports);
|
|
19
|
+
__exportStar(require("./segmented-button-types"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/atoms/segmented-button/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,qDAAmC;AACnC,2DAAyC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const segmentedButtonStyles: (props?: ({
|
|
2
|
+
fullWidth?: boolean | null | undefined;
|
|
3
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
4
|
+
export declare const segmentedButtonHighlightStyles: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
5
|
+
//# sourceMappingURL=segmented-button-styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segmented-button-styles.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/segmented-button/segmented-button-styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,qBAAqB;;mFAajC,CAAC;AAEF,eAAO,MAAM,8BAA8B,yFAGzC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.segmentedButtonHighlightStyles = exports.segmentedButtonStyles = void 0;
|
|
4
|
+
const class_variance_authority_1 = require("class-variance-authority");
|
|
5
|
+
exports.segmentedButtonStyles = (0, class_variance_authority_1.cva)(['relative inline-flex items-center rounded-full bg-gray-05 p-1'], {
|
|
6
|
+
variants: {
|
|
7
|
+
fullWidth: {
|
|
8
|
+
true: 'w-full',
|
|
9
|
+
false: 'w-fit',
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
defaultVariants: {
|
|
13
|
+
fullWidth: false,
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
exports.segmentedButtonHighlightStyles = (0, class_variance_authority_1.cva)([
|
|
17
|
+
'absolute rounded-full bg-white shadow-white-two pointer-events-none',
|
|
18
|
+
'transition-all duration-300 ease-in-out',
|
|
19
|
+
]);
|
|
20
|
+
//# sourceMappingURL=segmented-button-styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segmented-button-styles.js","sourceRoot":"","sources":["../../../../src/components/atoms/segmented-button/segmented-button-styles.ts"],"names":[],"mappings":";;;AAAA,uEAA+C;AAElC,QAAA,qBAAqB,GAAG,IAAA,8BAAG,EACtC,CAAC,+DAA+D,CAAC,EACjE;IACE,QAAQ,EAAE;QACR,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,OAAO;SACf;KACF;IACD,eAAe,EAAE;QACf,SAAS,EAAE,KAAK;KACjB;CACF,CACF,CAAC;AAEW,QAAA,8BAA8B,GAAG,IAAA,8BAAG,EAAC;IAChD,qEAAqE;IACrE,yCAAyC;CAC1C,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segmented-button-types.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/segmented-button/segmented-button-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segmented-button-types.js","sourceRoot":"","sources":["../../../../src/components/atoms/segmented-button/segmented-button-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SegmentedButtonOption } from './segmented-button-types';
|
|
2
|
+
type Props = {
|
|
3
|
+
segments: SegmentedButtonOption[];
|
|
4
|
+
selected: string;
|
|
5
|
+
onSelected: (value: string) => void;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
fullWidth?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
ariaLabel?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const SegmentedButton: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
|
+
export type { Props as SegmentedButtonProps };
|
|
13
|
+
//# sourceMappingURL=segmented-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segmented-button.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/segmented-button/segmented-button.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAGjE,KAAK,KAAK,GAAG;IACX,QAAQ,EAAE,qBAAqB,EAAE,CAAC;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,eAAe,kGAiG1B,CAAC;AAEH,YAAY,EAAE,KAAK,IAAI,oBAAoB,EAAE,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SegmentedButton = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const components_1 = require("../../../components");
|
|
7
|
+
const tailwind_utils_1 = require("../../../utils/tailwind-utils");
|
|
8
|
+
const window_dimensions_utils_1 = require("../../../utils/window-dimensions-utils");
|
|
9
|
+
const components_2 = require("./components");
|
|
10
|
+
const segmented_button_styles_1 = require("./segmented-button-styles");
|
|
11
|
+
const use_segmented_button_1 = require("./use-segmented-button");
|
|
12
|
+
exports.SegmentedButton = (0, react_1.forwardRef)(function SegmentedButton({ segments, selected, onSelected, disabled = false, fullWidth = false, className, ariaLabel }, forwardedRef) {
|
|
13
|
+
const { isMobile } = (0, window_dimensions_utils_1.useWindowDimensions)();
|
|
14
|
+
const iconSize = isMobile ? components_1.IconSize.LG : components_1.IconSize.XL;
|
|
15
|
+
const { segmentWidth, highlightRect, isHighlightTransitionEnabled, registerSegmentRef, focusSegment, } = (0, use_segmented_button_1.useSegmentedButton)({ segments, selected });
|
|
16
|
+
const areSegmentsGrowable = fullWidth && segmentWidth !== undefined;
|
|
17
|
+
function getEnabledSegments() {
|
|
18
|
+
return segments.filter((segment) => !disabled && !segment.disabled);
|
|
19
|
+
}
|
|
20
|
+
function handleSelect(value) {
|
|
21
|
+
onSelected(value);
|
|
22
|
+
}
|
|
23
|
+
function handleKeyDown(event) {
|
|
24
|
+
const isNext = event.key === 'ArrowRight' || event.key === 'ArrowDown';
|
|
25
|
+
const isPrevious = event.key === 'ArrowLeft' || event.key === 'ArrowUp';
|
|
26
|
+
if (!isNext && !isPrevious) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
const enabledSegments = getEnabledSegments();
|
|
30
|
+
if (enabledSegments.length === 0) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
event.preventDefault();
|
|
34
|
+
const currentIndex = enabledSegments.findIndex((segment) => segment.value === selected);
|
|
35
|
+
const step = isNext ? 1 : -1;
|
|
36
|
+
const nextIndex = (currentIndex + step + enabledSegments.length) % enabledSegments.length;
|
|
37
|
+
const nextSegment = enabledSegments[nextIndex];
|
|
38
|
+
handleSelect(nextSegment.value);
|
|
39
|
+
focusSegment(nextSegment.value);
|
|
40
|
+
}
|
|
41
|
+
return ((0, jsx_runtime_1.jsxs)("div", { ref: forwardedRef, role: "radiogroup", "aria-label": ariaLabel, "aria-disabled": disabled || undefined, onKeyDown: handleKeyDown, className: (0, tailwind_utils_1.tailwind)((0, segmented_button_styles_1.segmentedButtonStyles)({ fullWidth }), className), children: [(0, jsx_runtime_1.jsx)("div", { "aria-hidden": "true", className: (0, tailwind_utils_1.tailwind)((0, segmented_button_styles_1.segmentedButtonHighlightStyles)(), !isHighlightTransitionEnabled && 'transition-none'), style: {
|
|
42
|
+
top: highlightRect.top,
|
|
43
|
+
left: highlightRect.left,
|
|
44
|
+
width: highlightRect.width,
|
|
45
|
+
height: highlightRect.height,
|
|
46
|
+
} }), segments.map((segment) => {
|
|
47
|
+
const isSegmentDisabled = disabled || Boolean(segment.disabled);
|
|
48
|
+
return ((0, jsx_runtime_1.jsx)(components_2.Segment, { ref: registerSegmentRef(segment.value), value: segment.value, label: segment.label, icon: segment.icon, iconSize: iconSize, width: segmentWidth, fullWidth: areSegmentsGrowable, isSelected: segment.value === selected, isDisabled: isSegmentDisabled, onSelect: handleSelect }, segment.value));
|
|
49
|
+
})] }));
|
|
50
|
+
});
|
|
51
|
+
//# sourceMappingURL=segmented-button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segmented-button.js","sourceRoot":"","sources":["../../../../src/components/atoms/segmented-button/segmented-button.tsx"],"names":[],"mappings":";;;;AAAA,iCAAkD;AAClD,oDAA+C;AAC/C,kEAAyD;AACzD,oFAA6E;AAC7E,6CAAuC;AACvC,uEAAkG;AAElG,iEAA4D;AAY/C,QAAA,eAAe,GAAG,IAAA,kBAAU,EAAwB,SAAS,eAAe,CACvF,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,GAAG,KAAK,EAAE,SAAS,GAAG,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,EAC7F,YAAY;IAEZ,MAA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AK,EAAE,YAAY,EACnB,SAAS,EAAE,mBAAmB,EAC9B,UAAU,EAAE,OAAO,CAAC,KAAK,KAAK,QAAQ,EACtC,UAAU,EAAE,iBAAiB,EAC7B,QAAQ,EAAE,YAAY,IAVjB,OAAO,CAAC,KAAK,CAWlB,CACH,CAAC;YACJ,CAAC,CAAC,IACE,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SegmentedButtonOption } from './segmented-button-types';
|
|
2
|
+
type HighlightRect = {
|
|
3
|
+
top: number;
|
|
4
|
+
left: number;
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
};
|
|
8
|
+
type UseSegmentedButtonProps = {
|
|
9
|
+
segments: SegmentedButtonOption[];
|
|
10
|
+
selected: string;
|
|
11
|
+
};
|
|
12
|
+
type UseSegmentedButtonHook = {
|
|
13
|
+
segmentWidth: number | undefined;
|
|
14
|
+
highlightRect: HighlightRect;
|
|
15
|
+
isHighlightTransitionEnabled: boolean;
|
|
16
|
+
registerSegmentRef: (value: string) => (element: HTMLButtonElement | null) => void;
|
|
17
|
+
focusSegment: (value: string) => void;
|
|
18
|
+
};
|
|
19
|
+
export declare function useSegmentedButton({ segments, selected, }: UseSegmentedButtonProps): UseSegmentedButtonHook;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=use-segmented-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-segmented-button.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/segmented-button/use-segmented-button.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,KAAK,aAAa,GAAG;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,KAAK,uBAAuB,GAAG;IAC7B,QAAQ,EAAE,qBAAqB,EAAE,CAAC;IAClC,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,KAAK,sBAAsB,GAAG;IAC5B,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,aAAa,EAAE,aAAa,CAAC;IAC7B,4BAA4B,EAAE,OAAO,CAAC;IACtC,kBAAkB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,CAAC,OAAO,EAAE,iBAAiB,GAAG,IAAI,KAAK,IAAI,CAAC;IACnF,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC,CAAC;AAkCF,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,QAAQ,GACT,EAAE,uBAAuB,GAAG,sBAAsB,CAsIlD"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useSegmentedButton = useSegmentedButton;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const window_dimensions_utils_1 = require("../../../utils/window-dimensions-utils");
|
|
6
|
+
const INITIAL_HIGHLIGHT_RECT = { top: 0, left: 0, width: 0, height: 0 };
|
|
7
|
+
function getSegmentsContentKey(segments) {
|
|
8
|
+
return segments
|
|
9
|
+
.map((segment) => `${segment.value}:${segment.label}:${segment.icon ?? ''}`)
|
|
10
|
+
.join('|');
|
|
11
|
+
}
|
|
12
|
+
function areRectsEqual(a, b) {
|
|
13
|
+
return a.top === b.top && a.left === b.left && a.width === b.width && a.height === b.height;
|
|
14
|
+
}
|
|
15
|
+
function useSegmentedButton({ segments, selected, }) {
|
|
16
|
+
const { isMobile } = (0, window_dimensions_utils_1.useWindowDimensions)();
|
|
17
|
+
const segmentElementsRef = (0, react_1.useRef)({});
|
|
18
|
+
const segmentWidthRef = (0, react_1.useRef)(undefined);
|
|
19
|
+
const [segmentWidth, setSegmentWidthState] = (0, react_1.useState)(undefined);
|
|
20
|
+
const [highlightRect, setHighlightRect] = (0, react_1.useState)(INITIAL_HIGHLIGHT_RECT);
|
|
21
|
+
const [isHighlightTransitionEnabled, setIsHighlightTransitionEnabled] = (0, react_1.useState)(false);
|
|
22
|
+
const segmentsContentKey = getSegmentsContentKey(segments);
|
|
23
|
+
function setSegmentWidth(width) {
|
|
24
|
+
segmentWidthRef.current = width;
|
|
25
|
+
setSegmentWidthState(width);
|
|
26
|
+
}
|
|
27
|
+
const measureMaxSegmentWidth = (0, react_1.useCallback)(() => {
|
|
28
|
+
const widths = segments.map((segment) => segmentElementsRef.current[segment.value]?.offsetWidth ?? 0);
|
|
29
|
+
return Math.max(0, ...widths);
|
|
30
|
+
}, [segments]);
|
|
31
|
+
const revalidateHighlightRect = (0, react_1.useCallback)(() => {
|
|
32
|
+
const selectedElement = segmentElementsRef.current[selected];
|
|
33
|
+
if (!selectedElement) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const nextRect = {
|
|
37
|
+
top: selectedElement.offsetTop,
|
|
38
|
+
left: selectedElement.offsetLeft,
|
|
39
|
+
width: selectedElement.offsetWidth,
|
|
40
|
+
height: selectedElement.offsetHeight,
|
|
41
|
+
};
|
|
42
|
+
setHighlightRect((previousRect) => areRectsEqual(previousRect, nextRect) ? previousRect : nextRect);
|
|
43
|
+
}, [selected]);
|
|
44
|
+
(0, react_1.useLayoutEffect)(() => {
|
|
45
|
+
setSegmentWidth(undefined);
|
|
46
|
+
}, [segmentsContentKey, isMobile]);
|
|
47
|
+
(0, react_1.useLayoutEffect)(() => {
|
|
48
|
+
if (segmentWidth !== undefined) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
const maxWidth = measureMaxSegmentWidth();
|
|
52
|
+
if (maxWidth > 0) {
|
|
53
|
+
setSegmentWidth(maxWidth);
|
|
54
|
+
}
|
|
55
|
+
}, [segmentWidth, measureMaxSegmentWidth]);
|
|
56
|
+
(0, react_1.useLayoutEffect)(() => {
|
|
57
|
+
revalidateHighlightRect();
|
|
58
|
+
}, [selected, segmentWidth, revalidateHighlightRect]);
|
|
59
|
+
const revalidateRef = (0, react_1.useRef)(() => { });
|
|
60
|
+
revalidateRef.current = function revalidate() {
|
|
61
|
+
if (segmentWidthRef.current === undefined) {
|
|
62
|
+
const maxWidth = measureMaxSegmentWidth();
|
|
63
|
+
if (maxWidth > 0) {
|
|
64
|
+
setSegmentWidth(maxWidth);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
revalidateHighlightRect();
|
|
68
|
+
};
|
|
69
|
+
const resizeObserverRef = (0, react_1.useRef)(null);
|
|
70
|
+
if (!resizeObserverRef.current && typeof ResizeObserver !== 'undefined') {
|
|
71
|
+
resizeObserverRef.current = new ResizeObserver(() => revalidateRef.current());
|
|
72
|
+
}
|
|
73
|
+
(0, react_1.useEffect)(() => {
|
|
74
|
+
return () => {
|
|
75
|
+
resizeObserverRef.current?.disconnect();
|
|
76
|
+
resizeObserverRef.current = null;
|
|
77
|
+
};
|
|
78
|
+
}, []);
|
|
79
|
+
(0, react_1.useEffect)(() => {
|
|
80
|
+
const frameId = requestAnimationFrame(() => setIsHighlightTransitionEnabled(true));
|
|
81
|
+
return () => cancelAnimationFrame(frameId);
|
|
82
|
+
}, []);
|
|
83
|
+
function registerSegmentRef(value) {
|
|
84
|
+
return (element) => {
|
|
85
|
+
const previousElement = segmentElementsRef.current[value];
|
|
86
|
+
if (previousElement) {
|
|
87
|
+
resizeObserverRef.current?.unobserve(previousElement);
|
|
88
|
+
}
|
|
89
|
+
segmentElementsRef.current[value] = element;
|
|
90
|
+
if (element) {
|
|
91
|
+
resizeObserverRef.current?.observe(element);
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
function focusSegment(value) {
|
|
96
|
+
segmentElementsRef.current[value]?.focus();
|
|
97
|
+
}
|
|
98
|
+
return {
|
|
99
|
+
segmentWidth,
|
|
100
|
+
highlightRect,
|
|
101
|
+
isHighlightTransitionEnabled,
|
|
102
|
+
registerSegmentRef,
|
|
103
|
+
focusSegment,
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=use-segmented-button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-segmented-button.js","sourceRoot":"","sources":["../../../../src/components/atoms/segmented-button/use-segmented-button.ts"],"names":[],"mappings":";;AAwDA,gDAyIC;AAjMD,iCAAkF;AAClF,oFAA6E;AAuB7E,MAAM,sBAAsB,GAAkB,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;AAEvF,SAAS,qBAAqB,CAAC,QAAiC;IAC9D,OAAO,QAAQ;SACZ,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,GAAG,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC;SAC3E,IAAI,CAAC,GAAG,CAAC,CAAC;AACf,CAAC;AAED,SAAS,aAAa,CAAC,CAAgB,EAAE,CAAgB;IACvD,OAAO,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,CAAC;AAC9F,CAAC;AAsBD,SAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,QAAQ,GACgB;IACxB,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAA,6CAAmB,GAAE,CAAC;IAC3C,MAAM,kBAAkB,GAAG,IAAA,cAAM,EAA2C,EAAE,CAAC,CAAC;IAChF,MAAM,eAAe,GAAG,IAAA,cAAM,EAAqB,SAAS,CAAC,CAAC;IAC9D,MAAM,CAAC,YAAY,EAAE,oBAA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