@nattstack/ui 0.0.1 → 0.0.3

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 (57) hide show
  1. package/dist/colors/index.css +3 -0
  2. package/dist/colors/root-p3.css +904 -0
  3. package/dist/colors/root.css +906 -0
  4. package/dist/{button.module-77AJOXGM.module.css → components/button.module-EYMY7VLZ.module.css} +14 -7
  5. package/dist/components/dialog-responsive-backdrop.module-O336AARV.module.css +27 -0
  6. package/dist/components/dialog-responsive-bar.module-QCLP4IUN.module.css +14 -0
  7. package/dist/components/dialog-responsive-popup.module-BOEQIHJ7.module.css +58 -0
  8. package/dist/components/dialog-responsive-portal.module-YFVKMKVT.module.css +5 -0
  9. package/dist/components/dialog-responsive-viewport.module-LT7MZPLD.module.css +16 -0
  10. package/dist/{index.d.ts → components/index.d.ts} +33 -17
  11. package/dist/{index.js → components/index.js} +244 -99
  12. package/dist/{tabs-pill-tab.module-M5YIWTWX.module.css → components/tabs-pill-tab.module-2F7LOGXE.module.css} +7 -0
  13. package/dist/{tabs-segmented-indicator.module-MB5GZJGW.module.css → components/tabs-segmented-indicator.module-EG56DHS2.module.css} +1 -1
  14. package/dist/{tabs-segmented-tab.module-GFCOY63Z.module.css → components/tabs-segmented-tab.module-SVYVEM2O.module.css} +7 -0
  15. package/dist/{tabs-underline-tab.module-YGSM4IUK.module.css → components/tabs-underline-tab.module-OAE4JH7K.module.css} +7 -0
  16. package/dist/{textarea.module-6GUVSFC7.module.css → components/textarea.module-LK25MKCZ.module.css} +2 -1
  17. package/dist/tailwind-colors/color.css +88 -0
  18. package/dist/tailwind-colors/gray.css +335 -0
  19. package/dist/tailwind-colors/index.css +6 -0
  20. package/dist/tailwind-colors/primary.css +1399 -0
  21. package/dist/tailwind-tokenless/10/container.css +16 -0
  22. package/dist/tailwind-tokenless/10/index.css +19 -0
  23. package/dist/tailwind-tokenless/10/radius.css +12 -0
  24. package/dist/tailwind-tokenless/10/spacing.css +38 -0
  25. package/dist/tailwind-tokenless/10/text.css +20 -0
  26. package/dist/tailwind-tokenless/16/container.css +16 -0
  27. package/dist/tailwind-tokenless/16/index.css +19 -0
  28. package/dist/tailwind-tokenless/16/radius.css +12 -0
  29. package/dist/tailwind-tokenless/16/spacing.css +38 -0
  30. package/dist/tailwind-tokenless/16/text.css +20 -0
  31. package/dist/tailwind-tokenless/aspect.css +7 -0
  32. package/dist/tailwind-tokenless/blur.css +11 -0
  33. package/dist/tailwind-tokenless/breakpoint.css +10 -0
  34. package/dist/tailwind-tokenless/drop-shadow.css +10 -0
  35. package/dist/tailwind-tokenless/font-weight.css +12 -0
  36. package/dist/tailwind-tokenless/inset-shadow.css +6 -0
  37. package/dist/tailwind-tokenless/leading.css +9 -0
  38. package/dist/tailwind-tokenless/perspective-dramatic.css +9 -0
  39. package/dist/tailwind-tokenless/shadow.css +11 -0
  40. package/dist/tailwind-tokenless/text-shadow.css +12 -0
  41. package/dist/tailwind-tokenless/tracking.css +7 -0
  42. package/package.json +11 -10
  43. /package/dist/{button-spinner.module-T3OGVJS4.module.css → components/button-spinner.module-T3OGVJS4.module.css} +0 -0
  44. /package/dist/{column.module-A7QCVPFC.module.css → components/column.module-A7QCVPFC.module.css} +0 -0
  45. /package/dist/{input.module-DOM3NIU5.module.css → components/input.module-DOM3NIU5.module.css} +0 -0
  46. /package/dist/{label.module-HUBUIUFV.module.css → components/label.module-HUBUIUFV.module.css} +0 -0
  47. /package/dist/{row.module-GYNANRAY.module.css → components/row.module-GYNANRAY.module.css} +0 -0
  48. /package/dist/{spacer.module-ZYYYWYEB.module.css → components/spacer.module-ZYYYWYEB.module.css} +0 -0
  49. /package/dist/{switch.module-TLJBHCSA.module.css → components/switch.module-TLJBHCSA.module.css} +0 -0
  50. /package/dist/{tabs-panel.module-VGH3G3KV.module.css → components/tabs-panel.module-VGH3G3KV.module.css} +0 -0
  51. /package/dist/{tabs-pill-indicator.module-533HMO7L.module.css → components/tabs-pill-indicator.module-533HMO7L.module.css} +0 -0
  52. /package/dist/{tabs-pill-list.module-KQW67ZSW.module.css → components/tabs-pill-list.module-KQW67ZSW.module.css} +0 -0
  53. /package/dist/{tabs-segmented-list.module-I3DSVFSP.module.css → components/tabs-segmented-list.module-I3DSVFSP.module.css} +0 -0
  54. /package/dist/{tabs-underline-indicator.module-6SHQHUH5.module.css → components/tabs-underline-indicator.module-6SHQHUH5.module.css} +0 -0
  55. /package/dist/{tabs-underline-list.module-72ZCIEAS.module.css → components/tabs-underline-list.module-72ZCIEAS.module.css} +0 -0
  56. /package/dist/{tabs.module-3Z5DRPPX.module.css → components/tabs.module-3Z5DRPPX.module.css} +0 -0
  57. /package/dist/{tooltip-content.module-5MWTMSBY.module.css → components/tooltip-content.module-5MWTMSBY.module.css} +0 -0
