@nation-a/ui 0.14.0 → 0.15.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 +160 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +160 -10
- package/dist/index.js.map +1 -1
- package/dist/styled-system/styles.css +36 -16
- package/dist/types/components/Button/button.recipe.d.ts +2 -0
- package/dist/types/components/Button/index.d.ts +1 -1
- package/dist/types/components/Fab/Fab.stories.d.ts +7 -0
- package/dist/types/components/Fab/fab.recipe.d.ts +55 -0
- package/dist/types/components/Fab/index.d.ts +11 -0
- package/dist/types/components/IconButton/icon-button.recipe.d.ts +2 -0
- package/dist/types/components/index.d.ts +1 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -870,6 +870,8 @@ const buttonRecipe = cva({
|
|
|
870
870
|
heyd_primary: {},
|
|
871
871
|
heyd_secondary: {},
|
|
872
872
|
heybee_primary: {},
|
|
873
|
+
blackAlpha: {},
|
|
874
|
+
whiteAlpha: {},
|
|
873
875
|
neutral: {},
|
|
874
876
|
danger: {},
|
|
875
877
|
warning: {},
|
|
@@ -995,6 +997,24 @@ const buttonRecipe = cva({
|
|
|
995
997
|
_hover: { background: "background.heybeePrimary.selected" }
|
|
996
998
|
}
|
|
997
999
|
},
|
|
1000
|
+
{
|
|
1001
|
+
variant: "solid",
|
|
1002
|
+
color: "blackAlpha",
|
|
1003
|
+
css: {
|
|
1004
|
+
background: "background.static.blackAlpha.default",
|
|
1005
|
+
color: "content.neutral.default",
|
|
1006
|
+
_hover: { background: "background.static.blackAlpha.selected" }
|
|
1007
|
+
}
|
|
1008
|
+
},
|
|
1009
|
+
{
|
|
1010
|
+
variant: "solid",
|
|
1011
|
+
color: "whiteAlpha",
|
|
1012
|
+
css: {
|
|
1013
|
+
background: "background.static.whiteAlpha.default",
|
|
1014
|
+
color: "content.neutral.default",
|
|
1015
|
+
_hover: { background: "background.static.whiteAlpha.selected" }
|
|
1016
|
+
}
|
|
1017
|
+
},
|
|
998
1018
|
{
|
|
999
1019
|
variant: "solid",
|
|
1000
1020
|
color: "neutral",
|
|
@@ -9945,7 +9965,7 @@ const Button = ({ loading, disabled, loadingText, children, color: color2, varia
|
|
|
9945
9965
|
}
|
|
9946
9966
|
);
|
|
9947
9967
|
};
|
|
9948
|
-
const index$
|
|
9968
|
+
const index$5 = memo$2(withPolymorphicComponent(Button));
|
|
9949
9969
|
const textRecipe = cva({
|
|
9950
9970
|
base: {
|
|
9951
9971
|
color: "currentcolor"
|
|
@@ -10273,6 +10293,8 @@ const iconButtonRecipe = cva({
|
|
|
10273
10293
|
zoltarina_primary: {},
|
|
10274
10294
|
heyd_primary: {},
|
|
10275
10295
|
heybee_primary: {},
|
|
10296
|
+
blackAlpha: {},
|
|
10297
|
+
whiteAlpha: {},
|
|
10276
10298
|
neutral: {}
|
|
10277
10299
|
},
|
|
10278
10300
|
size: {
|
|
@@ -10342,6 +10364,24 @@ const iconButtonRecipe = cva({
|
|
|
10342
10364
|
_hover: { background: "background.heybeePrimary.selected" }
|
|
10343
10365
|
}
|
|
10344
10366
|
},
|
|
10367
|
+
{
|
|
10368
|
+
variant: "solid",
|
|
10369
|
+
color: "blackAlpha",
|
|
10370
|
+
css: {
|
|
10371
|
+
background: "background.static.blackAlpha.default",
|
|
10372
|
+
color: "content.neutral.default",
|
|
10373
|
+
_hover: { background: "background.static.blackAlpha.selected" }
|
|
10374
|
+
}
|
|
10375
|
+
},
|
|
10376
|
+
{
|
|
10377
|
+
variant: "solid",
|
|
10378
|
+
color: "whiteAlpha",
|
|
10379
|
+
css: {
|
|
10380
|
+
background: "background.static.whiteAlpha.default",
|
|
10381
|
+
color: "content.neutral.default",
|
|
10382
|
+
_hover: { background: "background.static.whiteAlpha.selected" }
|
|
10383
|
+
}
|
|
10384
|
+
},
|
|
10345
10385
|
{
|
|
10346
10386
|
variant: "solid",
|
|
10347
10387
|
color: "neutral",
|
|
@@ -10387,7 +10427,7 @@ const IconButton = forwardRef(
|
|
|
10387
10427
|
}
|
|
10388
10428
|
);
|
|
10389
10429
|
IconButton.displayName = "IconButton";
|
|
10390
|
-
const index$
|
|
10430
|
+
const index$4 = memo$2(withPolymorphicComponent(IconButton));
|
|
10391
10431
|
const LayoutGroupContext = createContext$1({});
|
|
10392
10432
|
function useConstant(init) {
|
|
10393
10433
|
const ref = useRef(null);
|
|
@@ -19528,7 +19568,7 @@ const Tag = forwardRef(({ imageSrc, text, onDeleteClick, ...rest }, ref) => {
|
|
|
19528
19568
|
] });
|
|
19529
19569
|
});
|
|
19530
19570
|
Tag.displayName = "Tag";
|
|
19531
|
-
const index$
|
|
19571
|
+
const index$3 = memo$2(Tag);
|
|
19532
19572
|
const inputRecipe = sva({
|
|
19533
19573
|
className: "input",
|
|
19534
19574
|
slots: ["inputContainer", "requiredStar", "description", "label", "textLengthIndicator", "adornment"],
|
|
@@ -19823,7 +19863,7 @@ const Input = forwardRef(
|
|
|
19823
19863
|
}
|
|
19824
19864
|
);
|
|
19825
19865
|
Input.displayName = "Input";
|
|
19826
|
-
const index$
|
|
19866
|
+
const index$2 = memo$2(Input);
|
|
19827
19867
|
const Textarea = forwardRef(
|
|
19828
19868
|
({
|
|
19829
19869
|
value,
|
|
@@ -19906,7 +19946,7 @@ const Textarea = forwardRef(
|
|
|
19906
19946
|
}
|
|
19907
19947
|
);
|
|
19908
19948
|
Textarea.displayName = "Textarea";
|
|
19909
|
-
const index = memo$2(Textarea);
|
|
19949
|
+
const index$1 = memo$2(Textarea);
|
|
19910
19950
|
const tabsRecipe = sva({
|
|
19911
19951
|
className: "tabs",
|
|
19912
19952
|
slots: anatomy.keys(),
|
|
@@ -21212,6 +21252,115 @@ const Switch = forwardRef((props, ref) => {
|
|
|
21212
21252
|
] });
|
|
21213
21253
|
});
|
|
21214
21254
|
Switch.displayName = "Switch";
|
|
21255
|
+
const fabRecipe = cva({
|
|
21256
|
+
base: {
|
|
21257
|
+
alignItems: "center",
|
|
21258
|
+
appearance: "none",
|
|
21259
|
+
cursor: "pointer",
|
|
21260
|
+
display: "inline-flex",
|
|
21261
|
+
isolation: "isolate",
|
|
21262
|
+
minWidth: "0",
|
|
21263
|
+
justifyContent: "center",
|
|
21264
|
+
outline: "none",
|
|
21265
|
+
position: "relative",
|
|
21266
|
+
transitionDuration: "normal",
|
|
21267
|
+
transitionProperty: "background, border-color, color, box-shadow",
|
|
21268
|
+
transitionTimingFunction: "default",
|
|
21269
|
+
userSelect: "none",
|
|
21270
|
+
verticalAlign: "middle",
|
|
21271
|
+
borderRadius: "full",
|
|
21272
|
+
color: "content.neutral.bold",
|
|
21273
|
+
h: 14,
|
|
21274
|
+
w: 14,
|
|
21275
|
+
shadow: "overlay",
|
|
21276
|
+
"& :where(svg)": {
|
|
21277
|
+
width: "24px",
|
|
21278
|
+
height: "24px"
|
|
21279
|
+
},
|
|
21280
|
+
_hidden: {
|
|
21281
|
+
display: "none"
|
|
21282
|
+
},
|
|
21283
|
+
_disabled: {
|
|
21284
|
+
background: "background.neutral.disabled",
|
|
21285
|
+
color: "content.neutral.disabled",
|
|
21286
|
+
cursor: "not-allowed",
|
|
21287
|
+
pointerEvents: "none"
|
|
21288
|
+
}
|
|
21289
|
+
},
|
|
21290
|
+
defaultVariants: {
|
|
21291
|
+
color: "neutral"
|
|
21292
|
+
},
|
|
21293
|
+
variants: {
|
|
21294
|
+
color: {
|
|
21295
|
+
neuroid_primary: {
|
|
21296
|
+
background: "background.neuroidPrimary.default",
|
|
21297
|
+
color: "content.neutral.bold",
|
|
21298
|
+
_hover: { background: "background.neuroidPrimary.selected" }
|
|
21299
|
+
},
|
|
21300
|
+
zoltarina_primary: {
|
|
21301
|
+
background: "background.zoltarinaPrimary.default",
|
|
21302
|
+
color: "content.static.black.bold",
|
|
21303
|
+
_hover: { background: "background.zoltarinaPrimary.selected" }
|
|
21304
|
+
},
|
|
21305
|
+
heyd_primary: {
|
|
21306
|
+
background: "background.heydPrimary.default",
|
|
21307
|
+
color: "content.static.black.bold",
|
|
21308
|
+
_hover: { background: "background.heydPrimary.selected" }
|
|
21309
|
+
},
|
|
21310
|
+
heybee_primary: {
|
|
21311
|
+
background: "background.heybeePrimary.default",
|
|
21312
|
+
color: "content.static.black.bold",
|
|
21313
|
+
_hover: { background: "background.heybeePrimary.selected" }
|
|
21314
|
+
},
|
|
21315
|
+
blackAlpha: {
|
|
21316
|
+
background: "background.static.blackAlpha.default",
|
|
21317
|
+
color: "content.neutral.default",
|
|
21318
|
+
_hover: { background: "background.static.blackAlpha.selected" }
|
|
21319
|
+
},
|
|
21320
|
+
whiteAlpha: {
|
|
21321
|
+
background: "background.static.whiteAlpha.default",
|
|
21322
|
+
color: "content.neutral.default",
|
|
21323
|
+
_hover: { background: "background.static.whiteAlpha.selected" }
|
|
21324
|
+
},
|
|
21325
|
+
neutral: {
|
|
21326
|
+
background: "background.neutral.default",
|
|
21327
|
+
color: "content.neutral.bold",
|
|
21328
|
+
_hover: { background: "background.neutral.selected" }
|
|
21329
|
+
}
|
|
21330
|
+
}
|
|
21331
|
+
}
|
|
21332
|
+
});
|
|
21333
|
+
const Fab = forwardRef(({ loading, disabled, children, color: color2, ...rest }, ref) => {
|
|
21334
|
+
const StyledButton = styled(ark.button, fabRecipe);
|
|
21335
|
+
return /* @__PURE__ */ jsx(
|
|
21336
|
+
StyledButton,
|
|
21337
|
+
{
|
|
21338
|
+
disabled,
|
|
21339
|
+
ref,
|
|
21340
|
+
color: color2,
|
|
21341
|
+
css: { pointerEvents: loading ? "none" : "auto" },
|
|
21342
|
+
...rest,
|
|
21343
|
+
children: loading ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
21344
|
+
/* @__PURE__ */ jsx(
|
|
21345
|
+
Center$1,
|
|
21346
|
+
{
|
|
21347
|
+
inline: true,
|
|
21348
|
+
css: {
|
|
21349
|
+
position: "absolute",
|
|
21350
|
+
transform: "translate(-50%, -50%)",
|
|
21351
|
+
top: "50%",
|
|
21352
|
+
insetStart: "50%"
|
|
21353
|
+
},
|
|
21354
|
+
children: /* @__PURE__ */ jsx(Spinner, { size: "md" })
|
|
21355
|
+
}
|
|
21356
|
+
),
|
|
21357
|
+
/* @__PURE__ */ jsx(styled.span, { css: { opacity: 0 }, children })
|
|
21358
|
+
] }) : children
|
|
21359
|
+
}
|
|
21360
|
+
);
|
|
21361
|
+
});
|
|
21362
|
+
Fab.displayName = "Fab";
|
|
21363
|
+
const index = memo$2(withPolymorphicComponent(Fab));
|
|
21215
21364
|
function definePreset(preset2) {
|
|
21216
21365
|
return preset2;
|
|
21217
21366
|
}
|
|
@@ -21525,16 +21674,17 @@ const preset = definePreset({
|
|
|
21525
21674
|
export {
|
|
21526
21675
|
BottomSheet,
|
|
21527
21676
|
Box2 as Box,
|
|
21528
|
-
index$
|
|
21677
|
+
index$5 as Button,
|
|
21529
21678
|
Center2 as Center,
|
|
21530
21679
|
Checkbox,
|
|
21531
21680
|
Dialog,
|
|
21681
|
+
index as Fab,
|
|
21532
21682
|
Flex2 as Flex,
|
|
21533
21683
|
Grid2 as Grid,
|
|
21534
21684
|
GridItem2 as GridItem,
|
|
21535
21685
|
HStack2 as HStack,
|
|
21536
|
-
index$
|
|
21537
|
-
index$
|
|
21686
|
+
index$4 as IconButton,
|
|
21687
|
+
index$2 as Input,
|
|
21538
21688
|
Navigation,
|
|
21539
21689
|
Portal,
|
|
21540
21690
|
RadioGroup,
|
|
@@ -21543,9 +21693,9 @@ export {
|
|
|
21543
21693
|
Stack2 as Stack,
|
|
21544
21694
|
Switch,
|
|
21545
21695
|
Tabs,
|
|
21546
|
-
index$
|
|
21696
|
+
index$3 as Tag,
|
|
21547
21697
|
Text,
|
|
21548
|
-
index as TextArea,
|
|
21698
|
+
index$1 as TextArea,
|
|
21549
21699
|
Toast,
|
|
21550
21700
|
VStack2 as VStack,
|
|
21551
21701
|
createListCollection,
|