@knkcs/anker 0.0.3 → 0.0.4

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 (43) hide show
  1. package/dist/atoms/index.d.ts +16 -3
  2. package/dist/atoms/index.js +89 -6
  3. package/dist/atoms/index.js.map +1 -1
  4. package/dist/chunk-5YDCDC4B.js +12 -0
  5. package/dist/chunk-5YDCDC4B.js.map +1 -0
  6. package/dist/{chunk-C4JI3JNA.js → chunk-6H4LQUMM.js} +4 -33
  7. package/dist/chunk-6H4LQUMM.js.map +1 -0
  8. package/dist/{chunk-PZCL4M6I.js → chunk-E7KRPPCQ.js} +5 -18
  9. package/dist/chunk-E7KRPPCQ.js.map +1 -0
  10. package/dist/{chunk-GJTQLZ4O.js → chunk-KVPN6T6J.js} +6 -28
  11. package/dist/chunk-KVPN6T6J.js.map +1 -0
  12. package/dist/chunk-OU6H3KU4.js +21 -0
  13. package/dist/chunk-OU6H3KU4.js.map +1 -0
  14. package/dist/chunk-SJ6YXNZW.js +30 -0
  15. package/dist/chunk-SJ6YXNZW.js.map +1 -0
  16. package/dist/chunk-SJIYWHIV.js +51 -0
  17. package/dist/chunk-SJIYWHIV.js.map +1 -0
  18. package/dist/chunk-WEP2AIQ5.js +37 -0
  19. package/dist/chunk-WEP2AIQ5.js.map +1 -0
  20. package/dist/chunk-WQIEF5N3.js +52 -0
  21. package/dist/chunk-WQIEF5N3.js.map +1 -0
  22. package/dist/{chunk-QU3FF5WI.js → chunk-ZFBDVERP.js} +4 -8
  23. package/dist/chunk-ZFBDVERP.js.map +1 -0
  24. package/dist/components/index.d.ts +171 -3
  25. package/dist/components/index.js +685 -11
  26. package/dist/components/index.js.map +1 -1
  27. package/dist/feedback/index.d.ts +20 -1
  28. package/dist/feedback/index.js +121 -4
  29. package/dist/feedback/index.js.map +1 -1
  30. package/dist/forms/index.d.ts +23 -15
  31. package/dist/forms/index.js +71 -47
  32. package/dist/forms/index.js.map +1 -1
  33. package/dist/primitives/index.js +8 -49
  34. package/dist/primitives/index.js.map +1 -1
  35. package/package.json +1 -1
  36. package/dist/chunk-7UJ4QEUW.js +0 -37
  37. package/dist/chunk-7UJ4QEUW.js.map +0 -1
  38. package/dist/chunk-C4JI3JNA.js.map +0 -1
  39. package/dist/chunk-GJTQLZ4O.js.map +0 -1
  40. package/dist/chunk-PZCL4M6I.js.map +0 -1
  41. package/dist/chunk-QU3FF5WI.js.map +0 -1
  42. package/dist/chunk-RJPEVNMJ.js +0 -23
  43. package/dist/chunk-RJPEVNMJ.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { NumberInput, Popover as Popover$1, RadioGroup as RadioGroup$1, Dialog, Portal, ButtonGroup, Button, NativeSelect as NativeSelect$1 } from '@chakra-ui/react';
1
+ import { NumberInput, RadioGroup as RadioGroup$1, Dialog, Portal, ButtonGroup, Button, NativeSelect as NativeSelect$1 } from '@chakra-ui/react';
2
2
  import { useRef } from 'react';
3
3
  import { jsx, jsxs } from 'react/jsx-runtime';
4
4
 
@@ -98,35 +98,6 @@ var NumberInputScrubber = NumberInput.Scrubber;
98
98
  NumberInputScrubber.displayName = "NumberInputScrubber";
99
99
  var NumberInputLabel = NumberInput.Label;
100
100
  NumberInputLabel.displayName = "NumberInputLabel";
