@bison-lab/tailwind-preset 0.3.0 → 0.4.0
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/index.d.mts.map +1 -1
- package/dist/index.mjs +23 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;cA6BM,WAAA,EAAa,OAAA,CAAQ,MAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,28 @@
|
|
|
1
|
+
import plugin from "tailwindcss/plugin";
|
|
1
2
|
import animatePlugin from "tailwindcss-animate";
|
|
2
3
|
//#region src/index.ts
|
|
4
|
+
const bisonBasePlugin = plugin(function({ addBase }) {
|
|
5
|
+
addBase({
|
|
6
|
+
"*, *::before, *::after": { borderColor: "hsl(var(--border))" },
|
|
7
|
+
body: {
|
|
8
|
+
backgroundColor: "hsl(var(--background))",
|
|
9
|
+
color: "hsl(var(--foreground))",
|
|
10
|
+
fontFamily: "var(--font-body, ui-sans-serif, system-ui, sans-serif)"
|
|
11
|
+
},
|
|
12
|
+
":focus-visible": {
|
|
13
|
+
outline: "2px solid hsl(var(--ring))",
|
|
14
|
+
outlineOffset: "2px"
|
|
15
|
+
},
|
|
16
|
+
"@media (prefers-reduced-motion: reduce)": { "*, *::before, *::after": {
|
|
17
|
+
animationDuration: "0.01ms !important",
|
|
18
|
+
animationIterationCount: "1 !important",
|
|
19
|
+
transitionDuration: "0.01ms !important",
|
|
20
|
+
scrollBehavior: "auto !important"
|
|
21
|
+
} }
|
|
22
|
+
});
|
|
23
|
+
});
|
|
3
24
|
const bisonPreset = {
|
|
4
|
-
darkMode: "
|
|
25
|
+
darkMode: ["selector", "[data-theme=\"dark\"]"],
|
|
5
26
|
theme: { extend: {
|
|
6
27
|
colors: {
|
|
7
28
|
border: "hsl(var(--border))",
|
|
@@ -116,7 +137,7 @@ const bisonPreset = {
|
|
|
116
137
|
"accordion-up": "accordion-up var(--duration-normal) var(--ease-out)"
|
|
117
138
|
}
|
|
118
139
|
} },
|
|
119
|
-
plugins: [animatePlugin]
|
|
140
|
+
plugins: [bisonBasePlugin, animatePlugin]
|
|
120
141
|
};
|
|
121
142
|
//#endregion
|
|
122
143
|
export { bisonPreset as default };
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import type { Config } from \"tailwindcss\";\nimport animatePlugin from \"tailwindcss-animate\";\n\nconst bisonPreset: Partial<Config> = {\n darkMode: \"
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import type { Config } from \"tailwindcss\";\nimport plugin from \"tailwindcss/plugin\";\nimport animatePlugin from \"tailwindcss-animate\";\n\nconst bisonBasePlugin = plugin(function ({ addBase }) {\n addBase({\n \"*, *::before, *::after\": {\n borderColor: \"hsl(var(--border))\",\n },\n body: {\n backgroundColor: \"hsl(var(--background))\",\n color: \"hsl(var(--foreground))\",\n fontFamily: \"var(--font-body, ui-sans-serif, system-ui, sans-serif)\",\n },\n \":focus-visible\": {\n outline: \"2px solid hsl(var(--ring))\",\n outlineOffset: \"2px\",\n },\n \"@media (prefers-reduced-motion: reduce)\": {\n \"*, *::before, *::after\": {\n animationDuration: \"0.01ms !important\",\n animationIterationCount: \"1 !important\",\n transitionDuration: \"0.01ms !important\",\n scrollBehavior: \"auto !important\",\n },\n },\n });\n});\n\nconst bisonPreset: Partial<Config> = {\n darkMode: [\"selector\", '[data-theme=\"dark\"]'],\n theme: {\n extend: {\n colors: {\n border: \"hsl(var(--border))\",\n input: \"hsl(var(--input))\",\n ring: \"hsl(var(--ring))\",\n background: \"hsl(var(--background))\",\n foreground: \"hsl(var(--foreground))\",\n primary: {\n DEFAULT: \"hsl(var(--primary))\",\n foreground: \"hsl(var(--primary-foreground))\",\n },\n secondary: {\n DEFAULT: \"hsl(var(--secondary))\",\n foreground: \"hsl(var(--secondary-foreground))\",\n },\n highlight: {\n DEFAULT: \"hsl(var(--highlight))\",\n foreground: \"hsl(var(--highlight-foreground))\",\n },\n destructive: {\n DEFAULT: \"hsl(var(--destructive))\",\n foreground: \"hsl(var(--destructive-foreground))\",\n },\n muted: {\n DEFAULT: \"hsl(var(--muted))\",\n foreground: \"hsl(var(--muted-foreground))\",\n },\n accent: {\n DEFAULT: \"hsl(var(--accent))\",\n foreground: \"hsl(var(--accent-foreground))\",\n },\n \"brand-accent\": {\n DEFAULT: \"hsl(var(--brand-accent))\",\n foreground: \"hsl(var(--brand-accent-foreground))\",\n },\n popover: {\n DEFAULT: \"hsl(var(--popover))\",\n foreground: \"hsl(var(--popover-foreground))\",\n },\n card: {\n DEFAULT: \"hsl(var(--card))\",\n foreground: \"hsl(var(--card-foreground))\",\n },\n },\n borderRadius: {\n lg: \"var(--radius-lg)\",\n md: \"var(--radius-md)\",\n sm: \"var(--radius-sm)\",\n xl: \"var(--radius-xl)\",\n full: \"var(--radius-full)\",\n },\n boxShadow: {\n sm: \"var(--shadow-sm)\",\n DEFAULT: \"var(--shadow)\",\n md: \"var(--shadow-md)\",\n lg: \"var(--shadow-lg)\",\n xl: \"var(--shadow-xl)\",\n },\n transitionDuration: {\n fast: \"var(--duration-fast)\",\n normal: \"var(--duration-normal)\",\n slow: \"var(--duration-slow)\",\n },\n transitionTimingFunction: {\n default: \"var(--ease-default)\",\n in: \"var(--ease-in)\",\n out: \"var(--ease-out)\",\n \"in-out\": \"var(--ease-in-out)\",\n },\n zIndex: {\n dropdown: \"var(--z-dropdown)\",\n sticky: \"var(--z-sticky)\",\n fixed: \"var(--z-fixed)\",\n \"modal-backdrop\": \"var(--z-modal-backdrop)\",\n modal: \"var(--z-modal)\",\n popover: \"var(--z-popover)\",\n tooltip: \"var(--z-tooltip)\",\n toast: \"var(--z-toast)\",\n },\n fontFamily: {\n body: \"var(--font-body)\",\n heading: \"var(--font-heading)\",\n },\n fontSize: {\n xs: [\"0.75rem\", { lineHeight: \"1rem\" }],\n sm: [\"0.875rem\", { lineHeight: \"1.25rem\" }],\n base: [\"1rem\", { lineHeight: \"1.5rem\" }],\n lg: [\"1.125rem\", { lineHeight: \"1.75rem\" }],\n xl: [\"1.25rem\", { lineHeight: \"1.75rem\" }],\n \"2xl\": [\"1.5rem\", { lineHeight: \"2rem\" }],\n \"3xl\": [\"1.875rem\", { lineHeight: \"2.25rem\" }],\n \"4xl\": [\"2.25rem\", { lineHeight: \"2.5rem\" }],\n },\n fontWeight: {\n normal: \"var(--font-weight-normal)\",\n medium: \"var(--font-weight-medium)\",\n semibold: \"var(--font-weight-semibold)\",\n bold: \"var(--font-weight-bold)\",\n },\n keyframes: {\n \"accordion-down\": {\n from: { height: \"0\" },\n to: { height: \"var(--radix-accordion-content-height)\" },\n },\n \"accordion-up\": {\n from: { height: \"var(--radix-accordion-content-height)\" },\n to: { height: \"0\" },\n },\n },\n animation: {\n \"accordion-down\": \"accordion-down var(--duration-normal) var(--ease-out)\",\n \"accordion-up\": \"accordion-up var(--duration-normal) var(--ease-out)\",\n },\n },\n },\n plugins: [bisonBasePlugin, animatePlugin],\n};\n\nexport default bisonPreset;\n"],"mappings":";;;AAIA,MAAM,kBAAkB,OAAO,SAAU,EAAE,WAAW;AACpD,SAAQ;EACN,0BAA0B,EACxB,aAAa,sBACd;EACD,MAAM;GACJ,iBAAiB;GACjB,OAAO;GACP,YAAY;GACb;EACD,kBAAkB;GAChB,SAAS;GACT,eAAe;GAChB;EACD,2CAA2C,EACzC,0BAA0B;GACxB,mBAAmB;GACnB,yBAAyB;GACzB,oBAAoB;GACpB,gBAAgB;GACjB,EACF;EACF,CAAC;EACF;AAEF,MAAM,cAA+B;CACnC,UAAU,CAAC,YAAY,wBAAsB;CAC7C,OA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