@okam/next-component 2.1.0 → 2.1.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.
Files changed (45) hide show
  1. package/components/AdminBar/AdminBarContent.d.ts +3 -0
  2. package/components/AdminBar/AdminBarContent.js +14 -0
  3. package/components/AdminBar/AdminBarContent.mjs +14 -0
  4. package/components/AdminBar/index.js +14 -0
  5. package/components/AdminBar/index.mjs +15 -0
  6. package/components/Filter/index.js +54 -0
  7. package/components/Filter/index.mjs +55 -0
  8. package/components/Img/index.js +29 -0
  9. package/components/Img/index.mjs +30 -0
  10. package/components/Link/index.js +40 -0
  11. package/components/Link/index.mjs +41 -0
  12. package/hooks/useFilterState/index.js +50 -0
  13. package/hooks/useFilterState/index.mjs +50 -0
  14. package/hooks/useHash/index.js +25 -0
  15. package/hooks/useHash/index.mjs +25 -0
  16. package/hooks/useLink/index.js +118 -0
  17. package/hooks/useLink/index.mjs +118 -0
  18. package/hooks/useLink/interface.d.ts +61 -1
  19. package/hooks/useLink/interface.js +8 -0
  20. package/hooks/useLink/interface.mjs +8 -0
  21. package/index.d.ts +2 -1
  22. package/index.js +20 -590
  23. package/index.mjs +17 -587
  24. package/lib/createServerContext/index.js +12 -0
  25. package/lib/createServerContext/index.mjs +12 -0
  26. package/package.json +5 -5
  27. package/providers/AdminBar/index.js +17 -0
  28. package/providers/AdminBar/index.mjs +17 -0
  29. package/{index-DV6W6v68.js → providers/DraftMode/index.js} +2 -0
  30. package/{index-Ber8Ecgv.mjs → providers/DraftMode/index.mjs} +3 -2
  31. package/providers/DraftMode/server.js +10 -0
  32. package/providers/DraftMode/server.mjs +11 -0
  33. package/server.d.ts +1 -0
  34. package/server.js +8 -30
  35. package/server.mjs +7 -29
  36. package/theme/AdminBar/index.js +120 -0
  37. package/theme/AdminBar/index.mjs +120 -0
  38. package/theme/Button/index.js +75 -0
  39. package/theme/Button/index.mjs +76 -0
  40. package/theme/Filter/index.js +72 -0
  41. package/theme/Filter/index.mjs +73 -0
  42. package/theme/Typography/index.js +43 -0
  43. package/theme/Typography/index.mjs +44 -0
  44. package/theme/index.js +16 -0
  45. package/theme/index.mjs +17 -0
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ const tailwindVariants = require("tailwind-variants");
3
+ const typography = tailwindVariants.tv({
4
+ variants: {
5
+ size: {
6
+ h1: `text-5xl`,
7
+ h2: `text-4xl`,
8
+ h3: `text-3xl`,
9
+ h4: `text-2xl`,
10
+ h5: `text-xl`,
11
+ h6: `text-lg`,
12
+ leading: `text-md font-bold leading-normal`,
13
+ paragraph: `text-md inline`,
14
+ footnotes: `text-sm`,
15
+ xs: `text-xs`
16
+ },
17
+ font: {
18
+ body: `font-body`
19
+ },
20
+ weight: {
21
+ normal: `font-normal`,
22
+ light: `font-light`,
23
+ bold: "font-bold"
24
+ },
25
+ color: {
26
+ gray: `text-gray-500`,
27
+ white: `text-white`
28
+ },
29
+ isError: {
30
+ true: "text-sm text-error py-3"
31
+ },
32
+ align: {
33
+ center: "text-center",
34
+ left: "text-left",
35
+ right: "text-right"
36
+ }
37
+ },
38
+ defaultVariants: {
39
+ size: "paragraph",
40
+ font: "body"
41
+ }
42
+ });
43
+ module.exports = typography;
@@ -0,0 +1,44 @@
1
+ import { tv } from "tailwind-variants";
2
+ const typography = tv({
3
+ variants: {
4
+ size: {
5
+ h1: `text-5xl`,
6
+ h2: `text-4xl`,
7
+ h3: `text-3xl`,
8
+ h4: `text-2xl`,
9
+ h5: `text-xl`,
10
+ h6: `text-lg`,
11
+ leading: `text-md font-bold leading-normal`,
12
+ paragraph: `text-md inline`,
13
+ footnotes: `text-sm`,
14
+ xs: `text-xs`
15
+ },
16
+ font: {
17
+ body: `font-body`
18
+ },
19
+ weight: {
20
+ normal: `font-normal`,
21
+ light: `font-light`,
22
+ bold: "font-bold"
23
+ },
24
+ color: {
25
+ gray: `text-gray-500`,
26
+ white: `text-white`
27
+ },
28
+ isError: {
29
+ true: "text-sm text-error py-3"
30
+ },
31
+ align: {
32
+ center: "text-center",
33
+ left: "text-left",
34
+ right: "text-right"
35
+ }
36
+ },
37
+ defaultVariants: {
38
+ size: "paragraph",
39
+ font: "body"
40
+ }
41
+ });
42
+ export {
43
+ typography as default
44
+ };
package/theme/index.js ADDED
@@ -0,0 +1,16 @@
1
+ "use client";
2
+ "use strict";
3
+ const stackUi = require("@okam/stack-ui");
4
+ const react = require("react");
5
+ const index$1 = require("./AdminBar/index.js");
6
+ const index$3 = require("./Button/index.js");
7
+ const index$4 = require("./Filter/index.js");
8
+ const index$2 = require("./Typography/index.js");
9
+ const BaseTheme = stackUi.makeTheme({
10
+ filter: index$4,
11
+ button: index$3,
12
+ typography: index$2,
13
+ adminBar: index$1.adminBarTheme
14
+ });
15
+ const index = react.memo(stackUi.createThemeProvider(BaseTheme));
16
+ module.exports = index;
@@ -0,0 +1,17 @@
1
+ "use client";
2
+ import { createThemeProvider, makeTheme } from "@okam/stack-ui";
3
+ import { memo } from "react";
4
+ import { adminBarTheme } from "./AdminBar/index.mjs";
5
+ import button from "./Button/index.mjs";
6
+ import filterTheme from "./Filter/index.mjs";
7
+ import typography from "./Typography/index.mjs";
8
+ const BaseTheme = makeTheme({
9
+ filter: filterTheme,
10
+ button,
11
+ typography,
12
+ adminBar: adminBarTheme
13
+ });
14
+ const index = memo(createThemeProvider(BaseTheme));
15
+ export {
16
+ index as default
17
+ };