101
- var Popover = function Popover2(props) {
102
- return /* @__PURE__ */ jsx(Popover$1.Root, { ...props, children: props.children });
103
- };
104
- Popover.displayName = "Popover";
105
- var PopoverTrigger = Popover$1.Trigger;
106
- PopoverTrigger.displayName = "PopoverTrigger";
107
- var PopoverContent = function PopoverContent2({
108
- ref,
109
- ...props
110
- }) {
111
- const { showArrow, portalled = true, portalRef, children, ...rest } = props;
112
- return /* @__PURE__ */ jsx(Portal, { disabled: !portalled, container: portalRef, children: /* @__PURE__ */ jsx(Popover$1.Positioner, { children: /* @__PURE__ */ jsxs(Popover$1.Content, { ref, ...rest, children: [
113
- showArrow && /* @__PURE__ */ jsx(Popover$1.Arrow, { children: /* @__PURE__ */ jsx(Popover$1.ArrowTip, {}) }),
114
- children
115
- ] }) }) });
116
- };
117
- PopoverContent.displayName = "PopoverContent";
118
- var PopoverHeader = Popover$1.Header;
119
- PopoverHeader.displayName = "PopoverHeader";
120
- var PopoverBody = Popover$1.Body;
121
- PopoverBody.displayName = "PopoverBody";
122
- var PopoverFooter = Popover$1.Footer;
123
- PopoverFooter.displayName = "PopoverFooter";
124
- var PopoverCloseTrigger = Popover$1.CloseTrigger;
125
- PopoverCloseTrigger.displayName = "PopoverCloseTrigger";
126
- var PopoverTitle = Popover$1.Title;
127
- PopoverTitle.displayName = "PopoverTitle";
128
- var PopoverDescription = Popover$1.Description;
129
- PopoverDescription.displayName = "PopoverDescription";
130
101
  var Radio = function Radio2({
131
102
  ref,
132
103
  ...props
@@ -142,6 +113,6 @@ Radio.displayName = "Radio";
142
113
  var RadioGroup = RadioGroup$1.Root;
143
114
  RadioGroup.displayName = "RadioGroup";
144
115
 
145
- export { LeavePageConfirmation, NativeSelect, NumberInputField, NumberInputLabel, NumberInputRoot, NumberInputScrubber, Popover, PopoverBody, PopoverCloseTrigger, PopoverContent, PopoverDescription, PopoverFooter, PopoverHeader, PopoverTitle, PopoverTrigger, Radio, RadioGroup };
146
- //# sourceMappingURL=chunk-C4JI3JNA.js.map
147
- //# sourceMappingURL=chunk-C4JI3JNA.js.map
116
+ export { LeavePageConfirmation, NativeSelect, NumberInputField, NumberInputLabel, NumberInputRoot, NumberInputScrubber, Radio, RadioGroup };
117
+ //# sourceMappingURL=chunk-6H4LQUMM.js.map
118
+ //# sourceMappingURL=chunk-6H4LQUMM.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/primitives/leave-page-confirmation.tsx","../src/primitives/native-select.tsx","../src/primitives/number-input.tsx","../src/primitives/radio.tsx"],"names":["NativeSelect","jsxs","ChakraNativeSelect","jsx","NumberInput","ChakraNumberInput","Radio","ChakraRadioGroup"],"mappings":";;;;;AAqBO,IAAM,qBAAA,GAA8D,CAC1E,KAAA,KACI;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AAA,EAAjB,EAA2B,QAAA,EAAS;AAAA,GAAA,EAEvC,CAAA;AAEF;AACA,KAAA,CAAM,WAAA,GAAc,OAAA;AAEb,IAAM,aAAaA,YAAA,CAAiB;AAC3C,UAAA,CAAW,WAAA,GAAc,YAAA","file":"chunk-6H4LQUMM.js","sourcesContent":["import { Button, ButtonGroup, Dialog, Portal } from \"@chakra-ui/react\";\nimport type React from \"react\";\nimport { useRef } from \"react\";\n\nexport interface LeavePageConfirmationProps {\n\t/** Whether the dialog is currently open (i.e., navigation is blocked). */\n\tblocked: boolean;\n\t/** Called when the user confirms they want to leave. */\n\tonConfirmLeave: () => void;\n\t/** Called when the user cancels and wants to stay. */\n\tonCancelLeave: () => void;\n\t/** Dialog title. Defaults to \"You have unsaved changes\". */\n\ttitle?: string;\n\t/** Dialog message body. Defaults to a generic unsaved-changes prompt. */\n\tmessage?: string;\n\t/** Label for the confirm/leave button. Defaults to \"Leave\". */\n\tconfirmLabel?: string;\n\t/** Label for the cancel/stay button. Defaults to \"Stay\". */\n\tcancelLabel?: string;\n}\n\nexport const LeavePageConfirmation: React.FC<LeavePageConfirmationProps> = (\n\tprops,\n) => {\n\tconst {\n\t\tblocked,\n\t\tonConfirmLeave,\n\t\tonCancelLeave,\n\t\ttitle = \"You have unsaved changes\",\n\t\tmessage = \"Are you sure you want to leave this page? You have unsaved changes.\",\n\t\tconfirmLabel = \"Leave\",\n\t\tcancelLabel = \"Stay\",\n\t} = props;\n\n\tconst cancelRef = useRef<HTMLButtonElement | null>(null);\n\n\treturn (\n\t\t<Dialog.Root\n\t\t\topen={blocked}\n\t\t\tinitialFocusEl={() => cancelRef.current}\n\t\t\trole=\"alertdialog\"\n\t\t\tonOpenChange={(e) => {\n\t\t\t\tif (!e.open) {\n\t\t\t\t\tonCancelLeave();\n\t\t\t\t}\n\t\t\t}}\n\t\t>\n\t\t\t<Portal>\n\t\t\t\t<Dialog.Backdrop>\n\t\t\t\t\t<Dialog.Positioner>\n\t\t\t\t\t\t<Dialog.Content>\n\t\t\t\t\t\t\t<Dialog.Header fontSize=\"lg\" fontWeight=\"bold\">\n\t\t\t\t\t\t\t\t{title}\n\t\t\t\t\t\t\t</Dialog.Header>\n\t\t\t\t\t\t\t<Dialog.Body>{message}</Dialog.Body>\n\t\t\t\t\t\t\t<Dialog.Footer>\n\t\t\t\t\t\t\t\t<ButtonGroup>\n\t\t\t\t\t\t\t\t\t<Button variant=\"solid\" onClick={onConfirmLeave}>\n\t\t\t\t\t\t\t\t\t\t{confirmLabel}\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\tonClick={onCancelLeave}\n\t\t\t\t\t\t\t\t\t\tref={cancelRef}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{cancelLabel}\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</ButtonGroup>\n\t\t\t\t\t\t\t</Dialog.Footer>\n\t\t\t\t\t\t</Dialog.Content>\n\t\t\t\t\t</Dialog.Positioner>\n\t\t\t\t</Dialog.Backdrop>\n\t\t\t</Portal>\n\t\t</Dialog.Root>\n\t);\n};\nLeavePageConfirmation.displayName = \"LeavePageConfirmation\";\n","import {\n\tNativeSelect as ChakraNativeSelect,\n\ttype NativeSelectFieldProps,\n\ttype NativeSelectRootProps,\n} from \"@chakra-ui/react\";\nimport type * as React from \"react\";\n\nexport interface NativeSelectProps\n\textends Omit<NativeSelectFieldProps, \"placeholder\"> {\n\t/** Props forwarded to the root wrapper. */\n\tsize?: NativeSelectRootProps[\"size\"];\n\tvariant?: NativeSelectRootProps[\"variant\"];\n\tdisabled?: NativeSelectRootProps[\"disabled\"];\n\tinvalid?: NativeSelectRootProps[\"invalid\"];\n\tunstyled?: NativeSelectRootProps[\"unstyled\"];\n\t/** Rendered as a disabled first <option> */\n\tplaceholder?: string;\n}\n\nexport const NativeSelect = function NativeSelect({\n\tref,\n\t...props\n}: NativeSelectProps & { ref?: React.Ref<HTMLSelectElement> }) {\n\tconst {\n\t\tsize,\n\t\tvariant,\n\t\tdisabled,\n\t\tinvalid,\n\t\tunstyled,\n\t\tplaceholder,\n\t\tchildren,\n\t\t...fieldProps\n\t} = props;\n\n\treturn (\n\t\t<ChakraNativeSelect.Root\n\t\t\tsize={size}\n\t\t\tvariant={variant}\n\t\t\tdisabled={disabled}\n\t\t\tinvalid={invalid}\n\t\t\tunstyled={unstyled}\n\t\t>\n\t\t\t<ChakraNativeSelect.Field ref={ref} {...fieldProps}>\n\t\t\t\t{placeholder && (\n\t\t\t\t\t<option value=\"\" disabled>\n\t\t\t\t\t\t{placeholder}\n\t\t\t\t\t</option>\n\t\t\t\t)}\n\t\t\t\t{children}\n\t\t\t</ChakraNativeSelect.Field>\n\t\t\t<ChakraNativeSelect.Indicator />\n\t\t</ChakraNativeSelect.Root>\n\t);\n};\nNativeSelect.displayName = \"NativeSelect\";\n","import { NumberInput as ChakraNumberInput } from \"@chakra-ui/react\";\nimport type * as React from \"react\";\n\nexport interface NumberInputProps extends ChakraNumberInput.RootProps {\n\tshowStepper?: boolean;\n}\n\nexport const NumberInputRoot = function NumberInput({\n\tref,\n\t...props\n}: NumberInputProps & { ref?: React.Ref<HTMLDivElement> }) {\n\tconst { children, showStepper = true, ...rest } = props;\n\treturn (\n\t\t<ChakraNumberInput.Root ref={ref} variant=\"outline\" {...rest}>\n\t\t\t{children}\n\t\t\t{showStepper && (\n\t\t\t\t<ChakraNumberInput.Control>\n\t\t\t\t\t<ChakraNumberInput.IncrementTrigger />\n\t\t\t\t\t<ChakraNumberInput.DecrementTrigger />\n\t\t\t\t</ChakraNumberInput.Control>\n\t\t\t)}\n\t\t</ChakraNumberInput.Root>\n\t);\n};\nNumberInputRoot.displayName = \"NumberInputRoot\";\n\nexport const NumberInputField = ChakraNumberInput.Input;\nNumberInputField.displayName = \"NumberInputField\";\nexport const NumberInputScrubber = ChakraNumberInput.Scrubber;\nNumberInputScrubber.displayName = \"NumberInputScrubber\";\nexport const NumberInputLabel = ChakraNumberInput.Label;\nNumberInputLabel.displayName = \"NumberInputLabel\";\n","import { RadioGroup as ChakraRadioGroup } from \"@chakra-ui/react\";\nimport type * as React from \"react\";\n\nexport interface RadioProps extends ChakraRadioGroup.ItemProps {\n\t/** Ref attached to the root element. */\n\trootRef?: React.RefObject<HTMLDivElement | null>;\n\t/** Additional props forwarded to the hidden input element. */\n\tinputProps?: React.InputHTMLAttributes<HTMLInputElement>;\n}\n\nexport const Radio = function Radio({\n\tref,\n\t...props\n}: RadioProps & { ref?: React.Ref<HTMLInputElement> }) {\n\tconst { children, inputProps, rootRef, ...rest } = props;\n\treturn (\n\t\t<ChakraRadioGroup.Item ref={rootRef} {...rest}>\n\t\t\t<ChakraRadioGroup.ItemHiddenInput ref={ref} {...inputProps} />\n\t\t\t<ChakraRadioGroup.ItemIndicator />\n\t\t\t{children && (\n\t\t\t\t<ChakraRadioGroup.ItemText>{children}</ChakraRadioGroup.ItemText>\n\t\t\t)}\n\t\t</ChakraRadioGroup.Item>\n\t);\n};\nRadio.displayName = \"Radio\";\n\nexport const RadioGroup = ChakraRadioGroup.Root;\nRadioGroup.displayName = \"RadioGroup\";\n"]}
@@ -1,8 +1,8 @@
1
- import { InputGroup, Input, Group, InputAddon } from '@chakra-ui/react';
1
+ import { InputGroup, Input } from '@chakra-ui/react';
2
2
  import debounce from 'lodash.debounce';
3
3
  import { Search } from 'lucide-react';
4
4
  import { useMemo, useEffect, useCallback } from 'react';
5
- import { jsx, jsxs } from 'react/jsx-runtime';
5
+ import { jsx } from 'react/jsx-runtime';
6
6
 
7
7
  // src/forms/search-input.tsx
8
8
  var SearchInput = (props) => {
@@ -43,20 +43,7 @@ var SearchInput = (props) => {
43
43
  ) });
44
44
  };
45
45
  SearchInput.displayName = "SearchInput";
46
- var TextInput = ({
47
- ref,
48
- ...props
49
- }) => {
50
- const { name, append, prepend, size, ...rest } = props;
51
- return /* @__PURE__ */ jsxs(Group, { attached: true, w: "full", children: [
52
- prepend && prepend !== "" && /* @__PURE__ */ jsx(InputAddon, { children: prepend }),
53
- /* @__PURE__ */ jsx(Input, { id: name, size, ...rest, ref }),
54
- append && append !== "" && /* @__PURE__ */ jsx(InputAddon, { children: append })
55
- ] });
56
- };
57
- TextInput.displayName = "TextInput";
58
- var text_input_default = TextInput;
59
46
 
