@nation-a/ui 0.11.11 → 0.13.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/styled-system/styles.css +163 -12
- package/dist/types/components/CheckBox/checkbox.recipe.d.ts +16 -0
- package/dist/types/components/CheckBox/checkbox.stories.d.ts +10 -0
- package/dist/types/components/CheckBox/checkbox.styled.d.ts +16 -0
- package/dist/types/components/CheckBox/index.d.ts +4 -0
- package/dist/types/components/Select/Select.stories.d.ts +21 -0
- package/dist/types/components/Select/index.d.ts +32 -0
- package/dist/types/components/Select/select.recipe.d.ts +32 -0
- package/package.json +4 -3
|
@@ -1293,6 +1293,22 @@ html:not(#\#),body:not(#\#) {
|
|
|
1293
1293
|
opacity: 0;
|
|
1294
1294
|
}
|
|
1295
1295
|
|
|
1296
|
+
.c_content\.neutralInverse\.bold:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1297
|
+
color: var(--colors-content-neutral-inverse-bold);
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
.w_4\.5:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1301
|
+
width: var(--sizes-4\.5);
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
.h_4\.5:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1305
|
+
height: var(--sizes-4\.5);
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1308
|
+
.bdr_sm:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1309
|
+
border-radius: var(--radii-sm);
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1296
1312
|
.px_6:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1297
1313
|
padding-inline: var(--spacing-6);
|
|
1298
1314
|
}
|
|
@@ -1442,6 +1458,46 @@ html:not(#\#),body:not(#\#) {
|
|
|
1442
1458
|
width: 64px;
|
|
1443
1459
|
}
|
|
1444
1460
|
|
|
1461
|
+
.w_90vw:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1462
|
+
width: 90vw;
|
|
1463
|
+
}
|
|
1464
|
+
|
|
1465
|
+
.p_10:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1466
|
+
padding: var(--spacing-10);
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1469
|
+
.h_40px:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1470
|
+
height: 40px;
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
.p_0_16px:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1474
|
+
padding: 0 16px;
|
|
1475
|
+
}
|
|
1476
|
+
|
|
1477
|
+
.trs_all_0\.2s_ease:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1478
|
+
transition: all 0.2s ease;
|
|
1479
|
+
}
|
|
1480
|
+
|
|
1481
|
+
.cursor_not-allowed:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1482
|
+
cursor: not-allowed;
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1485
|
+
.z_dropdown:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1486
|
+
z-index: var(--z-index-dropdown);
|
|
1487
|
+
}
|
|
1488
|
+
|
|
1489
|
+
.flex_1:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1490
|
+
flex: 1 1 0%;
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1493
|
+
.ta_left:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1494
|
+
text-align: left;
|
|
1495
|
+
}
|
|
1496
|
+
|
|
1497
|
+
.px_1:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1498
|
+
padding-inline: var(--spacing-1);
|
|
1499
|
+
}
|
|
1500
|
+
|
|
1445
1501
|
.gap_2rem:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1446
1502
|
gap: 2rem;
|
|
1447
1503
|
}
|
|
@@ -1516,10 +1572,6 @@ html:not(#\#),body:not(#\#) {
|
|
|
1516
1572
|
transition-duration: var(--transition-duration, 150ms);
|
|
1517
1573
|
}
|
|
1518
1574
|
|
|
1519
|
-
.flex_1:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1520
|
-
flex: 1 1 0%;
|
|
1521
|
-
}
|
|
1522
|
-
|
|
1523
1575
|
.ov_hidden:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1524
1576
|
overflow: hidden;
|
|
1525
1577
|
}
|
|
@@ -1568,10 +1620,6 @@ html:not(#\#),body:not(#\#) {
|
|
|
1568
1620
|
cursor: default;
|
|
1569
1621
|
}
|
|
1570
1622
|
|
|
1571
|
-
.bdr_sm:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1572
|
-
border-radius: var(--radii-sm);
|
|
1573
|
-
}
|
|
1574
|
-
|
|
1575
1623
|
.bg_background\.static\.whiteAlpha\.bold:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1576
1624
|
background: var(--colors-background-static-white-alpha-bold);
|
|
1577
1625
|
}
|
|
@@ -1608,10 +1656,6 @@ html:not(#\#),body:not(#\#) {
|
|
|
1608
1656
|
overflow-wrap: anywhere;
|
|
1609
1657
|
}
|
|
1610
1658
|
|
|
1611
|
-
.c_content\.neutralInverse\.bold:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1612
|
-
color: var(--colors-content-neutral-inverse-bold);
|
|
1613
|
-
}
|
|
1614
|
-
|
|
1615
1659
|
.px_3:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1616
1660
|
padding-inline: var(--spacing-3);
|
|
1617
1661
|
}
|
|
@@ -2055,6 +2099,15 @@ html:not(#\#),body:not(#\#) {
|
|
|
2055
2099
|
top: 50%;
|
|
2056
2100
|
}
|
|
2057
2101
|
|
|
2102
|
+
.bd-c_content\.neutral\.bold:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
2103
|
+
border-color: var(--colors-content-neutral-bold);
|
|
2104
|
+
}
|
|
2105
|
+
|
|
2106
|
+
.trs-prop_border-color\,_background:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
2107
|
+
--transition-prop: border-color, background;
|
|
2108
|
+
transition-property: border-color, background;
|
|
2109
|
+
}
|
|
2110
|
+
|
|
2058
2111
|
.top_0:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
2059
2112
|
top: var(--spacing-0);
|
|
2060
2113
|
}
|
|
@@ -2099,6 +2152,22 @@ html:not(#\#),body:not(#\#) {
|
|
|
2099
2152
|
padding-bottom: var(--spacing-8);
|
|
2100
2153
|
}
|
|
2101
2154
|
|
|
2155
|
+
.bg-c_background\.neutral\.default:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
2156
|
+
background-color: var(--colors-background-neutral-default);
|
|
2157
|
+
}
|
|
2158
|
+
|
|
2159
|
+
.mt_2:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
2160
|
+
margin-top: var(--spacing-2);
|
|
2161
|
+
}
|
|
2162
|
+
|
|
2163
|
+
.ov-y_auto:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
2164
|
+
overflow-y: auto;
|
|
2165
|
+
}
|
|
2166
|
+
|
|
2167
|
+
.fs_12px:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
2168
|
+
font-size: 12px;
|
|
2169
|
+
}
|
|
2170
|
+
|
|
2102
2171
|
.ov-x_auto:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
2103
2172
|
overflow-x: auto;
|
|
2104
2173
|
}
|
|
@@ -2247,6 +2316,26 @@ html:not(#\#),body:not(#\#) {
|
|
|
2247
2316
|
height: 24px;
|
|
2248
2317
|
}
|
|
2249
2318
|
|
|
2319
|
+
.\[\&_svg\]\:w_2\.5:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) svg {
|
|
2320
|
+
width: var(--sizes-2\.5);
|
|
2321
|
+
}
|
|
2322
|
+
|
|
2323
|
+
.\[\&_svg\]\:h_2\.5:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) svg {
|
|
2324
|
+
height: var(--sizes-2\.5);
|
|
2325
|
+
}
|
|
2326
|
+
|
|
2327
|
+
.checked\:bg_content\.neutral\.bold:is(:checked, [data-checked], [aria-checked=true], [data-state="checked"]):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
2328
|
+
background: var(--colors-content-neutral-bold);
|
|
2329
|
+
}
|
|
2330
|
+
|
|
2331
|
+
.indeterminate\:bg_content\.neutral\.bold:is(:indeterminate, [data-indeterminate], [aria-checked=mixed], [data-state=indeterminate]):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
2332
|
+
background: var(--colors-content-neutral-bold);
|
|
2333
|
+
}
|
|
2334
|
+
|
|
2335
|
+
.disabled\:tch-a_none:is(:disabled, [disabled], [data-disabled]):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
2336
|
+
touch-action: none;
|
|
2337
|
+
}
|
|
2338
|
+
|
|
2250
2339
|
.open\:anim_backdrop-in:is([open], [data-open], [data-state="open"]):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
2251
2340
|
animation: var(--animations-backdrop-in);
|
|
2252
2341
|
}
|
|
@@ -2311,6 +2400,10 @@ html:not(#\#),body:not(#\#) {
|
|
|
2311
2400
|
background: var(--colors-background-neutral-default);
|
|
2312
2401
|
}
|
|
2313
2402
|
|
|
2403
|
+
.\[\&\[data-placeholder\]\]\:c_content\.neutral\.subtlest[data-placeholder]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
2404
|
+
color: var(--colors-content-neutral-subtlest);
|
|
2405
|
+
}
|
|
2406
|
+
|
|
2314
2407
|
.\[\&_path\]\:stk_currentColor:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) path {
|
|
2315
2408
|
stroke: currentColor;
|
|
2316
2409
|
}
|
|
@@ -2659,6 +2752,14 @@ html:not(#\#),body:not(#\#) {
|
|
|
2659
2752
|
border-color: var(--colors-border-neutral-disabled);
|
|
2660
2753
|
}
|
|
2661
2754
|
|
|
2755
|
+
.indeterminate\:bd-c_content\.neutral\.bold:is(:indeterminate, [data-indeterminate], [aria-checked=mixed], [data-state=indeterminate]):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
2756
|
+
border-color: var(--colors-content-neutral-bold);
|
|
2757
|
+
}
|
|
2758
|
+
|
|
2759
|
+
.disabled\:bd-c_content\.neutral\.disabled\!:is(:disabled, [disabled], [data-disabled]):not(#\#):not(#\#) {
|
|
2760
|
+
border-color: var(--colors-content-neutral-disabled) !important;
|
|
2761
|
+
}
|
|
2762
|
+
|
|
2662
2763
|
.\[\&_textarea\]\:ov-y_auto:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) textarea {
|
|
2663
2764
|
overflow-y: auto;
|
|
2664
2765
|
}
|
|
@@ -2671,10 +2772,38 @@ html:not(#\#),body:not(#\#) {
|
|
|
2671
2772
|
border-color: var(--colors-border-neutral-default);
|
|
2672
2773
|
}
|
|
2673
2774
|
|
|
2775
|
+
.\[\&\:has\(\+_\:focus-visible\)\]\:ring-o_2px:has(+ :focus-visible):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
2776
|
+
outline-offset: 2px;
|
|
2777
|
+
}
|
|
2778
|
+
|
|
2779
|
+
.\[\&\:has\(\+_\:focus-visible\)\]\:ring_2px_solid:has(+ :focus-visible):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
2780
|
+
outline: 2px solid;
|
|
2781
|
+
}
|
|
2782
|
+
|
|
2783
|
+
.\[\&\:has\(\+_\:focus-visible\)\]\:ring-c_border\.neutral\.default:has(+ :focus-visible):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
2784
|
+
outline-color: var(--colors-border-neutral-default);
|
|
2785
|
+
}
|
|
2786
|
+
|
|
2674
2787
|
.\[\&\:hover\]\:op_0\.8:hover:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
2675
2788
|
opacity: 0.8;
|
|
2676
2789
|
}
|
|
2677
2790
|
|
|
2791
|
+
.\[\&\:hover\]\:bg-c_background\.neutral\.default:hover:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
2792
|
+
background-color: var(--colors-background-neutral-default);
|
|
2793
|
+
}
|
|
2794
|
+
|
|
2795
|
+
.\[\&\:hover\]\:bg-c_background\.neutral\.hover:hover:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
2796
|
+
background-color: background.neutral.hover;
|
|
2797
|
+
}
|
|
2798
|
+
|
|
2799
|
+
.checked\:disabled\:bg_content\.neutral\.disabled\!:is(:checked, [data-checked], [aria-checked=true], [data-state="checked"]):is(:disabled, [disabled], [data-disabled]):not(#\#):not(#\#) {
|
|
2800
|
+
background: var(--colors-content-neutral-disabled) !important;
|
|
2801
|
+
}
|
|
2802
|
+
|
|
2803
|
+
.indeterminate\:disabled\:bg_content\.neutral\.disabled\!:is(:indeterminate, [data-indeterminate], [aria-checked=mixed], [data-state=indeterminate]):is(:disabled, [disabled], [data-disabled]):not(#\#):not(#\#) {
|
|
2804
|
+
background: var(--colors-content-neutral-disabled) !important;
|
|
2805
|
+
}
|
|
2806
|
+
|
|
2678
2807
|
.group:is(:disabled, [disabled], [data-disabled]):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) .placeholder\:groupDisabled\:c_content\.static\.white\.disabled::placeholder, .group:is(:disabled, [disabled], [data-disabled]):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) .placeholder\:groupDisabled\:c_content\.static\.white\.disabled[data-placeholder] {
|
|
2679
2808
|
color: var(--colors-content-static-white-disabled);
|
|
2680
2809
|
}
|
|
@@ -2683,6 +2812,10 @@ html:not(#\#),body:not(#\#) {
|
|
|
2683
2812
|
color: var(--colors-content-neutral-disabled);
|
|
2684
2813
|
}
|
|
2685
2814
|
|
|
2815
|
+
.\[\&\:has\(\+_\:focus-visible\)\]\:checked\:ring-c_border\.neutral\.default:has(+ :focus-visible):is(:checked, [data-checked], [aria-checked=true], [data-state="checked"]):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
2816
|
+
outline-color: var(--colors-border-neutral-default);
|
|
2817
|
+
}
|
|
2818
|
+
|
|
2686
2819
|
@media (hover: hover) and (pointer: fine) {
|
|
2687
2820
|
.hover\:bg_background\.neuroidPrimary\.selected:is(:hover, [data-hover]):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
2688
2821
|
background: var(--colors-background-neuroid-primary-selected);
|
|
@@ -2771,4 +2904,22 @@ html:not(#\#),body:not(#\#) {
|
|
|
2771
2904
|
.hover\:c_content\.neutral\.hovered:is(:hover, [data-hover]):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
2772
2905
|
color: content.neutral.hovered;
|
|
2773
2906
|
}
|
|
2907
|
+
}
|
|
2908
|
+
|
|
2909
|
+
@media (hover: hover) and (pointer: fine) {
|
|
2910
|
+
.hover\:bd-c_content\.neutral\.subtle:is(:hover, [data-hover]):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
2911
|
+
border-color: var(--colors-content-neutral-subtle);
|
|
2912
|
+
}
|
|
2913
|
+
}
|
|
2914
|
+
|
|
2915
|
+
@media (hover: hover) and (pointer: fine) {
|
|
2916
|
+
.checked\:hover\:bg_content\.neutral\.subtle:is(:hover, [data-hover]):is(:checked, [data-checked], [aria-checked=true], [data-state="checked"]):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
2917
|
+
background: var(--colors-content-neutral-subtle);
|
|
2918
|
+
}
|
|
2919
|
+
}
|
|
2920
|
+
|
|
2921
|
+
@media (hover: hover) and (pointer: fine) {
|
|
2922
|
+
.indeterminate\:hover\:bg_content\.neutral\.subtle:is(:hover, [data-hover]):is(:indeterminate, [data-indeterminate], [aria-checked=mixed], [data-state=indeterminate]):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
2923
|
+
background: var(--colors-content-neutral-subtle);
|
|
2924
|
+
}
|
|
2774
2925
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { RecipeVariantProps } from '../../../styled-system/css';
|
|
2
|
+
export type CheckboxVariantProps = RecipeVariantProps<typeof checkboxRecipe>;
|
|
3
|
+
export declare const checkboxRecipe: import('../../../styled-system/types').SlotRecipeRuntimeFn<"label" | "group" | "indicator" | "root" | "control", {
|
|
4
|
+
variant: {
|
|
5
|
+
square: {
|
|
6
|
+
control: {
|
|
7
|
+
borderRadius: "sm";
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
round: {
|
|
11
|
+
control: {
|
|
12
|
+
borderRadius: "full";
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
}>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Checkbox } from '.';
|
|
3
|
+
declare const meta: Meta<typeof Checkbox>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Base: Story;
|
|
7
|
+
export declare const Variant: Story;
|
|
8
|
+
export declare const Checked: Story;
|
|
9
|
+
export declare const Disabled: Story;
|
|
10
|
+
export declare const Indeterminate: Story;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Assign } from '@ark-ui/react';
|
|
2
|
+
import { Checkbox } from '@ark-ui/react/checkbox';
|
|
3
|
+
import { ComponentProps, HTMLStyledProps } from 'styled-system/types';
|
|
4
|
+
export type RootProviderProps = ComponentProps<typeof RootProvider>;
|
|
5
|
+
export declare const RootProvider: import('react').ForwardRefExoticComponent<Omit<Omit<Assign<HTMLStyledProps<"label">, Checkbox.RootProviderBaseProps>, never> & {
|
|
6
|
+
variant?: "round" | "square" | undefined;
|
|
7
|
+
}, "ref"> & import('react').RefAttributes<HTMLLabelElement>>;
|
|
8
|
+
export type RootProps = ComponentProps<typeof Root>;
|
|
9
|
+
export declare const Root: import('react').ForwardRefExoticComponent<Omit<Omit<Assign<HTMLStyledProps<"label">, Checkbox.RootBaseProps>, never> & {
|
|
10
|
+
variant?: "round" | "square" | undefined;
|
|
11
|
+
}, "ref"> & import('react').RefAttributes<HTMLLabelElement>>;
|
|
12
|
+
export declare const Control: import('react').ForwardRefExoticComponent<Omit<Assign<HTMLStyledProps<"div">, Checkbox.ControlBaseProps>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
13
|
+
export declare const Group: import('react').ForwardRefExoticComponent<Omit<Assign<HTMLStyledProps<"div">, Checkbox.GroupBaseProps>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
14
|
+
export declare const Indicator: import('react').ForwardRefExoticComponent<Omit<Assign<HTMLStyledProps<"div">, Checkbox.IndicatorBaseProps>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
15
|
+
export declare const Label: import('react').ForwardRefExoticComponent<Omit<Assign<HTMLStyledProps<"span">, Checkbox.LabelBaseProps>, "ref"> & import('react').RefAttributes<HTMLSpanElement>>;
|
|
16
|
+
export { CheckboxContext as Context, CheckboxHiddenInput as HiddenInput } from '@ark-ui/react/checkbox';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as StyledCheckbox from './checkbox.styled';
|
|
2
|
+
export interface CheckboxProps extends StyledCheckbox.RootProps {
|
|
3
|
+
}
|
|
4
|
+
export declare const Checkbox: import('react').ForwardRefExoticComponent<Omit<CheckboxProps, "ref"> & import('react').RefAttributes<HTMLLabelElement>>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: (props: Omit<import('../../../styled-system/jsx').HTMLStyledProps<"div">, keyof import('@ark-ui/react').SelectRootProps<T>> & {
|
|
5
|
+
collection: any;
|
|
6
|
+
} & import('@ark-ui/react').SelectRootProps<any>) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
tags: string[];
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: string;
|
|
10
|
+
};
|
|
11
|
+
argTypes: {
|
|
12
|
+
className: {
|
|
13
|
+
control: "text";
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export default meta;
|
|
18
|
+
type Story = StoryObj<typeof meta>;
|
|
19
|
+
export declare const Default: Story;
|
|
20
|
+
export declare const WithDescription: Story;
|
|
21
|
+
export declare const WithDescriptionAndCustomIcons: Story;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Select as ArkSelect } from '@ark-ui/react/select';
|
|
2
|
+
import { HTMLStyledProps } from '../../../styled-system/jsx';
|
|
3
|
+
import { Assign } from '@ark-ui/react';
|
|
4
|
+
import { ComponentProps } from 'react';
|
|
5
|
+
export type SelectProps = ComponentProps<typeof Root>;
|
|
6
|
+
type RootProps<T> = Assign<HTMLStyledProps<'div'>, {
|
|
7
|
+
collection: any;
|
|
8
|
+
} & ArkSelect.RootProps<T>>;
|
|
9
|
+
declare const Root: (props: RootProps<any>) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
type LabelProps = Assign<HTMLStyledProps<'label'>, ArkSelect.LabelProps>;
|
|
11
|
+
type TriggerProps = Assign<HTMLStyledProps<'button'>, ArkSelect.TriggerProps & {
|
|
12
|
+
description?: string;
|
|
13
|
+
}>;
|
|
14
|
+
type ValueTextProps = Assign<HTMLStyledProps<'span'>, ArkSelect.ValueTextProps>;
|
|
15
|
+
type DescriptionProps = Assign<HTMLStyledProps<'div'>, {
|
|
16
|
+
text: string;
|
|
17
|
+
className?: string;
|
|
18
|
+
}>;
|
|
19
|
+
type ContentProps = Assign<HTMLStyledProps<'div'>, ArkSelect.ContentProps & {
|
|
20
|
+
radius?: 'md' | 'lg';
|
|
21
|
+
}>;
|
|
22
|
+
type ItemProps = Assign<HTMLStyledProps<'div'>, ArkSelect.ItemProps>;
|
|
23
|
+
declare const Select: {
|
|
24
|
+
Root: (props: RootProps<any>) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
Label: import('react').ForwardRefExoticComponent<Omit<LabelProps, "ref"> & import('react').RefAttributes<HTMLLabelElement>>;
|
|
26
|
+
Trigger: import('react').ForwardRefExoticComponent<Omit<TriggerProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
27
|
+
Content: import('react').ForwardRefExoticComponent<Omit<ContentProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
28
|
+
Item: import('react').ForwardRefExoticComponent<Omit<ItemProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
29
|
+
ValueText: import('react').ForwardRefExoticComponent<Omit<ValueTextProps, "ref"> & import('react').RefAttributes<HTMLSpanElement>>;
|
|
30
|
+
Description: import('react').ForwardRefExoticComponent<Omit<DescriptionProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
31
|
+
};
|
|
32
|
+
export default Select;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export type SelectVariantProps = keyof typeof selectRecipe.variantMap;
|
|
2
|
+
export declare const selectRecipe: import('../../../styled-system/types').SlotRecipeRuntimeFn<"label" | "description" | "content" | "trigger" | "item" | "root" | "valueText", {
|
|
3
|
+
radius: {
|
|
4
|
+
md: {
|
|
5
|
+
trigger: {
|
|
6
|
+
borderRadius: number;
|
|
7
|
+
};
|
|
8
|
+
content: {
|
|
9
|
+
borderRadius: number;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
lg: {
|
|
13
|
+
trigger: {
|
|
14
|
+
borderRadius: number;
|
|
15
|
+
};
|
|
16
|
+
content: {
|
|
17
|
+
borderRadius: number;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
disabled: {
|
|
22
|
+
true: {
|
|
23
|
+
trigger: {
|
|
24
|
+
opacity: number;
|
|
25
|
+
cursor: "not-allowed";
|
|
26
|
+
'&:hover': {
|
|
27
|
+
backgroundColor: "background.neutral.default";
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
}>;
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nation-a/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"type": "module",
|
|
5
|
+
"types": "./dist/types/index.d.ts",
|
|
5
6
|
"main": "./dist/index.cjs",
|
|
6
7
|
"module": "./dist/index.js",
|
|
7
|
-
"types": "./dist/types/index.d.ts",
|
|
8
8
|
"files": [
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"react-hot-toast": "^2.5.2",
|
|
22
22
|
"react-lottie": "^1.2.10",
|
|
23
23
|
"@nation-a/icons": "0.2.0",
|
|
24
|
-
"@nation-a/tokens": "0.2.
|
|
24
|
+
"@nation-a/tokens": "0.2.2"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@chromatic-com/storybook": "^3",
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"@typescript-eslint/eslint-plugin": "^5.59.7",
|
|
45
45
|
"@typescript-eslint/parser": "^5.59.7",
|
|
46
46
|
"@vitejs/plugin-react": "^4.3.4",
|
|
47
|
+
"chromatic": "^11.28.0",
|
|
47
48
|
"eslint": "^8.40.0",
|
|
48
49
|
"eslint-plugin-storybook": "^0.12.0",
|
|
49
50
|
"storybook": "^8.6.11",
|