@@ -11,7 +11,7 @@
11
11
  font-family: var(--font-sans, sans-serif);
12
12
  font-size: 14px;
13
13
  font-weight: 500;
14
- height: var(--size);
14
+ height: var(--size-button);
15
15
  justify-content: safe center;
16
16
  line-height: 1.5;
17
17
  outline-color: var(--color-primary-9);
@@ -41,11 +41,18 @@
41
41
  outline-width: 2px;
42
42
  }
43
43
 
44
+ /* Icon size */
45
+ .button > svg {
46
+ --size-icon: 18px;
47
+ height: var(--size-icon);
48
+ width: var(--size-icon);
49
+ }
50
+
44
51
  /* ===================================================== */
45
52
  /* Icon only */
46
53
  /* ===================================================== */
47
54
  .button__icon_only {
48
- width: var(--size) !important;
55
+ width: var(--size-button) !important;
49
56
  padding: 0 !important;
50
57
  }
51
58
 
@@ -64,31 +71,31 @@
64
71
  /* Size */
65
72
  /* ===================================================== */
66
73
  .button__size_32 {
67
- --size: 32px;
74
+ --size-button: 32px;
68
75
  padding: 0 10px;
69
76
  border-radius: 8px;
70
77
  }
71
78
 
72
79
  .button__size_36 {
73
- --size: 36px;
80
+ --size-button: 36px;
74
81
  padding: 0 12px;
75
82
  border-radius: 10px;
76
83
  }
77
84
 
78
85
  .button__size_40 {
79
- --size: 40px;
86
+ --size-button: 40px;
80
87
  padding: 0 14px;
81
88
  border-radius: 12px;
82
89
  }
83
90
 
84
91
  .button__size_44 {
85
- --size: 44px;
92
+ --size-button: 44px;
86
93
  padding: 0 16px;
87
94
  border-radius: 14px;
88
95
  }
89
96
 
90
97
  .button__size_48 {
91
- --size: 48px;
98
+ --size-button: 48px;
92
99
  padding: 0 18px;
93
100
  border-radius: 16px;
94
101
  }