60
- export { SearchInput, text_input_default };
61
- //# sourceMappingURL=chunk-PZCL4M6I.js.map
62
- //# sourceMappingURL=chunk-PZCL4M6I.js.map
47
+ export { SearchInput };
48
+ //# sourceMappingURL=chunk-E7KRPPCQ.js.map
49
+ //# sourceMappingURL=chunk-E7KRPPCQ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/forms/search-input.tsx"],"names":[],"mappings":";;;;;;;AAmBO,IAAM,WAAA,GAA0C,CAAC,KAAA,KAAU;AACjE,EAAA,MAAM;AAAA,IACL,QAAA;AAAA,IACA,UAAA,GAAa,GAAA;AAAA,IACb,WAAA,GAAc,WAAA;AAAA,IACd,YAAA,GAAe,EAAA;AAAA,IACf,QAAA,GAAW,MAAA;AAAA,IACX,GAAG;AAAA,GACJ,GAAI,KAAA;AAEJ,EAAA,MAAM,eAAA,GAAkB,OAAA;AAAA,IACvB,MAAM,QAAA,CAAS,CAAC,SAAiB,QAAA,CAAS,IAAI,GAAG,UAAU,CAAA;AAAA,IAC3D,CAAC,UAAU,UAAU;AAAA,GACtB;AAEA,EAAA,SAAA,CAAU,MAAM;AACf,IAAA,OAAO,MAAM;AACZ,MAAA,eAAA,CAAgB,MAAA,EAAO;AAAA,IACxB,CAAA;AAAA,EACD,CAAA,EAAG,CAAC,eAAe,CAAC,CAAA;AAEpB,EAAA,MAAM,YAAA,GAAe,WAAA;AAAA,IACpB,CAAC,CAAA,KAA2C;AAC3C,MAAA,eAAA,CAAgB,CAAA,CAAE,OAAO,KAAK,CAAA;AAAA,IAC/B,CAAA;AAAA,IACA,CAAC,eAAe;AAAA,GACjB;AAEA,EAAA,uBACC,GAAA,CAAC,cAAW,QAAA,EAAoB,YAAA,sBAAe,MAAA,EAAA,EAAO,IAAA,EAAM,IAAI,CAAA,EAC/D,QAAA,kBAAA,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACA,OAAA,EAAQ,SAAA;AAAA,MACR,IAAA,EAAK,MAAA;AAAA,MACL,YAAA,EAAa,KAAA;AAAA,MACb,WAAA;AAAA,MACA,YAAA;AAAA,MACA,QAAA,EAAU,YAAA;AAAA,MACT,GAAG;AAAA;AAAA,GACL,EACD,CAAA;AAEF;AACA,WAAA,CAAY,WAAA,GAAc,aAAA","file":"chunk-E7KRPPCQ.js","sourcesContent":["import { Input, InputGroup, type InputProps } from \"@chakra-ui/react\";\nimport debounce from \"lodash.debounce\";\nimport { Search } from \"lucide-react\";\nimport type React from \"react\";\nimport { useCallback, useEffect, useMemo } from \"react\";\n\nexport interface SearchInputProps\n\textends Omit<InputProps, \"onChange\" | \"defaultValue\"> {\n\t/** Called with the search query after debounce. */\n\tonSearch: (query: string) => void;\n\t/** Debounce delay in milliseconds. @default 300 */\n\tdebounceMs?: number;\n\t/** Placeholder text. @default \"Search...\" */\n\tplaceholder?: string;\n\t/** Initial value. */\n\tdefaultValue?: string;\n\tmaxWidth?: string;\n}\n\nexport const SearchInput: React.FC<SearchInputProps> = (props) => {\n\tconst {\n\t\tonSearch,\n\t\tdebounceMs = 300,\n\t\tplaceholder = \"Search...\",\n\t\tdefaultValue = \"\",\n\t\tmaxWidth = \"full\",\n\t\t...restProps\n\t} = props;\n\n\tconst debouncedSearch = useMemo(\n\t\t() => debounce((term: string) => onSearch(term), debounceMs),\n\t\t[onSearch, debounceMs],\n\t);\n\n\tuseEffect(() => {\n\t\treturn () => {\n\t\t\tdebouncedSearch.cancel();\n\t\t};\n\t}, [debouncedSearch]);\n\n\tconst handleChange = useCallback(\n\t\t(e: React.ChangeEvent<HTMLInputElement>) => {\n\t\t\tdebouncedSearch(e.target.value);\n\t\t},\n\t\t[debouncedSearch],\n\t);\n\n\treturn (\n\t\t<InputGroup maxWidth={maxWidth} startElement={<Search size={16} />}>\n\t\t\t<Input\n\t\t\t\tvariant=\"outline\"\n\t\t\t\ttype=\"text\"\n\t\t\t\tautoComplete=\"off\"\n\t\t\t\tplaceholder={placeholder}\n\t\t\t\tdefaultValue={defaultValue}\n\t\t\t\tonChange={handleChange}\n\t\t\t\t{...restProps}\n\t\t\t/>\n\t\t</InputGroup>\n\t);\n};\nSearchInput.displayName = \"SearchInput\";\n"]}
@@ -1,35 +1,13 @@
1
- import { Button as Button$1, IconButton as IconButton$1, Badge } from '@chakra-ui/react';
2
- import { jsx } from 'react/jsx-runtime';
3
1
  import dayjs from 'dayjs';
4
2
  import calendarPlugin from 'dayjs/plugin/calendar.js';
5
3
  import relativeTime from 'dayjs/plugin/relativeTime.js';
6
4
  import utcPlugin from 'dayjs/plugin/utc.js';
5
+ import { Badge } from '@chakra-ui/react';
7
6
  import { readableColor } from 'color2k';
8
7
  import { useMemo } from 'react';
8
+ import { jsx } from 'react/jsx-runtime';
9
9
 
10
- // src/atoms/button/button.tsx
11
- var Button = ({
12
- ref,
13
- ...props
14
- }) => {
15
- return /* @__PURE__ */ jsx(
16
- Button$1,
17
- {
18
- size: "md",
19
- variant: "secondary",
20
- ref,
21
- ...props
22
- }
23
- );
24
- };
25
- Button.displayName = "Button";
26
- var IconButton = ({
27
- ref,
28
- ...props
29
- }) => {
30
- return /* @__PURE__ */ jsx(IconButton$1, { size: "md", variant: "ghost", ref, ...props });
31
- };
32
- IconButton.displayName = "IconButton";
10
+ // src/atoms/datetime/utils/relative-date-time-utils.ts
33
11
  dayjs.extend(utcPlugin);
34
12
  dayjs.extend(relativeTime);
35
13
  dayjs.extend(calendarPlugin);
@@ -68,6 +46,6 @@ var StatusBadge = (props) => {
68
46
  };
69
47
  StatusBadge.displayName = "StatusBadge";
70
48
 
