@infonomic/uikit 5.2.1 → 5.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.
Files changed (68) hide show
  1. package/dist/astro.d.ts +45 -0
  2. package/dist/astro.js +45 -0
  3. package/dist/components/accordion/accordion.module.css +60 -0
  4. package/dist/components/avatar/avatar.module.css +54 -0
  5. package/dist/components/badge/badge.module.css +61 -0
  6. package/dist/components/button/button-group.module.css +19 -0
  7. package/dist/components/button/button.astro +86 -0
  8. package/dist/components/button/button.module.css +431 -0
  9. package/dist/components/button/control-buttons.module.css +132 -0
  10. package/dist/components/button/copy-button.module.css +56 -0
  11. package/dist/components/button/icon-button.astro +47 -0
  12. package/dist/components/card/card-content.astro +14 -0
  13. package/dist/components/card/card-description.astro +14 -0
  14. package/dist/components/card/card-footer.astro +14 -0
  15. package/dist/components/card/card-header.astro +14 -0
  16. package/dist/components/card/card-title.astro +14 -0
  17. package/dist/components/card/card.astro +41 -0
  18. package/dist/components/card/card.module.css +77 -0
  19. package/dist/components/container/container.astro +13 -0
  20. package/dist/components/container/container.module.css +36 -0
  21. package/dist/components/dropdown/dropdown.module.css +120 -0
  22. package/dist/components/forms/calendar.module.css +269 -0
  23. package/dist/components/forms/checkbox.module.css +211 -0
  24. package/dist/components/forms/error-text.astro +14 -0
  25. package/dist/components/forms/error-text.module.css +9 -0
  26. package/dist/components/forms/help-text.astro +13 -0
  27. package/dist/components/forms/help-text.module.css +9 -0
  28. package/dist/components/forms/input-adornment.astro +26 -0
  29. package/dist/components/forms/input-adornment.module.css +21 -0
  30. package/dist/components/forms/input.astro +99 -0
  31. package/dist/components/forms/input.module.css +278 -0
  32. package/dist/components/forms/label.astro +24 -0
  33. package/dist/components/forms/label.module.css +15 -0
  34. package/dist/components/forms/radio-group.module.css +163 -0
  35. package/dist/components/forms/select.module.css +68 -0
  36. package/dist/components/forms/text-area.module.css +10 -0
  37. package/dist/components/hamburger/hamburger.astro +30 -0
  38. package/dist/components/notifications/alert.module.css +110 -0
  39. package/dist/components/notifications/toast.module.css +237 -0
  40. package/dist/components/overlay/overlay.module.css +41 -0
  41. package/dist/components/pager/pagination.module.css +149 -0
  42. package/dist/components/scroll-area/scroll-area.module.css +64 -0
  43. package/dist/components/scroll-to-top/scroll-to-top.astro +75 -0
  44. package/dist/components/scroll-to-top/scroll-to-top.d.ts +12 -7
  45. package/dist/components/scroll-to-top/scroll-to-top.d.ts.map +1 -1
  46. package/dist/components/scroll-to-top/scroll-to-top.js +24 -14
  47. package/dist/components/scroll-to-top/scroll-to-top.module.css +86 -0
  48. package/dist/components/section/section.astro +13 -0
  49. package/dist/components/section/section.module.css +9 -0
  50. package/dist/components/shimmer/shimmer.module.css +53 -0
  51. package/dist/components/table/table.module.css +100 -0
  52. package/dist/components/tabs/tabs.module.css +66 -0
  53. package/dist/components/tooltip/tooltip.module.css +45 -0
  54. package/dist/icons/close-icon.astro +38 -0
  55. package/dist/icons/icon-element.astro +27 -0
  56. package/dist/icons/icons.module.css +155 -0
  57. package/dist/icons/light-icon.astro +36 -0
  58. package/dist/icons/moon-icon.astro +38 -0
  59. package/dist/icons/search-icon.astro +40 -0
  60. package/dist/widgets/datepicker/datepicker.module.css +189 -0
  61. package/dist/widgets/drawer/drawer.module.css +112 -0
  62. package/dist/widgets/modal/modal.module.css +81 -0
  63. package/dist/widgets/timeline/timeline.module.css +87 -0
  64. package/package.json +5 -4
  65. package/src/astro.d.ts +2 -0
  66. package/src/astro.js +3 -0
  67. package/src/components/scroll-to-top/scroll-to-top.astro +75 -0
  68. package/src/components/scroll-to-top/scroll-to-top.tsx +52 -33
