@nation-a/ui 0.14.0 → 0.15.1

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 CHANGED
@@ -888,6 +888,8 @@ const buttonRecipe = cva({
888
888
  heyd_primary: {},
889
889
  heyd_secondary: {},
890
890
  heybee_primary: {},
891
+ blackAlpha: {},
892
+ whiteAlpha: {},
891
893
  neutral: {},
892
894
  danger: {},
893
895
  warning: {},
@@ -1013,6 +1015,24 @@ const buttonRecipe = cva({
1013
1015
  _hover: { background: "background.heybeePrimary.selected" }
1014
1016
  }
1015
1017
  },
1018
+ {
1019
+ variant: "solid",
1020
+ color: "blackAlpha",
1021
+ css: {
1022
+ background: "background.static.blackAlpha.default",
1023
+ color: "content.neutral.default",
1024
+ _hover: { background: "background.static.blackAlpha.selected" }
1025
+ }
1026
+ },
1027
+ {
1028
+ variant: "solid",
1029
+ color: "whiteAlpha",
1030
+ css: {
1031
+ background: "background.static.whiteAlpha.default",
1032
+ color: "content.neutral.default",
1033
+ _hover: { background: "background.static.whiteAlpha.selected" }
1034
+ }
1035
+ },
1016
1036
  {
1017
1037
  variant: "solid",
1018
1038
  color: "neutral",
@@ -9963,7 +9983,7 @@ const Button = ({ loading, disabled, loadingText, children, color: color2, varia
9963
9983
  }
9964
9984
  );
9965
9985
  };
9966
- const index$4 = React.memo(withPolymorphicComponent(Button));
9986
+ const index$5 = React.memo(withPolymorphicComponent(Button));
9967
9987
  const textRecipe = cva({
9968
9988
  base: {
9969
9989
  color: "currentcolor"
@@ -10291,6 +10311,8 @@ const iconButtonRecipe = cva({
10291
10311
  zoltarina_primary: {},
10292
10312
  heyd_primary: {},
10293
10313
  heybee_primary: {},
10314
+ blackAlpha: {},
10315
+ whiteAlpha: {},
10294
10316
  neutral: {}
10295
10317
  },
10296
10318
  size: {
@@ -10360,6 +10382,24 @@ const iconButtonRecipe = cva({
10360
10382
  _hover: { background: "background.heybeePrimary.selected" }
10361
10383
  }
10362
10384
  },
10385
+ {
10386
+ variant: "solid",
10387
+ color: "blackAlpha",
10388
+ css: {
10389
+ background: "background.static.blackAlpha.default",
10390
+ color: "content.neutral.default",
10391
+ _hover: { background: "background.static.blackAlpha.selected" }
10392
+ }
10393
+ },
10394
+ {
10395
+ variant: "solid",
10396
+ color: "whiteAlpha",
10397
+ css: {
10398
+ background: "background.static.whiteAlpha.default",
10399
+ color: "content.neutral.default",
10400
+ _hover: { background: "background.static.whiteAlpha.selected" }
10401
+ }
10402
+ },
10363
10403
  {
10364
10404
  variant: "solid",
10365
10405
  color: "neutral",
@@ -10405,7 +10445,7 @@ const IconButton = React.forwardRef(
10405
10445
  }
10406
10446
  );
10407
10447
  IconButton.displayName = "IconButton";
10408
- const index$3 = React.memo(withPolymorphicComponent(IconButton));
10448
+ const index$4 = React.memo(withPolymorphicComponent(IconButton));
10409
10449
  const LayoutGroupContext = React.createContext({});
10410
10450
  function useConstant(init) {
10411
10451
  const ref = React.useRef(null);
@@ -19546,7 +19586,7 @@ const Tag = React.forwardRef(({ imageSrc, text, onDeleteClick, ...rest }, ref) =
19546
19586
  ] });
19547
19587
  });
19548
19588
  Tag.displayName = "Tag";
19549
- const index$2 = React.memo(Tag);
19589
+ const index$3 = React.memo(Tag);
19550
19590
  const inputRecipe = sva({
19551
19591
  className: "input",
19552
19592
  slots: ["inputContainer", "requiredStar", "description", "label", "textLengthIndicator", "adornment"],
@@ -19829,19 +19869,19 @@ const Input = React.forwardRef(
19829
19869
  /* @__PURE__ */ jsxRuntime.jsx(Label2, { visible: !!(label && labelPosition === "outside"), children: label }),
19830
19870
  " ",
19831
19871
  /* @__PURE__ */ jsxRuntime.jsxs(HStack$1, { className: cx(recipe.inputContainer, className), onClick: handleContainerClick, css: css2, children: [
19832
- /* @__PURE__ */ jsxRuntime.jsx(Box$1, { className: recipe.adornment, children: startAdornment }),
19872
+ startAdornment && /* @__PURE__ */ jsxRuntime.jsx(Box$1, { className: recipe.adornment, children: startAdornment }),
19833
19873
  /* @__PURE__ */ jsxRuntime.jsxs(Stack2, { gap: 1, css: { width: "100%" }, children: [
19834
19874
  /* @__PURE__ */ jsxRuntime.jsx(Label2, { visible: !!(label && labelPosition === "inside"), children: label }),
19835
19875
  /* @__PURE__ */ jsxRuntime.jsx(styled.input, { ref: inputRef, disabled, onChange: handleInputChange, ...rest })
19836
19876
  ] }),
19837
- /* @__PURE__ */ jsxRuntime.jsx(Box$1, { className: recipe.adornment, children: endAdornment })
19877
+ endAdornment && /* @__PURE__ */ jsxRuntime.jsx(Box$1, { className: recipe.adornment, children: endAdornment })
19838
19878
  ] }),
19839
19879
  description && /* @__PURE__ */ jsxRuntime.jsx(Description2, { children: description })
19840
19880
  ] });
19841
19881
  }
19842
19882
  );
19843
19883
  Input.displayName = "Input";
19844
- const index$1 = React.memo(Input);
19884
+ const index$2 = React.memo(Input);
19845
19885
  const Textarea = React.forwardRef(
19846
19886
  ({
19847
19887
  value,
@@ -19924,7 +19964,7 @@ const Textarea = React.forwardRef(
19924
19964
  }
19925
19965
  );
19926
19966
  Textarea.displayName = "Textarea";
19927
- const index = React.memo(Textarea);
19967
+ const index$1 = React.memo(Textarea);
19928
19968
  const tabsRecipe = sva({
19929
19969
  className: "tabs",
19930
19970
  slots: anatomy.keys(),
@@ -21230,6 +21270,115 @@ const Switch = React.forwardRef((props, ref) => {
21230
21270
  ] });
21231
21271
  });
21232
21272
  Switch.displayName = "Switch";
21273
+ const fabRecipe = cva({
21274
+ base: {
21275
+ alignItems: "center",
21276
+ appearance: "none",
21277
+ cursor: "pointer",
21278
+ display: "inline-flex",
21279
+ isolation: "isolate",
21280
+ minWidth: "0",
21281
+ justifyContent: "center",
21282
+ outline: "none",
21283
+ position: "relative",
21284
+ transitionDuration: "normal",
21285
+ transitionProperty: "background, border-color, color, box-shadow",
21286
+ transitionTimingFunction: "default",
21287
+ userSelect: "none",
21288
+ verticalAlign: "middle",
21289
+ borderRadius: "full",
21290
+ color: "content.neutral.bold",
21291
+ h: 14,
21292
+ w: 14,
21293
+ shadow: "overlay",
21294
+ "& :where(svg)": {
21295
+ width: "24px",
21296
+ height: "24px"
21297
+ },
21298
+ _hidden: {
21299
+ display: "none"
21300
+ },
21301
+ _disabled: {
21302
+ background: "background.neutral.disabled",
21303
+ color: "content.neutral.disabled",
21304
+ cursor: "not-allowed",
21305
+ pointerEvents: "none"
21306
+ }
21307
+ },
21308
+ defaultVariants: {
21309
+ color: "neutral"
21310
+ },
21311
+ variants: {
21312
+ color: {
21313
+ neuroid_primary: {
21314
+ background: "background.neuroidPrimary.default",
21315
+ color: "content.neutral.bold",
21316
+ _hover: { background: "background.neuroidPrimary.selected" }
21317
+ },
21318
+ zoltarina_primary: {
21319
+ background: "background.zoltarinaPrimary.default",
21320
+ color: "content.static.black.bold",
21321
+ _hover: { background: "background.zoltarinaPrimary.selected" }
21322
+ },
21323
+ heyd_primary: {
21324
+ background: "background.heydPrimary.default",
21325
+ color: "content.static.black.bold",
21326
+ _hover: { background: "background.heydPrimary.selected" }
21327
+ },
21328
+ heybee_primary: {
21329
+ background: "background.heybeePrimary.default",
21330
+ color: "content.static.black.bold",
21331
+ _hover: { background: "background.heybeePrimary.selected" }
21332
+ },
21333
+ blackAlpha: {
21334
+ background: "background.static.blackAlpha.default",
21335
+ color: "content.neutral.default",
21336
+ _hover: { background: "background.static.blackAlpha.selected" }
21337
+ },
21338
+ whiteAlpha: {
21339
+ background: "background.static.whiteAlpha.default",
21340
+ color: "content.neutral.default",
21341
+ _hover: { background: "background.static.whiteAlpha.selected" }
21342
+ },
21343
+ neutral: {
21344
+ background: "background.neutral.default",
21345
+ color: "content.neutral.bold",
21346
+ _hover: { background: "background.neutral.selected" }
21347
+ }
21348
+ }
21349
+ }
21350
+ });
21351
+ const Fab = React.forwardRef(({ loading, disabled, children, color: color2, ...rest }, ref) => {
21352
+ const StyledButton = styled(ark.button, fabRecipe);
21353
+ return /* @__PURE__ */ jsxRuntime.jsx(
21354
+ StyledButton,
21355
+ {
21356
+ disabled,
21357
+ ref,
21358
+ color: color2,
21359
+ css: { pointerEvents: loading ? "none" : "auto" },
21360
+ ...rest,
21361
+ children: loading ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
21362
+ /* @__PURE__ */ jsxRuntime.jsx(
21363
+ Center$1,
21364
+ {
21365
+ inline: true,
21366
+ css: {
21367
+ position: "absolute",
21368
+ transform: "translate(-50%, -50%)",
21369
+ top: "50%",
21370
+ insetStart: "50%"
21371
+ },
21372
+ children: /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: "md" })
21373
+ }
21374
+ ),
21375
+ /* @__PURE__ */ jsxRuntime.jsx(styled.span, { css: { opacity: 0 }, children })
21376
+ ] }) : children
21377
+ }
21378
+ );
21379
+ });
21380
+ Fab.displayName = "Fab";
21381
+ const index = React.memo(withPolymorphicComponent(Fab));
21233
21382
  function definePreset(preset2) {
21234
21383
  return preset2;
21235
21384
  }