@@ -0,0 +1,27 @@
1
+ .dialog_responsive_backdrop {
2
+ --backdrop-opacity: 0.25;
3
+ background-color: black;
4
+ inset: 0;
5
+ opacity: calc(var(--backdrop-opacity) * (1 - var(--drawer-swipe-progress)));
6
+ outline-color: var(--color-primary-9);
7
+ position: fixed;
8
+ transition-duration: 150ms;
9
+ transition-property: opacity;
10
+ }
11
+
12
+ .dialog_responsive_backdrop[data-ending-style],
13
+ .dialog_responsive_backdrop[data-starting-style] {
14
+ opacity: 0;
15
+ }
16
+
17
+ .dialog_responsive_backdrop[data-ending-style] {
18
+ transition-duration: calc(var(--drawer-swipe-strength) * 400ms);
19
+ }
20
+
21
+ .dialog_responsive_backdrop[data-swiping] {
22
+ transition-duration: 0ms;
23
+ }
24
+
25
+ :global(.dark) .dialog_responsive_backdrop {
26
+ --backdrop-opacity: 0.75;
27
+ }
@@ -0,0 +1,14 @@
1
+ .dialog_responsive_bar {
2
+ background-color: var(--color-gray-4);
3
+ border-radius: 9999px;
4
+ display: none;
5
+ height: 4px;
6
+ margin: 12px auto;
7
+ width: 48px;
8
+ }
9
+
10
+ @media (max-width: 640px) {
11
+ .dialog_responsive_bar {
12
+ display: block;
13
+ }
14
+ }
@@ -0,0 +1,58 @@
1
+ .dialog_responsive_popup {
2
+ background-color: var(--color-gray-1);
3
+ border-radius: 16px;
4
+ cursor: auto;
5
+ display: flex;
6
+ flex-direction: column;
7
+ max-width: 640px;
8
+ outline-color: var(--color-primary-9);
9
+ outline-offset: -4px;
10
+ outline-style: solid;
11
+ outline-width: 0;
12
+ padding: 16px;
13
+ transition-duration: 150ms;
14
+ transition-property: opacity, transform;
15
+ width: 100%;
16
+ will-change: opacity, transform;
17
+ }
18
+
19
+ .dialog_responsive_popup:focus-visible {
20
+ outline-width: 2px;
21
+ }
22
+
23
+ /* Desktop */
24
+ .dialog_responsive_popup[data-ending-style],
25
+ .dialog_responsive_popup[data-starting-style] {
26
+ opacity: 0;
27
+ transform: scale(0.975);
28
+ }
29
+
30
+ .dialog_responsive_popup[data-swiping] {
31
+ user-select: none;
32
+ }
33
+
34
+ /* Mobile */
35
+ @media (max-width: 640px) {
36
+ .dialog_responsive_popup {
37
+ --radius-mobile: 24px;
38
+ border-bottom-left-radius: 0;
39
+ border-bottom-right-radius: 0;
40
+ border-top-left-radius: var(--radius-mobile);
41
+ border-top-right-radius: var(--radius-mobile);
42
+ padding-top: 0;
43
+ transform: translateY(var(--drawer-swipe-movement-y));
44
+ transition-duration: 450ms;
45
+ transition-property: transform;
46
+ transition-timing-function: cubic-bezier(0.32, 0.72, 0, 1);
47
+ }
48
+
49
+ .dialog_responsive_popup[data-ending-style],
50
+ .dialog_responsive_popup[data-starting-style] {
51
+ opacity: 1;
52
+ transform: scale(1) translateY(100%);
53
+ }
54
+
55
+ .dialog_responsive_popup[data-ending-style] {
56
+ transition-duration: calc(var(--drawer-swipe-strength) * 300ms);
57
+ }
58
+ }
@@ -0,0 +1,5 @@
1
+ .dialog_responsive_portal {
2
+ isolation: isolate;
3
+ position: relative;
4
+ z-index: 30;
5
+ }
@@ -0,0 +1,16 @@
1
+ .dialog_responsive_viewport {
2
+ align-items: safe center;
3
+ cursor: pointer;
4
+ display: flex;
5
+ inset: 0;
6
+ justify-content: safe center;
7
+ padding: 24px;
8
+ position: fixed;
9
+ }
10
+
11
+ @media (max-width: 640px) {
12
+ .dialog_responsive_viewport {
13
+ align-items: safe flex-end;
14
+ padding: 48px 0 0;
15
+ }
16
+ }
@@ -1,6 +1,5 @@
1
1
  import { ComponentProps, ReactNode, JSX, ElementType, CSSProperties } from 'react';