@@ -0,0 +1,149 @@
1
+ @layer infonomic-base, infonomic-functional, infonomic-utilities, infonomic-theme, infonomic-typography, infonomic-components;
2
+
3
+ @layer infonomic-components {
4
+ .pagination-root {
5
+ display: flex;
6
+ padding: 0;
7
+ align-items: center;
8
+ }
9
+
10
+ .pagination-items {
11
+ display: flex;
12
+ align-items: center;
13
+ list-style: none;
14
+ }
15
+
16
+ .pagination-items {
17
+ display: flex;
18
+ align-items: center;
19
+ list-style: none;
20
+ }
21
+
22
+ .pagination-items.dashboard li,
23
+ .pagination-items.default li {
24
+ margin-right: -1px;
25
+ }
26
+
27
+ .pagination-items.classic li {
28
+ margin-right: 0;
29
+ }
30
+
31
+ .pagination-items.classic {
32
+ gap: 6px;
33
+ }
34
+
35
+ .number-button.dashboard.rounded-left,
36
+ .number-button.default.rounded-left,
37
+ .first-button.dashboard.rounded-left,
38
+ .first-button.default.rounded-left,
39
+ .previous-button.dashboard.rounded-left,
40
+ .previous-button.default.rounded-left,
41
+ .last-button.dashboard.rounded-left,
42
+ .last-button.default.rounded-left,
43
+ .next-button.dashboard.rounded-left,
44
+ .next-button.default.rounded-left {
45
+ border-top-left-radius: var(--border-radius-sm);
46
+ border-bottom-left-radius: var(--border-radius-sm);
47
+ }
48
+
49
+ .number-button.dashboard.rounded-right,
50
+ .number-button.default.rounded-right,
51
+ .first-button.dashboard.rounded-right,
52
+ .first-button.default.rounded-right,
53
+ .previous-button.dashboard.rounded-right,
54
+ .previous-button.default.rounded-right,
55
+ .last-button.dashboard.rounded-right,
56
+ .last-button.default.rounded-right,
57
+ .next-button.dashboard.rounded-right,
58
+ .next-button.default.rounded-right {
59
+ border-top-right-radius: var(--border-radius-sm);
60
+ border-bottom-right-radius: var(--border-radius-sm);
61
+ }
62
+
63
+ .ellipses,
64
+ .last-button,
65
+ .next-button,
66
+ .previous-button,
67
+ .first-button,
68
+ .number-button {
69
+ margin-left: 0;
70
+ display: flex;
71
+ align-items: center;
72
+ justify-content: center;
73
+ height: 32px;
74
+ line-height: 1;
75
+ border: 1px solid var(--stroke-primary);
76
+ background-color: var(--background);
77
+ color: var(--foreground);
78
+ font-size: var(--font-size-sm);
79
+ }
80
+
81
+
82
+ .previous-button,
83
+ .last-button,
84
+ .next-button,
85
+ .first-button {
86
+ width: 38px;
87
+ }
88
+
89
+ .ellipses,
90
+ .number-button {
91
+ min-width: 42px;
92
+ }
93
+
94
+ .last-button:hover,
95
+ .next-button:hover,
96
+ .number-button:hover,
97
+ .previous-button:hover,
98
+ .first-button:hover {
99
+ color: var(--text-on-primary);
100
+ background-color: var(--fill-primary-strong);
101
+ }
102
+
103
+ .last-button:disabled,
104
+ .last-button[disabled],
105
+ .next-button:disabled,
106
+ .next-button[disabled],
107
+ .number-button:disabled,
108
+ .number-button[disabled],
109
+ .previous-button:disabled,
110
+ .previous-button[disabled],
111
+ .first-button:disabled,
112
+ .first-button[disabled] {
113
+ cursor: default;
114
+ }
115
+
116
+ .number-button.active {
117
+ color: var(--text-on-primary);
118
+ background-color: var(--fill-primary-strong);
119
+ }
120
+
121
+
122
+ /* Opinionated mobile */
123
+ .mobile-toggle {
124
+ display: none;
125
+ }
126
+
127
+ @media(min-width: 40rem) {
128
+
129
+ .mobile-toggle {
130
+ display: flex;
131
+ }
132
+ }
133
+
134
+ /* 🌙 Dark via `.dark` class. We rely on the
135
+ * consuming application to detect a user's preferred
136
+ * color scheme - either by header or cookie, and set
137
+ * a root html class accordingly
138
+ */
139
+ :global(.dark) {
140
+ .ellipses,
141
+ .number-button,
142
+ .next-button,
143
+ .last-button,
144
+ .previous-button,
145
+ .first-button {
146
+ border-color: var(--canvas-700);
147
+ }
148
+ }
149
+ }
@@ -0,0 +1,64 @@
1
+ @layer infonomic-base, infonomic-functional, infonomic-utilities, infonomic-theme, infonomic-typography, infonomic-components;
2
+
3
+ @layer infonomic-components {
4
+ .root {
5
+ border-radius: 4px;
6
+ overflow: hidden;
7
+ background-color: inherit;
8
+ --scrollbar-size: 10px;
9
+ }
10
+
11
+ .viewport {
12
+ width: 100%;
13
+ height: 100%;
14
+ border-radius: inherit;
15
+ }
16
+
17
+ .scrollbar {
18
+ display: flex;
19
+ /* ensures no selection */
20
+ user-select: none;
21
+ /* disable browser handling of all panning and zooming gestures on touch devices */
22
+ touch-action: none;
23
+ padding: 2px;
24
+ background: var(--surface-panel-scrollbar);
25
+ transition: background 160ms ease-out;
26
+
27
+ &:hover {
28
+ background: var(--surface-panel-scrollbar);
29
+ }
30
+
31
+ &[data-orientation="vertical"] {
32
+ width: var(--scrollbar-size);
33
+ }
34
+
35
+ &[data-orientation="horizontal"] {
36
+ flex-direction: column;
37
+ height: var(--scrollbar-size);
38
+ }
39
+ }
40
+
41
+ .thumb {
42
+ flex: 1;
43
+ background: var(--surface-panel-scrollbar-thumb);
44
+ border-radius: var(--border-radius-sm);
45
+ position: relative;
46
+
47
+ /* increase target size for touch devices https://www.w3.org/WAI/WCAG21/Understanding/target-size.html */
48
+ &::before {
49
+ content: "";
50
+ position: absolute;
51
+ top: 50%;
52
+ left: 50%;
53
+ transform: translate(-50%, -50%);
54
+ width: 100%;
55
+ height: 100%;
56
+ min-width: 44px;
57
+ min-height: 44px;
58
+ }
59
+ }
60
+
61
+ .corner {
62
+ background: var(--surface-panel-scrollbar);
63
+ }
64
+ }
@@ -0,0 +1,75 @@
1
+ ---
2
+ import styles from './scroll-to-top.module.css'
3
+
4
+ interface Props {
5
+ class?: string
6
+ showAt?: number
7
+ offset?: number
8
+ 'aria-label'?: string
9
+ [key: string]: any
10
+ }
11
+
12
+ const {
13
+ class: className,
14
+ showAt = 200,
15
+ offset = -65,
16
+ 'aria-label': ariaLabel = 'Scroll to top',
17
+ ...rest
18
+ } = Astro.props
19
+ ---
20
+
21
+ <button
22
+ type="button"
23
+ aria-label={ariaLabel}
24
+ class:list={['scroll-to-top', styles['scroll-to-top'], className]}
25
+ data-show-at={showAt}
26
+ data-offset={offset}
27
+ data-class-shown={styles['scroll-to-top-shown']}
28
+ {...rest}
29
+ >
30
+ <span aria-hidden="true">
31
+ <svg class="icon" style="fill: currentColor" focusable="false" viewBox="0 0 51 32">
32
+ <path d="M25.4,9.8L45.6,30l4.5-4.5L25.4,0.8L0.8,25.4L5.3,30L25.4,9.8z"></path>
33
+ </svg>
34
+ </span>
35
+ </button>
36
+
37
+ <script>
38
+ const buttons = document.querySelectorAll('button.scroll-to-top')
39
+
40
+ buttons.forEach((button) => {
41
+ if (!(button instanceof HTMLElement)) return
42
+
43
+ const showAt = Number(button.dataset.showAt) || 200
44
+ const offset = Number(button.dataset.offset) || -65
45
+ const classShown = button.dataset.classShown
46
+
47
+ if (classShown == null) return
48
+
49
+ // Click Handler
50
+ button.addEventListener('click', () => {
51
+ window.scrollTo({ top: offset, left: 0, behavior: 'smooth' })
52
+ })
53
+
54
+ // Scroll Handler
55
+ let ticking = false
56
+ const handleOnScroll = () => {
57
+ if (!ticking) {
58
+ window.requestAnimationFrame(() => {
59
+ const shouldShow = window.scrollY > showAt
60
+ if (shouldShow) {
61
+ button.classList.add(classShown)
62
+ button.classList.add('scroll-to-top-shown')
63
+ } else {
64
+ button.classList.remove(classShown)
65
+ button.classList.remove('scroll-to-top-shown')
66
+ }
67
+ ticking = false
68
+ })
69
+ ticking = true
70
+ }
71
+ }
72
+
73
+ window.addEventListener('scroll', handleOnScroll, { passive: true })
74
+ })
75
+ </script>
@@ -1,10 +1,15 @@
1
- import type React from 'react';
2
- type ScrollToTopIntrinsicProps = React.JSX.IntrinsicElements['button'];
3
- interface ScrollToTopProps extends ScrollToTopIntrinsicProps {
1
+ import { type ComponentProps } from 'react';
2
+ export interface ScrollToTopProps extends ComponentProps<'button'> {
3
+ /**
4
+ * The scroll position (Y-axis) in pixels that triggers the button to appear.
5
+ * @default 200
6
+ */
7
+ showAt?: number;
8
+ /**
9
+ * The target scroll position (Y-axis) to scroll to when clicked.
10
+ * @default -65
11
+ */
4
12
  offset?: number;
5
13
  }
6
- export type { ScrollToTopProps };
7
- export declare const ScrollToTop: ({ ref, offset, ...rest }: ScrollToTopProps & {
8
- ref?: React.RefObject<HTMLButtonElement>;
9
- }) => React.JSX.Element;
14
+ export declare function ScrollToTop({ className, showAt, offset, type, 'aria-label': ariaLabel, onClick, ...props }: ScrollToTopProps): import("react").JSX.Element;
10
15
  //# sourceMappingURL=scroll-to-top.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"scroll-to-top.d.ts","sourceRoot":"","sources":["../../../src/components/scroll-to-top/scroll-to-top.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,KAAK,yBAAyB,GAAG,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAA;AACtE,UAAU,gBAAiB,SAAQ,yBAAyB;IAC1D,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,YAAY,EAAE,gBAAgB,EAAE,CAAA;AAEhC,eAAO,MAAM,WAAW,GAAwB,0BAI7C,gBAAgB,GAAG;IACpB,GAAG,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAA;CACzC,sBA2CA,CAAA"}
1
+ {"version":3,"file":"scroll-to-top.d.ts","sourceRoot":"","sources":["../../../src/components/scroll-to-top/scroll-to-top.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,cAAc,EAAuB,MAAM,OAAO,CAAA;AAIhE,MAAM,WAAW,gBAAiB,SAAQ,cAAc,CAAC,QAAQ,CAAC;IAChE;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,wBAAgB,WAAW,CAAC,EAC1B,SAAS,EACT,MAAY,EACZ,MAAY,EACZ,IAAe,EACf,YAAY,EAAE,SAA2B,EACzC,OAAO,EACP,GAAG,KAAK,EACT,EAAE,gBAAgB,+BAuDlB"}
@@ -3,43 +3,53 @@ import { jsx } from "react/jsx-runtime";
3
3
  import classnames from "classnames";
4
4
  import { useEffect, useState } from "react";
5
5
  import scroll_to_top_module from "./scroll-to-top.module.js";
6
- const scroll_to_top_ScrollToTop = function({ ref, offset = -65, ...rest }) {
6
+ function ScrollToTop({ className, showAt = 200, offset = -65, type = 'button', 'aria-label': ariaLabel = 'Scroll to top', onClick, ...props }) {
7
7
  const [show, setShow] = useState(false);
8
- const handleOnClick = ()=>{
8
+ const handleOnClick = (e)=>{
9
9
  window.scrollTo({
10
10
  top: offset,
11
11
  left: 0,
12
12
  behavior: 'smooth'
13
13
  });
14
+ onClick?.(e);
14
15
  };
15
16
  useEffect(()=>{
17
+ let ticking = false;
16
18
  const handleOnScroll = ()=>{
17
- const scrollTop = window.scrollY;
18
- scrollTop > 200 ? setShow(true) : setShow(false);
19
+ if (!ticking) {
20
+ window.requestAnimationFrame(()=>{
21
+ setShow(window.scrollY > showAt);
22
+ ticking = false;
23
+ });
24
+ ticking = true;
25
+ }
19
26
  };
20
- if ('undefined' != typeof window) window.addEventListener('scroll', handleOnScroll);
27
+ window.addEventListener('scroll', handleOnScroll, {
28
+ passive: true
29
+ });
21
30
  return ()=>{
22
31
  window.removeEventListener('scroll', handleOnScroll);
23
32
  };
24
- }, []);
33
+ }, [
34
+ showAt
35
+ ]);
25
36
  return /*#__PURE__*/ jsx("button", {
26
- ref: ref,
27
- ...rest,
37
+ type: type,
38
+ "aria-label": ariaLabel,
28
39
  onClick: handleOnClick,
29
- type: "button",
30
- id: "scroll-to-top",
31
40
  className: classnames('scroll-to-top', scroll_to_top_module["scroll-to-top"], {
32
41
  'scroll-to-top-shown': show,
33
42
  [scroll_to_top_module["scroll-to-top-shown"]]: show
34
- }),
43
+ }, className),
44
+ ...props,
35
45
  children: /*#__PURE__*/ jsx("span", {
46
+ "aria-hidden": "true",
36
47
  children: /*#__PURE__*/ jsx("svg", {
37
48
  className: "icon",
38
49
  style: {
39
50
  fill: 'currentColor'
40
51
  },
41
52
  focusable: "false",
42
- "aria-hidden": "true",
43
53
  viewBox: "0 0 51 32",
44
54
  children: /*#__PURE__*/ jsx("path", {
45
55
  d: "M25.4,9.8L45.6,30l4.5-4.5L25.4,0.8L0.8,25.4L5.3,30L25.4,9.8z"
@@ -47,5 +57,5 @@ const scroll_to_top_ScrollToTop = function({ ref, offset = -65, ...rest }) {
47
57
  })
48
58
  })
49
59
  });
50
- };
51
- export { scroll_to_top_ScrollToTop as ScrollToTop };
60
+ }
61
+ export { ScrollToTop };
@@ -0,0 +1,86 @@
1
+ @layer infonomic-base, infonomic-utilities, infonomic-theme, infonomic-typography, infonomic-components;
2
+
3
+ @layer infonomic-components {
4
+ .scroll-to-top,
5
+ :global(.scroll-to-top) {
6
+ display: flex;
7
+ position: fixed;
8
+ width: 0;
9
+ height: 0;
10
+ opacity: 0;
11
+ visibility: hidden;
12
+ align-items: center;
13
+ text-decoration: none;
14
+ border-style: none;
15
+ padding: 0;
16
+ margin: 0;
17
+ outline: none;
18
+ z-index: 20;
19
+ justify-content: center;
20
+ bottom: 45px;
21
+ right: 30px;
22
+ color: var(--text-on-primary);
23
+ background-color: var(--fill-primary-strong);
24
+ transition-property: all, color;
25
+ transition-duration: 0.3s, 1ms;
26
+ transition-timing-function: cubic-bezier(0.25, 0.8, 0.5, 1), ease;
27
+ transition-delay: 0s, 0s;
28
+ cursor: pointer;
29
+ }
30
+
31
+ .scroll-to-top span,
32
+ :global(.scroll-to-top span) {
33
+ width: 18px;
34
+ padding-bottom: 3px;
35
+ }
36
+
37
+ .scroll-to-top span svg path,
38
+ :global(.scroll-to-top span svg path) {
39
+ stroke: none;
40
+ fill: var(--text-on-primary);
41
+ }
42
+
43
+ .scroll-to-top:hover,
44
+ .scroll-to-top:focus,
45
+ :global(.scroll-to-top:hover),
46
+ :global(.scroll-to-top:focus) {
47
+ color: var(--text-on-primary);
48
+ background-color: var(--fill-primary-strong-hover);
49
+ transform: translateY(-5px);
50
+ }
51
+
52
+ .scroll-to-top-shown,
53
+ :global(.scroll-to-top-shown) {
54
+ min-width: 0;
55
+ opacity: 1;
56
+ visibility: visible;
57
+ padding: 0;
58
+ width: 40px;
59
+ height: 40px;
60
+ bottom: 20px;
61
+ right: 10px;
62
+ border-radius: 20px;
63
+ }
64
+
65
+ @media screen and (min-width: 587px) {
66
+ .scroll-to-top,
67
+ :global(.scroll-to-top) {
68
+ bottom: 45px;
69
+ right: 45px;
70
+ }
71
+
72
+ .scroll-to-top span,
73
+ :global(.scroll-to-top span) {
74
+ width: 18px;
75
+ }
76
+
77
+ .scroll-to-top-shown,
78
+ :global(.scroll-to-top-shown) {
79
+ width: 42px;
80
+ height: 42px;
81
+ border-radius: 21px;
82
+ bottom: 22px;
83
+ right: 22px;
84
+ }
85
+ }
86
+ }
@@ -0,0 +1,13 @@
1
+ ---
2
+ interface Props {
3
+ class?: string
4
+ }
5
+
6
+ import styles from './section.module.css'
7
+
8
+ const { class: className, ...rest } = Astro.props as Props
9
+ ---
10
+
11
+ <section class:list={[styles.section, className]} {...rest}>
12
+ <slot />
13
+ </section>
@@ -0,0 +1,9 @@
1
+ @layer infonomic-base, infonomic-functional, infonomic-utilities, infonomic-theme, infonomic-typography, infonomic-components;
2
+
3
+ @layer infonomic-components {
4
+ .section,
5
+ :global(.section) {
6
+ width: 100%;
7
+ position: relative;
8
+ }
9
+ }
@@ -0,0 +1,53 @@
1
+ @layer infonomic-base, infonomic-functional, infonomic-utilities, infonomic-theme, infonomic-typography, infonomic-components;
2
+
3
+ /* 'border-collapse w-full text-sm text-left text-gray-700 dark:text-gray-400 m-0', */
4
+ @layer infonomic-components {
5
+ .shimmer {
6
+ position: relative;
7
+ overflow: hidden;
8
+ background-color: #f0f0f0;
9
+ background-image: linear-gradient(90deg,
10
+ transparent,
11
+ rgba(255, 255, 255, 0.6),
12
+ transparent);
13
+ background-size: 200% 100%;
14
+ animation: shimmer 1.5s infinite;
15
+ }
16
+
17
+ .shimmer:is(:global(.dark) *) {
18
+ background-color: #141414;
19
+ background-image: linear-gradient(90deg,
20
+ transparent,
21
+ rgba(255, 255, 255, 0.01),
22
+ transparent);
23
+ }
24
+
25
+ .shimmerContainer {
26
+ display: flex;
27
+ flex-direction: column;
28
+ }
29
+
30
+ .rectangular {
31
+ border-radius: 0.25rem;
32
+ }
33
+
34
+ .text {
35
+ border-radius: 0.125rem;
36
+ height: 1rem;
37
+ }
38
+
39
+ .circular {
40
+ border-radius: 50%;
41
+ aspect-ratio: 1;
42
+ }
43
+
44
+ @keyframes shimmer {
45
+ 0% {
46
+ background-position: -200% 0;
47
+ }
48
+
49
+ 100% {
50
+ background-position: 200% 0;
51
+ }
52
+ }
53
+ }
@@ -0,0 +1,100 @@
1
+ @layer infonomic-base, infonomic-functional, infonomic-utilities, infonomic-theme, infonomic-typography, infonomic-components;
2
+
3
+ /* 'border-collapse w-full text-sm text-left text-gray-700 dark:text-gray-400 m-0', */
4
+ @layer infonomic-components {
5
+
6
+ /* 'table--container break-normal overflow-hidden relative shadow-md rounded-md my-[16px] dark:border dark:border-canvas-700', */
7
+ .table-container {
8
+ display: block;
9
+ overflow: hidden;
10
+ word-break: normal;
11
+ position: relative;
12
+ box-shadow: var(--shadow-sm);
13
+ border-radius: var(--border-radius-sm);
14
+ border: 1px solid var(--border-color);
15
+ }
16
+
17
+ .table-scroller {
18
+ overflow-x: auto;
19
+ max-width: calc(100vw - 32px);
20
+ }
21
+
22
+ .table {
23
+ width: 100%;
24
+ border-collapse: collapse;
25
+ margin: 0;
26
+ font-size: var(--font-size-sm);
27
+ text-align: left;
28
+ }
29
+
30
+ /* 'text-xs text-gray-700 uppercase bg-canvas-100 dark:bg-canvas-700 dark:text-gray-400', */
31
+ .table-header {
32
+ font-size: var(--font-size-sm);
33
+ /* text-transform: uppercase; */
34
+ background-color: var(--canvas-50);
35
+ }
36
+
37
+ /* 'border-b border-solid border-canvas-200 bg-white hover:bg-canvas-100/50 dark:border-canvas-700/60 dark:bg-canvas-800/50 dark:hover:bg-canvas-700/50', */
38
+ .table-row {
39
+ border-bottom: 1px solid var(--canvas-50);
40
+ background-color: white;
41
+ }
42
+
43
+ .table-row:hover {
44
+ background-color: var(--canvas-50);
45
+ }
46
+
47
+ /* 'whitespace-nowrap px-2 py-4 text-sm text-gray-700 uppercase bg-canvas-100/50 dark:bg-canvas-800/50 dark:text-gray-200', */
48
+ .table-heading-cell {
49
+ white-space: nowrap;
50
+ padding: var(--spacing-8) var(--spacing-8);
51
+ font-size: 0.975rem; /* 15.6px */
52
+ /* text-transform: uppercase; */
53
+ background-color: var(--canvas-50);
54
+ }
55
+
56
+ /* not-prose px-2 py-2 text-sm [&_a]:underline */
57
+ .table-cell {
58
+ padding: var(--spacing-8);
59
+ font-size: var(--font-size-sm);
60
+
61
+ & a {
62
+ text-decoration: underline;
63
+ }
64
+ }
65
+
66
+ /* 'text-xs text-gray-700 uppercase bg-canvas-100 dark:bg-canvas-700 dark:text-gray-400', */
67
+ .table-footer {
68
+ font-size: var(--font-size-sm);
69
+ /* text-transform: uppercase; */
70
+ background-color: var(--canvas-100);
71
+ }
72
+
73
+ /* 🌙 Dark via `.dark` class. We rely on the
74
+ * consuming application to detect a user's preferred
75
+ * color scheme - either by header or cookie, and set
76
+ * a root html class accordingly
77
+ */
78
+ :global(.dark) {
79
+ .table-header {
80
+ background-color: var(--canvas-700);
81
+ }
82
+
83
+ .table-row:not(:where([class~="not-dark"], [class~="not-dark"] *)) {
84
+ border-bottom: 1px solid var(--canvas-700);
85
+ background-color: var(--canvas-800);
86
+ }
87
+
88
+ .table-row:hover:not(:where([class~="not-dark"], [class~="not-dark"] *)) {
89
+ background-color: oklch(from var(--canvas-800) calc(l * 1.1) c h)
90
+ }
91
+
92
+ .table-heading-cell:not(:where([class~="not-dark"], [class~="not-dark"] *)) {
93
+ background-color: oklch(from var(--canvas-800) calc(l * 1.1) c h);
94
+ }
95
+
96
+ .table-footer:not(:where([class~="not-dark"], [class~="not-dark"] *)) {
97
+ background-color: var(--canvas-800);
98
+ }
99
+ }
100
+ }