@sikka/hawa 0.46.4-next → 0.48.0-next

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 (55) hide show
  1. package/dist/{Radio-Dyvlywnk.d.mts → Radio-BPHTeDMz.d.mts} +8 -7
  2. package/dist/{Radio-DlPwVCG4.d.ts → Radio-cRcIH8_L.d.ts} +8 -7
  3. package/dist/blocks/auth/index.d.mts +34 -17
  4. package/dist/blocks/auth/index.d.ts +34 -17
  5. package/dist/blocks/auth/index.js +1008 -430
  6. package/dist/blocks/auth/index.mjs +427 -297
  7. package/dist/blocks/feedback/index.d.mts +1 -1
  8. package/dist/blocks/feedback/index.d.ts +1 -1
  9. package/dist/blocks/feedback/index.js +68 -79
  10. package/dist/blocks/feedback/index.mjs +1 -1
  11. package/dist/blocks/index.d.mts +28 -11
  12. package/dist/blocks/index.d.ts +28 -11
  13. package/dist/blocks/index.js +2340 -2233
  14. package/dist/blocks/index.mjs +407 -269
  15. package/dist/blocks/misc/index.d.mts +1 -1
  16. package/dist/blocks/misc/index.d.ts +1 -1
  17. package/dist/blocks/misc/index.js +68 -79
  18. package/dist/blocks/misc/index.mjs +50 -367
  19. package/dist/blocks/pricing/index.d.mts +1 -1
  20. package/dist/blocks/pricing/index.d.ts +1 -1
  21. package/dist/blocks/pricing/index.mjs +1 -1
  22. package/dist/{chunk-6TG2PHZK.mjs → chunk-AWJSHOYU.mjs} +68 -79
  23. package/dist/{chunk-5CTMGPEF.mjs → chunk-GBLWUEYN.mjs} +650 -674
  24. package/dist/chunk-JFWD2ICY.mjs +511 -0
  25. package/dist/elements/index.d.mts +2 -2
  26. package/dist/elements/index.d.ts +2 -2
  27. package/dist/elements/index.js +81 -105
  28. package/dist/elements/index.mjs +1 -1
  29. package/dist/index.css +7 -0
  30. package/dist/index.d.mts +36 -17
  31. package/dist/index.d.ts +36 -17
  32. package/dist/index.js +482 -373
  33. package/dist/index.mjs +487 -373
  34. package/dist/phoneInput/index.d.mts +7 -7
  35. package/dist/phoneInput/index.d.ts +7 -7
  36. package/dist/phoneInput/index.js +78 -85
  37. package/dist/phoneInput/index.js.map +1 -1
  38. package/dist/phoneInput/index.mjs +78 -85
  39. package/dist/phoneInput/index.mjs.map +1 -1
  40. package/dist/pinInput/index.js +3 -20
  41. package/dist/pinInput/index.js.map +1 -1
  42. package/dist/pinInput/index.mjs +3 -20
  43. package/dist/pinInput/index.mjs.map +1 -1
  44. package/dist/select/index.d.mts +1 -0
  45. package/dist/select/index.d.ts +1 -0
  46. package/dist/select/index.js +68 -79
  47. package/dist/select/index.js.map +1 -1
  48. package/dist/select/index.mjs +68 -79
  49. package/dist/select/index.mjs.map +1 -1
  50. package/dist/{textTypes-DXLtO2fL.d.mts → textTypes-CYQYIsFt.d.mts} +1 -0
  51. package/dist/{textTypes-DXLtO2fL.d.ts → textTypes-CYQYIsFt.d.ts} +1 -0
  52. package/dist/types/index.d.mts +1 -0
  53. package/dist/types/index.d.ts +1 -0
  54. package/package.json +1 -1
  55. package/dist/chunk-EOH6A3GR.mjs +0 -183
@@ -1,5 +1,5 @@
1
1
  import React__default, { FC } from 'react';
2
- import { T as TextInputType, R as RadioOptionType } from '../../textTypes-DXLtO2fL.mjs';
2
+ import { T as TextInputType, R as RadioOptionType } from '../../textTypes-CYQYIsFt.mjs';
3
3
 
