@nation-a/ui 0.5.1 → 0.6.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.cjs +957 -45
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +957 -45
- package/dist/index.js.map +1 -1
- package/dist/styled-system/styles.css +108 -0
- package/dist/types/components/Dialog/Dialog.stories.d.ts +3 -10
- package/dist/types/components/Navigation/Navigation.stories.d.ts +6 -0
- package/dist/types/components/Navigation/index.d.ts +30 -0
- package/dist/types/components/Navigation/navigation.recipe.d.ts +2 -0
- package/dist/types/components/Spinner/Spinner.stories.d.ts +3 -23
- package/dist/types/components/Tag/Tag.stories.d.ts +10 -0
- package/dist/types/components/Tag/index.d.ts +13 -0
- package/dist/types/components/Tag/tag.recipe.d.ts +27 -0
- package/dist/types/components/index.d.ts +2 -0
- package/package.json +4 -1
|
@@ -1267,6 +1267,30 @@
|
|
|
1267
1267
|
padding: 8px;
|
|
1268
1268
|
}
|
|
1269
1269
|
|
|
1270
|
+
.bg_surface\.layer_1 {
|
|
1271
|
+
background: var(--colors-surface-layer_1);
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
.z_10 {
|
|
1275
|
+
z-index: 10;
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
.h_48px {
|
|
1279
|
+
height: 48px;
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
.w_64px {
|
|
1283
|
+
width: 64px;
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1286
|
+
.px_2 {
|
|
1287
|
+
padding-inline: var(--spacing-2);
|
|
1288
|
+
}
|
|
1289
|
+
|
|
1290
|
+
.c_content\.neutral\.subtlest {
|
|
1291
|
+
color: var(--colors-content-neutral-subtlest);
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1270
1294
|
.sr_true {
|
|
1271
1295
|
position: absolute;
|
|
1272
1296
|
width: 1px;
|
|
@@ -1323,6 +1347,66 @@
|
|
|
1323
1347
|
height: var(--sizes-24);
|
|
1324
1348
|
}
|
|
1325
1349
|
|
|
1350
|
+
.c_neutral {
|
|
1351
|
+
color: neutral;
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1354
|
+
.c_black {
|
|
1355
|
+
color: black;
|
|
1356
|
+
}
|
|
1357
|
+
|
|
1358
|
+
.c_white {
|
|
1359
|
+
color: white;
|
|
1360
|
+
}
|
|
1361
|
+
|
|
1362
|
+
.bg_off {
|
|
1363
|
+
background: off;
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1366
|
+
.py_1 {
|
|
1367
|
+
padding-block: var(--spacing-1);
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1370
|
+
.h_fit-content {
|
|
1371
|
+
height: fit-content;
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1374
|
+
.w_fit-content {
|
|
1375
|
+
width: fit-content;
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
.cursor_default {
|
|
1379
|
+
cursor: default;
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
.bdr_sm {
|
|
1383
|
+
border-radius: var(--radii-sm);
|
|
1384
|
+
}
|
|
1385
|
+
|
|
1386
|
+
.bg_background\.static\.whiteAlpha\.bold {
|
|
1387
|
+
background: var(--colors-background-static-white-alpha-bold);
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
.c_content\.static\.black\.default {
|
|
1391
|
+
color: var(--colors-content-static-black-default);
|
|
1392
|
+
}
|
|
1393
|
+
|
|
1394
|
+
.bg_background\.neutral\.selected {
|
|
1395
|
+
background: var(--colors-background-neutral-selected);
|
|
1396
|
+
}
|
|
1397
|
+
|
|
1398
|
+
.bg_background\.static\.blackAlpha\.default {
|
|
1399
|
+
background: var(--colors-background-static-black-alpha-default);
|
|
1400
|
+
}
|
|
1401
|
+
|
|
1402
|
+
.c_content\.static\.white\.default {
|
|
1403
|
+
color: var(--colors-content-static-white-default);
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1406
|
+
.bg_background\.static\.whiteAlpha\.selected {
|
|
1407
|
+
background: var(--colors-background-static-white-alpha-selected);
|
|
1408
|
+
}
|
|
1409
|
+
|
|
1326
1410
|
.font_inter {
|
|
1327
1411
|
font: inter;
|
|
1328
1412
|
}
|
|
@@ -1454,6 +1538,18 @@
|
|
|
1454
1538
|
flex-direction: row;
|
|
1455
1539
|
}
|
|
1456
1540
|
|
|
1541
|
+
.jc_space-around {
|
|
1542
|
+
justify-content: space-around;
|
|
1543
|
+
}
|
|
1544
|
+
|
|
1545
|
+
.pt_2 {
|
|
1546
|
+
padding-top: var(--spacing-2);
|
|
1547
|
+
}
|
|
1548
|
+
|
|
1549
|
+
.pb_8 {
|
|
1550
|
+
padding-bottom: var(--spacing-8);
|
|
1551
|
+
}
|
|
1552
|
+
|
|
1457
1553
|
.bd-c_inherit {
|
|
1458
1554
|
border-color: inherit;
|
|
1459
1555
|
}
|
|
@@ -1474,6 +1570,10 @@
|
|
|
1474
1570
|
animation-duration: var(--durations-slowest);
|
|
1475
1571
|
}
|
|
1476
1572
|
|
|
1573
|
+
.pl_1 {
|
|
1574
|
+
padding-left: var(--spacing-1);
|
|
1575
|
+
}
|
|
1576
|
+
|
|
1477
1577
|
.ff_inter {
|
|
1478
1578
|
font-family: var(--fonts-inter);
|
|
1479
1579
|
}
|
|
@@ -1546,6 +1646,14 @@
|
|
|
1546
1646
|
animation: var(--animations-dialog-out);
|
|
1547
1647
|
}
|
|
1548
1648
|
|
|
1649
|
+
.selected\:c_content\.neutral\.default:is([aria-selected=true], [data-selected]) {
|
|
1650
|
+
color: var(--colors-content-neutral-default);
|
|
1651
|
+
}
|
|
1652
|
+
|
|
1653
|
+
.selected\:bg_background\.neutral\.default:is([aria-selected=true], [data-selected]) {
|
|
1654
|
+
background: var(--colors-background-neutral-default);
|
|
1655
|
+
}
|
|
1656
|
+
|
|
1549
1657
|
.disabled\:bd-c_border\.neutral\.disabled:is(:disabled, [disabled], [data-disabled]) {
|
|
1550
1658
|
border-color: var(--colors-border-neutral-disabled);
|
|
1551
1659
|
}
|
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
component: (props: import('@ark-ui/react').DialogRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
parameters: {
|
|
6
|
-
layout: string;
|
|
7
|
-
};
|
|
8
|
-
tags: string[];
|
|
9
|
-
argTypes: {};
|
|
10
|
-
};
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { default as Dialog } from './index';
|
|
3
|
+
declare const meta: Meta<typeof Dialog.Root>;
|
|
11
4
|
export default meta;
|
|
12
5
|
type Story = StoryObj<typeof meta>;
|
|
13
6
|
export declare const BasicDialog: Story;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Tabs as ArkTabs } from '@ark-ui/react/tabs';
|
|
2
|
+
import { Assign } from '@ark-ui/react';
|
|
3
|
+
import { ButtonHTMLAttributes, ComponentProps, HTMLAttributes } from 'react';
|
|
4
|
+
export type NavigationProps = ComponentProps<typeof Root>;
|
|
5
|
+
declare const Root: (props: ArkTabs.RootProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export type NavigationTriggerProps = Assign<ButtonHTMLAttributes<HTMLButtonElement>, ArkTabs.TriggerBaseProps> & {
|
|
7
|
+
/**
|
|
8
|
+
* The icon to display in the trigger.
|
|
9
|
+
*/
|
|
10
|
+
icon: React.ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* The label to display in the trigger.
|
|
13
|
+
*/
|
|
14
|
+
label: string;
|
|
15
|
+
};
|
|
16
|
+
declare const Navigation: {
|
|
17
|
+
Root: (props: ArkTabs.RootProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
Item: import('react').ForwardRefExoticComponent<Omit<ButtonHTMLAttributes<HTMLButtonElement>, keyof ArkTabs.TriggerBaseProps> & ArkTabs.TriggerBaseProps & {
|
|
19
|
+
/**
|
|
20
|
+
* The icon to display in the trigger.
|
|
21
|
+
*/
|
|
22
|
+
icon: React.ReactNode;
|
|
23
|
+
/**
|
|
24
|
+
* The label to display in the trigger.
|
|
25
|
+
*/
|
|
26
|
+
label: string;
|
|
27
|
+
} & import('react').RefAttributes<HTMLButtonElement>>;
|
|
28
|
+
List: import('react').ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "asChild"> & ArkTabs.ListBaseProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
29
|
+
};
|
|
30
|
+
export default Navigation;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export type NavigationVariantProps = keyof typeof navigationRecipe.variantMap;
|
|
2
|
+
export declare const navigationRecipe: import('../../../styled-system/types').SlotRecipeRuntimeFn<"content" | "list" | "trigger" | "root" | "indicator", import('../../../styled-system/types').SlotRecipeVariantRecord<"content" | "list" | "trigger" | "root" | "indicator">>;
|
|
@@ -1,26 +1,6 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
component: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
|
|
5
|
-
size?: "sm" | "md" | "lg" | "xl" | undefined;
|
|
6
|
-
} & {
|
|
7
|
-
label?: string;
|
|
8
|
-
color?: import('../../../styled-system/tokens').ColorToken;
|
|
9
|
-
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
10
|
-
parameters: {
|
|
11
|
-
layout: string;
|
|
12
|
-
};
|
|
13
|
-
tags: string[];
|
|
14
|
-
argTypes: {
|
|
15
|
-
size: {
|
|
16
|
-
control: "select";
|
|
17
|
-
options: string[];
|
|
18
|
-
};
|
|
19
|
-
label: {
|
|
20
|
-
control: "text";
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
};
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { default as Spinner } from './index';
|
|
3
|
+
declare const meta: Meta<typeof Spinner>;
|
|
24
4
|
export default meta;
|
|
25
5
|
type Story = StoryObj<typeof meta>;
|
|
26
6
|
export declare const DefaultSpinner: Story;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { default as Tag } from './index';
|
|
3
|
+
declare const meta: Meta<typeof Tag>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Tag>;
|
|
6
|
+
export declare const DefaultTag: Story;
|
|
7
|
+
export declare const NoCloseTag: Story;
|
|
8
|
+
export declare const TagWithBackground: Story;
|
|
9
|
+
export declare const TagWithNoBackground: Story;
|
|
10
|
+
export declare const TagWithImage: Story;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes } from 'react';
|
|
2
|
+
import { TagVariantProps } from './tag.recipe';
|
|
3
|
+
export type TagProps = ButtonHTMLAttributes<HTMLDivElement> & TagVariantProps & {
|
|
4
|
+
imageSrc?: string;
|
|
5
|
+
text: string;
|
|
6
|
+
onDeleteClick?: () => void;
|
|
7
|
+
};
|
|
8
|
+
declare const Tag: import('react').ForwardRefExoticComponent<ButtonHTMLAttributes<HTMLDivElement> & TagVariantProps & {
|
|
9
|
+
imageSrc?: string;
|
|
10
|
+
text: string;
|
|
11
|
+
onDeleteClick?: () => void;
|
|
12
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
13
|
+
export default Tag;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type TagVariantProps = Omit<typeof tagRecipe.__type, 'avatar'>;
|
|
2
|
+
export declare const tagRecipe: import('../../../styled-system/types').RecipeRuntimeFn<{
|
|
3
|
+
color: {
|
|
4
|
+
neutral: {};
|
|
5
|
+
black: {};
|
|
6
|
+
white: {};
|
|
7
|
+
};
|
|
8
|
+
background: {
|
|
9
|
+
on: {};
|
|
10
|
+
off: {};
|
|
11
|
+
};
|
|
12
|
+
radius: {
|
|
13
|
+
sm: {
|
|
14
|
+
borderRadius: "sm";
|
|
15
|
+
};
|
|
16
|
+
full: {
|
|
17
|
+
borderRadius: "full";
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
avatar: {
|
|
21
|
+
true: {
|
|
22
|
+
borderRadius: "full";
|
|
23
|
+
pl: number;
|
|
24
|
+
};
|
|
25
|
+
false: {};
|
|
26
|
+
};
|
|
27
|
+
}>;
|
|
@@ -4,4 +4,6 @@ export { default as Dialog, type DialogProps } from './Dialog';
|
|
|
4
4
|
export { default as Spinner, type SpinnerProps } from './Spinner';
|
|
5
5
|
export { default as IconButton, type IconButtonProps } from './IconButton';
|
|
6
6
|
export { default as BottomSheet } from './BottomSheet';
|
|
7
|
+
export { default as Navigation, type NavigationProps, type NavigationTriggerProps } from './Navigation';
|
|
8
|
+
export { default as Tag, type TagProps } from './Tag';
|
|
7
9
|
export { Portal, type PortalProps } from '@ark-ui/react';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nation-a/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -25,11 +25,14 @@
|
|
|
25
25
|
"@storybook/addon-essentials": "^8.6.11",
|
|
26
26
|
"@storybook/addon-interactions": "^8.6.11",
|
|
27
27
|
"@storybook/addon-onboarding": "^8.6.11",
|
|
28
|
+
"@storybook/addon-themes": "^8.6.11",
|
|
28
29
|
"@storybook/blocks": "^8.6.11",
|
|
29
30
|
"@storybook/builder-vite": "^8.6.11",
|
|
31
|
+
"@storybook/manager-api": "^8.6.11",
|
|
30
32
|
"@storybook/react": "^8.6.11",
|
|
31
33
|
"@storybook/react-vite": "^8.6.11",
|
|
32
34
|
"@storybook/test": "^8.6.11",
|
|
35
|
+
"@storybook/theming": "^8.6.11",
|
|
33
36
|
"@types/node": "^22.13.10",
|
|
34
37
|
"@types/react": "^18.3.1",
|
|
35
38
|
"@types/react-dom": "^18.3.1",
|