71
- export { Button, IconButton, StatusBadge, formatRelativeDateTime, formatRelativeToCurrentWeekDateTime };
72
- //# sourceMappingURL=chunk-GJTQLZ4O.js.map
73
- //# sourceMappingURL=chunk-GJTQLZ4O.js.map
49
+ export { StatusBadge, formatRelativeDateTime, formatRelativeToCurrentWeekDateTime };
50
+ //# sourceMappingURL=chunk-KVPN6T6J.js.map
51
+ //# sourceMappingURL=chunk-KVPN6T6J.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/atoms/datetime/utils/relative-date-time-utils.ts","../src/atoms/status-badge/status-badge.tsx"],"names":[],"mappings":";;;;;;;;;;AAKA,KAAA,CAAM,OAAO,SAAS,CAAA;AACtB,KAAA,CAAM,OAAO,YAAY,CAAA;AACzB,KAAA,CAAM,OAAO,cAAc,CAAA;AAmBpB,SAAS,sBAAA,CACf,IAAA,EACA,QAAA,mBAAqB,IAAI,MAAK,EAC7B;AACD,EAAA,OAAO,KAAA,CAAM,IAAI,CAAA,CAAE,IAAA,CAAK,QAAQ,CAAA;AACjC;AAmBO,SAAS,mCAAA,CACf,IAAA,EACA,QAAA,mBAAqB,IAAI,MAAK,EAC7B;AACD,EAAA,MAAM,UAAU,KAAA,CAAM,IAAI,CAAA,CAAE,MAAA,CAAO,UAAU,KAAK,CAAA;AAElD,EAAA,IAAI,CAAC,OAAA,EAAS;AAGb,IAAA,OAAO,KAAA,CAAM,IAAI,CAAA,CAAE,QAAA,CAAS,QAAA,EAAU;AAAA,MACrC,QAAA,EAAU;AAAA,KACV,CAAA;AAAA,EACF;AAGA,EAAA,OAAO,sBAAA,CAAuB,MAAM,QAAQ,CAAA;AAC7C;ACtDO,IAAM,WAAA,GAA0C,CAAC,KAAA,KAAU;AACjE,EAAA,MAAM,EAAE,KAAA,EAAO,KAAA,EAAM,GAAI,KAAA;AAEzB,EAAA,MAAM,SAAA,GAAY,QAAQ,MAAM;AAC/B,IAAA,IAAI;AACH,MAAA,OAAO,cAAc,KAAK,CAAA;AAAA,IAC3B,CAAA,CAAA,MAAQ;AACP,MAAA,OAAO,OAAA;AAAA,IACR;AAAA,EACD,CAAA,EAAG,CAAC,KAAK,CAAC,CAAA;AAEV,EAAA,uBACC,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACA,EAAA,EAAI,KAAA;AAAA,MACJ,KAAA,EAAO,SAAA;AAAA,MACP,OAAA,EAAQ,MAAA;AAAA,MACR,EAAA,EAAI,CAAA;AAAA,MACJ,iBAAA,EAAmB,CAAA;AAAA,MAElB,QAAA,EAAA;AAAA;AAAA,GACF;AAEF;AAEA,WAAA,CAAY,WAAA,GAAc,aAAA","file":"chunk-KVPN6T6J.js","sourcesContent":["import dayjs from \"dayjs\";\nimport calendarPlugin from \"dayjs/plugin/calendar.js\";\nimport relativeTime from \"dayjs/plugin/relativeTime.js\";\nimport utcPlugin from \"dayjs/plugin/utc.js\";\n\ndayjs.extend(utcPlugin);\ndayjs.extend(relativeTime);\ndayjs.extend(calendarPlugin);\n\nimport type { DateType } from \"../types\";\n\n/**\n * A function that will return a string with how far a given date is in the past or future,\n * using a baseDate as reference. If the baseDate is not passed, the function will use today as reference.\n *\n * @param date - the date to be formatted\n * @param baseDate - the date that should be used as a reference (default is \"today\")\n * @returns a relative date\n *\n * @example\n * // Considering today as 18.08.2021\n * formatRelativeDateTime('2021-08-17T15:45:00') // returns \"a day ago\"\n *\n * @example\n * formatRelativeDateTime('2021-08-17T15:45:00', '2021-08-16') // returns \"in a day\"\n */\nexport function formatRelativeDateTime(\n\tdate: DateType,\n\tbaseDate: DateType = new Date(),\n) {\n\treturn dayjs(date).from(baseDate);\n}\n\n/**\n * A function that formats a date relative to Today or to the `baseDate` if passed.\n * If the date is not today, it will return a string with \"Yesterday ...\", \"Tomorrow ...\", etc\n * If the date is not in the current week, it return a string with \"DD MMM YYYY\" format\n * If the date is today, it will return a string with \"... ago\" or \"in ...\"\n *\n * @param date - the date to be formatted\n * @param baseDate - the date that should be used as a reference (default is \"today\")\n * @returns a relative date\n *\n * @example\n * // Considering today as 18.08.2021\n * formatRelativeToCurrentWeekDateTime('2021-08-17T15:45:00') // returns \"Yesterday at 3:45 PM\"\n *\n * @example\n * formatRelativeToCurrentWeekDateTime('2021-08-17T15:45:00', '2021-08-16') // returns \"Tomorrow at 3:45 PM\"\n */\nexport function formatRelativeToCurrentWeekDateTime(\n\tdate: DateType,\n\tbaseDate: DateType = new Date(),\n) {\n\tconst isToday = dayjs(date).isSame(baseDate, \"day\");\n\n\tif (!isToday) {\n\t\t// if the date is not today, we display it with \"Yesterday\", \"Tomorrow\", etc.\n\t\t// and if the date is not in the current week then it will display \"17 Aug 2021\"\n\t\treturn dayjs(date).calendar(baseDate, {\n\t\t\tsameElse: \"DD MMM YYYY\",\n\t\t});\n\t}\n\n\t// returns \"... ago\"\n\treturn formatRelativeDateTime(date, baseDate);\n}\n","import { Badge } from \"@chakra-ui/react\";\nimport { readableColor } from \"color2k\";\nimport type React from \"react\";\nimport { useMemo } from \"react\";\n\nexport interface StatusBadgeProps {\n\t/** The display label for the badge */\n\tlabel: string;\n\t/** The background color for the badge (hex format, e.g. \"#ff0000\") */\n\tcolor: string;\n}\n\nexport const StatusBadge: React.FC<StatusBadgeProps> = (props) => {\n\tconst { label, color } = props;\n\n\tconst textColor = useMemo(() => {\n\t\ttry {\n\t\t\treturn readableColor(color);\n\t\t} catch {\n\t\t\treturn \"black\";\n\t\t}\n\t}, [color]);\n\n\treturn (\n\t\t<Badge\n\t\t\tbg={color}\n\t\t\tcolor={textColor}\n\t\t\trounded=\"base\"\n\t\t\tpx={2}\n\t\t\tmarginInlineStart={1}\n\t\t>\n\t\t\t{label}\n\t\t</Badge>\n\t);\n};\n\nStatusBadge.displayName = \"StatusBadge\";\n"]}
@@ -0,0 +1,21 @@
1
+ import { Group, InputAddon, Input } from '@chakra-ui/react';
2
+ import { jsxs, jsx } from 'react/jsx-runtime';
3
+
4
+ // src/atoms/text-input/text-input.tsx
5
+ var TextInput = ({
6
+ ref,
7
+ ...props
8
+ }) => {
9
+ const { name, append, prepend, size, ...rest } = props;
10
+ return /* @__PURE__ */ jsxs(Group, { attached: true, w: "full", children: [
11
+ prepend && prepend !== "" && /* @__PURE__ */ jsx(InputAddon, { children: prepend }),
12
+ /* @__PURE__ */ jsx(Input, { id: name, size, ...rest, ref }),
13
+ append && append !== "" && /* @__PURE__ */ jsx(InputAddon, { children: append })
14
+ ] });
15
+ };
16
+ TextInput.displayName = "TextInput";
17
+ var text_input_default = TextInput;
18
+
19
+ export { text_input_default };
20
+ //# sourceMappingURL=chunk-OU6H3KU4.js.map
21
+ //# sourceMappingURL=chunk-OU6H3KU4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/atoms/text-input/text-input.tsx"],"names":[],"mappings":";;;;AAQA,IAAM,YAAY,CAAC;AAAA,EAClB,GAAA;AAAA,EACA,GAAG;AACJ,CAAA,KAA8D;AAC7D,EAAA,MAAM,EAAE,IAAA,EAAM,MAAA,EAAQ,SAAS,IAAA,EAAM,GAAG,MAAK,GAAI,KAAA;AACjD,EAAA,uBACC,IAAA,CAAC,KAAA,EAAA,EAAM,QAAA,EAAQ,IAAA,EAAC,GAAE,MAAA,EAChB,QAAA,EAAA;AAAA,IAAA,OAAA,IAAW,OAAA,KAAY,EAAA,oBAAM,GAAA,CAAC,UAAA,EAAA,EAAY,QAAA,EAAA,OAAA,EAAQ,CAAA;AAAA,wBAClD,KAAA,EAAA,EAAM,EAAA,EAAI,MAAM,IAAA,EAAa,GAAG,MAAM,GAAA,EAAU,CAAA;AAAA,IAChD,MAAA,IAAU,MAAA,KAAW,EAAA,oBAAM,GAAA,CAAC,cAAY,QAAA,EAAA,MAAA,EAAO;AAAA,GAAA,EACjD,CAAA;AAEF,CAAA;AACA,SAAA,CAAU,WAAA,GAAc,WAAA;AAExB,IAAO,kBAAA,GAAQ","file":"chunk-OU6H3KU4.js","sourcesContent":["import { Group, Input, InputAddon, type InputProps } from \"@chakra-ui/react\";\nimport type React from \"react\";\n\nexport interface TextInputProps extends InputProps {\n\tappend?: string | React.ReactElement;\n\tprepend?: string | React.ReactElement;\n}\n\nconst TextInput = ({\n\tref,\n\t...props\n}: TextInputProps & { ref?: React.Ref<HTMLInputElement> }) => {\n\tconst { name, append, prepend, size, ...rest } = props;\n\treturn (\n\t\t<Group attached w=\"full\">\n\t\t\t{prepend && prepend !== \"\" && <InputAddon>{prepend}</InputAddon>}\n\t\t\t<Input id={name} size={size} {...rest} ref={ref} />\n\t\t\t{append && append !== \"\" && <InputAddon>{append}</InputAddon>}\n\t\t</Group>\n\t);\n};\nTextInput.displayName = \"TextInput\";\n\nexport default TextInput;\n"]}
@@ -0,0 +1,30 @@
1
+ import { Button as Button$1, IconButton as IconButton$1 } from '@chakra-ui/react';
2
+ import { jsx } from 'react/jsx-runtime';
3
+
4
+ // src/atoms/button/button.tsx
5
+ var Button = ({
6
+ ref,
7
+ ...props
8
+ }) => {
9
+ return /* @__PURE__ */ jsx(
10
+ Button$1,
11
+ {
12
+ size: "md",
13
+ variant: "secondary",
14
+ ref,
15
+ ...props
16
+ }
17
+ );
18
+ };
19
+ Button.displayName = "Button";
20
+ var IconButton = ({
21
+ ref,
22
+ ...props
23
+ }) => {
24
+ return /* @__PURE__ */ jsx(IconButton$1, { size: "md", variant: "ghost", ref, ...props });
25
+ };
26
+ IconButton.displayName = "IconButton";
27
+
28
+ export { Button, IconButton };
29
+ //# sourceMappingURL=chunk-SJ6YXNZW.js.map
30
+ //# sourceMappingURL=chunk-SJ6YXNZW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/atoms/button/button.tsx","../src/atoms/button/icon-button.tsx"],"names":["ChakraButton","jsx","ChakraIconButton"],"mappings":";;;;AAsBO,IAAM,SAAS,CAAC;AAAA,EACtB,GAAA;AAAA,EACA,GAAG;AACJ,CAAA,KAA4D;AAC3D,EAAA,uBACC,GAAA;AAAA,IAACA,QAAA;AAAA,IAAA;AAAA,MACA,IAAA,EAAK,IAAA;AAAA,MACL,OAAA,EAAS,WAAA;AAAA,MACT,GAAA;AAAA,MACC,GAAI;AAAA;AAAA,GACN;AAEF;AACA,MAAA,CAAO,WAAA,GAAc,QAAA;AC5Bd,IAAM,aAAa,CAAC;AAAA,EAC1B,GAAA;AAAA,EACA,GAAG;AACJ,CAAA,KAAgE;AAC/D,EAAA,uBAAOC,IAACC,YAAA,EAAA,EAAiB,IAAA,EAAK,MAAK,OAAA,EAAQ,OAAA,EAAQ,GAAA,EAAW,GAAG,KAAA,EAAO,CAAA;AACzE;AACA,UAAA,CAAW,WAAA,GAAc,YAAA","file":"chunk-SJ6YXNZW.js","sourcesContent":["import {\n\tButton as ChakraButton,\n\ttype ButtonProps as ChakraButtonProps,\n} from \"@chakra-ui/react\";\n\n// Extend ButtonProps to include custom variants defined in the @knkcs/anker\n// theme (primary, secondary, link-gray) that are not in Chakra's default types.\nexport type ButtonProps = Omit<ChakraButtonProps, \"variant\"> & {\n\tvariant?:\n\t\t| \"solid\"\n\t\t| \"subtle\"\n\t\t| \"surface\"\n\t\t| \"outline\"\n\t\t| \"ghost\"\n\t\t| \"plain\"\n\t\t| \"primary\"\n\t\t| \"secondary\"\n\t\t| \"link\"\n\t\t| \"link-gray\"\n\t\t| undefined;\n};\n\nexport const Button = ({\n\tref,\n\t...props\n}: ButtonProps & { ref?: React.Ref<HTMLButtonElement> }) => {\n\treturn (\n\t\t<ChakraButton\n\t\t\tsize=\"md\"\n\t\t\tvariant={\"secondary\" as ChakraButtonProps[\"variant\"]}\n\t\t\tref={ref}\n\t\t\t{...(props as ChakraButtonProps)}\n\t\t/>\n\t);\n};\nButton.displayName = \"Button\";\n","import {\n\tIconButton as ChakraIconButton,\n\ttype IconButtonProps,\n} from \"@chakra-ui/react\";\n\nexport type { IconButtonProps };\n\nexport const IconButton = ({\n\tref,\n\t...props\n}: IconButtonProps & { ref?: React.Ref<HTMLButtonElement> }) => {\n\treturn <ChakraIconButton size=\"md\" variant=\"ghost\" ref={ref} {...props} />;\n};\nIconButton.displayName = \"IconButton\";\n"]}
@@ -0,0 +1,51 @@
1
+ import { Checkbox as Checkbox$1, Skeleton as Skeleton$1, Stack, Circle } from '@chakra-ui/react';
2
+ export { Box, Center, Code, Container, Flex, Grid, GridItem, HStack, Heading, Link, Spacer, Stack, Text, VStack } from '@chakra-ui/react';
3
+ import { jsxs, jsx } from 'react/jsx-runtime';
4
+
5
+ // src/primitives/checkbox.tsx
6
+ var Checkbox = function Checkbox2({
7
+ ref,
8
+ ...props
9
+ }) {
10
+ const { children, inputProps, rootRef, ...rest } = props;
11
+ return /* @__PURE__ */ jsxs(Checkbox$1.Root, { ref: rootRef, ...rest, children: [
12
+ /* @__PURE__ */ jsx(Checkbox$1.HiddenInput, { ref, ...inputProps }),
13
+ /* @__PURE__ */ jsx(Checkbox$1.Control, { children: /* @__PURE__ */ jsx(Checkbox$1.Indicator, {}) }),
14
+ children != null && /* @__PURE__ */ jsx(Checkbox$1.Label, { children })
15
+ ] });
16
+ };
17
+ Checkbox.displayName = "Checkbox";
18
+ var CheckboxGroup = Checkbox$1.Group;
19
+ CheckboxGroup.displayName = "CheckboxGroup";
20
+ var Skeleton = (props) => {
21
+ return /* @__PURE__ */ jsx(Skeleton$1, { ...props });
22
+ };
23
+ Skeleton.displayName = "Skeleton";
24
+ var SkeletonText = ({
25
+ lines = 3,
26
+ gap = 3
27
+ }) => {
28
+ return /* @__PURE__ */ jsx(Stack, { gap, children: Array.from({ length: lines }).map((_, i) => {
29
+ const isLast = i === lines - 1;
30
+ return /* @__PURE__ */ jsx(
31
+ Skeleton$1,
32
+ {
33
+ height: "3",
34
+ width: isLast ? "80%" : "100%",
35
+ borderRadius: "sm"
36
+ },
37
+ isLast ? "last" : `line-${String(i)}`
38
+ );
39
+ }) });
40
+ };
41
+ SkeletonText.displayName = "SkeletonText";
42
+ var SkeletonCircle = ({
43
+ size = 10
44
+ }) => {
45
+ return /* @__PURE__ */ jsx(Circle, { asChild: true, size, children: /* @__PURE__ */ jsx(Skeleton$1, {}) });
46
+ };
47
+ SkeletonCircle.displayName = "SkeletonCircle";
48
+
49
+ export { Checkbox, CheckboxGroup, Skeleton, SkeletonCircle, SkeletonText };
50
+ //# sourceMappingURL=chunk-SJIYWHIV.js.map
51
+ //# sourceMappingURL=chunk-SJIYWHIV.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/primitives/checkbox.tsx","../src/primitives/skeleton.tsx"],"names":["Checkbox","ChakraCheckbox","jsx","ChakraSkeleton","Stack"],"mappings":";;;;;AAYO,IAAM,QAAA,GAAW,SAASA,SAAAA,CAAS;AAAA,EACzC,GAAA;AAAA,EACA,GAAG;AACJ,CAAA,EAA0D;AACzD,EAAA,MAAM,EAAE,QAAA,EAAU,UAAA,EAAY,OAAA,EAAS,GAAG,MAAK,GAAI,KAAA;AACnD,EAAA,4BACEC,UAAA,CAAe,IAAA,EAAf,EAAoB,GAAA,EAAK,OAAA,EAAU,GAAG,IAAA,EACtC,QAAA,EAAA;AAAA,oBAAA,GAAA,CAACA,UAAA,CAAe,WAAA,EAAf,EAA2B,GAAA,EAAW,GAAG,UAAA,EAAY,CAAA;AAAA,oBACtD,GAAA,CAACA,WAAe,OAAA,EAAf,EACA,8BAACA,UAAA,CAAe,SAAA,EAAf,EAAyB,CAAA,EAC3B,CAAA;AAAA,IACC,YAAY,IAAA,oBACZ,GAAA,CAACA,UAAA,CAAe,KAAA,EAAf,EAAsB,QAAA,EAAS;AAAA,GAAA,EAElC,CAAA;AAEF;AACA,QAAA,CAAS,WAAA,GAAc,UAAA;AAEhB,IAAM,gBAAgBA,UAAA,CAAe;AAC5C,aAAA,CAAc,WAAA,GAAc,eAAA;ACrBrB,IAAM,QAAA,GAAoC,CAAC,KAAA,KAAU;AAC3D,EAAA,uBAAOC,GAAAA,CAACC,UAAA,EAAA,EAAgB,GAAG,KAAA,EAAO,CAAA;AACnC;AACA,QAAA,CAAS,WAAA,GAAc,UAAA;AAUhB,IAAM,eAA4C,CAAC;AAAA,EACzD,KAAA,GAAQ,CAAA;AAAA,EACR,GAAA,GAAM;AACP,CAAA,KAAM;AACL,EAAA,uBACCD,GAAAA,CAACE,KAAAA,EAAA,EAAM,KACL,QAAA,EAAA,KAAA,CAAM,IAAA,CAAK,EAAE,MAAA,EAAQ,OAAO,CAAA,CAAE,GAAA,CAAI,CAAC,GAAG,CAAA,KAAM;AAC5C,IAAA,MAAM,MAAA,GAAS,MAAM,KAAA,GAAQ,CAAA;AAC7B,IAAA,uBACCF,GAAAA;AAAA,MAACC,UAAA;AAAA,MAAA;AAAA,QAEA,MAAA,EAAO,GAAA;AAAA,QACP,KAAA,EAAO,SAAS,KAAA,GAAQ,MAAA;AAAA,QACxB,YAAA,EAAa;AAAA,OAAA;AAAA,MAHR,MAAA,GAAS,MAAA,GAAS,CAAA,KAAA,EAAQ,MAAA,CAAO,CAAC,CAAC,CAAA;AAAA,KAIzC;AAAA,EAEF,CAAC,CAAA,EACF,CAAA;AAEF;AACA,YAAA,CAAa,WAAA,GAAc,cAAA;AAGpB,IAAM,iBAAuD,CAAC;AAAA,EACpE,IAAA,GAAO;AACR,CAAA,KAAM;AACL,EAAA,uBACCD,IAAC,MAAA,EAAA,EAAO,OAAA,EAAO,MAAC,IAAA,EACf,QAAA,kBAAAA,GAAAA,CAACC,UAAA,EAAA,EAAe,CAAA,EACjB,CAAA;AAEF;AACA,cAAA,CAAe,WAAA,GAAc,gBAAA","file":"chunk-SJIYWHIV.js","sourcesContent":["import { Checkbox as ChakraCheckbox } from \"@chakra-ui/react\";\nimport type * as React from \"react\";\n\nexport interface CheckboxProps extends ChakraCheckbox.RootProps {\n\t/** Checkbox label text or content. */\n\tchildren?: React.ReactNode;\n\t/** Additional props forwarded to the hidden input element. */\n\tinputProps?: React.InputHTMLAttributes<HTMLInputElement>;\n\t/** Ref attached to the root element. */\n\trootRef?: React.RefObject<HTMLLabelElement | null>;\n}\n\nexport const Checkbox = function Checkbox({\n\tref,\n\t...props\n}: CheckboxProps & { ref?: React.Ref<HTMLInputElement> }) {\n\tconst { children, inputProps, rootRef, ...rest } = props;\n\treturn (\n\t\t<ChakraCheckbox.Root ref={rootRef} {...rest}>\n\t\t\t<ChakraCheckbox.HiddenInput ref={ref} {...inputProps} />\n\t\t\t<ChakraCheckbox.Control>\n\t\t\t\t<ChakraCheckbox.Indicator />\n\t\t\t</ChakraCheckbox.Control>\n\t\t\t{children != null && (\n\t\t\t\t<ChakraCheckbox.Label>{children}</ChakraCheckbox.Label>\n\t\t\t)}\n\t\t</ChakraCheckbox.Root>\n\t);\n};\nCheckbox.displayName = \"Checkbox\";\n\nexport const CheckboxGroup = ChakraCheckbox.Group;\nCheckboxGroup.displayName = \"CheckboxGroup\";\n","import {\n\tSkeleton as ChakraSkeleton,\n\ttype SkeletonProps as ChakraSkeletonProps,\n\tCircle,\n\tStack,\n} from \"@chakra-ui/react\";\nimport type React from \"react\";\n\nexport type SkeletonProps = ChakraSkeletonProps;\n\n/** Rectangular skeleton placeholder. */\nexport const Skeleton: React.FC<SkeletonProps> = (props) => {\n\treturn <ChakraSkeleton {...props} />;\n};\nSkeleton.displayName = \"Skeleton\";\n\nexport interface SkeletonTextProps {\n\t/** Number of text lines. @default 3 */\n\tlines?: number;\n\t/** Gap between lines. @default 3 */\n\tgap?: number | string;\n}\n\n/** Multi-line text skeleton placeholder. */\nexport const SkeletonText: React.FC<SkeletonTextProps> = ({\n\tlines = 3,\n\tgap = 3,\n}) => {\n\treturn (\n\t\t<Stack gap={gap}>\n\t\t\t{Array.from({ length: lines }).map((_, i) => {\n\t\t\t\tconst isLast = i === lines - 1;\n\t\t\t\treturn (\n\t\t\t\t\t<ChakraSkeleton\n\t\t\t\t\t\tkey={isLast ? \"last\" : `line-${String(i)}`}\n\t\t\t\t\t\theight=\"3\"\n\t\t\t\t\t\twidth={isLast ? \"80%\" : \"100%\"}\n\t\t\t\t\t\tborderRadius=\"sm\"\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t})}\n\t\t</Stack>\n\t);\n};\nSkeletonText.displayName = \"SkeletonText\";\n\n/** Circular skeleton placeholder for avatars. */\nexport const SkeletonCircle: React.FC<{ size?: string | number }> = ({\n\tsize = 10,\n}) => {\n\treturn (\n\t\t<Circle asChild size={size}>\n\t\t\t<ChakraSkeleton />\n\t\t</Circle>\n\t);\n};\nSkeletonCircle.displayName = \"SkeletonCircle\";\n"]}
@@ -0,0 +1,37 @@
1
+ import { Progress as Progress$1, ProgressCircle as ProgressCircle$1 } from '@chakra-ui/react';
2
+ import { jsxs, jsx } from 'react/jsx-runtime';
3
+
4
+ // src/primitives/progress.tsx
5
+ var Progress = function Progress2({
6
+ ref,
7
+ ...props
8
+ }) {
9
+ const { showValue, label, ...rest } = props;
10
+ return /* @__PURE__ */ jsxs(Progress$1.Root, { ref, ...rest, children: [
11
+ (label || showValue) && /* @__PURE__ */ jsxs(Progress$1.Label, { children: [
12
+ label,
13
+ showValue && /* @__PURE__ */ jsx(Progress$1.ValueText, {})
14
+ ] }),
15
+ /* @__PURE__ */ jsx(Progress$1.Track, { children: /* @__PURE__ */ jsx(Progress$1.Range, {}) })
16
+ ] });
17
+ };
18
+ Progress.displayName = "Progress";
19
+ var ProgressCircle = function ProgressCircle2({
20
+ ref,
21
+ ...props
22
+ }) {
23
+ const { showValue, children, ...rest } = props;
24
+ return /* @__PURE__ */ jsxs(ProgressCircle$1.Root, { ref, ...rest, children: [
25
+ /* @__PURE__ */ jsxs(ProgressCircle$1.Circle, { children: [
26
+ /* @__PURE__ */ jsx(ProgressCircle$1.Track, {}),
27
+ /* @__PURE__ */ jsx(ProgressCircle$1.Range, {})
28
+ ] }),
29
+ showValue && /* @__PURE__ */ jsx(ProgressCircle$1.ValueText, {}),
30
+ children
31
+ ] });
32
+ };
33
+ ProgressCircle.displayName = "ProgressCircle";
34
+
35
+ export { Progress, ProgressCircle };
36
+ //# sourceMappingURL=chunk-WEP2AIQ5.js.map
37
+ //# sourceMappingURL=chunk-WEP2AIQ5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/primitives/progress.tsx"],"names":["Progress","ChakraProgress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A,GAAA,EACF,CAAA;AAEF;AACA,cAAA,CAAe,WAAA,GAAc,gBAAA","file":"chunk-WEP2AIQ5.js","sourcesContent":["import {\n\tProgress as ChakraProgress,\n\tProgressCircle as ChakraProgressCircle,\n} from \"@chakra-ui/react\";\nimport type * as React from \"react\";\n\nexport interface ProgressProps extends ChakraProgress.RootProps {\n\t/** Whether to show the percentage label. @default false */\n\tshowValue?: boolean;\n\t/** Label text displayed above the progress bar. */\n\tlabel?: React.ReactNode;\n}\n\nexport const Progress = function Progress({\n\tref,\n\t...props\n}: ProgressProps & { ref?: React.Ref<HTMLDivElement> }) {\n\tconst { showValue, label, ...rest } = props;\n\treturn (\n\t\t<ChakraProgress.Root ref={ref} {...rest}>\n\t\t\t{(label || showValue) && (\n\t\t\t\t<ChakraProgress.Label>\n\t\t\t\t\t{label}\n\t\t\t\t\t{showValue && <ChakraProgress.ValueText />}\n\t\t\t\t</ChakraProgress.Label>\n\t\t\t)}\n\t\t\t<ChakraProgress.Track>\n\t\t\t\t<ChakraProgress.Range />\n\t\t\t</ChakraProgress.Track>\n\t\t</ChakraProgress.Root>\n\t);\n};\nProgress.displayName = \"Progress\";\n\nexport interface ProgressCircleProps extends ChakraProgressCircle.RootProps {\n\t/** Whether to show the percentage label. @default false */\n\tshowValue?: boolean;\n}\n\nexport const ProgressCircle = function ProgressCircle({\n\tref,\n\t...props\n}: ProgressCircleProps & { ref?: React.Ref<HTMLDivElement> }) {\n\tconst { showValue, children, ...rest } = props;\n\treturn (\n\t\t<ChakraProgressCircle.Root ref={ref} {...rest}>\n\t\t\t<ChakraProgressCircle.Circle>\n\t\t\t\t<ChakraProgressCircle.Track />\n\t\t\t\t<ChakraProgressCircle.Range />\n\t\t\t</ChakraProgressCircle.Circle>\n\t\t\t{showValue && <ChakraProgressCircle.ValueText />}\n\t\t\t{children}\n\t\t</ChakraProgressCircle.Root>\n\t);\n};\nProgressCircle.displayName = \"ProgressCircle\";\n"]}
@@ -0,0 +1,52 @@
1
+ import { Popover as Popover$1, Portal, Switch as Switch$1 } from '@chakra-ui/react';
2
+ import { jsx, jsxs } from 'react/jsx-runtime';
3
+
4
+ // src/primitives/popover.tsx
5
+ var Popover = function Popover2(props) {
6
+ return /* @__PURE__ */ jsx(Popover$1.Root, { ...props, children: props.children });
7
+ };
8
+ Popover.displayName = "Popover";
9
+ var PopoverTrigger = Popover$1.Trigger;
10
+ PopoverTrigger.displayName = "PopoverTrigger";
11
+ var PopoverContent = function PopoverContent2({
12
+ ref,
13
+ ...props
14
+ }) {
15
+ const { showArrow, portalled = true, portalRef, children, ...rest } = props;
16
+ return /* @__PURE__ */ jsx(Portal, { disabled: !portalled, container: portalRef, children: /* @__PURE__ */ jsx(Popover$1.Positioner, { children: /* @__PURE__ */ jsxs(Popover$1.Content, { ref, ...rest, children: [
17
+ showArrow && /* @__PURE__ */ jsx(Popover$1.Arrow, { children: /* @__PURE__ */ jsx(Popover$1.ArrowTip, {}) }),
18
+ children
19
+ ] }) }) });
20
+ };
21
+ PopoverContent.displayName = "PopoverContent";
22
+ var PopoverHeader = Popover$1.Header;
23
+ PopoverHeader.displayName = "PopoverHeader";
24
+ var PopoverBody = Popover$1.Body;
25
+ PopoverBody.displayName = "PopoverBody";
26
+ var PopoverFooter = Popover$1.Footer;
27
+ PopoverFooter.displayName = "PopoverFooter";
28
+ var PopoverCloseTrigger = Popover$1.CloseTrigger;
29
+ PopoverCloseTrigger.displayName = "PopoverCloseTrigger";
30
+ var PopoverTitle = Popover$1.Title;
31
+ PopoverTitle.displayName = "PopoverTitle";
32
+ var PopoverDescription = Popover$1.Description;
33
+ PopoverDescription.displayName = "PopoverDescription";
34
+ var Switch = function Switch2({
35
+ ref,
36
+ ...props
37
+ }) {
38
+ const { inputProps, children, rootRef, trackLabel, thumbLabel, ...rest } = props;
39
+ return /* @__PURE__ */ jsxs(Switch$1.Root, { ref: rootRef, ...rest, children: [
40
+ /* @__PURE__ */ jsx(Switch$1.HiddenInput, { ref, ...inputProps }),
41
+ /* @__PURE__ */ jsxs(Switch$1.Control, { children: [
42
+ /* @__PURE__ */ jsx(Switch$1.Thumb, { children: thumbLabel && /* @__PURE__ */ jsx(Switch$1.ThumbIndicator, { fallback: thumbLabel?.off, children: thumbLabel?.on }) }),
43
+ trackLabel && /* @__PURE__ */ jsx(Switch$1.Indicator, { fallback: trackLabel.off, children: trackLabel.on })
44
+ ] }),
45
+ children != null && /* @__PURE__ */ jsx(Switch$1.Label, { children })
46
+ ] });
47
+ };
48
+ Switch.displayName = "Switch";
49
+
50
+ export { Popover, PopoverBody, PopoverCloseTrigger, PopoverContent, PopoverDescription, PopoverFooter, PopoverHeader, PopoverTitle, PopoverTrigger, Switch };
51
+ //# sourceMappingURL=chunk-WQIEF5N3.js.map
52
+ //# sourceMappingURL=chunk-WQIEF5N3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/primitives/popover.tsx","../src/primitives/switch.tsx"],"names":["Popover","ChakraPopover","PopoverContent","Switch","jsxs","ChakraSwitch","jsx"],"mappings":";;;;AAKO,IAAM,OAAA,GAAU,SAASA,QAAAA,CAAQ,KAAA,EAAqB;AAC5D,EAAA,2BAAQC,SAAA,CAAc,IAAA,EAAd,EAAoB,GAAG,KAAA,EAAQ,gBAAM,QAAA,EAAS,CAAA;AACvD;AACA,OAAA,CAAQ,WAAA,GAAc,SAAA;AAEf,IAAM,iBAAiBA,SAAA,CAAc;AAC5C,cAAA,CAAe,WAAA,GAAc,gBAAA;AAWtB,IAAM,cAAA,GAAiB,SAASC,eAAAA,CAAe;AAAA,EACrD,GAAA;AAAA,EACA,GAAG;AACJ,CAAA,EAA8D;AAC7D,EAAA,MAAM,EAAE,WAAW,SAAA,GAAY,IAAA,EAAM,WAAW,QAAA,EAAU,GAAG,MAAK,GAAI,KAAA;AACtE,EAAA,2BACE,MAAA,EAAA,EAAO,QAAA,EAAU,CAAC,SAAA,EAAW,WAAW,SAAA,EACxC,QAAA,kBAAA,GAAA,CAACD,SAAA,CAAc,UAAA,EA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A,CAAa,KAAA,EAAb,EACC,wCACAC,GAAAA,CAACD,QAAA,CAAa,cAAA,EAAb,EAA4B,QAAA,EAAU,UAAA,EAAY,GAAA,EACjD,QAAA,EAAA,UAAA,EAAY,IACd,CAAA,EAEF,CAAA;AAAA,MACC,UAAA,oBACAC,GAAAA,CAACD,QAAA,CAAa,SAAA,EAAb,EAAuB,QAAA,EAAU,UAAA,CAAW,GAAA,EAC3C,QAAA,EAAA,UAAA,CAAW,EAAA,EACb;AAAA,KAAA,EAEF,CAAA;AAAA,IACC,YAAY,IAAA,oBAAQC,IAACD,QAAA,CAAa,KAAA,EAAb,EAAoB,QAAA,EAAS;AAAA,GAAA,EACpD,CAAA;AAEF;AACA,MAAA,CAAO,WAAA,GAAc,QAAA","file":"chunk-WQIEF5N3.js","sourcesContent":["import { Popover as ChakraPopover, Portal } from \"@chakra-ui/react\";\nimport type * as React from \"react\";\n\nexport type PopoverProps = ChakraPopover.RootProps;\n\nexport const Popover = function Popover(props: PopoverProps) {\n\treturn <ChakraPopover.Root {...props}>{props.children}</ChakraPopover.Root>;\n};\nPopover.displayName = \"Popover\";\n\nexport const PopoverTrigger = ChakraPopover.Trigger;\nPopoverTrigger.displayName = \"PopoverTrigger\";\n\nexport interface PopoverContentProps extends ChakraPopover.ContentProps {\n\t/** Whether to show an arrow. @default false */\n\tshowArrow?: boolean;\n\t/** Whether to render in a portal. @default true */\n\tportalled?: boolean;\n\t/** Container ref for portal. */\n\tportalRef?: React.RefObject<HTMLElement | null>;\n}\n\nexport const PopoverContent = function PopoverContent({\n\tref,\n\t...props\n}: PopoverContentProps & { ref?: React.Ref<HTMLDivElement> }) {\n\tconst { showArrow, portalled = true, portalRef, children, ...rest } = props;\n\treturn (\n\t\t<Portal disabled={!portalled} container={portalRef}>\n\t\t\t<ChakraPopover.Positioner>\n\t\t\t\t<ChakraPopover.Content ref={ref} {...rest}>\n\t\t\t\t\t{showArrow && (\n\t\t\t\t\t\t<ChakraPopover.Arrow>\n\t\t\t\t\t\t\t<ChakraPopover.ArrowTip />\n\t\t\t\t\t\t</ChakraPopover.Arrow>\n\t\t\t\t\t)}\n\t\t\t\t\t{children}\n\t\t\t\t</ChakraPopover.Content>\n\t\t\t</ChakraPopover.Positioner>\n\t\t</Portal>\n\t);\n};\nPopoverContent.displayName = \"PopoverContent\";\n\nexport const PopoverHeader = ChakraPopover.Header;\nPopoverHeader.displayName = \"PopoverHeader\";\n\nexport const PopoverBody = ChakraPopover.Body;\nPopoverBody.displayName = \"PopoverBody\";\n\nexport const PopoverFooter = ChakraPopover.Footer;\nPopoverFooter.displayName = \"PopoverFooter\";\n\nexport const PopoverCloseTrigger = ChakraPopover.CloseTrigger;\nPopoverCloseTrigger.displayName = \"PopoverCloseTrigger\";\n\nexport const PopoverTitle = ChakraPopover.Title;\nPopoverTitle.displayName = \"PopoverTitle\";\n\nexport const PopoverDescription = ChakraPopover.Description;\nPopoverDescription.displayName = \"PopoverDescription\";\n","import { Switch as ChakraSwitch } from \"@chakra-ui/react\";\nimport type * as React from \"react\";\n\nexport interface SwitchProps extends ChakraSwitch.RootProps {\n\t/** Additional props forwarded to the hidden input element. */\n\tinputProps?: React.InputHTMLAttributes<HTMLInputElement>;\n\t/** Ref attached to the root label element. */\n\trootRef?: React.RefObject<HTMLLabelElement | null>;\n\t/** Labels displayed inside the track for on/off states. */\n\ttrackLabel?: { on: React.ReactNode; off: React.ReactNode };\n\t/** Labels displayed inside the thumb for on/off states. */\n\tthumbLabel?: { on: React.ReactNode; off: React.ReactNode };\n}\n\nexport const Switch = function Switch({\n\tref,\n\t...props\n}: SwitchProps & { ref?: React.Ref<HTMLInputElement> }) {\n\tconst { inputProps, children, rootRef, trackLabel, thumbLabel, ...rest } =\n\t\tprops;\n\n\treturn (\n\t\t<ChakraSwitch.Root ref={rootRef} {...rest}>\n\t\t\t<ChakraSwitch.HiddenInput ref={ref} {...inputProps} />\n\t\t\t<ChakraSwitch.Control>\n\t\t\t\t<ChakraSwitch.Thumb>\n\t\t\t\t\t{thumbLabel && (\n\t\t\t\t\t\t<ChakraSwitch.ThumbIndicator fallback={thumbLabel?.off}>\n\t\t\t\t\t\t\t{thumbLabel?.on}\n\t\t\t\t\t\t</ChakraSwitch.ThumbIndicator>\n\t\t\t\t\t)}\n\t\t\t\t</ChakraSwitch.Thumb>\n\t\t\t\t{trackLabel && (\n\t\t\t\t\t<ChakraSwitch.Indicator fallback={trackLabel.off}>\n\t\t\t\t\t\t{trackLabel.on}\n\t\t\t\t\t</ChakraSwitch.Indicator>\n\t\t\t\t)}\n\t\t\t</ChakraSwitch.Control>\n\t\t\t{children != null && <ChakraSwitch.Label>{children}</ChakraSwitch.Label>}\n\t\t</ChakraSwitch.Root>\n\t);\n};\nSwitch.displayName = \"Switch\";\n"]}
@@ -1,4 +1,4 @@
1
- import { AvatarGroup as AvatarGroup$1, Avatar as Avatar$1, useRecipe, chakra, Spinner as Spinner$1 } from '@chakra-ui/react';
1
+ import { AvatarGroup as AvatarGroup$1, Avatar as Avatar$1, useRecipe, chakra } from '@chakra-ui/react';
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
3
 
