@diceui/tags-input 0.1.0 → 0.2.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 CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  'use strict';
4
4
 
5
- var reactPrimitive = require('@radix-ui/react-primitive');
6
5
  var React = require('react');
7
6
  var shared = require('@diceui/shared');
8
7
 
@@ -316,7 +315,7 @@ var TagsInputRoot = React__namespace.forwardRef((props, ref) => {
316
315
  labelId
317
316
  },
318
317
  /* @__PURE__ */ React__namespace.createElement(
319
- reactPrimitive.Primitive.div,
318
+ shared.Primitive.div,
320
319
  {
321
320
  id,
322
321
  "data-invalid": isInvalidInput ? "" : void 0,
@@ -367,7 +366,7 @@ var TagsInputLabel = React__namespace.forwardRef(
367
366
  (props, ref) => {
368
367
  const context = useTagsInput(LABEL_NAME);
369
368
  return /* @__PURE__ */ React__namespace.createElement(
370
- reactPrimitive.Primitive.label,
369
+ shared.Primitive.label,
371
370
  {
372
371
  id: context.labelId,
373
372
  htmlFor: context.inputId,
@@ -410,7 +409,7 @@ var TagsInputItem = React__namespace.forwardRef(
410
409
  displayValue
411
410
  },
412
411
  /* @__PURE__ */ React__namespace.createElement(
413
- reactPrimitive.Primitive.div,
412
+ shared.Primitive.div,
414
413
  {
415
414
  ...{ [shared.DATA_ITEM_ATTR]: "" },
416
415
  "aria-labelledby": textId,
@@ -502,7 +501,7 @@ var TagsInputInput = React__namespace.forwardRef(
502
501
  return () => cancelAnimationFrame(animationFrameId);
503
502
  }, [autoFocus, context.inputRef]);
504
503
  return /* @__PURE__ */ React__namespace.createElement(
505
- reactPrimitive.Primitive.input,
504
+ shared.Primitive.input,
506
505
  {
507
506
  type: "text",
508
507
  id: context.inputId,
@@ -568,7 +567,7 @@ var TagsInputItemDelete = React__namespace.forwardRef((props, ref) => {
568
567
  const disabled = itemContext.disabled || context.disabled;
569
568
  if (itemContext.isEditing) return null;
570
569
  return /* @__PURE__ */ React__namespace.createElement(
571
- reactPrimitive.Primitive.button,
570
+ shared.Primitive.button,
572
571
  {
573
572
  type: "button",
574
573
  tabIndex: -1,
@@ -597,7 +596,7 @@ var TagsInputItemText = React__namespace.forwardRef((props, ref) => {
597
596
  const [editValue, setEditValue] = React__namespace.useState(itemContext.displayValue);
598
597
  if (itemContext.isEditing && context.editable && !itemContext.disabled) {
599
598
  return /* @__PURE__ */ React__namespace.createElement(
600
- reactPrimitive.Primitive.input,
599
+ shared.Primitive.input,
601
600
  {
602
601
  type: "text",
603
602
  autoCapitalize: "off",
@@ -648,7 +647,7 @@ var TagsInputItemText = React__namespace.forwardRef((props, ref) => {
648
647
  }
649
648
  );
650
649
  }
651
- return /* @__PURE__ */ React__namespace.createElement(reactPrimitive.Primitive.span, { id: itemContext.textId, ...itemTextProps, ref }, children ?? itemContext.displayValue);
650
+ return /* @__PURE__ */ React__namespace.createElement(shared.Primitive.span, { id: itemContext.textId, ...itemTextProps, ref }, children ?? itemContext.displayValue);
652
651
  });
653
652
  var ItemText = TagsInputItemText;
654
653
  var CLEAR_NAME = "TagsInputClear";
@@ -657,7 +656,7 @@ var TagsInputClear = React__namespace.forwardRef(
657
656
  const { forceMount, ...clearProps } = props;
658
657
  const context = useTagsInput(CLEAR_NAME);
659
658
  return /* @__PURE__ */ React__namespace.createElement(shared.Presence, { present: forceMount || context.value.length > 0 }, /* @__PURE__ */ React__namespace.createElement(
660
- reactPrimitive.Primitive.button,
659
+ shared.Primitive.button,
661
660
  {
662
661
  type: "button",
663
662
  "aria-disabled": context.disabled,
package/dist/index.d.cts CHANGED
@@ -1,6 +1,5 @@
1
- import { Primitive } from '@radix-ui/react-primitive';
2
1
  import * as React from 'react';
3
- import { Direction } from '@diceui/shared';
2
+ import { Primitive, Direction } from '@diceui/shared';
4
3
 
5
4
  interface TagsInputInputProps extends React.ComponentPropsWithoutRef<typeof Primitive.input> {
6
5
  }
package/dist/index.d.ts CHANGED
@@ -1,6 +1,5 @@
1
- import { Primitive } from '@radix-ui/react-primitive';
2
1
  import * as React from 'react';
3
- import { Direction } from '@diceui/shared';
2
+ import { Primitive, Direction } from '@diceui/shared';
4
3
 
5
4
  interface TagsInputInputProps extends React.ComponentPropsWithoutRef<typeof Primitive.input> {
6
5
  }
package/dist/index.js CHANGED
@@ -1,8 +1,7 @@
1
1
  'use client';
2
2
 
3
- import { Primitive } from '@radix-ui/react-primitive';
4
3
  import * as React from 'react';
5
- import { createContext, useControllableState, useId, useDirection, useCollection, useFormControl, useComposedRefs, DATA_ITEM_ATTR, composeEventHandlers, BubbleInput, composeRefs, Presence } from '@diceui/shared';
4
+ import { createContext, useControllableState, useId, useDirection, useCollection, useFormControl, useComposedRefs, DATA_ITEM_ATTR, Primitive, composeEventHandlers, BubbleInput, composeRefs, Presence } from '@diceui/shared';
6
5
 
7
6
  var ROOT_NAME = "TagsInputRoot";
8
7
  var [TagsInputProvider, useTagsInput] = createContext(ROOT_NAME);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diceui/tags-input",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -52,8 +52,7 @@
52
52
  "typescript": "^5.7.2"
53
53
  },
54
54
  "dependencies": {
55
- "@radix-ui/react-primitive": "^2.0.1",
56
- "@diceui/shared": "0.4.0"
55
+ "@diceui/shared": "0.6.0"
57
56
  },
58
57
  "scripts": {
59
58
  "dev": "tsup --watch",