@clubmed/trident-ui 1.3.0-beta.9 → 1.3.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +120 -0
- package/README.md +8 -0
- package/assets/icons/ResortFill/PHUC_Fill.svg +287 -10
- package/assets/icons/ResortFill/TOMC_Fill.svg +199 -14
- package/assets/icons/ResortFill-EC/KIPC_EC_Fill.svg +499 -0
- package/assets/icons/ResortOutline/PHUC_Outline.svg +156 -6
- package/assets/icons/ResortOutline/TOMC_Outline.svg +99 -6
- package/assets/icons/ResortOutline-EC/KIPC_EC_Outline.svg +380 -0
- package/assets/icons/Transports/Taxi.svg +5 -0
- package/assets/icons/Utilities/Doorhanger.svg +5 -0
- package/assets/{style.css → trident-ui.css} +1 -1
- package/atoms/Clickable/Clickable.d.ts +5 -0
- package/atoms/Clickable/Clickable.js +25 -0
- package/atoms/Clickable/Clickable.js.map +1 -0
- package/atoms/Heading/Heading.d.ts +6 -0
- package/atoms/Heading/Heading.js +14 -0
- package/atoms/Heading/Heading.js.map +1 -0
- package/atoms/Heading/HeadingGroup.d.ts +7 -0
- package/atoms/Heading/HeadingGroup.js +15 -0
- package/atoms/Heading/HeadingGroup.js.map +1 -0
- package/atoms/Icons/Iconics.d.ts +1 -1
- package/atoms/Icons/IconsResolver.d.ts +1 -1
- package/atoms/Icons/contexts/IconsContext.d.ts +1 -1
- package/atoms/Icons/svg/SvgIcon.d.ts +1 -1
- package/atoms/Icons/svg-use/SvgUseIcon.d.ts +1 -1
- package/atoms/Image/Image.d.ts +7 -0
- package/atoms/Image/Image.js +18 -0
- package/atoms/Image/Image.js.map +1 -0
- package/atoms/Prose/Prose.d.ts +5 -0
- package/atoms/Prose/Prose.js +18 -0
- package/atoms/Prose/Prose.js.map +1 -0
- package/chunks/ResizeObserver.js +287 -0
- package/chunks/ResizeObserver.js.map +1 -0
- package/chunks/_commonjsHelpers.js +19 -14
- package/chunks/_commonjsHelpers.js.map +1 -1
- package/chunks/index.js +36 -33
- package/chunks/index.js.map +1 -1
- package/chunks/plugin.js +57 -46
- package/chunks/plugin.js.map +1 -1
- package/contexts/Devices/Device.d.ts +3 -3
- package/contexts/Devices/hooks/useQueries.d.ts +2 -2
- package/contexts/Devices/reducers/reducer.d.ts +2 -2
- package/contexts/TridentUIConfig.d.ts +1 -1
- package/contexts/TridentUIConfig.js +1265 -653
- package/contexts/TridentUIConfig.js.map +1 -1
- package/helpers/colors/colors.d.ts +108 -0
- package/helpers/colors/colors.js +132 -0
- package/helpers/colors/colors.js.map +1 -0
- package/hooks/useKeyboardControls.d.ts +1 -1
- package/hooks/useResizeObserver.d.ts +2 -0
- package/hooks/useResizeObserver.js +84 -0
- package/hooks/useResizeObserver.js.map +1 -0
- package/hooks/useSafeBoop.d.ts +2 -2
- package/molecules/Arrows/Arrows.d.ts +2 -2
- package/molecules/Avatar.d.ts +1 -1
- package/molecules/Avatar.js +24 -24
- package/molecules/Avatar.js.map +1 -1
- package/molecules/Backdrop.d.ts +1 -1
- package/molecules/Breadcrumb.d.ts +7 -11
- package/molecules/Breadcrumb.js +44 -36
- package/molecules/Breadcrumb.js.map +1 -1
- package/molecules/Breadcrumb.themes.d.ts +8 -0
- package/molecules/Breadcrumb.themes.js +15 -0
- package/molecules/Breadcrumb.themes.js.map +1 -0
- package/molecules/Buttons/ArrowButton.d.ts +1 -1
- package/molecules/Buttons/Button.d.ts +3 -3
- package/molecules/Buttons/ButtonAnchor.d.ts +2 -2
- package/molecules/Buttons/ButtonContent.d.ts +2 -2
- package/molecules/Buttons/FakeButton.d.ts +2 -3
- package/molecules/Buttons/InertButton.d.ts +2 -2
- package/molecules/Buttons/v2/Button.d.ts +2096 -2097
- package/molecules/Buttons/v2/Button.type.d.ts +5 -2
- package/molecules/Buttons/v2/Button.type.js +8 -5
- package/molecules/Buttons/v2/Button.type.js.map +1 -1
- package/molecules/Card.d.ts +1 -11
- package/molecules/Card.js +2 -34
- package/molecules/Card.js.map +1 -1
- package/molecules/Cards/Card.d.ts +13 -0
- package/molecules/Cards/Card.js +22 -0
- package/molecules/Cards/Card.js.map +1 -0
- package/molecules/Cards/CardAspectRatios.d.ts +6 -0
- package/molecules/Cards/CardAspectRatios.js +10 -0
- package/molecules/Cards/CardAspectRatios.js.map +1 -0
- package/molecules/Cards/CardBackground.d.ts +4 -0
- package/molecules/Cards/CardBackground.js +30 -0
- package/molecules/Cards/CardBackground.js.map +1 -0
- package/molecules/Cards/CardBackgroundContext.d.ts +6 -0
- package/molecules/Cards/CardBackgroundContext.js +10 -0
- package/molecules/Cards/CardBackgroundContext.js.map +1 -0
- package/molecules/Cards/CardClickable.d.ts +6 -0
- package/molecules/Cards/CardClickable.js +37 -0
- package/molecules/Cards/CardClickable.js.map +1 -0
- package/molecules/Cards/ExpandableCard.d.ts +14 -0
- package/molecules/Cards/ExpandableCard.js +80 -0
- package/molecules/Cards/ExpandableCard.js.map +1 -0
- package/molecules/Cards/v2/Card.d.ts +15 -0
- package/molecules/Cards/v2/Card.js +34 -0
- package/molecules/Cards/v2/Card.js.map +1 -0
- package/molecules/Chip.d.ts +9 -0
- package/molecules/Chip.js +31 -0
- package/molecules/Chip.js.map +1 -0
- package/molecules/Chip.themes.d.ts +12 -0
- package/molecules/Chip.themes.js +24 -0
- package/molecules/Chip.themes.js.map +1 -0
- package/molecules/ElasticHeight.d.ts +6 -27
- package/molecules/ElasticHeight.js +27 -33
- package/molecules/ElasticHeight.js.map +1 -1
- package/molecules/Forms/Checkboxes/Checkbox.d.ts +1 -1
- package/molecules/Forms/Checkboxes/Checkbox.js +43 -43
- package/molecules/Forms/Checkboxes/Checkbox.js.map +1 -1
- package/molecules/Forms/Checkboxes/Checkboxes.d.ts +2 -2
- package/molecules/Forms/DateField.d.ts +2 -2
- package/molecules/Forms/DateField.js +60 -61
- package/molecules/Forms/DateField.js.map +1 -1
- package/molecules/Forms/Filter.d.ts +1 -2
- package/molecules/Forms/Filter.js +29 -29
- package/molecules/Forms/Filter.js.map +1 -1
- package/molecules/Forms/FormControl.d.ts +4 -4
- package/molecules/Forms/FormLabel.d.ts +1 -1
- package/molecules/Forms/NumberField.d.ts +280 -280
- package/molecules/Forms/Password/Password.d.ts +1 -1
- package/molecules/Forms/Password/ValidationMessage.d.ts +1 -1
- package/molecules/Forms/Radios/Radio.d.ts +4 -2
- package/molecules/Forms/Radios/Radio.js +29 -28
- package/molecules/Forms/Radios/Radio.js.map +1 -1
- package/molecules/Forms/Radios/RadioGroup.d.ts +2 -2
- package/molecules/Forms/Radios/RadioGroup.js +70 -33
- package/molecules/Forms/Radios/RadioGroup.js.map +1 -1
- package/molecules/Forms/Range.d.ts +1 -2
- package/molecules/Forms/Range.js +144 -421
- package/molecules/Forms/Range.js.map +1 -1
- package/molecules/Forms/Select.d.ts +3 -3
- package/molecules/Forms/Switch.d.ts +1 -1
- package/molecules/Forms/TextField.d.ts +3 -3
- package/molecules/HamburgerIcon.d.ts +1 -1
- package/molecules/Link.d.ts +2 -2
- package/molecules/Loader.d.ts +1 -1
- package/molecules/Pagination.d.ts +2 -2
- package/molecules/Popin.d.ts +1 -1
- package/molecules/Spinner.d.ts +1 -1
- package/molecules/Tabs/Tab.d.ts +2 -3
- package/molecules/Tabs/Tab.js +41 -42
- package/molecules/Tabs/Tab.js.map +1 -1
- package/molecules/Tabs/TabList.d.ts +1 -1
- package/molecules/Tabs/TabList.js +21 -21
- package/molecules/Tabs/TabList.js.map +1 -1
- package/molecules/Tabs/TabPanel.d.ts +1 -1
- package/molecules/Tabs/TabPanel.js +13 -13
- package/molecules/Tabs/TabPanel.js.map +1 -1
- package/molecules/Tabs/Tabs.d.ts +1 -1
- package/molecules/Tabs/TabsBody.d.ts +1 -1
- package/molecules/Tabs/context/TabControl.d.ts +2 -2
- package/molecules/Tabs/hooks/tabControl.d.ts +5 -5
- package/molecules/Tag.d.ts +43 -0
- package/molecules/Tag.js +73 -0
- package/molecules/Tag.js.map +1 -0
- package/package.json +48 -45
- package/styles/index.css +1 -1
- package/tailwind/plugins/animationDelay.d.ts +2 -2
- package/tailwind/plugins/hocus.d.ts +2 -2
- package/tailwind/plugins/lineClampFix.d.ts +2 -2
- package/tailwind/plugins/popover.d.ts +2 -2
- package/tailwind/plugins/startingStyle.d.ts +2 -2
- package/tailwind/plugins/transitionBehavior.d.ts +2 -2
- package/tailwind/tailwind.preset.d.ts +50 -50
- package/types/LiteralUnion.d.js +2 -0
- package/types/LiteralUnion.d.js.map +1 -0
- package/types/Theme.d.js +2 -0
- package/types/Theme.d.js.map +1 -0
- package/assets/icons/ResortFill/KIPC_Fill.svg +0 -12
- package/assets/icons/ResortOutline/KIPC_Outline.svg +0 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumb.js","sources":["../../lib/molecules/Breadcrumb.tsx"],"sourcesContent":["import classnames from 'classnames';\
|
|
1
|
+
{"version":3,"file":"Breadcrumb.js","sources":["../../lib/molecules/Breadcrumb.tsx"],"sourcesContent":["import classnames from 'classnames';\nimport type { ComponentPropsWithoutRef, FunctionComponent } from 'react';\n\nimport { getTheme } from './Breadcrumb.themes';\n\nimport type { Theme } from '@/types/Theme';\nimport { Icon } from '@clubmed/trident-icons';\nimport './Breadcrumb.css';\n\nexport interface BreadcrumbProps extends ComponentPropsWithoutRef<'nav'> {\n items: ({\n href: string;\n label: string;\n } & ComponentPropsWithoutRef<'li'>)[];\n theme?: Theme;\n}\n\nexport const Breadcrumb: FunctionComponent<BreadcrumbProps> = ({\n className,\n items,\n theme = 'light',\n ...attrs\n}) => {\n if (items.length == 0) {\n return null;\n }\n\n const [first, second, , ...rest] = items;\n const lastItem = rest.length ? rest[rest.length - 1] : items[items.length - 1];\n const spacer = { label: '', href: '', className: 'breadcrumb-spacer' };\n const itemsToRender = !rest.length ? items : [first, second, spacer, lastItem];\n\n const { thStart, thEnd } = getTheme(theme);\n\n return (\n <nav\n role=\"navigation\"\n aria-label=\"Breadcrumb\"\n {...attrs}\n className={classnames(className, 'overflow-hidden')}\n data-name=\"Breadcrumb\"\n >\n <ol className=\"scrollbar-hidden flex items-center overflow-x-auto font-sans text-b4\">\n {itemsToRender.map(({ label, href, className, ...attrs }, index) => {\n const isLast = index === itemsToRender.length - 1;\n const isLink = href && !isLast;\n return (\n <li\n {...attrs}\n {...(isLast && { 'aria-current': 'page' })}\n className={classnames(\n 'flex shrink-0 items-center',\n {\n [thStart]: !isLast,\n [thEnd]: isLast,\n },\n className,\n )}\n key={`${label}-${index}`}\n >\n {isLink ? <a href={href}>{label}</a> : label}\n {!isLast && <Icon className=\"mx-4\" name=\"Diamond\" width=\"14px\" />}\n </li>\n );\n })}\n </ol>\n </nav>\n );\n};\n"],"names":["Breadcrumb","className","items","theme","attrs","first","second","rest","lastItem","spacer","itemsToRender","thStart","thEnd","getTheme","jsx","classnames","label","href","index","isLast","isLink","createElement","Icon"],"mappings":";;;;;AAiBO,MAAMA,IAAiD,CAAC;AAAA,EAC7D,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,GAAGC;AACL,MAAM;AACJ,MAAIF,EAAM,UAAU;AAClB,WAAO;AAGT,QAAM,CAACG,GAAOC,KAAU,GAAGC,CAAI,IAAIL,GAC7BM,IAAWD,EAAK,SAASA,EAAKA,EAAK,SAAS,CAAC,IAAIL,EAAMA,EAAM,SAAS,CAAC,GACvEO,IAAS,EAAE,OAAO,IAAI,MAAM,IAAI,WAAW,oBAAA,GAC3CC,IAAiBH,EAAK,SAAiB,CAACF,GAAOC,GAAQG,GAAQD,CAAQ,IAAxCN,GAE/B,EAAE,SAAAS,GAAS,OAAAC,MAAUC,EAASV,CAAK;AAEzC,SACE,gBAAAW;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,cAAW;AAAA,MACV,GAAGV;AAAA,MACJ,WAAWW,EAAWd,GAAW,iBAAiB;AAAA,MAClD,aAAU;AAAA,MAEV,UAAA,gBAAAa,EAAC,MAAA,EAAG,WAAU,wEACX,YAAc,IAAI,CAAC,EAAE,OAAAE,GAAO,MAAAC,GAAM,WAAAhB,GAAW,GAAGG,EAAAA,GAASc,MAAU;AAClE,cAAMC,IAASD,MAAUR,EAAc,SAAS,GAC1CU,IAASH,KAAQ,CAACE;AACxB,eACE,gBAAAE;AAAA,UAAC;AAAA,UAAA;AAAA,YACE,GAAGjB;AAAAA,YACH,GAAIe,KAAU,EAAE,gBAAgB,OAAA;AAAA,YACjC,WAAWJ;AAAA,cACT;AAAA,cACA;AAAA,gBACE,CAACJ,CAAO,GAAG,CAACQ;AAAA,gBACZ,CAACP,CAAK,GAAGO;AAAA,cAAA;AAAA,cAEXlB;AAAAA,YAAA;AAAA,YAEF,KAAK,GAAGe,CAAK,IAAIE,CAAK;AAAA,UAAA;AAAA,UAErBE,IAAS,gBAAAN,EAAC,KAAA,EAAE,MAAAG,GAAa,aAAM,IAAOD;AAAA,UACtC,CAACG,KAAU,gBAAAL,EAACQ,GAAA,EAAK,WAAU,QAAO,MAAK,WAAU,OAAM,OAAA,CAAO;AAAA,QAAA;AAAA,MAGrE,CAAC,EAAA,CACH;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const t = {
|
|
2
|
+
thStart: "bg-ultramarine",
|
|
3
|
+
thEnd: "bg-ultramarine font-bold"
|
|
4
|
+
}, e = {
|
|
5
|
+
dark: t,
|
|
6
|
+
wave: t,
|
|
7
|
+
light: {
|
|
8
|
+
thStart: "text-middleGrey",
|
|
9
|
+
thEnd: "text-black font-bold"
|
|
10
|
+
}
|
|
11
|
+
}, n = (r) => e[r] || e.light;
|
|
12
|
+
export {
|
|
13
|
+
n as getTheme
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=Breadcrumb.themes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Breadcrumb.themes.js","sources":["../../lib/molecules/Breadcrumb.themes.ts"],"sourcesContent":["import type { Theme } from '@/types/Theme';\nconst dark = {\n thStart: 'bg-ultramarine',\n thEnd: 'bg-ultramarine font-bold',\n};\n\nconst THEME = {\n dark,\n wave: dark,\n light: {\n thStart: 'text-middleGrey',\n thEnd: 'text-black font-bold',\n },\n} as const satisfies Record<string, { thStart: string; thEnd: string }>;\n\nexport const getTheme = (theme: Theme) => {\n return THEME[theme as keyof typeof THEME] || THEME.light;\n};\n"],"names":["dark","THEME","getTheme","theme"],"mappings":"AACA,MAAMA,IAAO;AAAA,EACX,SAAS;AAAA,EACT,OAAO;AACT,GAEMC,IAAQ;AAAA,EACZ,MAAAD;AAAA,EACA,MAAMA;AAAA,EACN,OAAO;AAAA,IACL,SAAS;AAAA,IACT,OAAO;AAAA,EAAA;AAEX,GAEaE,IAAW,CAACC,MAChBF,EAAME,CAA2B,KAAKF,EAAM;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ComponentProps, FunctionComponent } from 'react';
|
|
2
2
|
import { Button } from './Button';
|
|
3
3
|
interface Props extends ComponentProps<typeof Button> {
|
|
4
4
|
icon: 'ArrowDefaultLeft' | 'ArrowDefaultRight' | 'ArrowTailLeft' | 'ArrowTailRight';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import { ButtonHTMLAttributes, FunctionComponent, ReactNode } from 'react';
|
|
2
|
+
import { ButtonProps as ButtonPropsV2 } from './v2/Button.js';
|
|
3
|
+
import { IconicNames, IconicTypes } from '@clubmed/trident-icons';
|
|
4
4
|
export declare const BUTTON_THEME_LEGACY: any;
|
|
5
5
|
export declare const BUTTON_VARIANT_LEGACY: any;
|
|
6
6
|
export type ButtonPropsLegacy = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import { AnchorHTMLAttributes, FunctionComponent, PropsWithChildren } from 'react';
|
|
2
|
+
import { CommonButtonProps } from './Button';
|
|
3
3
|
type ButtonAnchorProps = CommonButtonProps & {
|
|
4
4
|
component?: FunctionComponent<PropsWithChildren<any>> | string;
|
|
5
5
|
} & AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
+
import { IconicNames, IconicTypes } from '@clubmed/trident-icons';
|
|
3
3
|
export type ButtonContentProps = {
|
|
4
4
|
/**
|
|
5
5
|
* @deprecated
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import './v2/Button
|
|
3
|
-
import { type FakeButtonProps } from './v2/Button';
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { FakeButtonProps } from './v2/Button';
|
|
4
3
|
/**
|
|
5
4
|
* @deprecated use Button with `component="span"` instead
|
|
6
5
|
* @param props
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { CommonButtonProps } from './Button';
|
|
3
3
|
/**
|
|
4
4
|
* @deprecated use Button with `component="span"` instead
|
|
5
5
|
* @param props
|