4
4
  // src/primitives/avatar.tsx
@@ -26,11 +26,7 @@ var Prose = ({
26
26
  return /* @__PURE__ */ jsx(chakra.div, { ref, css: styles, ...props });
27
27
  };
28
28
  Prose.displayName = "Prose";
29
- var Spinner = (props) => {
30
- return /* @__PURE__ */ jsx(Spinner$1, { ...props });
31
- };
32
- Spinner.displayName = "Spinner";
33
29
 
34
- export { Avatar, AvatarGroup, Prose, Spinner };
35
- //# sourceMappingURL=chunk-QU3FF5WI.js.map
36
- //# sourceMappingURL=chunk-QU3FF5WI.js.map
30
+ export { Avatar, AvatarGroup, Prose };
31
+ //# sourceMappingURL=chunk-ZFBDVERP.js.map
32
+ //# sourceMappingURL=chunk-ZFBDVERP.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/primitives/avatar.tsx","../src/primitives/prose.tsx"],"names":["Avatar","ChakraAvatar","ChakraAvatarGroup","jsx"],"mappings":";;;;AAuBO,IAAM,MAAA,GAAS,SAASA,OAAAA,CAAO;AAAA,EACrC,GAAA;AAAA,EACA,GAAG;AACJ,CAAA,EAAsD;AACrD,EAAA,MAAM,EAAE,IAAA,EAAM,GAAA,EAAK,MAAA,EAAQ,OAAA,EAAS,MAAM,QAAA,EAAU,QAAA,EAAU,GAAG,IAAA,EAAK,GACrE,KAAA;AACD,EAAA,4BACEC,QAAA,CAAa,IAAA,EAAb,EAAkB,GAAA,EAAW,GAAG,IAAA,EAChC,QAAA,EAAA;AAAA,oBAAA,GAAA,CAACA,QAAA,CAAa,QAAA,EAAb,EAAsB,IAAA,EACrB,kBAAQ,QAAA,EACV,CAAA;AAAA,wBACCA,QAAA,CAAa,KAAA,EAAb,EAAmB,GAAA,EAAU,QAAgB,OAAA,EAAkB,CAAA;AAAA,IAC/D;AAAA,GAAA,EACF,CAAA;AAEF;AACA,MAAA,CAAO,WAAA,GAAc,QAAA;AAEd,IAAM,WAAA,GAAcC;AAC3B,WAAA,CAAY,WAAA,GAAc,aAAA;ACnCnB,IAAM,QAAQ,CAAC;AAAA,EACrB,GAAA;AAAA,EACA,IAAA;AAAA,EACA,GAAG;AACJ,CAAA,KAAwD;AACvD,EAAA,MAAM,MAAA,GAAS,SAAA,CAAU,EAAE,GAAA,EAAK,SAAS,CAAA;AACzC,EAAA,MAAM,MAAA,GAAS,MAAA,CAAO,EAAE,IAAA,EAAM,CAAA;AAC9B,EAAA,uBAAOC,IAAC,MAAA,CAAO,GAAA,EAAP,EAAW,GAAA,EAAU,GAAA,EAAK,MAAA,EAAS,GAAG,KAAA,EAAO,CAAA;AACtD;AACA,KAAA,CAAM,WAAA,GAAc,OAAA","file":"chunk-ZFBDVERP.js","sourcesContent":["import {\n\tAvatar as ChakraAvatar,\n\tAvatarGroup as ChakraAvatarGroup,\n} from \"@chakra-ui/react\";\nimport type * as React from \"react\";\n\ntype ImageProps = React.ImgHTMLAttributes<HTMLImageElement>;\n\nexport interface AvatarProps extends ChakraAvatar.RootProps {\n\t/** Display name used to generate initials for the fallback. */\n\tname?: string;\n\t/** Image source URL. */\n\tsrc?: string;\n\t/** Image srcSet attribute for responsive images. */\n\tsrcSet?: string;\n\t/** Image loading strategy. */\n\tloading?: ImageProps[\"loading\"];\n\t/** Custom icon element shown as fallback. */\n\ticon?: React.ReactElement;\n\t/** Custom fallback content when no image or icon is provided. */\n\tfallback?: React.ReactNode;\n}\n\nexport const Avatar = function Avatar({\n\tref,\n\t...props\n}: AvatarProps & { ref?: React.Ref<HTMLDivElement> }) {\n\tconst { name, src, srcSet, loading, icon, fallback, children, ...rest } =\n\t\tprops;\n\treturn (\n\t\t<ChakraAvatar.Root ref={ref} {...rest}>\n\t\t\t<ChakraAvatar.Fallback name={name}>\n\t\t\t\t{icon || fallback}\n\t\t\t</ChakraAvatar.Fallback>\n\t\t\t<ChakraAvatar.Image src={src} srcSet={srcSet} loading={loading} />\n\t\t\t{children}\n\t\t</ChakraAvatar.Root>\n\t);\n};\nAvatar.displayName = \"Avatar\";\n\nexport const AvatarGroup = ChakraAvatarGroup;\nAvatarGroup.displayName = \"AvatarGroup\";\n","import { chakra, type HTMLChakraProps, useRecipe } from \"@chakra-ui/react\";\nimport type React from \"react\";\n\nexport interface ProseProps extends HTMLChakraProps<\"div\"> {\n\tsize?: \"md\" | \"lg\";\n}\n\nexport const Prose = ({\n\tref,\n\tsize,\n\t...props\n}: ProseProps & { ref?: React.Ref<HTMLDivElement> }) => {\n\tconst recipe = useRecipe({ key: \"prose\" });\n\tconst styles = recipe({ size });\n\treturn <chakra.div ref={ref} css={styles} {...props} />;\n};\nProse.displayName = \"Prose\";\n"]}