4
4
  type TabType = {
5
5
  title: string;
@@ -1,5 +1,5 @@
1
1
  import React__default, { FC } from 'react';
2
- import { T as TextInputType, R as RadioOptionType } from '../../textTypes-DXLtO2fL.js';
2
+ import { T as TextInputType, R as RadioOptionType } from '../../textTypes-CYQYIsFt.js';
3
3
 
4
4
  type TabType = {
5
5
  title: string;
@@ -1499,6 +1499,7 @@ var import_clsx2 = __toESM(require("clsx"));
1499
1499
  var Select = ({
1500
1500
  labelProps,
1501
1501
  labelKey = "label",
1502
+ valueKey = "value",
1502
1503
  ...props
1503
1504
  }) => {
1504
1505
  const NoOption = () => {
@@ -1518,13 +1519,7 @@ var Select = ({
1518
1519
  children
1519
1520
  );
1520
1521
  };
1521
- const Option = ({
1522
- children,
1523
- innerProps,
1524
- innerRef,
1525
- isFocused,
1526
- isSelected
1527
- }) => {
1522
+ const Option = ({ children, innerProps, innerRef, isFocused, isSelected }) => {
1528
1523
  return /* @__PURE__ */ import_react33.default.createElement(
1529
1524
  "div",
1530
1525
  {
@@ -1539,14 +1534,7 @@ var Select = ({
1539
1534
  children
1540
1535
  );
1541
1536
  };
1542
- const Menu = ({
1543
- cx,
1544
- children,
1545
- getStyles,
1546
- innerProps,
1547
- innerRef,
1548
- ...menuProps
1549
- }) => {
1537
+ const Menu = ({ cx, children, getStyles, innerProps, innerRef, ...menuProps }) => {
1550
1538
  const menuOpen = menuProps.selectProps.menuIsOpen;
1551
1539
  return /* @__PURE__ */ import_react33.default.createElement(
1552
1540
  "div",
@@ -1575,71 +1563,72 @@ var Select = ({
1575
1563
  )
1576
1564
  },
1577
1565
  props.label && /* @__PURE__ */ import_react33.default.createElement(Label, { ...labelProps }, props.label),
1578
- props.isLoading ? /* @__PURE__ */ import_react33.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" }) : !props.isCreatable ? (
1579
- // TODO: enable keyboard to go to the next item in the list
1580
- /* @__PURE__ */ import_react33.default.createElement(
1581
- import_react_select.default,
1582
- {
1583
- noOptionsMessage: NoOption,
1584
- classNames: {
1585
- control: () => cn(
1586
- props.phoneCode && "hawa-rounded-r-none",
1587
- props.controlClassNames
1588
- ),
1589
- container: () => cn(
1590
- selectContainerStyles,
1591
- props.phoneCode && phoneCodeStyles,
1592
- props.isMulti && "hawa-ps-0 "
1593
- ),
1594
- placeholder: () => cn(
1595
- selectPlaceholderStyles,
1596
- props.disabled && "hawa-text-muted-foreground"
1597
- ),
1598
- valueContainer: () => "hawa-text-foreground hawa-px-1 ",
1599
- singleValue: () => cn(
1600
- props.disabled ? "hawa-text-muted-foreground hawa-opacity-30" : "hawa-text-foreground"
1601
- ),
1602
- indicatorsContainer: () => cn(
1603
- selectIndicatorContainerStyles,
1604
- props.hideIndicator ? "hawa-invisible" : "hawa-px-1",
1605
- props.disabled && "hawa-opacity-30"
1606
- )
1607
- },
1608
- unstyled: true,
1609
- autoFocus: false,
1610
- components: props.hideIndicator ? { Option, Menu, IndicatorsContainer: () => null } : {
1566
+ props.isLoading ? /* @__PURE__ */ import_react33.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" }) : !props.isCreatable ? /* @__PURE__ */ import_react33.default.createElement(
1567
+ import_react_select.default,
1568
+ {
1569
+ noOptionsMessage: NoOption,
1570
+ classNames: {
1571
+ control: () => cn(props.phoneCode && "hawa-rounded-r-none", props.controlClassNames),
1572
+ container: () => cn(
1573
+ selectContainerStyles,
1574
+ props.phoneCode && phoneCodeStyles,
1575
+ props.isMulti && "hawa-ps-0 "
1576
+ ),
1577
+ placeholder: () => cn(selectPlaceholderStyles, props.disabled && "hawa-text-muted-foreground"),
1578
+ valueContainer: () => "hawa-text-foreground hawa-px-1",
1579
+ singleValue: () => cn(
1580
+ props.disabled ? "hawa-text-muted-foreground hawa-opacity-30" : "hawa-text-foreground"
1581
+ ),
1582
+ indicatorsContainer: () => cn(
1583
+ selectIndicatorContainerStyles,
1584
+ props.hideIndicator ? "hawa-invisible" : "hawa-px-1",
1585
+ props.disabled && "hawa-opacity-30"
1586
+ )
1587
+ },
1588
+ unstyled: true,
1589
+ autoFocus: false,
1590
+ components: props.hideIndicator ? {
1591
+ Option: (optionProps) => /* @__PURE__ */ import_react33.default.createElement(
1611
1592
  Option,
1612
- Menu,
1613
- ValueContainer: (e) => /* @__PURE__ */ import_react33.default.createElement(
1614
- "div",
1615
- {
1616
- className: cn(
1617
- e.className,
1618
- "hawa-gap-1 hawa-flex hawa-flex-row hawa-flex-wrap hawa-p-1"
1619
- ),
1620
- ...e
1621
- }
1622
- ),
1623
- MultiValueContainer: (e) => /* @__PURE__ */ import_react33.default.createElement(
1624
- "div",
1625
- {
1626
- className: "hawa-rounded hawa-border hawa-p-1 hawa-px-2 hawa-flex hawa-flex-row",
1627
- ...e
1628
- }
1629
- )
1630
- },
1631
- onChange: (newValue, action) => props.onChange(newValue, action),
1632
- options: props.options,
1633
- getOptionLabel: props.getOptionLabel,
1634
- defaultValue: props.defaultValue,
1635
- value: props.value,
1636
- placeholder: props.placeholder,
1637
- isDisabled: props.disabled,
1638
- isClearable: props.isClearable,
1639
- isMulti: props.isMulti,
1640
- isSearchable: props.isSearchable
1641
- }
1642
- )
1593
+ {
1594
+ ...optionProps,
1595
+ isSelected: optionProps.data[valueKey] === props.value[valueKey]
1596
+ }
1597
+ ),
1598
+ Menu,
1599
+ IndicatorsContainer: () => null
1600
+ } : {
1601
+ Option,
1602
+ Menu,
1603
+ ValueContainer: (e) => /* @__PURE__ */ import_react33.default.createElement(
1604
+ "div",
1605
+ {
1606
+ className: cn(
1607
+ e.className,
1608
+ "hawa-gap-1 hawa-flex hawa-flex-row hawa-flex-wrap hawa-p-2 hawa-w-full hawa-cursor-pointer"
1609
+ ),
1610
+ ...e
1611
+ }
1612
+ ),
1613
+ MultiValueContainer: (e) => /* @__PURE__ */ import_react33.default.createElement(
1614
+ "div",
1615
+ {
1616
+ className: "hawa-rounded hawa-border hawa-p-1 hawa-px-2 hawa-flex hawa-flex-row",
1617
+ ...e
1618
+ }
1619
+ )
1620
+ },
1621
+ onChange: (newValue, action) => props.onChange(newValue, action),
1622
+ options: props.options,
1623
+ getOptionLabel: props.getOptionLabel,
1624
+ defaultValue: props.defaultValue,
1625
+ value: props.value,
1626
+ placeholder: props.placeholder,
1627
+ isDisabled: props.disabled,
1628
+ isClearable: props.isClearable,
1629
+ isMulti: props.isMulti,
1630
+ isSearchable: props.isSearchable
1631
+ }
1643
1632
  ) : /* @__PURE__ */ import_react33.default.createElement(
1644
1633
  import_creatable.default,
1645
1634
  {