@nattstack/ui 0.0.3 → 0.0.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.
@@ -1,10 +1,4 @@
1
1
  :root {
2
- /* =================================================== */
3
- /* White & Black
4
- /* =================================================== */
5
- --color-white: rgba(255, 255, 255, 1);
6
- --color-black: rgba(0, 0, 0, 1);
7
-
8
2
  /* =================================================== */
9
3
  /* Gray */
10
4
  /* =================================================== */
@@ -20,7 +20,7 @@
20
20
  outline-width: 0px;
21
21
  overflow: hidden;
22
22
  transition-duration: 150ms;
23
- transition-property: background-color, box-shadow, opacity, translate;
23
+ transition-property: background-color, opacity, translate;
24
24
  user-select: none;
25
25
  }
26
26
 
@@ -105,7 +105,7 @@
105
105
  /* ===================================================== */
106
106
  /* Accent */
107
107
  .button__variant_accent {
108
- color: var(--color-white);
108
+ color: white;
109
109
  background-color: var(--color-primary-9);
110
110
  background-image: linear-gradient(
111
111
  to bottom,
@@ -130,7 +130,7 @@
130
130
 
131
131
  /* Ghost */
132
132
  .button__variant_ghost {
133
- color: var(--color-black);
133
+ color: black;
134
134
  background-color: transparent;
135
135
  }
136
136
 
@@ -141,12 +141,12 @@
141
141
  }
142
142
 
143
143
  :global(.dark) .button__variant_ghost {
144
- color: var(--color-white);
144
+ color: white;
145
145
  }
146
146
 
147
147
  /* Primary */
148
148
  .button__variant_primary {
149
- color: var(--color-white);
149
+ color: white;
150
150
  background-color: var(--color-gray-dark-1);
151
151
  background-image: linear-gradient(
152
152
  to bottom,
@@ -162,7 +162,7 @@
162
162
  }
163
163
 
164
164
  :global(.dark) .button__variant_primary {
165
- color: var(--color-black);
165
+ color: black;
166
166
  background-color: var(--color-gray-light-1);
167
167
  background-image: linear-gradient(
168
168
  to bottom,
@@ -179,7 +179,7 @@
179
179
 
180
180
  /* Secondary */
181
181
  .button__variant_secondary {
182
- color: var(--color-black);
182
+ color: black;
183
183
  background-color: var(--color-gray-2);
184
184
  background-image: linear-gradient(
185
185
  to bottom,
@@ -196,7 +196,7 @@
196
196
  }
197
197
 
198
198
  :global(.dark) .button__variant_secondary {
199
- color: var(--color-white);
199
+ color: white;
200
200
  background-image: linear-gradient(
201
201
  to bottom,
202
202
  color-mix(in oklab, transparent 100%, #ffffff 1%) 50%,
@@ -244,11 +244,12 @@ declare const TEXTAREA_CLASS_NAME: {
244
244
  };
245
245
  };
246
246
 
247
- interface TooltipProps extends Tooltip$1.Root.Props {
247
+ interface TooltipProps extends Omit<Tooltip$1.Root.Props, "disabled"> {
248
+ isDisabled?: Tooltip$1.Root.Props["disabled"];
248
249
  }
249
250
  declare function Tooltip(props: TooltipProps): JSX.Element;
250
251
 
251
- interface TooltipContentProps extends Pick<Tooltip$1.Positioner.Props, "side">, Tooltip$1.Popup.Props {
252
+ interface TooltipContentProps extends Pick<Tooltip$1.Positioner.Props, "side" | "sideOffset">, Tooltip$1.Popup.Props {
252
253
  }
253
254
  declare function TooltipContent(props: TooltipContentProps): JSX.Element;
254
255
  declare const TOOLTIP_CONTENT_CLASS_NAME: {
@@ -15,7 +15,7 @@ function normalizeWhitespace(value) {
15
15
  }
16
16
 
17
17
  // src/components/button/button.tsx
18
- import styles2 from "./button.module-EYMY7VLZ.module.css";
18
+ import styles2 from "./button.module-D3HOTJS3.module.css";
19
19
  import { jsx as jsx2, jsxs } from "react/jsx-runtime";
20
20
  function Button(props) {
21
21
  const {
@@ -354,7 +354,7 @@ var INPUT_CLASS_NAME = {
354
354
  };
355
355
 
356
356
  // src/components/label/label.tsx
357
- import styles10 from "./label.module-HUBUIUFV.module.css";
357
+ import styles10 from "./label.module-NYFSR6AT.module.css";
358
358
  import { jsx as jsx11 } from "react/jsx-runtime";
359
359
  function Label(props) {
360
360
  const { className: customClassName = "", htmlFor = void 0, children = "", ...rest } = props;
@@ -432,7 +432,7 @@ var SPACER_CLASS_NAME = {
432
432
 
433
433
  // src/components/switch/switch.tsx
434
434
  import { Switch as BaseSwitch } from "@base-ui/react";
435
- import styles13 from "./switch.module-TLJBHCSA.module.css";
435
+ import styles13 from "./switch.module-U6Q27QB5.module.css";
436
436
  import { jsx as jsx13 } from "react/jsx-runtime";
437
437
  function Switch(props) {
438
438
  const {
@@ -519,7 +519,7 @@ var TABS_PILL_LIST_CLASS_NAME = {
519
519
 
520
520
  // src/components/tabs-pill/tabs-pill-tab.tsx
521
521
  import { Tabs as BaseTabs3 } from "@base-ui/react";
522
- import styles16 from "./tabs-pill-tab.module-2F7LOGXE.module.css";
522
+ import styles16 from "./tabs-pill-tab.module-5SZMEO3Y.module.css";
523
523
  import { jsx as jsx16, jsxs as jsxs4 } from "react/jsx-runtime";
524
524
  function TabsPillTab(props) {
525
525
  const { className: customClassName = "", isNativeButton = true, ...rest } = props;
@@ -767,17 +767,16 @@ var TEXTAREA_CLASS_NAME = {
767
767
  import { Tooltip as BaseTooltip } from "@base-ui/react";
768
768
  import { jsx as jsx26 } from "react/jsx-runtime";
769
769
  function Tooltip(props) {
770
- const { ...rest } = props;
771
- return /* @__PURE__ */ jsx26(BaseTooltip.Root, { "data-slot": "tooltip", disableHoverablePopup: true, ...rest });
770
+ const { isDisabled = false, ...rest } = props;
771
+ return /* @__PURE__ */ jsx26(BaseTooltip.Root, { "data-slot": "tooltip", disabled: isDisabled, disableHoverablePopup: true, ...rest });
772
772
  }
773
773
 
774
774
  // src/components/tooltip/tooltip-content.tsx
775
775
  import { Tooltip as BaseTooltip2 } from "@base-ui/react";
776
- import styles26 from "./tooltip-content.module-5MWTMSBY.module.css";
776
+ import styles26 from "./tooltip-content.module-QGRFS5NN.module.css";
777
777
  import { jsx as jsx27, jsxs as jsxs7 } from "react/jsx-runtime";
778
778
  function TooltipContent(props) {
779
- const { children, className: customClassName = "", side = "top", ...rest } = props;
780
- const SIDE_OFFSET = 4;
779
+ const { children, className: customClassName = "", side = "top", sideOffset = 4, ...rest } = props;
781
780
  const combinedClassName = normalizeWhitespace(`
782
781
  ${TOOLTIP_CONTENT_CLASS_NAME.BASE}
783
782
  ${customClassName}
@@ -787,7 +786,7 @@ function TooltipContent(props) {
787
786
  {
788
787
  className: styles26.tooltip_content_positioner,
789
788
  side,
790
- sideOffset: SIDE_OFFSET,
789
+ sideOffset,
791
790
  children: [
792
791
  /* @__PURE__ */ jsx27(BaseTooltip2.Popup, { className: combinedClassName, "data-slot": "tooltip-content", ...rest, children }),
793
792
  /* @__PURE__ */ jsx27(BaseTooltip2.Arrow, {})
@@ -2,8 +2,8 @@
2
2
  /* Base */
3
3
  /* ===================================================== */
4
4
  .label {
5
- width: fit-content;
5
+ color: var(--color-gray-11);
6
6
  font-size: 13px;
7
7
  font-weight: 500;
8
- color: var(--color-gray-11, #646464);
8
+ width: fit-content;
9
9
  }
@@ -36,7 +36,7 @@
36
36
  .switch__thumb {
37
37
  height: 100%;
38
38
  aspect-ratio: 1 / 1;
39
- background-color: var(--color-white);
39
+ background-color: white;
40
40
  border-radius: 9999px;
41
41
  transition-duration: 150ms;
42
42
  transition-property: transform;
@@ -1,7 +1,7 @@
1
1
  .tabs_pill_tab {
2
2
  align-items: center;
3
3
  border-radius: var(--border-radius);
4
- color: var(--color-black);
4
+ color: black;
5
5
  column-gap: 8px;
6
6
  cursor: pointer;
7
7
  display: flex;
@@ -29,15 +29,15 @@
29
29
 
30
30
  .tabs_pill_tab[data-active] {
31
31
  background-color: transparent;
32
- color: var(--color-white);
32
+ color: white;
33
33
  }
34
34
 
35
35
  :global(.dark) .tabs_pill_tab {
36
- color: var(--color-white);
36
+ color: white;
37
37
  }
38
38
 
39
39
  :global(.dark) .tabs_pill_tab[data-active] {
40
- color: var(--color-black);
40
+ color: black;
41
41
  }
42
42
 
43
43
  /* Icon size */
@@ -0,0 +1,18 @@
1
+ .tooltip_content {
2
+ background-color: var(--color-gray-dark-1);
3
+ border-radius: 8px;
4
+ color: var(--color-gray-dark-12);
5
+ font-size: 13px;
6
+ font-weight: 500;
7
+ padding: 4px 8px;
8
+ }
9
+
10
+ .tooltip_content_positioner {
11
+ isolation: isolate;
12
+ z-index: 50;
13
+ }
14
+
15
+ :global(.dark) .tooltip_content {
16
+ background-color: var(--color-gray-light-1);
17
+ color: var(--color-gray-light-12);
18
+ }
@@ -2,10 +2,6 @@
2
2
  /* Reset ============================================= */
3
3
  --color-\*: initial;
4
4
 
5
- /* White & Black ===================================== */
6
- --color-white: var(--color-white);
7
- --color-black: var(--color-black);
8
-
9
5
  /* Gray ============================================== */
10
6
  --color-gray-1: var(--color-gray-1);
11
7
  --color-gray-2: var(--color-gray-2);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nattstack/ui",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "description": "A collection of reusable React components built with Base UI, TypeScript, and CSS Modules",
5
5
  "keywords": [
6
6
  "components",
@@ -1,13 +0,0 @@
1
- .tooltip_content {
2
- background-color: var(--color-gray-1);
3
- border-radius: 8px;
4
- border: 1px solid var(--color-gray-4);
5
- color: var(--color-gray-12);
6
- font-size: 14px;
7
- padding: 4px 8px;
8
- }
9
-
10
- .tooltip_content_positioner {
11
- isolation: isolate;
12
- z-index: 50;
13
- }