@@ -21542,16 +21691,17 @@ const preset = definePreset({
21542
21691
  });
21543
21692
  exports.BottomSheet = BottomSheet;
21544
21693
  exports.Box = Box2;
21545
- exports.Button = index$4;
21694
+ exports.Button = index$5;
21546
21695
  exports.Center = Center2;
21547
21696
  exports.Checkbox = Checkbox;
21548
21697
  exports.Dialog = Dialog;
21698
+ exports.Fab = index;
21549
21699
  exports.Flex = Flex2;
21550
21700
  exports.Grid = Grid2;
21551
21701
  exports.GridItem = GridItem2;
21552
21702
  exports.HStack = HStack2;
21553
- exports.IconButton = index$3;
21554
- exports.Input = index$1;
21703
+ exports.IconButton = index$4;
21704
+ exports.Input = index$2;
21555
21705
  exports.Navigation = Navigation;
21556
21706
  exports.Portal = Portal;
21557
21707
  exports.RadioGroup = RadioGroup;
@@ -21560,9 +21710,9 @@ exports.Spinner = Spinner;
21560
21710
  exports.Stack = Stack2;
21561
21711
  exports.Switch = Switch;
21562
21712
  exports.Tabs = Tabs;
21563
- exports.Tag = index$2;
21713
+ exports.Tag = index$3;
21564
21714
  exports.Text = Text;
21565
- exports.TextArea = index;
21715
+ exports.TextArea = index$1;
21566
21716
  exports.Toast = Toast;
21567
21717
  exports.VStack = VStack2;
21568
21718
  exports.createListCollection = createListCollection;