@clubmed/trident-ui 1.3.0-beta.3 → 1.3.0-beta.5
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 +20 -0
- package/assets/style.css +1 -1
- package/chunks/plugin.js +53 -0
- package/chunks/plugin.js.map +1 -0
- package/molecules/Arrows/Arrows.d.ts +16 -0
- package/molecules/Arrows/Arrows.js +66 -0
- package/molecules/Arrows/Arrows.js.map +1 -0
- package/molecules/Arrows/ArrowsLabels.d.js +2 -0
- package/molecules/Arrows/ArrowsLabels.d.js.map +1 -0
- package/molecules/Arrows.d.ts +1 -50
- package/molecules/Arrows.js +2 -56
- package/molecules/Arrows.js.map +1 -1
- package/molecules/Buttons/ArrowButton.d.ts +7 -0
- package/molecules/Buttons/ArrowButton.js +14 -0
- package/molecules/Buttons/ArrowButton.js.map +1 -0
- package/molecules/Buttons/Button.d.ts +13 -34
- package/molecules/Buttons/Button.js +50 -42
- package/molecules/Buttons/Button.js.map +1 -1
- package/molecules/Buttons/ButtonAnchor.d.ts +2 -3
- package/molecules/Buttons/ButtonAnchor.js +14 -36
- package/molecules/Buttons/ButtonAnchor.js.map +1 -1
- package/molecules/Buttons/ButtonContent.d.ts +11 -3
- package/molecules/Buttons/ButtonContent.js +13 -6
- package/molecules/Buttons/ButtonContent.js.map +1 -1
- package/molecules/Buttons/InertButton.d.ts +4 -0
- package/molecules/Buttons/InertButton.js +14 -31
- package/molecules/Buttons/InertButton.js.map +1 -1
- package/molecules/Buttons/v2/Button.d.ts +10 -0
- package/molecules/Buttons/v2/Button.js +32 -0
- package/molecules/Buttons/v2/Button.js.map +1 -0
- package/molecules/Buttons/v2/Button.type.d.ts +54 -0
- package/molecules/Buttons/v2/Button.type.js +42 -0
- package/molecules/Buttons/v2/Button.type.js.map +1 -0
- package/molecules/Buttons/v2/ButtonAnchor.d.ts +12 -0
- package/molecules/Buttons/v2/ButtonAnchor.js +32 -0
- package/molecules/Buttons/v2/ButtonAnchor.js.map +1 -0
- package/molecules/Buttons/v2/FakeButton.d.ts +7 -0
- package/molecules/Buttons/v2/FakeButton.js +27 -0
- package/molecules/Buttons/v2/FakeButton.js.map +1 -0
- package/molecules/Forms/NumberField.d.ts +15 -15
- package/molecules/Forms/NumberField.js +68 -68
- package/molecules/Forms/NumberField.js.map +1 -1
- package/molecules/Pagination.d.ts +2 -1
- package/molecules/Pagination.js +68 -46
- package/molecules/Pagination.js.map +1 -1
- package/molecules/Popin.js +16 -16
- package/molecules/Popin.js.map +1 -1
- package/molecules/Tabs/Tab.d.ts +1 -1
- package/molecules/Tabs/Tab.js +51 -49
- package/molecules/Tabs/Tab.js.map +1 -1
- package/molecules/Tabs/TabPanel.js +31 -29
- package/molecules/Tabs/TabPanel.js.map +1 -1
- package/molecules/Tabs/Tabs.js +7 -9
- package/molecules/Tabs/Tabs.js.map +1 -1
- package/molecules/Tabs/context/TabControl.d.ts +29 -27
- package/molecules/Tabs/context/TabControl.js +67 -66
- package/molecules/Tabs/context/TabControl.js.map +1 -1
- package/molecules/Tabs/hooks/tabControl.d.ts +25 -14
- package/molecules/Tabs/hooks/tabControl.js +26 -23
- package/molecules/Tabs/hooks/tabControl.js.map +1 -1
- package/package.json +6 -6
- package/styles/globals.css +12 -15
- package/tailwind/colors.d.ts +38 -0
- package/tailwind/colors.js +44 -0
- package/tailwind/colors.js.map +1 -0
- package/tailwind/plugins/animationDelay.d.ts +4 -0
- package/tailwind/plugins/animationDelay.js +15 -0
- package/tailwind/plugins/animationDelay.js.map +1 -0
- package/tailwind/plugins/hocus.d.ts +4 -0
- package/tailwind/plugins/hocus.js +11 -0
- package/tailwind/plugins/hocus.js.map +1 -0
- package/tailwind/plugins/lineClampFix.d.ts +4 -0
- package/tailwind/plugins/lineClampFix.js +13 -0
- package/tailwind/plugins/lineClampFix.js.map +1 -0
- package/tailwind/plugins/popover.d.ts +4 -0
- package/tailwind/plugins/popover.js +8 -0
- package/tailwind/plugins/popover.js.map +1 -0
- package/tailwind/plugins/startingStyle.d.ts +4 -0
- package/tailwind/plugins/startingStyle.js +8 -0
- package/tailwind/plugins/startingStyle.js.map +1 -0
- package/tailwind/plugins/transitionBehavior.d.ts +4 -0
- package/tailwind/plugins/transitionBehavior.js +11 -0
- package/tailwind/plugins/transitionBehavior.js.map +1 -0
- package/tailwind/tailwind.preset.d.ts +730 -510
- package/tailwind/tailwind.preset.js +705 -631
- package/tailwind/tailwind.preset.js.map +1 -1
- package/types/Colors.d.js +2 -0
- package/types/Colors.d.js.map +1 -0
- package/types/ScrollerLabels.d.js +2 -0
- package/types/ScrollerLabels.d.js.map +1 -0
- package/molecules/Buttons/Button.helpers.d.ts +0 -8
- package/molecules/Buttons/Button.helpers.js +0 -12
- package/molecules/Buttons/Button.helpers.js.map +0 -1
- package/molecules/Buttons/Button.themes.d.ts +0 -1
- package/molecules/Buttons/Button.themes.js +0 -25
- package/molecules/Buttons/Button.themes.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabControl.js","sources":["../../../../lib/molecules/Tabs/context/TabControl.tsx"],"sourcesContent":["'use client';\n\nimport {\n type Dispatch,\n type
|
|
1
|
+
{"version":3,"file":"TabControl.js","sources":["../../../../lib/molecules/Tabs/context/TabControl.tsx"],"sourcesContent":["'use client';\n\nimport {\n createContext,\n type Dispatch,\n type PropsWithChildren,\n type RefObject,\n useCallback,\n useId,\n useReducer,\n} from 'react';\n\ntype RefTab<T extends HTMLElement = HTMLElement> = RefObject<T>;\ntype RefTabs<T extends HTMLElement = HTMLElement> = Map<number, RefTab<T>>;\n\ntype TabsUpdateAction = {\n type: 'update';\n payload: number;\n};\n\ntype TabsRegisterAction<T extends HTMLElement = HTMLElement> = {\n type: 'register';\n payload: { value: number; ref: RefObject<T> };\n};\n\ntype TabsUnregisterAction = {\n type: 'unregister';\n payload: { value: number };\n};\n\ntype TabsAction<T extends HTMLElement = HTMLElement> =\n | { type: 'start' | 'end' | 'previous' | 'next' }\n | TabsUpdateAction\n | TabsRegisterAction<T>\n | TabsUnregisterAction;\n\ninterface TabsState<T extends HTMLElement = HTMLElement> {\n uid: string;\n value: number;\n refs: RefTabs<T>;\n}\n\ninterface TabControl<T extends HTMLElement = HTMLElement> extends TabsState<T> {\n uid: string;\n value: number;\n refs: RefTabs<T>;\n dispatch: Dispatch<TabsAction>;\n register: (value: number, ref: RefTab<T>) => void;\n unregister: (value: number) => void;\n}\n\nfunction next(state: TabsState) {\n const keys = [...state.refs.keys()];\n const index = keys.findIndex((value) => value === state.value);\n const nextIndex = (index + 1) % keys.length;\n\n return { ...state, value: keys[nextIndex] };\n}\n\nfunction previous(state: TabsState) {\n const keys = [...state.refs.keys()];\n const index = keys.findIndex((value) => value === state.value);\n const previousIndex = (index - 1 + keys.length) % keys.length;\n\n return { ...state, value: keys[previousIndex] };\n}\n\nfunction start(state: TabsState) {\n const keys = [...state.refs.keys()];\n const firstIndex = keys[0];\n\n return {\n ...state,\n value: firstIndex,\n };\n}\n\nfunction end(state: TabsState) {\n const keys = [...state.refs.keys()];\n const lastIndex = keys[keys.length - 1];\n\n return {\n ...state,\n value: lastIndex,\n };\n}\n\nfunction unregister(state: TabsState, action: TabsUnregisterAction) {\n const deletedRefs = new Map(state.refs);\n deletedRefs.delete(action.payload.value);\n\n return {\n ...state,\n refs: deletedRefs,\n };\n}\n\nfunction register(state: TabsState, action: TabsRegisterAction) {\n return {\n ...state,\n refs: new Map(state.refs).set(action.payload.value, action.payload.ref),\n };\n}\n\nfunction update(state: TabsState, action: TabsUpdateAction) {\n return { ...state, value: action.payload };\n}\n\nconst actions = {\n next,\n previous,\n start,\n end,\n register,\n unregister,\n update,\n} as const;\n\nfunction tabsReducer(state: TabsState, action: TabsAction): TabsState {\n if (action.type in actions) {\n const actionFunction = actions[action.type] as (\n state: TabsState,\n action: TabsAction,\n ) => TabsState;\n\n return actionFunction(state, action);\n }\n\n return state;\n}\n\nexport const TabControlContext = createContext<TabControl>({\n uid: '',\n value: 0,\n refs: new Map(),\n dispatch: () => {\n console.warn('Tab Controller Context dispatch used outside of Provider');\n },\n register: () => {\n console.warn('Tab Controller Context register used outside of Provider');\n },\n unregister: () => {\n console.warn('Tab Controller Context unregister used outside of Provider');\n },\n});\n\nTabControlContext.displayName = 'TabControlContext';\n\nexport interface TabsProviderProps {\n selected?: number;\n /**\n * The selected tab value\n * @deprecated Min props as no effect on the Tabs component and will be removed in future versions\n */\n min?: number;\n\n /**\n * The selected tab value\n * @deprecated Max props as no effect on the Tabs component and will be removed in future versions\n */\n max?: number;\n}\n\nexport function TabsProvider({ selected = 0, children }: PropsWithChildren<TabsProviderProps>) {\n const uid = useId();\n const [state, dispatch] = useReducer(tabsReducer, { uid, value: selected, refs: new Map() });\n\n const register = useCallback(<T extends HTMLElement>(value: number, ref: RefTab<T>) => {\n dispatch({ type: 'register', payload: { value, ref } });\n }, []);\n\n const unregister = useCallback((value: number) => {\n dispatch({ type: 'unregister', payload: { value } });\n }, []);\n\n return (\n <TabControlContext.Provider value={{ ...state, dispatch, register, unregister }}>\n {children}\n </TabControlContext.Provider>\n );\n}\n"],"names":["next","state","keys","nextIndex","value","previous","previousIndex","start","firstIndex","end","lastIndex","unregister","action","deletedRefs","register","update","actions","tabsReducer","actionFunction","TabControlContext","createContext","TabsProvider","selected","children","uid","useId","dispatch","useReducer","useCallback","ref","jsx"],"mappings":"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"}
|
|
@@ -4,30 +4,41 @@ export declare const useTabDispatch: () => import("react").Dispatch<{
|
|
|
4
4
|
type: "update";
|
|
5
5
|
payload: number;
|
|
6
6
|
} | {
|
|
7
|
-
type: "
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
type: "unregister";
|
|
8
|
+
payload: {
|
|
9
|
+
value: number;
|
|
10
|
+
};
|
|
11
|
+
} | {
|
|
12
|
+
type: "start" | "end" | "next" | "previous";
|
|
13
|
+
} | {
|
|
14
|
+
type: "register";
|
|
15
|
+
payload: {
|
|
16
|
+
value: number;
|
|
17
|
+
ref: RefObject<HTMLElement>;
|
|
18
|
+
};
|
|
14
19
|
}>;
|
|
20
|
+
export declare const useTabsUid: () => string;
|
|
15
21
|
interface Props<T extends HTMLElement> {
|
|
16
22
|
value: number;
|
|
17
23
|
ref: RefObject<T>;
|
|
18
24
|
}
|
|
19
|
-
export declare
|
|
25
|
+
export declare function useRegisterTabControl<T extends HTMLElement>({ value, ref }: Props<T>): import("react").Dispatch<{
|
|
20
26
|
type: "update";
|
|
21
27
|
payload: number;
|
|
22
28
|
} | {
|
|
23
|
-
type: "
|
|
24
|
-
|
|
25
|
-
|
|
29
|
+
type: "unregister";
|
|
30
|
+
payload: {
|
|
31
|
+
value: number;
|
|
32
|
+
};
|
|
26
33
|
} | {
|
|
27
|
-
type: "start";
|
|
34
|
+
type: "start" | "end" | "next" | "previous";
|
|
28
35
|
} | {
|
|
29
|
-
type: "
|
|
36
|
+
type: "register";
|
|
37
|
+
payload: {
|
|
38
|
+
value: number;
|
|
39
|
+
ref: RefObject<HTMLElement>;
|
|
40
|
+
};
|
|
30
41
|
}>;
|
|
31
|
-
export declare const
|
|
42
|
+
export declare const useTabControls: () => Map<number, RefObject<HTMLElement>>;
|
|
32
43
|
export declare const useActiveTabControl: () => readonly [number, RefObject<HTMLElement> | undefined];
|
|
33
44
|
export {};
|
|
@@ -1,31 +1,34 @@
|
|
|
1
|
-
import { useContext as e, useEffect as
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
4
|
-
const { value: t } = e(
|
|
1
|
+
import { useContext as e, useEffect as u } from "react";
|
|
2
|
+
import { TabControlContext as r } from "../context/TabControl.js";
|
|
3
|
+
const b = () => {
|
|
4
|
+
const { value: t } = e(r);
|
|
5
|
+
return t;
|
|
6
|
+
}, T = () => {
|
|
7
|
+
const { dispatch: t } = e(r);
|
|
5
8
|
return t;
|
|
6
9
|
}, f = () => {
|
|
7
|
-
const {
|
|
10
|
+
const { uid: t } = e(r);
|
|
8
11
|
return t;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
const { refs: t } = e(u);
|
|
12
|
+
};
|
|
13
|
+
function p({ value: t, ref: s }) {
|
|
14
|
+
const { dispatch: c, register: n, unregister: o } = e(r);
|
|
15
|
+
return u(() => (n(t, s), () => {
|
|
16
|
+
o(t);
|
|
17
|
+
}), [t, s, n, o]), c;
|
|
18
|
+
}
|
|
19
|
+
const C = () => {
|
|
20
|
+
const { refs: t } = e(r);
|
|
19
21
|
return t;
|
|
20
|
-
},
|
|
21
|
-
const { value: t
|
|
22
|
-
return [t,
|
|
22
|
+
}, d = () => {
|
|
23
|
+
const { value: t, refs: s } = e(r);
|
|
24
|
+
return [t, s.get(t)];
|
|
23
25
|
};
|
|
24
26
|
export {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
b as useActiveTab,
|
|
28
|
+
d as useActiveTabControl,
|
|
29
|
+
p as useRegisterTabControl,
|
|
30
|
+
C as useTabControls,
|
|
31
|
+
T as useTabDispatch,
|
|
32
|
+
f as useTabsUid
|
|
30
33
|
};
|
|
31
34
|
//# sourceMappingURL=tabControl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabControl.js","sources":["../../../../lib/molecules/Tabs/hooks/tabControl.ts"],"sourcesContent":["import { useContext, useEffect
|
|
1
|
+
{"version":3,"file":"tabControl.js","sources":["../../../../lib/molecules/Tabs/hooks/tabControl.ts"],"sourcesContent":["import { type RefObject, useContext, useEffect } from 'react';\n\nimport { TabControlContext } from '../context/TabControl';\n\nexport const useActiveTab = () => {\n const { value } = useContext(TabControlContext);\n\n return value;\n};\n\nexport const useTabDispatch = () => {\n const { dispatch } = useContext(TabControlContext);\n\n return dispatch;\n};\n\nexport const useTabsUid = () => {\n const { uid } = useContext(TabControlContext);\n\n return uid;\n};\n\ninterface Props<T extends HTMLElement> {\n value: number;\n ref: RefObject<T>;\n}\n\nexport function useRegisterTabControl<T extends HTMLElement>({ value, ref }: Props<T>) {\n const { dispatch, register, unregister } = useContext(TabControlContext);\n\n useEffect(() => {\n register(value, ref);\n\n return () => {\n unregister(value);\n };\n }, [value, ref, register, unregister]);\n\n return dispatch;\n}\n\nexport const useTabControls = () => {\n const { refs } = useContext(TabControlContext);\n\n return refs;\n};\n\nexport const useActiveTabControl = () => {\n const { value, refs } = useContext(TabControlContext);\n\n return [value, refs.get(value)] as const;\n};\n"],"names":["useActiveTab","value","useContext","TabControlContext","useTabDispatch","dispatch","useTabsUid","uid","useRegisterTabControl","ref","register","unregister","useEffect","useTabControls","refs","useActiveTabControl"],"mappings":";;AAIO,MAAMA,IAAe,MAAM;AAChC,QAAM,EAAE,OAAAC,EAAA,IAAUC,EAAWC,CAAiB;AAEvC,SAAAF;AACT,GAEaG,IAAiB,MAAM;AAClC,QAAM,EAAE,UAAAC,EAAA,IAAaH,EAAWC,CAAiB;AAE1C,SAAAE;AACT,GAEaC,IAAa,MAAM;AAC9B,QAAM,EAAE,KAAAC,EAAA,IAAQL,EAAWC,CAAiB;AAErC,SAAAI;AACT;AAOO,SAASC,EAA6C,EAAE,OAAAP,GAAO,KAAAQ,KAAiB;AACrF,QAAM,EAAE,UAAAJ,GAAU,UAAAK,GAAU,YAAAC,EAAW,IAAIT,EAAWC,CAAiB;AAEvE,SAAAS,EAAU,OACRF,EAAST,GAAOQ,CAAG,GAEZ,MAAM;AACX,IAAAE,EAAWV,CAAK;AAAA,EAAA,IAEjB,CAACA,GAAOQ,GAAKC,GAAUC,CAAU,CAAC,GAE9BN;AACT;AAEO,MAAMQ,IAAiB,MAAM;AAClC,QAAM,EAAE,MAAAC,EAAA,IAASZ,EAAWC,CAAiB;AAEtC,SAAAW;AACT,GAEaC,IAAsB,MAAM;AACvC,QAAM,EAAE,OAAAd,GAAO,MAAAa,EAAK,IAAIZ,EAAWC,CAAiB;AAEpD,SAAO,CAACF,GAAOa,EAAK,IAAIb,CAAK,CAAC;AAChC;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clubmed/trident-ui",
|
|
3
|
-
"version": "1.3.0-beta.
|
|
3
|
+
"version": "1.3.0-beta.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Shared ClubMed React UI components",
|
|
6
6
|
"keywords": [
|
|
@@ -31,16 +31,16 @@
|
|
|
31
31
|
"import": "./atoms/Icons/index.js",
|
|
32
32
|
"default": "./atoms/Icons/index.js"
|
|
33
33
|
},
|
|
34
|
-
"./atoms/Icons/svg-use": {
|
|
35
|
-
"types": "./atoms/Icons/svg-use/index.d.ts",
|
|
36
|
-
"import": "./atoms/Icons/svg-use/index.js",
|
|
37
|
-
"default": "./atoms/Icons/svg-use/index.js"
|
|
38
|
-
},
|
|
39
34
|
"./atoms/Icons/svg": {
|
|
40
35
|
"types": "./atoms/Icons/svg/index.d.ts",
|
|
41
36
|
"import": "./atoms/Icons/svg/index.js",
|
|
42
37
|
"default": "./atoms/Icons/svg/index.js"
|
|
43
38
|
},
|
|
39
|
+
"./atoms/Icons/svg-use": {
|
|
40
|
+
"types": "./atoms/Icons/svg-use/index.d.ts",
|
|
41
|
+
"import": "./atoms/Icons/svg-use/index.js",
|
|
42
|
+
"default": "./atoms/Icons/svg-use/index.js"
|
|
43
|
+
},
|
|
44
44
|
"./molecules/Tabs": {
|
|
45
45
|
"types": "./molecules/Tabs/index.d.ts",
|
|
46
46
|
"import": "./molecules/Tabs/index.js",
|
package/styles/globals.css
CHANGED
|
@@ -25,6 +25,8 @@
|
|
|
25
25
|
--color-sienna-active: 13deg 48% 44%;
|
|
26
26
|
--color-wave: 180 100% 25%;
|
|
27
27
|
--color-wave-active: 180 100% 22%;
|
|
28
|
+
--color-marygold: 35 100% 49%;
|
|
29
|
+
--color-marygold-active: 35 100% 49%;
|
|
28
30
|
--color-white: 0deg 0% 100%;
|
|
29
31
|
--color-white-active: 0deg 0% 80%;
|
|
30
32
|
|
|
@@ -35,16 +37,17 @@
|
|
|
35
37
|
--color-lightGrey: 0deg 0% 80%;
|
|
36
38
|
--color-pearl: 0deg 0% 97%;
|
|
37
39
|
--color-green: 131deg 89% 29%;
|
|
40
|
+
--color-green-active: 131deg 89% 19%;
|
|
38
41
|
--color-red: 9deg 79% 42%;
|
|
42
|
+
--color-red-active: 9deg 79% 32%;
|
|
39
43
|
--color-orange: 25deg 100% 39%;
|
|
44
|
+
--color-orange-active: 25deg 100% 29%;
|
|
40
45
|
|
|
41
46
|
/* TRANSITION */
|
|
42
47
|
--transition-fn-boop: cubic-bezier(0.47, 1.64, 0.41, 0.8);
|
|
43
48
|
--transition-duration-boop: 0.4s;
|
|
44
49
|
}
|
|
45
|
-
}
|
|
46
50
|
|
|
47
|
-
@layer components {
|
|
48
51
|
html {
|
|
49
52
|
--xDirCoefficient: 1;
|
|
50
53
|
scroll-behavior: smooth;
|
|
@@ -69,7 +72,9 @@
|
|
|
69
72
|
}
|
|
70
73
|
|
|
71
74
|
.link-container:hover .link-underline.hoverable,
|
|
72
|
-
.link-container:focus .link-underline.hoverable
|
|
75
|
+
.link-container:focus .link-underline.hoverable,
|
|
76
|
+
.group:hover .link-underline.hoverable,
|
|
77
|
+
.group:focus .link-underline.hoverable {
|
|
73
78
|
background-size: calc(0% - 0px) 100%;
|
|
74
79
|
}
|
|
75
80
|
|
|
@@ -83,11 +88,13 @@
|
|
|
83
88
|
}
|
|
84
89
|
|
|
85
90
|
/* INPUTS */
|
|
91
|
+
|
|
92
|
+
/* Remove the reset button in active inputs */
|
|
93
|
+
input[type='search']::-webkit-search-cancel-button,
|
|
86
94
|
input[type='number']::-webkit-inner-spin-button,
|
|
87
95
|
input[type='number']::-webkit-outer-spin-button {
|
|
88
|
-
appearance
|
|
96
|
+
@apply appearance-none;
|
|
89
97
|
}
|
|
90
|
-
|
|
91
98
|
input[type='password']::-ms-reveal {
|
|
92
99
|
display: none;
|
|
93
100
|
}
|
|
@@ -114,14 +121,4 @@
|
|
|
114
121
|
@apply justify-between;
|
|
115
122
|
@apply uppercase;
|
|
116
123
|
}
|
|
117
|
-
|
|
118
|
-
/* SCROLLS */
|
|
119
|
-
.scrollbar-hide::-webkit-scrollbar {
|
|
120
|
-
display: none;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.scrollbar-hide {
|
|
124
|
-
-ms-overflow-style: none;
|
|
125
|
-
scrollbar-width: none;
|
|
126
|
-
}
|
|
127
124
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export declare const COLORS: {
|
|
2
|
+
current: string;
|
|
3
|
+
transparent: string;
|
|
4
|
+
inherit: string;
|
|
5
|
+
black: string;
|
|
6
|
+
'black-active': string;
|
|
7
|
+
ultramarine: string;
|
|
8
|
+
'ultramarine-active': string;
|
|
9
|
+
lavender: string;
|
|
10
|
+
'lavender-active': string;
|
|
11
|
+
verdigris: string;
|
|
12
|
+
'verdigris-active': string;
|
|
13
|
+
sand: string;
|
|
14
|
+
'sand-active': string;
|
|
15
|
+
lightSand: string;
|
|
16
|
+
'lightSand-active': string;
|
|
17
|
+
saffron: string;
|
|
18
|
+
'saffron-active': string;
|
|
19
|
+
sienna: string;
|
|
20
|
+
'sienna-active': string;
|
|
21
|
+
wave: string;
|
|
22
|
+
'wave-active': string;
|
|
23
|
+
marygold: string;
|
|
24
|
+
'marygold-active': string;
|
|
25
|
+
white: string;
|
|
26
|
+
'white-active': string;
|
|
27
|
+
darkGrey: string;
|
|
28
|
+
middleGrey: string;
|
|
29
|
+
grey: string;
|
|
30
|
+
lightGrey: string;
|
|
31
|
+
pearl: string;
|
|
32
|
+
green: string;
|
|
33
|
+
'green-active': string;
|
|
34
|
+
red: string;
|
|
35
|
+
'red-active': string;
|
|
36
|
+
orange: string;
|
|
37
|
+
'orange-active': string;
|
|
38
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
const a = {
|
|
2
|
+
current: "currentColor",
|
|
3
|
+
transparent: "transparent",
|
|
4
|
+
inherit: "inherit",
|
|
5
|
+
/* BRAND */
|
|
6
|
+
black: "hsl(var(--color-black) / <alpha-value>)",
|
|
7
|
+
"black-active": "hsl(var(--color-black-active) / <alpha-value>)",
|
|
8
|
+
ultramarine: "hsl(var(--color-ultramarine) / <alpha-value>)",
|
|
9
|
+
"ultramarine-active": "hsl(var(--color-ultramarine-active) / <alpha-value>)",
|
|
10
|
+
lavender: "hsl(var(--color-lavender) / <alpha-value>)",
|
|
11
|
+
"lavender-active": "hsl(var(--color-lavender-active) / <alpha-value>)",
|
|
12
|
+
verdigris: "hsl(var(--color-verdigris) / <alpha-value>)",
|
|
13
|
+
"verdigris-active": "hsl(var(--color-verdigris-active) / <alpha-value>)",
|
|
14
|
+
sand: "hsl(var(--color-sand) / <alpha-value>)",
|
|
15
|
+
"sand-active": "hsl(var(--color-sand-active) / <alpha-value>)",
|
|
16
|
+
lightSand: "hsl(var(--color-lightSand) / <alpha-value>)",
|
|
17
|
+
"lightSand-active": "hsl(var(--color-lightSand-active) / <alpha-value>)",
|
|
18
|
+
saffron: "hsl(var(--color-saffron) / <alpha-value>)",
|
|
19
|
+
"saffron-active": "hsl(var(--color-saffron-active) / <alpha-value>)",
|
|
20
|
+
sienna: "hsl(var(--color-sienna) / <alpha-value>)",
|
|
21
|
+
"sienna-active": "hsl(var(--color-sienna-active) / <alpha-value>)",
|
|
22
|
+
wave: "hsl(var(--color-wave) / <alpha-value>)",
|
|
23
|
+
"wave-active": "hsl(var(--color-wave-active) / <alpha-value>)",
|
|
24
|
+
marygold: "hsl(var(--color-marygold) / <alpha-value>)",
|
|
25
|
+
"marygold-active": "hsl(var(--color-marygold-active) / <alpha-value>)",
|
|
26
|
+
white: "hsl(var(--color-white) / <alpha-value>)",
|
|
27
|
+
"white-active": "hsl(var(--color-white-active) / <alpha-value>)",
|
|
28
|
+
/* LAYOUT */
|
|
29
|
+
darkGrey: "hsl(var(--color-darkGrey) / <alpha-value>)",
|
|
30
|
+
middleGrey: "hsl(var(--color-middleGrey) / <alpha-value>)",
|
|
31
|
+
grey: "hsl(var(--color-grey) / <alpha-value>)",
|
|
32
|
+
lightGrey: "hsl(var(--color-lightGrey) / <alpha-value>)",
|
|
33
|
+
pearl: "hsl(var(--color-pearl) / <alpha-value>)",
|
|
34
|
+
green: "hsl(var(--color-green) / <alpha-value>)",
|
|
35
|
+
"green-active": "hsl(var(--color-green-active) / <alpha-value>)",
|
|
36
|
+
red: "hsl(var(--color-red) / <alpha-value>)",
|
|
37
|
+
"red-active": "hsl(var(--color-red-active) / <alpha-value>)",
|
|
38
|
+
orange: "hsl(var(--color-orange) / <alpha-value>)",
|
|
39
|
+
"orange-active": "hsl(var(--color-orange-active) / <alpha-value>)"
|
|
40
|
+
};
|
|
41
|
+
export {
|
|
42
|
+
a as COLORS
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=colors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colors.js","sources":["../../lib/tailwind/colors.ts"],"sourcesContent":["export const COLORS = {\n current: 'currentColor',\n transparent: 'transparent',\n inherit: 'inherit',\n\n /* BRAND */\n black: 'hsl(var(--color-black) / <alpha-value>)',\n 'black-active': 'hsl(var(--color-black-active) / <alpha-value>)',\n ultramarine: 'hsl(var(--color-ultramarine) / <alpha-value>)',\n 'ultramarine-active': 'hsl(var(--color-ultramarine-active) / <alpha-value>)',\n lavender: 'hsl(var(--color-lavender) / <alpha-value>)',\n 'lavender-active': 'hsl(var(--color-lavender-active) / <alpha-value>)',\n verdigris: 'hsl(var(--color-verdigris) / <alpha-value>)',\n 'verdigris-active': 'hsl(var(--color-verdigris-active) / <alpha-value>)',\n sand: 'hsl(var(--color-sand) / <alpha-value>)',\n 'sand-active': 'hsl(var(--color-sand-active) / <alpha-value>)',\n lightSand: 'hsl(var(--color-lightSand) / <alpha-value>)',\n 'lightSand-active': 'hsl(var(--color-lightSand-active) / <alpha-value>)',\n saffron: 'hsl(var(--color-saffron) / <alpha-value>)',\n 'saffron-active': 'hsl(var(--color-saffron-active) / <alpha-value>)',\n sienna: 'hsl(var(--color-sienna) / <alpha-value>)',\n 'sienna-active': 'hsl(var(--color-sienna-active) / <alpha-value>)',\n wave: 'hsl(var(--color-wave) / <alpha-value>)',\n 'wave-active': 'hsl(var(--color-wave-active) / <alpha-value>)',\n marygold: 'hsl(var(--color-marygold) / <alpha-value>)',\n 'marygold-active': 'hsl(var(--color-marygold-active) / <alpha-value>)',\n white: 'hsl(var(--color-white) / <alpha-value>)',\n 'white-active': 'hsl(var(--color-white-active) / <alpha-value>)',\n\n /* LAYOUT */\n darkGrey: 'hsl(var(--color-darkGrey) / <alpha-value>)',\n middleGrey: 'hsl(var(--color-middleGrey) / <alpha-value>)',\n grey: 'hsl(var(--color-grey) / <alpha-value>)',\n lightGrey: 'hsl(var(--color-lightGrey) / <alpha-value>)',\n pearl: 'hsl(var(--color-pearl) / <alpha-value>)',\n green: 'hsl(var(--color-green) / <alpha-value>)',\n 'green-active': 'hsl(var(--color-green-active) / <alpha-value>)',\n red: 'hsl(var(--color-red) / <alpha-value>)',\n 'red-active': 'hsl(var(--color-red-active) / <alpha-value>)',\n orange: 'hsl(var(--color-orange) / <alpha-value>)',\n 'orange-active': 'hsl(var(--color-orange-active) / <alpha-value>)',\n};\n"],"names":["COLORS"],"mappings":"AAAO,MAAMA,IAAS;AAAA,EACpB,SAAS;AAAA,EACT,aAAa;AAAA,EACb,SAAS;AAAA;AAAA,EAGT,OAAO;AAAA,EACP,gBAAgB;AAAA,EAChB,aAAa;AAAA,EACb,sBAAsB;AAAA,EACtB,UAAU;AAAA,EACV,mBAAmB;AAAA,EACnB,WAAW;AAAA,EACX,oBAAoB;AAAA,EACpB,MAAM;AAAA,EACN,eAAe;AAAA,EACf,WAAW;AAAA,EACX,oBAAoB;AAAA,EACpB,SAAS;AAAA,EACT,kBAAkB;AAAA,EAClB,QAAQ;AAAA,EACR,iBAAiB;AAAA,EACjB,MAAM;AAAA,EACN,eAAe;AAAA,EACf,UAAU;AAAA,EACV,mBAAmB;AAAA,EACnB,OAAO;AAAA,EACP,gBAAgB;AAAA;AAAA,EAGhB,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,MAAM;AAAA,EACN,WAAW;AAAA,EACX,OAAO;AAAA,EACP,OAAO;AAAA,EACP,gBAAgB;AAAA,EAChB,KAAK;AAAA,EACL,cAAc;AAAA,EACd,QAAQ;AAAA,EACR,iBAAiB;AACnB;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { p as o } from "../../chunks/plugin.js";
|
|
2
|
+
const e = o(({ matchUtilities: a, theme: i }) => {
|
|
3
|
+
a(
|
|
4
|
+
{
|
|
5
|
+
"animation-delay": (n) => ({
|
|
6
|
+
animationDelay: n
|
|
7
|
+
})
|
|
8
|
+
},
|
|
9
|
+
{ values: i("animationDelay") }
|
|
10
|
+
);
|
|
11
|
+
});
|
|
12
|
+
export {
|
|
13
|
+
e as animationDelay
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=animationDelay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"animationDelay.js","sources":["../../../lib/tailwind/plugins/animationDelay.ts"],"sourcesContent":["import plugin from 'tailwindcss/plugin';\n\nexport const animationDelay = plugin(({ matchUtilities, theme }) => {\n matchUtilities(\n {\n 'animation-delay': (value) => ({\n animationDelay: value,\n }),\n },\n { values: theme('animationDelay') },\n );\n});\n"],"names":["animationDelay","plugin","matchUtilities","theme","value"],"mappings":";AAEO,MAAMA,IAAiBC,EAAO,CAAC,EAAE,gBAAAC,GAAgB,OAAAC,QAAY;AAClE,EAAAD;AAAA,IACE;AAAA,MACE,mBAAmB,CAACE,OAAW;AAAA,QAC7B,gBAAgBA;AAAA,MAAA;AAAA,IAEpB;AAAA,IACA,EAAE,QAAQD,EAAM,gBAAgB,EAAE;AAAA,EAAA;AAEtC,CAAC;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { p as e } from "../../chunks/plugin.js";
|
|
2
|
+
const i = e(({ addVariant: o }) => {
|
|
3
|
+
o("hocus", [
|
|
4
|
+
"@media (hover:hover) and (pointer: fine) { &:hover }",
|
|
5
|
+
"@media (hover:hover) and (pointer: fine) { &:focus }"
|
|
6
|
+
]);
|
|
7
|
+
});
|
|
8
|
+
export {
|
|
9
|
+
i as hocus
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=hocus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hocus.js","sources":["../../../lib/tailwind/plugins/hocus.ts"],"sourcesContent":["import plugin from 'tailwindcss/plugin';\n\nexport const hocus = plugin(({ addVariant }) => {\n addVariant('hocus', [\n '@media (hover:hover) and (pointer: fine) { &:hover }',\n '@media (hover:hover) and (pointer: fine) { &:focus }',\n ]);\n});\n"],"names":["hocus","plugin","addVariant"],"mappings":";AAEO,MAAMA,IAAQC,EAAO,CAAC,EAAE,YAAAC,QAAiB;AAC9C,EAAAA,EAAW,SAAS;AAAA,IAClB;AAAA,IACA;AAAA,EAAA,CACD;AACH,CAAC;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { p as a } from "../../chunks/plugin.js";
|
|
2
|
+
const n = 7, p = a(({ addUtilities: t }) => {
|
|
3
|
+
const l = {};
|
|
4
|
+
for (let i = 1; i <= n; i++)
|
|
5
|
+
l[`.line-clamp-${i}`] = {
|
|
6
|
+
maxHeight: `${i}lh`
|
|
7
|
+
};
|
|
8
|
+
t(l);
|
|
9
|
+
});
|
|
10
|
+
export {
|
|
11
|
+
p as lineClampSafariFix
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=lineClampFix.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lineClampFix.js","sources":["../../../lib/tailwind/plugins/lineClampFix.ts"],"sourcesContent":["import plugin from 'tailwindcss/plugin';\nimport type { CSSRuleObject } from 'tailwindcss/types/config';\n\nconst MAX_LINE_CLAMP = 7;\n\nexport const lineClampSafariFix = plugin(({ addUtilities }) => {\n const lineclampUtility: CSSRuleObject = {};\n\n // Generate dynamic classes for line clamp\n for (let i = 1; i <= MAX_LINE_CLAMP; i++) {\n lineclampUtility[`.line-clamp-${i}`] = {\n maxHeight: `${i}lh`,\n };\n }\n\n addUtilities(lineclampUtility);\n});\n"],"names":["MAX_LINE_CLAMP","lineClampSafariFix","plugin","addUtilities","lineclampUtility"],"mappings":";AAGA,MAAMA,IAAiB,GAEVC,IAAqBC,EAAO,CAAC,EAAE,cAAAC,QAAmB;AAC7D,QAAMC,IAAkC,CAAA;AAGxC,WAAS,IAAI,GAAG,KAAKJ,GAAgB;AAClB,IAAAI,EAAA,eAAe,CAAC,EAAE,IAAI;AAAA,MACrC,WAAW,GAAG,CAAC;AAAA,IAAA;AAInB,EAAAD,EAAaC,CAAgB;AAC/B,CAAC;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.js","sources":["../../../lib/tailwind/plugins/popover.ts"],"sourcesContent":["import plugin from 'tailwindcss/plugin';\n\nexport const popover = plugin(({ addVariant }) => {\n addVariant('open', '&:popover-open');\n});\n"],"names":["popover","plugin","addVariant"],"mappings":";AAEO,MAAMA,IAAUC,EAAO,CAAC,EAAE,YAAAC,QAAiB;AAChD,EAAAA,EAAW,QAAQ,gBAAgB;AACrC,CAAC;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"startingStyle.js","sources":["../../../lib/tailwind/plugins/startingStyle.ts"],"sourcesContent":["import plugin from 'tailwindcss/plugin';\n\nexport const startingStyle = plugin(({ addVariant }) => {\n addVariant('starting', '@starting-style');\n});\n"],"names":["startingStyle","plugin","addVariant"],"mappings":";AAEO,MAAMA,IAAgBC,EAAO,CAAC,EAAE,YAAAC,QAAiB;AACtD,EAAAA,EAAW,YAAY,iBAAiB;AAC1C,CAAC;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { p as o } from "../../chunks/plugin.js";
|
|
2
|
+
const t = o(({ addUtilities: i }) => {
|
|
3
|
+
i({
|
|
4
|
+
".transition-discrete": { transitionBehavior: "allow-discrete" },
|
|
5
|
+
".transition-normal": { transitionBehavior: "normal" }
|
|
6
|
+
});
|
|
7
|
+
});
|
|
8
|
+
export {
|
|
9
|
+
t as transitionBehavior
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=transitionBehavior.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transitionBehavior.js","sources":["../../../lib/tailwind/plugins/transitionBehavior.ts"],"sourcesContent":["import plugin from 'tailwindcss/plugin';\n\nexport const transitionBehavior = plugin(({ addUtilities }) => {\n addUtilities({\n '.transition-discrete': { transitionBehavior: 'allow-discrete' },\n '.transition-normal': { transitionBehavior: 'normal' },\n });\n});\n"],"names":["transitionBehavior","plugin","addUtilities"],"mappings":";AAEO,MAAMA,IAAqBC,EAAO,CAAC,EAAE,cAAAC,QAAmB;AAChD,EAAAA,EAAA;AAAA,IACX,wBAAwB,EAAE,oBAAoB,iBAAiB;AAAA,IAC/D,sBAAsB,EAAE,oBAAoB,SAAS;AAAA,EAAA,CACtD;AACH,CAAC;"}
|