2
- import * as react_jsx_runtime from 'react/jsx-runtime';
3
- import { Switch as Switch$1, Tabs as Tabs$1, Tooltip as Tooltip$1 } from '@base-ui/react';
2
+ import { Drawer, Switch as Switch$1, Tabs as Tabs$1, Tooltip as Tooltip$1 } from '@base-ui/react';
4
3
 
5
4
  interface ButtonIconProps extends ButtonInternalProps {
6
5
  children?: ReactNode;
@@ -9,7 +8,7 @@ interface ButtonIconProps extends ButtonInternalProps {
9
8
  isIconOnly: true;
10
9
  }
11
10
  interface ButtonProps extends ButtonInternalProps {
12
- children?: string | string[];
11
+ children?: number | number[] | string | string[];
13
12
  isIconOnly?: false;
14
13
  }
15
14
  interface ButtonInternalProps extends Omit<ComponentProps<"button">, "aria-pressed" | "disabled"> {
@@ -73,6 +72,23 @@ declare const COLUMN_CLASS_NAME: {
73
72
  readonly BASE: string;
74
73
  };
75
74
 
75
+ interface DialogResponsiveProps extends Omit<Drawer.Root.Props, "onOpenChange" | "open"> {
76
+ isOpen?: Drawer.Root.Props["open"];
77
+ onIsOpenChange?: Drawer.Root.Props["onOpenChange"];
78
+ }
79
+ declare function DialogResponsive(props: DialogResponsiveProps): JSX.Element;
80
+
81
+ interface DialogResponsivePopupProps extends Drawer.Popup.Props {
82
+ }
83
+ declare function DialogResponsivePopup(props: DialogResponsivePopupProps): JSX.Element;
84
+ declare const DIALOG_RESPONSIVE_POPUP_CLASS_NAME: {
85
+ readonly BASE: string;
86
+ };
87
+
88
+ interface DialogResponsiveTriggerProps extends Drawer.Trigger.Props {
89
+ }
90
+ declare function DialogResponsiveTrigger(props: DialogResponsiveTriggerProps): JSX.Element;
91
+
76
92
  interface InputProps extends Omit<ComponentProps<"input">, "aria-pressed" | "disabled" | "readOnly" | "required"> {
77
93
  isActive?: boolean;
78
94
  isDisabled?: boolean;
@@ -126,7 +142,7 @@ interface SpacerProps extends Omit<ComponentProps<"div">, "children"> {
126
142
  height?: CSSProperties["height"];
127
143
  width?: CSSProperties["width"];
128
144
  }
129
- declare function Spacer(props: SpacerProps): react_jsx_runtime.JSX.Element;
145
+ declare function Spacer(props: SpacerProps): JSX.Element;
130
146
  declare const SPACER_CLASS_NAME: {
131
147
  readonly BASE: string;
132
148
  };
@@ -150,7 +166,7 @@ declare const SWITCH_CLASS_NAME: {
150
166
 
151
167
  interface TabsPillListProps extends Tabs$1.List.Props {
152
168
  }
153
- declare function TabsPillList(props: TabsPillListProps): react_jsx_runtime.JSX.Element;
169
+ declare function TabsPillList(props: TabsPillListProps): JSX.Element;
154
170
  declare const TABS_PILL_LIST_CLASS_NAME: {
155
171
  readonly BASE: string;
156
172
  };
@@ -158,7 +174,7 @@ declare const TABS_PILL_LIST_CLASS_NAME: {
158
174
  interface TabsPillTabProps extends Omit<Tabs$1.Tab.Props, "nativeButton"> {
159
175
  isNativeButton?: Tabs$1.Tab.Props["nativeButton"];
160
176
  }
161
- declare function TabsPillTab(props: TabsPillTabProps): react_jsx_runtime.JSX.Element;
177
+ declare function TabsPillTab(props: TabsPillTabProps): JSX.Element;
162
178
  declare const TABS_PILL_TAB_CLASS_NAME: {
163
179
  readonly BACKGROUND: string;
164
180
  readonly BASE: string;
@@ -167,7 +183,7 @@ declare const TABS_PILL_TAB_CLASS_NAME: {
167
183
 
168
184
  interface TabsSegmentedListProps extends Tabs$1.List.Props {
169
185
  }
170
- declare function TabsSegmentedList(props: TabsSegmentedListProps): react_jsx_runtime.JSX.Element;
186
+ declare function TabsSegmentedList(props: TabsSegmentedListProps): JSX.Element;
171
187
  declare const TABS_SEGMENTED_LIST_CLASS_NAME: {
172
188
  readonly BASE: string;
173
189
  };
@@ -175,14 +191,14 @@ declare const TABS_SEGMENTED_LIST_CLASS_NAME: {
175
191
  interface TabsSegmentedTabProps extends Omit<Tabs$1.Tab.Props, "nativeButton"> {
176
192
  isNativeButton?: Tabs$1.Tab.Props["nativeButton"];
177
193
  }
178
- declare function TabsSegmentedTab(props: TabsSegmentedTabProps): react_jsx_runtime.JSX.Element;
194
+ declare function TabsSegmentedTab(props: TabsSegmentedTabProps): JSX.Element;
179
195
  declare const TABS_SEGMENTED_TAB_CLASS_NAME: {
180
196
  readonly BASE: string;
181
197
  };
182
198
 
183
199
  interface TabsUnderlineListProps extends Tabs$1.List.Props {
184
200
  }
185
- declare function TabsUnderlineList(props: TabsUnderlineListProps): react_jsx_runtime.JSX.Element;
201
+ declare function TabsUnderlineList(props: TabsUnderlineListProps): JSX.Element;
186
202
  declare const TABS_UNDERLINE_LIST_CLASS_NAME: {
187
203
  readonly BASE: string;
188
204
  };
@@ -190,21 +206,21 @@ declare const TABS_UNDERLINE_LIST_CLASS_NAME: {
190
206
  interface TabsUnderlineTabProps extends Omit<Tabs$1.Tab.Props, "nativeButton"> {
191
207
  isNativeButton?: Tabs$1.Tab.Props["nativeButton"];
192
208
  }
193
- declare function TabsUnderlineTab(props: TabsUnderlineTabProps): react_jsx_runtime.JSX.Element;
209
+ declare function TabsUnderlineTab(props: TabsUnderlineTabProps): JSX.Element;
194
210
  declare const TABS_UNDERLINE_TAB_CLASS_NAME: {
195
211
  readonly BASE: string;
196
212
  };
197
213
 
198
214
  interface TabsProps extends Tabs$1.Root.Props {
199
215
  }
200
- declare function Tabs(props: TabsProps): react_jsx_runtime.JSX.Element;
216
+ declare function Tabs(props: TabsProps): JSX.Element;
201
217
  declare const TABS_CLASS_NAME: {
202
218
  readonly BASE: string;
203
219
  };
204
220
 
205
221
  interface TabsPanelProps extends Tabs$1.Panel.Props {
206
222
  }
207
- declare function TabsPanel(props: TabsPanelProps): react_jsx_runtime.JSX.Element;
223
+ declare function TabsPanel(props: TabsPanelProps): JSX.Element;
208
224
  declare const TABS_PANEL_CLASS_NAME: {
209
225
  readonly BASE: string;
210
226
  };
@@ -230,21 +246,21 @@ declare const TEXTAREA_CLASS_NAME: {
230
246
 
231
247
  interface TooltipProps extends Tooltip$1.Root.Props {
232
248
  }
233
- declare function Tooltip(props: TooltipProps): react_jsx_runtime.JSX.Element;
249
+ declare function Tooltip(props: TooltipProps): JSX.Element;
234
250
 
235
251
  interface TooltipContentProps extends Pick<Tooltip$1.Positioner.Props, "side">, Tooltip$1.Popup.Props {
236
252
  }
237
- declare function TooltipContent(props: TooltipContentProps): react_jsx_runtime.JSX.Element;
253
+ declare function TooltipContent(props: TooltipContentProps): JSX.Element;
238
254
  declare const TOOLTIP_CONTENT_CLASS_NAME: {
239
255
  readonly BASE: string;
240
256
  };
241
257
 
242
258
  interface TooltipProviderProps extends Tooltip$1.Provider.Props {
243
259
  }
244
- declare function TooltipProvider(props: TooltipProviderProps): react_jsx_runtime.JSX.Element;
260
+ declare function TooltipProvider(props: TooltipProviderProps): JSX.Element;
245
261
 
246
262
  interface TooltipTriggerProps extends Tooltip$1.Trigger.Props {
247
263
  }
248
- declare function TooltipTrigger(props: TooltipTriggerProps): react_jsx_runtime.JSX.Element;
264
+ declare function TooltipTrigger(props: TooltipTriggerProps): JSX.Element;
249
265
 
250
- export { BUTTON_CLASS_NAME, Button, type ButtonIconProps, ButtonLink, type ButtonLinkProps, type ButtonProps, COLUMN_CLASS_NAME, Column, type ColumnProps, INPUT_CLASS_NAME, Input, type InputProps, LABEL_CLASS_NAME, Label, type LabelProps, ROW_CLASS_NAME, Row, type RowProps, SPACER_CLASS_NAME, SWITCH_CLASS_NAME, Spacer, type SpacerProps, Switch, type SwitchProps, TABS_CLASS_NAME, TABS_PANEL_CLASS_NAME, TABS_PILL_LIST_CLASS_NAME, TABS_PILL_TAB_CLASS_NAME, TABS_SEGMENTED_LIST_CLASS_NAME, TABS_SEGMENTED_TAB_CLASS_NAME, TABS_UNDERLINE_LIST_CLASS_NAME, TABS_UNDERLINE_TAB_CLASS_NAME, TEXTAREA_CLASS_NAME, TOOLTIP_CONTENT_CLASS_NAME, Tabs, TabsPanel, type TabsPanelProps, TabsPillList, type TabsPillListProps, TabsPillTab, type TabsPillTabProps, type TabsProps, TabsSegmentedList, type TabsSegmentedListProps, TabsSegmentedTab, type TabsSegmentedTabProps, TabsUnderlineList, type TabsUnderlineListProps, TabsUnderlineTab, type TabsUnderlineTabProps, Textarea, type TextareaProps, Tooltip, TooltipContent, type TooltipContentProps, type TooltipProps, TooltipProvider, type TooltipProviderProps, TooltipTrigger, type TooltipTriggerProps };
266
+ export { BUTTON_CLASS_NAME, Button, type ButtonIconProps, ButtonLink, type ButtonLinkProps, type ButtonProps, COLUMN_CLASS_NAME, Column, type ColumnProps, DIALOG_RESPONSIVE_POPUP_CLASS_NAME, DialogResponsive, DialogResponsivePopup, type DialogResponsivePopupProps, type DialogResponsiveProps, DialogResponsiveTrigger, type DialogResponsiveTriggerProps, INPUT_CLASS_NAME, Input, type InputProps, LABEL_CLASS_NAME, Label, type LabelProps, ROW_CLASS_NAME, Row, type RowProps, SPACER_CLASS_NAME, SWITCH_CLASS_NAME, Spacer, type SpacerProps, Switch, type SwitchProps, TABS_CLASS_NAME, TABS_PANEL_CLASS_NAME, TABS_PILL_LIST_CLASS_NAME, TABS_PILL_TAB_CLASS_NAME, TABS_SEGMENTED_LIST_CLASS_NAME, TABS_SEGMENTED_TAB_CLASS_NAME, TABS_UNDERLINE_LIST_CLASS_NAME, TABS_UNDERLINE_TAB_CLASS_NAME, TEXTAREA_CLASS_NAME, TOOLTIP_CONTENT_CLASS_NAME, Tabs, TabsPanel, type TabsPanelProps, TabsPillList, type TabsPillListProps, TabsPillTab, type TabsPillTabProps, type TabsProps, TabsSegmentedList, type TabsSegmentedListProps, TabsSegmentedTab, type TabsSegmentedTabProps, TabsUnderlineList, type TabsUnderlineListProps, TabsUnderlineTab, type TabsUnderlineTabProps, Textarea, type TextareaProps, Tooltip, TooltipContent, type TooltipContentProps, type TooltipProps, TooltipProvider, type TooltipProviderProps, TooltipTrigger, type TooltipTriggerProps };