@youngonesworks/ui 0.1.25 → 0.1.26
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 +2 -2
- package/dist/components/rating/index.d.ts +5 -1
- package/dist/components/reviews/index.d.ts +5 -1
- package/dist/index.cjs +5 -151
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -148
- package/dist/index.js.map +1 -1
- package/dist/theme/index.d.ts +0 -1
- package/package.json +2 -2
- package/dist/assets/fonts/woff/Gotham-BlackItalic_Web.woff +0 -0
- package/dist/assets/fonts/woff/Gotham-Black_Web.woff +0 -0
- package/dist/assets/fonts/woff/Gotham-BoldItalic_Web.woff +0 -0
- package/dist/assets/fonts/woff/Gotham-Bold_Web.woff +0 -0
- package/dist/assets/fonts/woff/Gotham-BookItalic_Web.woff +0 -0
- package/dist/assets/fonts/woff/Gotham-Book_Web.woff +0 -0
- package/dist/assets/fonts/woff/Gotham-LightItalic_Web.woff +0 -0
- package/dist/assets/fonts/woff/Gotham-Light_Web.woff +0 -0
- package/dist/assets/fonts/woff/Gotham-MediumItalic_Web.woff +0 -0
- package/dist/assets/fonts/woff/Gotham-Medium_Web.woff +0 -0
- package/dist/assets/fonts/woff/Gotham-ThinItalic_Web.woff +0 -0
- package/dist/assets/fonts/woff/Gotham-Thin_Web.woff +0 -0
- package/dist/assets/fonts/woff/Gotham-UltraItalic_Web.woff +0 -0
- package/dist/assets/fonts/woff/Gotham-Ultra_Web.woff +0 -0
- package/dist/assets/fonts/woff/Gotham-XLightItalic_Web.woff +0 -0
- package/dist/assets/fonts/woff/Gotham-XLight_Web.woff +0 -0
- package/dist/assets/fonts/woff2/Gotham-BlackItalic_Web.woff2 +0 -0
- package/dist/assets/fonts/woff2/Gotham-Black_Web.woff2 +0 -0
- package/dist/assets/fonts/woff2/Gotham-BoldItalic_Web.woff2 +0 -0
- package/dist/assets/fonts/woff2/Gotham-Bold_Web.woff2 +0 -0
- package/dist/assets/fonts/woff2/Gotham-BookItalic_Web.woff2 +0 -0
- package/dist/assets/fonts/woff2/Gotham-Book_Web.woff2 +0 -0
- package/dist/assets/fonts/woff2/Gotham-LightItalic_Web.woff2 +0 -0
- package/dist/assets/fonts/woff2/Gotham-Light_Web.woff2 +0 -0
- package/dist/assets/fonts/woff2/Gotham-MediumItalic_Web.woff2 +0 -0
- package/dist/assets/fonts/woff2/Gotham-Medium_Web.woff2 +0 -0
- package/dist/assets/fonts/woff2/Gotham-ThinItalic_Web.woff2 +0 -0
- package/dist/assets/fonts/woff2/Gotham-Thin_Web.woff2 +0 -0
- package/dist/assets/fonts/woff2/Gotham-UltraItalic_Web.woff2 +0 -0
- package/dist/assets/fonts/woff2/Gotham-Ultra_Web.woff2 +0 -0
- package/dist/assets/fonts/woff2/Gotham-XLightItalic_Web.woff2 +0 -0
- package/dist/assets/fonts/woff2/Gotham-XLight_Web.woff2 +0 -0
- package/dist/theme/fonts.d.ts +0 -29
package/dist/index.js
CHANGED
|
@@ -3,7 +3,6 @@ import React, { Component, Fragment, cloneElement, createContext, createElement,
|
|
|
3
3
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import * as ReactDOM$1 from "react-dom";
|
|
5
5
|
import ReactDOM, { createPortal, flushSync } from "react-dom";
|
|
6
|
-
import localFont from "next/font/local";
|
|
7
6
|
|
|
8
7
|
//#region rolldown:runtime
|
|
9
8
|
var __create = Object.create;
|
|
@@ -109787,7 +109786,7 @@ const IconStarHalfFilled = (props) => /* @__PURE__ */ jsxs("svg", {
|
|
|
109787
109786
|
|
|
109788
109787
|
//#endregion
|
|
109789
109788
|
//#region src/components/rating/index.tsx
|
|
109790
|
-
const Rating = ({ rating, size: size$3 = "normal", setReview, className, setReviewError, error: error$1 }) => {
|
|
109789
|
+
const Rating = ({ rating, ratings, size: size$3 = "normal", setReview, className, setReviewError, error: error$1 }) => {
|
|
109791
109790
|
const [hoveredStars, setHoveredStars] = useState(0);
|
|
109792
109791
|
const [hoveredSmallStars, setHoveredSmallStars] = useState(0);
|
|
109793
109792
|
const [reviewIsSet, setReviewIsSet] = useState(false);
|
|
@@ -109825,41 +109824,13 @@ const Rating = ({ rating, size: size$3 = "normal", setReview, className, setRevi
|
|
|
109825
109824
|
if (index$4 - roundedRating === .5) return /* @__PURE__ */ jsx(IconStarHalfFilled, { className: cn(className$1, "text-yellow") });
|
|
109826
109825
|
return /* @__PURE__ */ jsx(IconStarEmpty, { className: cn(className$1, "text-yellow") });
|
|
109827
109826
|
};
|
|
109828
|
-
const ratings = [
|
|
109829
|
-
{
|
|
109830
|
-
value: 5,
|
|
109831
|
-
label: "Excellent"
|
|
109832
|
-
},
|
|
109833
|
-
{
|
|
109834
|
-
value: 4,
|
|
109835
|
-
label: "Good"
|
|
109836
|
-
},
|
|
109837
|
-
{
|
|
109838
|
-
value: 3,
|
|
109839
|
-
label: "Average"
|
|
109840
|
-
},
|
|
109841
|
-
{
|
|
109842
|
-
value: 2,
|
|
109843
|
-
label: "Fair"
|
|
109844
|
-
},
|
|
109845
|
-
{
|
|
109846
|
-
value: 1,
|
|
109847
|
-
label: "Poor"
|
|
109848
|
-
}
|
|
109849
|
-
];
|
|
109850
109827
|
return /* @__PURE__ */ jsxs("span", {
|
|
109851
109828
|
className: cn("flex flex-col", className),
|
|
109852
109829
|
children: [
|
|
109853
109830
|
/* @__PURE__ */ jsx("div", {
|
|
109854
109831
|
"data-component": "rating",
|
|
109855
109832
|
className: "flex flex-row gap-[2px]",
|
|
109856
|
-
children:
|
|
109857
|
-
1,
|
|
109858
|
-
2,
|
|
109859
|
-
3,
|
|
109860
|
-
4,
|
|
109861
|
-
5
|
|
109862
|
-
].map((index$4) => /* @__PURE__ */ jsx("div", {
|
|
109833
|
+
children: ratings.map((_$1, index$4) => /* @__PURE__ */ jsx("div", {
|
|
109863
109834
|
className: cn("relative", setReview && "cursor-pointer"),
|
|
109864
109835
|
onClick: () => handleStarClick(index$4),
|
|
109865
109836
|
onMouseEnter: () => handleHover(index$4),
|
|
@@ -109937,7 +109908,7 @@ const ReviewsLine = ({ maxValue, amount, countStarsText }) => /* @__PURE__ */ js
|
|
|
109937
109908
|
function formatRating(rating) {
|
|
109938
109909
|
return rating === 0 ? 0 : rating.toFixed(1);
|
|
109939
109910
|
}
|
|
109940
|
-
const Reviews = ({ totalRatings, averageRating, aggregatedRating, countStarsText, numberOfReviewsText }) => /* @__PURE__ */ jsxs("div", {
|
|
109911
|
+
const Reviews = ({ totalRatings, ratings, averageRating, aggregatedRating, countStarsText, numberOfReviewsText }) => /* @__PURE__ */ jsxs("div", {
|
|
109941
109912
|
className: "bg-ultra-light-gray flex w-full flex-col p-6 md:flex-row",
|
|
109942
109913
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
109943
109914
|
className: "mb-5 flex flex-1 flex-row items-start justify-start gap-5 md:mb-0 md:flex-col md:justify-center md:gap-0",
|
|
@@ -109947,6 +109918,7 @@ const Reviews = ({ totalRatings, averageRating, aggregatedRating, countStarsText
|
|
|
109947
109918
|
}), /* @__PURE__ */ jsxs("div", {
|
|
109948
109919
|
className: "flex flex-col",
|
|
109949
109920
|
children: [/* @__PURE__ */ jsx(Rating, {
|
|
109921
|
+
ratings,
|
|
109950
109922
|
rating: averageRating,
|
|
109951
109923
|
size: "normal",
|
|
109952
109924
|
className: "mb-4"
|
|
@@ -109997,7 +109969,7 @@ const ScrollToTop = ({ scrollToTopTitle }) => {
|
|
|
109997
109969
|
};
|
|
109998
109970
|
return /* @__PURE__ */ jsx(ActionIcon, {
|
|
109999
109971
|
title: scrollToTopTitle,
|
|
110000
|
-
className: `bg-turquoise-700 hover:bg-turquoise-600 fixed -right-[10px] bottom-[105px] z-40 flex h-[43px] w-[62px] cursor-pointer items-center justify-center rounded-l-3xl border-0 px-2 text-black duration-500 ${isVisible ? "translate-x-0" : "translate-x-[60px]"}`,
|
|
109972
|
+
className: `active:translate-y-[1px] content-center rounded-[4px] border-gray-200 hover:border-black child:p-10 disabled:text-gray-500 bg-turquoise-700 hover:bg-turquoise-600 fixed -right-[10px] bottom-[105px] z-40 flex h-[43px] w-[62px] cursor-pointer items-center justify-center rounded-l-3xl border-0 px-2 text-black duration-500 ${isVisible ? "translate-x-0" : "translate-x-[60px]"}`,
|
|
110001
109973
|
onClick: scrollToTop,
|
|
110002
109974
|
icon: /* @__PURE__ */ jsx(IconChevronUp, {})
|
|
110003
109975
|
});
|
|
@@ -140343,119 +140315,5 @@ const setCSSVariable = (variable, value) => {
|
|
|
140343
140315
|
};
|
|
140344
140316
|
|
|
140345
140317
|
//#endregion
|
|
140346
|
-
|
|
140347
|
-
const gothamFont = localFont({
|
|
140348
|
-
src: [
|
|
140349
|
-
{
|
|
140350
|
-
path: "../assets/fonts/woff2/Gotham-Thin_Web.woff2",
|
|
140351
|
-
weight: "100",
|
|
140352
|
-
style: "normal"
|
|
140353
|
-
},
|
|
140354
|
-
{
|
|
140355
|
-
path: "../assets/fonts/woff2/Gotham-ThinItalic_Web.woff2",
|
|
140356
|
-
weight: "100",
|
|
140357
|
-
style: "italic"
|
|
140358
|
-
},
|
|
140359
|
-
{
|
|
140360
|
-
path: "../assets/fonts/woff2/Gotham-XLight_Web.woff2",
|
|
140361
|
-
weight: "200",
|
|
140362
|
-
style: "normal"
|
|
140363
|
-
},
|
|
140364
|
-
{
|
|
140365
|
-
path: "../assets/fonts/woff2/Gotham-XLightItalic_Web.woff2",
|
|
140366
|
-
weight: "200",
|
|
140367
|
-
style: "italic"
|
|
140368
|
-
},
|
|
140369
|
-
{
|
|
140370
|
-
path: "../assets/fonts/woff2/Gotham-Light_Web.woff2",
|
|
140371
|
-
weight: "300",
|
|
140372
|
-
style: "normal"
|
|
140373
|
-
},
|
|
140374
|
-
{
|
|
140375
|
-
path: "../assets/fonts/woff2/Gotham-LightItalic_Web.woff2",
|
|
140376
|
-
weight: "300",
|
|
140377
|
-
style: "italic"
|
|
140378
|
-
},
|
|
140379
|
-
{
|
|
140380
|
-
path: "../assets/fonts/woff2/Gotham-Book_Web.woff2",
|
|
140381
|
-
weight: "400",
|
|
140382
|
-
style: "normal"
|
|
140383
|
-
},
|
|
140384
|
-
{
|
|
140385
|
-
path: "../assets/fonts/woff2/Gotham-BookItalic_Web.woff2",
|
|
140386
|
-
weight: "400",
|
|
140387
|
-
style: "italic"
|
|
140388
|
-
},
|
|
140389
|
-
{
|
|
140390
|
-
path: "../assets/fonts/woff2/Gotham-Medium_Web.woff2",
|
|
140391
|
-
weight: "500",
|
|
140392
|
-
style: "normal"
|
|
140393
|
-
},
|
|
140394
|
-
{
|
|
140395
|
-
path: "../assets/fonts/woff2/Gotham-MediumItalic_Web.woff2",
|
|
140396
|
-
weight: "500",
|
|
140397
|
-
style: "italic"
|
|
140398
|
-
},
|
|
140399
|
-
{
|
|
140400
|
-
path: "../assets/fonts/woff2/Gotham-Bold_Web.woff2",
|
|
140401
|
-
weight: "700",
|
|
140402
|
-
style: "normal"
|
|
140403
|
-
},
|
|
140404
|
-
{
|
|
140405
|
-
path: "../assets/fonts/woff2/Gotham-BoldItalic_Web.woff2",
|
|
140406
|
-
weight: "700",
|
|
140407
|
-
style: "italic"
|
|
140408
|
-
},
|
|
140409
|
-
{
|
|
140410
|
-
path: "../assets/fonts/woff2/Gotham-Black_Web.woff2",
|
|
140411
|
-
weight: "800",
|
|
140412
|
-
style: "normal"
|
|
140413
|
-
},
|
|
140414
|
-
{
|
|
140415
|
-
path: "../assets/fonts/woff2/Gotham-BlackItalic_Web.woff2",
|
|
140416
|
-
weight: "800",
|
|
140417
|
-
style: "italic"
|
|
140418
|
-
},
|
|
140419
|
-
{
|
|
140420
|
-
path: "../assets/fonts/woff2/Gotham-Ultra_Web.woff2",
|
|
140421
|
-
weight: "900",
|
|
140422
|
-
style: "normal"
|
|
140423
|
-
},
|
|
140424
|
-
{
|
|
140425
|
-
path: "../assets/fonts/woff2/Gotham-UltraItalic_Web.woff2",
|
|
140426
|
-
weight: "900",
|
|
140427
|
-
style: "italic"
|
|
140428
|
-
}
|
|
140429
|
-
],
|
|
140430
|
-
variable: "--font-gotham",
|
|
140431
|
-
display: "swap",
|
|
140432
|
-
preload: true
|
|
140433
|
-
});
|
|
140434
|
-
const FONT_FAMILIES = {
|
|
140435
|
-
gotham: "var(--font-gotham), Gotham, ui-sans-serif, system-ui, sans-serif",
|
|
140436
|
-
sans: "ui-sans-serif, system-ui, sans-serif",
|
|
140437
|
-
serif: "ui-serif, Georgia, serif",
|
|
140438
|
-
mono: "ui-monospace, SFMono-Regular, Consolas, monospace"
|
|
140439
|
-
};
|
|
140440
|
-
const FONT_WEIGHTS = {
|
|
140441
|
-
thin: "100",
|
|
140442
|
-
extraLight: "200",
|
|
140443
|
-
light: "300",
|
|
140444
|
-
normal: "400",
|
|
140445
|
-
medium: "500",
|
|
140446
|
-
semiBold: "600",
|
|
140447
|
-
bold: "700",
|
|
140448
|
-
extraBold: "800",
|
|
140449
|
-
black: "900"
|
|
140450
|
-
};
|
|
140451
|
-
const FONT_CLASS_NAMES = {
|
|
140452
|
-
gotham: gothamFont.className,
|
|
140453
|
-
sans: "font-sans",
|
|
140454
|
-
serif: "font-serif",
|
|
140455
|
-
mono: "font-mono"
|
|
140456
|
-
};
|
|
140457
|
-
var fonts_default = gothamFont;
|
|
140458
|
-
|
|
140459
|
-
//#endregion
|
|
140460
|
-
export { AccordionItem, AccordionWrapper, ActionIcon, Alert, AppleAppButtonIcon, AutoCompleteInput, Avatar, AvatarIndicator, Badge, BigBadge, BreadCrumb, Button, CSS_VARIABLE_KEYS, Checkbox, Divider, FONT_CLASS_NAMES, FONT_FAMILIES, FONT_WEIGHTS, FavouriteButton, Filters, GoogleAppButtonIcon, HR, HamburgerMenuButton, Island, Label, LinkText, Loader, LogoBlack, Modal, NavButtons, NumberField, NumberedStepper, PageUnavailable, PasswordInput, Popover, ProgressBar, RadioButton, Rating, RegionSelector, Reviews, ScrollToTop, SearchInput, Select, SettingsCard, Skeleton, SkillPill, Stepper, StickyMobileButtonWrapper, Table, TableCell, TableHeader, TableHeaderItem, TableHeaderRow, TableRow, TextInput, Textarea, ThemeIcon, Toggle, Tooltip, TruncatedText, UnorderedList, UnorderedListItem, UnstyledButton, WysiwygEditor, buttonVariants, getCSSVariable, gothamFont, setCSSVariable };
|
|
140318
|
+
export { AccordionItem, AccordionWrapper, ActionIcon, Alert, AppleAppButtonIcon, AutoCompleteInput, Avatar, AvatarIndicator, Badge, BigBadge, BreadCrumb, Button, CSS_VARIABLE_KEYS, Checkbox, Divider, FavouriteButton, Filters, GoogleAppButtonIcon, HR, HamburgerMenuButton, Island, Label, LinkText, Loader, LogoBlack, Modal, NavButtons, NumberField, NumberedStepper, PageUnavailable, PasswordInput, Popover, ProgressBar, RadioButton, Rating, RegionSelector, Reviews, ScrollToTop, SearchInput, Select, SettingsCard, Skeleton, SkillPill, Stepper, StickyMobileButtonWrapper, Table, TableCell, TableHeader, TableHeaderItem, TableHeaderRow, TableRow, TextInput, Textarea, ThemeIcon, Toggle, Tooltip, TruncatedText, UnorderedList, UnorderedListItem, UnstyledButton, WysiwygEditor, buttonVariants, getCSSVariable, setCSSVariable };
|
|
140461
140319
|
//# sourceMappingURL=index.js.map
|