@pibit.ai/cure-design-system 0.3.6 → 0.3.8
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/foundations/dot-icon/index.d.ts +7 -0
- package/dist/foundations/dot-icon/index.d.ts.map +1 -0
- package/dist/foundations/dot-icon/index.js +10 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +42 -36
- package/dist/patterns/table/TableWrapper.d.ts +6 -3
- package/dist/patterns/table/TableWrapper.d.ts.map +1 -1
- package/dist/patterns/table/TableWrapper.js +80 -76
- package/dist/patterns/table/table.d.ts +5 -3
- package/dist/patterns/table/table.d.ts.map +1 -1
- package/dist/patterns/table/table.js +195 -173
- package/dist/patterns/tree-view/index.d.ts +2 -0
- package/dist/patterns/tree-view/index.d.ts.map +1 -0
- package/dist/patterns/tree-view/tree-view.d.ts +61 -0
- package/dist/patterns/tree-view/tree-view.d.ts.map +1 -0
- package/dist/patterns/tree-view/tree-view.js +167 -0
- package/dist/primitives/badge/badge-types.d.ts +17 -0
- package/dist/primitives/badge/badge-types.d.ts.map +1 -0
- package/dist/primitives/badge/badge-types.js +8 -0
- package/dist/primitives/badge/badge.d.ts +115 -22
- package/dist/primitives/badge/badge.d.ts.map +1 -1
- package/dist/primitives/badge/badge.js +272 -38
- package/dist/primitives/badge/index.d.ts +2 -1
- package/dist/primitives/badge/index.d.ts.map +1 -1
- package/dist/primitives/heading/heading.d.ts +1 -1
- package/dist/primitives/text/text.d.ts +1 -1
- package/dist/styles/components.css +1 -1
- package/package.json +2 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js +0 -59
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js +0 -34
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js +0 -47
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js +0 -17
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.js +0 -12
- package/dist/node_modules/framer-motion/dist/es/context/LayoutGroupContext.js +0 -5
- package/dist/node_modules/framer-motion/dist/es/context/LazyContext.js +0 -5
- package/dist/node_modules/framer-motion/dist/es/context/MotionConfigContext.js +0 -9
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/create.js +0 -13
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/index.js +0 -5
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.js +0 -15
- package/dist/node_modules/framer-motion/dist/es/context/PresenceContext.js +0 -5
- package/dist/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.js +0 -5
- package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.js +0 -8
- package/dist/node_modules/framer-motion/dist/es/events/event-info.js +0 -14
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js +0 -277
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.js +0 -22
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js +0 -67
- package/dist/node_modules/framer-motion/dist/es/gestures/focus.js +0 -28
- package/dist/node_modules/framer-motion/dist/es/gestures/hover.js +0 -21
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js +0 -131
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.js +0 -43
- package/dist/node_modules/framer-motion/dist/es/gestures/press.js +0 -23
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js +0 -27
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js +0 -34
- package/dist/node_modules/framer-motion/dist/es/motion/features/animations.js +0 -13
- package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.js +0 -39
- package/dist/node_modules/framer-motion/dist/es/motion/features/drag.js +0 -17
- package/dist/node_modules/framer-motion/dist/es/motion/features/gestures.js +0 -21
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js +0 -60
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout.js +0 -11
- package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.js +0 -14
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.js +0 -44
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.js +0 -21
- package/dist/node_modules/framer-motion/dist/es/motion/index.js +0 -63
- package/dist/node_modules/framer-motion/dist/es/motion/utils/symbol.js +0 -4
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js +0 -22
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js +0 -66
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js +0 -52
- package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.js +0 -38
- package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.js +0 -18
- package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.js +0 -13
- package/dist/node_modules/framer-motion/dist/es/render/components/motion/proxy.js +0 -7
- package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js +0 -10
- package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.js +0 -16
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js +0 -20
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js +0 -24
- package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.js +0 -10
- package/dist/node_modules/framer-motion/dist/es/render/html/use-props.js +0 -27
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js +0 -9
- package/dist/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.js +0 -30
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.js +0 -22
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.js +0 -10
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js +0 -8
- package/dist/node_modules/framer-motion/dist/es/utils/distance.js +0 -9
- package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.js +0 -4
- package/dist/node_modules/framer-motion/dist/es/utils/is-browser.js +0 -4
- package/dist/node_modules/framer-motion/dist/es/utils/is-ref-object.js +0 -6
- package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.js +0 -28
- package/dist/node_modules/framer-motion/dist/es/utils/use-constant.js +0 -8
- package/dist/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.js +0 -106
- package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.js +0 -133
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.js +0 -109
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js +0 -37
- package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.js +0 -17
- package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.js +0 -37
- package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.js +0 -30
- package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/defaults.js +0 -32
- package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/find.js +0 -52
- package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/index.js +0 -98
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.js +0 -9
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.js +0 -46
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.js +0 -49
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.js +0 -30
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.js +0 -22
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js +0 -69
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.js +0 -75
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.js +0 -16
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.js +0 -31
- package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.js +0 -27
- package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.js +0 -23
- package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.js +0 -31
- package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.js +0 -22
- package/dist/node_modules/motion-dom/dist/es/animation/utils/get-final-keyframe.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-animatable.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.js +0 -9
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.js +0 -16
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.js +0 -15
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.js +0 -21
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.js +0 -24
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.js +0 -17
- package/dist/node_modules/motion-dom/dist/es/events/add-dom-event.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.js +0 -27
- package/dist/node_modules/motion-dom/dist/es/frameloop/frame.js +0 -9
- package/dist/node_modules/motion-dom/dist/es/frameloop/microtask.js +0 -5
- package/dist/node_modules/motion-dom/dist/es/frameloop/order.js +0 -21
- package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.js +0 -41
- package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.js +0 -15
- package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.js +0 -11
- package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.js +0 -11
- package/dist/node_modules/motion-dom/dist/es/gestures/hover.js +0 -24
- package/dist/node_modules/motion-dom/dist/es/gestures/press/index.js +0 -33
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.js +0 -27
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/state.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.js +0 -27
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/conversion.js +0 -25
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/copy.js +0 -14
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.js +0 -52
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.js +0 -36
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.js +0 -25
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/models.js +0 -18
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/utils.js +0 -34
- package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.js +0 -16
- package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.js +0 -25
- package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.js +0 -623
- package/dist/node_modules/motion-dom/dist/es/projection/node/state.js +0 -15
- package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.js +0 -60
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.js +0 -21
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.js +0 -16
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.js +0 -21
- package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/projection/utils/each-axis.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/projection/utils/flat-tree.js +0 -19
- package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.js +0 -20
- package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/render/Feature.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/render/VisualElement.js +0 -247
- package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.js +0 -28
- package/dist/node_modules/motion-dom/dist/es/render/dom/is-css-var.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.js +0 -65
- package/dist/node_modules/motion-dom/dist/es/render/dom/style-set.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.js +0 -38
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.js +0 -29
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.js +0 -37
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.js +0 -14
- package/dist/node_modules/motion-dom/dist/es/render/store.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.js +0 -40
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.js +0 -32
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.js +0 -28
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.js +0 -15
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/render.js +0 -11
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.js +0 -15
- package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.js +0 -141
- package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.js +0 -20
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.js +0 -9
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-variant-label.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/render/utils/keys-position.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.js +0 -23
- package/dist/node_modules/motion-dom/dist/es/render/utils/motion-values.js +0 -25
- package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.js +0 -15
- package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.js +0 -5
- package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.js +0 -20
- package/dist/node_modules/motion-dom/dist/es/render/utils/setters.js +0 -21
- package/dist/node_modules/motion-dom/dist/es/render/utils/shallow-compare.js +0 -14
- package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/utils/delay.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/utils/interpolate.js +0 -42
- package/dist/node_modules/motion-dom/dist/es/utils/is-html-element.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/utils/is-svg-element.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/utils/mix/color.js +0 -29
- package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.js +0 -51
- package/dist/node_modules/motion-dom/dist/es/utils/mix/immediate.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/utils/mix/index.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/utils/mix/number.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/utils/mix/visibility.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.js +0 -15
- package/dist/node_modules/motion-dom/dist/es/utils/supports/flags.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/utils/supports/linear-easing.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/utils/supports/memo.js +0 -9
- package/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.js +0 -5
- package/dist/node_modules/motion-dom/dist/es/value/index.js +0 -215
- package/dist/node_modules/motion-dom/dist/es/value/types/auto.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.js +0 -19
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.js +0 -22
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/value/types/color/index.js +0 -15
- package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.js +0 -16
- package/dist/node_modules/motion-dom/dist/es/value/types/color/utils.js +0 -18
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/filter.js +0 -24
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.js +0 -49
- package/dist/node_modules/motion-dom/dist/es/value/types/dimensions.js +0 -9
- package/dist/node_modules/motion-dom/dist/es/value/types/int.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/defaults.js +0 -24
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.js +0 -70
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/transform.js +0 -31
- package/dist/node_modules/motion-dom/dist/es/value/types/numbers/index.js +0 -17
- package/dist/node_modules/motion-dom/dist/es/value/types/numbers/units.js +0 -17
- package/dist/node_modules/motion-dom/dist/es/value/types/test.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/color-regex.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/float-regex.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/sanitize.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/value/utils/is-motion-value.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/value/will-change/add-will-change.js +0 -14
- package/dist/node_modules/motion-dom/dist/es/value/will-change/is.js +0 -7
- package/dist/node_modules/motion-utils/dist/es/array.js +0 -11
- package/dist/node_modules/motion-utils/dist/es/clamp.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/easing/anticipate.js +0 -5
- package/dist/node_modules/motion-utils/dist/es/easing/back.js +0 -9
- package/dist/node_modules/motion-utils/dist/es/easing/circ.js +0 -8
- package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.js +0 -18
- package/dist/node_modules/motion-utils/dist/es/easing/ease.js +0 -7
- package/dist/node_modules/motion-utils/dist/es/easing/modifiers/mirror.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/easing/modifiers/reverse.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/easing/utils/map.js +0 -32
- package/dist/node_modules/motion-utils/dist/es/errors.js +0 -15
- package/dist/node_modules/motion-utils/dist/es/format-error-message.js +0 -6
- package/dist/node_modules/motion-utils/dist/es/global-config.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/is-numerical-string.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/is-object.js +0 -6
- package/dist/node_modules/motion-utils/dist/es/is-zero-value-string.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/memo.js +0 -8
- package/dist/node_modules/motion-utils/dist/es/noop.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/pipe.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/progress.js +0 -7
- package/dist/node_modules/motion-utils/dist/es/subscription-manager.js +0 -29
- package/dist/node_modules/motion-utils/dist/es/time-conversion.js +0 -5
- package/dist/node_modules/motion-utils/dist/es/velocity-per-second.js +0 -6
- package/dist/node_modules/motion-utils/dist/es/warn-once.js +0 -8
- package/dist/patterns/tree/TreeDemo.d.ts +0 -7
- package/dist/patterns/tree/TreeDemo.d.ts.map +0 -1
- package/dist/patterns/tree/TreeStructure.d.ts +0 -14
- package/dist/patterns/tree/TreeStructure.d.ts.map +0 -1
- package/dist/patterns/tree/TreeStructure.js +0 -110
- package/dist/patterns/tree/constants.d.ts +0 -18
- package/dist/patterns/tree/constants.d.ts.map +0 -1
- package/dist/patterns/tree/helper.d.ts +0 -6
- package/dist/patterns/tree/helper.d.ts.map +0 -1
- package/dist/patterns/tree/helper.js +0 -21
- package/dist/patterns/tree/index.d.ts +0 -4
- package/dist/patterns/tree/index.d.ts.map +0 -1
- package/dist/patterns/tree/interface.d.ts +0 -9
- package/dist/patterns/tree/interface.d.ts.map +0 -1
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { jsxs as A, jsx as r, Fragment as j } from "react/jsx-runtime";
|
|
2
|
+
import { useState as $ } from "react";
|
|
3
|
+
import { SearchSm as T, ChevronDown as K, ChevronRight as V } from "@untitledui/icons";
|
|
4
|
+
import { cn as k } from "../../utils/cn.js";
|
|
5
|
+
import { Input as I } from "../../primitives/input/input.js";
|
|
6
|
+
const N = 10;
|
|
7
|
+
function C(e, t, s = "") {
|
|
8
|
+
const {
|
|
9
|
+
labelKey: u,
|
|
10
|
+
childrenKey: n,
|
|
11
|
+
dataKey: p = "metadata",
|
|
12
|
+
typeKey: y = "type",
|
|
13
|
+
idKey: o,
|
|
14
|
+
maxDepth: i
|
|
15
|
+
} = t, f = s ? s.split(".").length : 0;
|
|
16
|
+
return i != null && f >= i ? [] : (Array.isArray(e) ? e : Object.values(e)).map((l, w) => {
|
|
17
|
+
const v = o != null ? l[o] : void 0, c = String(v ?? w), h = s ? `${s}.${c}` : c, a = l[n], d = Array.isArray(a) ? a : a != null ? Object.values(a) : [];
|
|
18
|
+
return {
|
|
19
|
+
id: h,
|
|
20
|
+
label: l[u] ?? "Untitled",
|
|
21
|
+
type: l[y] ?? "Untitled",
|
|
22
|
+
isOpen: !1,
|
|
23
|
+
children: d.length > 0 ? C(d, t, h) : [],
|
|
24
|
+
[p]: l
|
|
25
|
+
};
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
function O(e, t) {
|
|
29
|
+
const s = e.label ?? "", u = Array.isArray(e.children) ? e.children : [];
|
|
30
|
+
return s.toLowerCase().includes(t.toLowerCase()) ? !0 : u.some((n) => O(n, t));
|
|
31
|
+
}
|
|
32
|
+
const _ = () => /* @__PURE__ */ r("div", { className: "flex h-[28px] items-center px-[13px] shrink-0", children: /* @__PURE__ */ r("div", { className: "relative h-full w-0 shrink-0", children: /* @__PURE__ */ r(
|
|
33
|
+
"div",
|
|
34
|
+
{
|
|
35
|
+
className: "absolute inset-y-0 bg-(--color-border-secondary)",
|
|
36
|
+
style: { left: "-0.5px", width: 1 }
|
|
37
|
+
}
|
|
38
|
+
) }) }), D = ({
|
|
39
|
+
data: e,
|
|
40
|
+
config: t,
|
|
41
|
+
CustomNode: s,
|
|
42
|
+
onNodeClick: u,
|
|
43
|
+
selectedNodeId: n,
|
|
44
|
+
showSearch: p = !1,
|
|
45
|
+
searchPlaceholder: y = "Search...",
|
|
46
|
+
searchClassName: o,
|
|
47
|
+
searchInputClassName: i
|
|
48
|
+
}) => {
|
|
49
|
+
const [f, b] = $(() => C(e, t)), [l, w] = $("");
|
|
50
|
+
function v(c, h) {
|
|
51
|
+
const a = structuredClone(f), d = h.split("-"), g = Number(d[0]);
|
|
52
|
+
d.shift();
|
|
53
|
+
let m = a[g];
|
|
54
|
+
d.length > 0 && (m = d.reduce((x, L) => x.children[Number(L)], a[g])), m.isOpen = !m.isOpen, b(a);
|
|
55
|
+
}
|
|
56
|
+
return /* @__PURE__ */ A("div", { className: "min-w-max", children: [
|
|
57
|
+
p && /* @__PURE__ */ r("div", { className: k("mb-2", o), children: /* @__PURE__ */ r(
|
|
58
|
+
I,
|
|
59
|
+
{
|
|
60
|
+
type: "search",
|
|
61
|
+
placeholder: y,
|
|
62
|
+
value: l,
|
|
63
|
+
onChange: (c) => w(c),
|
|
64
|
+
size: "sm",
|
|
65
|
+
className: i,
|
|
66
|
+
leftIcon: /* @__PURE__ */ r(
|
|
67
|
+
T,
|
|
68
|
+
{
|
|
69
|
+
className: "text-(--color-fg-quaternary)",
|
|
70
|
+
style: { width: 14, height: 14 }
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
}
|
|
74
|
+
) }),
|
|
75
|
+
/* @__PURE__ */ r("div", { className: "flex flex-col", children: f.map((c, h) => /* @__PURE__ */ r(
|
|
76
|
+
S,
|
|
77
|
+
{
|
|
78
|
+
node: c,
|
|
79
|
+
parentId: String(h),
|
|
80
|
+
depth: 0,
|
|
81
|
+
handleToggle: v,
|
|
82
|
+
onNodeClick: u,
|
|
83
|
+
selectedNodeId: n,
|
|
84
|
+
CustomNode: s,
|
|
85
|
+
query: l
|
|
86
|
+
},
|
|
87
|
+
c.id || h
|
|
88
|
+
)) })
|
|
89
|
+
] });
|
|
90
|
+
};
|
|
91
|
+
D.displayName = "TreeView";
|
|
92
|
+
const S = ({
|
|
93
|
+
node: e,
|
|
94
|
+
parentId: t,
|
|
95
|
+
depth: s = 0,
|
|
96
|
+
handleToggle: u,
|
|
97
|
+
onNodeClick: n,
|
|
98
|
+
selectedNodeId: p,
|
|
99
|
+
CustomNode: y,
|
|
100
|
+
query: o
|
|
101
|
+
}) => {
|
|
102
|
+
const i = o.length > 0, f = Array.isArray(e.children) ? e.children : [], b = e.label ?? "";
|
|
103
|
+
if (i && !O(e, o))
|
|
104
|
+
return null;
|
|
105
|
+
const l = f.length > 0, w = p != null && e.id === p, v = l && (i || (e.isOpen ?? !1)), c = (m) => {
|
|
106
|
+
m.stopPropagation(), l && (i || u(e, t), n == null || n(e));
|
|
107
|
+
}, h = s === 0 ? "pl-[6px]" : "", a = s === 0 ? "pl-[2px]" : "pl-[8px]", d = i && b.toLowerCase().includes(o.toLowerCase()), g = i ? !0 : e.isOpen;
|
|
108
|
+
return /* @__PURE__ */ A("div", { className: "relative", children: [
|
|
109
|
+
/* @__PURE__ */ A(
|
|
110
|
+
"div",
|
|
111
|
+
{
|
|
112
|
+
className: `flex h-[28px] w-full items-center pr-[8px] rounded-sm ${h} ${d ? "bg-(--color-bg-secondary)" : ""} ${l ? "cursor-pointer hover:bg-(--color-bg-secondary)" : ""}`,
|
|
113
|
+
onClick: c,
|
|
114
|
+
children: [
|
|
115
|
+
s > 0 && Array.from({ length: s }).map((m, x) => /* @__PURE__ */ r(_, {}, x)),
|
|
116
|
+
l ? /* @__PURE__ */ r(
|
|
117
|
+
"div",
|
|
118
|
+
{
|
|
119
|
+
className: `flex flex-col h-full items-center shrink-0 ${a} ${g ? "justify-end" : "justify-center"}`,
|
|
120
|
+
children: g ? /* @__PURE__ */ A(j, { children: [
|
|
121
|
+
/* @__PURE__ */ r(
|
|
122
|
+
K,
|
|
123
|
+
{
|
|
124
|
+
className: "shrink-0 text-(--color-gray-400)",
|
|
125
|
+
style: { width: N, height: N }
|
|
126
|
+
}
|
|
127
|
+
),
|
|
128
|
+
/* @__PURE__ */ r("div", { className: "relative h-[8px] w-0 shrink-0", children: /* @__PURE__ */ r(
|
|
129
|
+
"div",
|
|
130
|
+
{
|
|
131
|
+
className: "absolute inset-y-0 bg-(--color-border-secondary)",
|
|
132
|
+
style: { left: "-0.5px", width: 1 }
|
|
133
|
+
}
|
|
134
|
+
) })
|
|
135
|
+
] }) : /* @__PURE__ */ r(
|
|
136
|
+
V,
|
|
137
|
+
{
|
|
138
|
+
className: "shrink-0 text-(--color-gray-400)",
|
|
139
|
+
style: { width: N, height: N }
|
|
140
|
+
}
|
|
141
|
+
)
|
|
142
|
+
}
|
|
143
|
+
) : s > 0 ? /* @__PURE__ */ r("div", { className: "h-full w-[6px] shrink-0" }) : null,
|
|
144
|
+
/* @__PURE__ */ r("div", { className: "flex flex-1 h-full items-center min-w-0 pl-[2px]", children: /* @__PURE__ */ r(y, { node: e, isSelected: w }) })
|
|
145
|
+
]
|
|
146
|
+
}
|
|
147
|
+
),
|
|
148
|
+
v && /* @__PURE__ */ r("div", { className: "relative", children: f.map((m, x) => /* @__PURE__ */ r(
|
|
149
|
+
S,
|
|
150
|
+
{
|
|
151
|
+
node: m,
|
|
152
|
+
parentId: `${t}-${x}`,
|
|
153
|
+
depth: s + 1,
|
|
154
|
+
handleToggle: u,
|
|
155
|
+
onNodeClick: n,
|
|
156
|
+
selectedNodeId: p,
|
|
157
|
+
CustomNode: y,
|
|
158
|
+
query: o
|
|
159
|
+
},
|
|
160
|
+
m.id || `${t}-${x}`
|
|
161
|
+
)) })
|
|
162
|
+
] });
|
|
163
|
+
};
|
|
164
|
+
export {
|
|
165
|
+
D as TreeView,
|
|
166
|
+
C as buildTreeViewNodes
|
|
167
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ComponentType, SVGProps } from 'react';
|
|
2
|
+
export declare const badgeTypes: {
|
|
3
|
+
readonly pillColor: "pill-color";
|
|
4
|
+
readonly color: "color";
|
|
5
|
+
readonly modern: "modern";
|
|
6
|
+
};
|
|
7
|
+
export type BadgeTypes = (typeof badgeTypes)[keyof typeof badgeTypes];
|
|
8
|
+
export type BadgeColors = "clear" | "gray" | "brand" | "error" | "warning" | "success" | "gray-blue" | "blue-light" | "blue" | "indigo" | "purple" | "pink" | "orange";
|
|
9
|
+
export type Sizes = "sm" | "md" | "lg";
|
|
10
|
+
export type FlagTypes = string;
|
|
11
|
+
export type IconComponentType = ComponentType<SVGProps<SVGSVGElement>>;
|
|
12
|
+
export type BadgeTypeToColorMap<T extends Record<string, {
|
|
13
|
+
styles: Record<string, unknown>;
|
|
14
|
+
}>> = {
|
|
15
|
+
[K in keyof T]: keyof T[K]["styles"];
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=badge-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge-types.d.ts","sourceRoot":"","sources":["../../../src/primitives/badge/badge-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAErD,eAAO,MAAM,UAAU;;;;CAIb,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AAEtE,MAAM,MAAM,WAAW,GACjB,OAAO,GACP,MAAM,GACN,OAAO,GACP,OAAO,GACP,SAAS,GACT,SAAS,GACT,WAAW,GACX,YAAY,GACZ,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,QAAQ,CAAC;AAEf,MAAM,MAAM,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEvC,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAE/B,MAAM,MAAM,iBAAiB,GAAG,aAAa,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC;AAEvE,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAAC,IAAI;KAC5F,CAAC,IAAI,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;CACvC,CAAC"}
|
|
@@ -1,28 +1,121 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
declare const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { MouseEventHandler, ReactNode } from 'react';
|
|
2
|
+
import { BadgeColors, BadgeTypeToColorMap, BadgeTypes, FlagTypes, IconComponentType, Sizes } from './badge-types';
|
|
3
|
+
export declare const filledColors: Record<BadgeColors, {
|
|
4
|
+
root: string;
|
|
5
|
+
addon: string;
|
|
6
|
+
addonButton: string;
|
|
7
|
+
}>;
|
|
8
|
+
declare const withPillTypes: {
|
|
9
|
+
"pill-color": {
|
|
10
|
+
common: string;
|
|
11
|
+
styles: Record<BadgeColors, {
|
|
12
|
+
root: string;
|
|
13
|
+
addon: string;
|
|
14
|
+
addonButton: string;
|
|
15
|
+
}>;
|
|
16
|
+
};
|
|
17
|
+
color: {
|
|
18
|
+
common: string;
|
|
19
|
+
styles: Record<BadgeColors, {
|
|
20
|
+
root: string;
|
|
21
|
+
addon: string;
|
|
22
|
+
addonButton: string;
|
|
23
|
+
}>;
|
|
24
|
+
};
|
|
25
|
+
modern: {
|
|
26
|
+
common: string;
|
|
27
|
+
styles: Record<BadgeColors, {
|
|
28
|
+
root: string;
|
|
29
|
+
addon: string;
|
|
30
|
+
addonButton: string;
|
|
31
|
+
}>;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
declare const withBadgeTypes: {
|
|
35
|
+
"pill-color": {
|
|
36
|
+
common: string;
|
|
37
|
+
styles: Record<BadgeColors, {
|
|
38
|
+
root: string;
|
|
39
|
+
addon: string;
|
|
40
|
+
addonButton: string;
|
|
41
|
+
}>;
|
|
42
|
+
};
|
|
43
|
+
color: {
|
|
44
|
+
common: string;
|
|
45
|
+
styles: Record<BadgeColors, {
|
|
46
|
+
root: string;
|
|
47
|
+
addon: string;
|
|
48
|
+
addonButton: string;
|
|
49
|
+
}>;
|
|
50
|
+
};
|
|
51
|
+
modern: {
|
|
52
|
+
common: string;
|
|
53
|
+
styles: Record<BadgeColors, {
|
|
54
|
+
root: string;
|
|
55
|
+
addon: string;
|
|
56
|
+
}>;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
export type BadgeColor<T extends BadgeTypes> = BadgeTypeToColorMap<typeof withPillTypes>[T];
|
|
60
|
+
export interface BadgeProps<T extends BadgeTypes> {
|
|
61
|
+
type?: T;
|
|
62
|
+
size?: Sizes;
|
|
63
|
+
color?: BadgeColor<T>;
|
|
9
64
|
children: ReactNode;
|
|
10
|
-
/** Additional CSS classes */
|
|
11
65
|
className?: string;
|
|
12
|
-
/** Icon to display before text */
|
|
13
|
-
icon?: ReactNode;
|
|
14
66
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
export declare
|
|
24
|
-
export
|
|
25
|
-
|
|
67
|
+
export declare const Badge: <T extends BadgeTypes>(props: BadgeProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
68
|
+
export interface BadgeWithDotProps<T extends BadgeTypes> {
|
|
69
|
+
type?: T;
|
|
70
|
+
size?: Sizes;
|
|
71
|
+
color?: BadgeTypeToColorMap<typeof withBadgeTypes>[T];
|
|
72
|
+
className?: string;
|
|
73
|
+
children: ReactNode;
|
|
74
|
+
}
|
|
75
|
+
export declare const BadgeWithDot: <T extends BadgeTypes>(props: BadgeWithDotProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
76
|
+
export interface BadgeWithIconProps<T extends BadgeTypes> {
|
|
77
|
+
type?: T;
|
|
78
|
+
size?: Sizes;
|
|
79
|
+
color?: BadgeTypeToColorMap<typeof withBadgeTypes>[T];
|
|
80
|
+
iconLeading?: ReactNode;
|
|
81
|
+
iconTrailing?: ReactNode;
|
|
82
|
+
children: ReactNode;
|
|
83
|
+
className?: string;
|
|
84
|
+
}
|
|
85
|
+
export declare const BadgeWithIcon: <T extends BadgeTypes>(props: BadgeWithIconProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
86
|
+
export interface BadgeWithFlagProps<T extends BadgeTypes> {
|
|
87
|
+
type?: T;
|
|
88
|
+
size?: Sizes;
|
|
89
|
+
flag?: FlagTypes;
|
|
90
|
+
color?: BadgeTypeToColorMap<typeof withPillTypes>[T];
|
|
91
|
+
children: ReactNode;
|
|
92
|
+
}
|
|
93
|
+
export declare const BadgeWithFlag: <T extends BadgeTypes>(props: BadgeWithFlagProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
94
|
+
export interface BadgeWithImageProps<T extends BadgeTypes> {
|
|
95
|
+
type?: T;
|
|
96
|
+
size?: Sizes;
|
|
97
|
+
imgSrc: string;
|
|
98
|
+
color?: BadgeTypeToColorMap<typeof withPillTypes>[T];
|
|
99
|
+
children: ReactNode;
|
|
100
|
+
}
|
|
101
|
+
export declare const BadgeWithImage: <T extends BadgeTypes>(props: BadgeWithImageProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
102
|
+
export interface BadgeWithButtonProps<T extends BadgeTypes> {
|
|
103
|
+
type?: T;
|
|
104
|
+
size?: Sizes;
|
|
105
|
+
icon?: IconComponentType;
|
|
106
|
+
color?: BadgeTypeToColorMap<typeof withPillTypes>[T];
|
|
107
|
+
children: ReactNode;
|
|
108
|
+
buttonLabel?: string;
|
|
109
|
+
onButtonClick?: MouseEventHandler<HTMLButtonElement>;
|
|
110
|
+
}
|
|
111
|
+
export declare const BadgeWithButton: <T extends BadgeTypes>(props: BadgeWithButtonProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
112
|
+
export interface BadgeIconProps<T extends BadgeTypes> {
|
|
113
|
+
type?: T;
|
|
114
|
+
size?: Sizes;
|
|
115
|
+
icon: IconComponentType;
|
|
116
|
+
color?: BadgeTypeToColorMap<typeof withPillTypes>[T];
|
|
117
|
+
children?: ReactNode;
|
|
26
118
|
}
|
|
119
|
+
export declare const BadgeIcon: <T extends BadgeTypes>(props: BadgeIconProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
27
120
|
export {};
|
|
28
121
|
//# sourceMappingURL=badge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/primitives/badge/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/primitives/badge/badge.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1,43 +1,277 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
import { jsx as u, jsxs as c, Fragment as f } from "react/jsx-runtime";
|
|
2
|
+
import { X as v } from "@untitledui/icons";
|
|
3
|
+
import { Dot as w } from "../../foundations/dot-icon/index.js";
|
|
4
|
+
import { badgeTypes as t } from "./badge-types.js";
|
|
5
|
+
import { cx as d } from "../../utils/cn.js";
|
|
6
|
+
const y = {
|
|
7
|
+
clear: {
|
|
8
|
+
root: "bg-primary text-secondary ring-secondary",
|
|
9
|
+
addon: "text-gray-500",
|
|
10
|
+
addonButton: "hover:bg-utility-gray-100 text-utility-gray-400 hover:text-utility-gray-500"
|
|
11
|
+
},
|
|
12
|
+
gray: {
|
|
13
|
+
root: "bg-utility-gray-100 text-utility-gray-700 ring-utility-gray-100",
|
|
14
|
+
addon: "text-utility-gray-500",
|
|
15
|
+
addonButton: "hover:bg-utility-gray-100 text-utility-gray-400 hover:text-utility-gray-500"
|
|
16
|
+
},
|
|
17
|
+
brand: {
|
|
18
|
+
root: "bg-utility-brand-50 text-utility-brand-600 ring-utility-brand-50",
|
|
19
|
+
addon: "text-utility-brand-500",
|
|
20
|
+
addonButton: "hover:bg-utility-brand-100 text-utility-brand-400 hover:text-utility-brand-500"
|
|
21
|
+
},
|
|
22
|
+
error: {
|
|
23
|
+
root: "bg-utility-error-100 text-utility-error-700 ring-utility-error-100",
|
|
24
|
+
addon: "text-utility-error-500",
|
|
25
|
+
addonButton: "hover:bg-utility-error-100 text-utility-error-400 hover:text-utility-error-500"
|
|
26
|
+
},
|
|
27
|
+
warning: {
|
|
28
|
+
root: "bg-utility-warning-100 text-utility-warning-700 ring-utility-warning-100",
|
|
29
|
+
addon: "text-utility-warning-500",
|
|
30
|
+
addonButton: "hover:bg-utility-warning-100 text-utility-warning-400 hover:text-utility-warning-500"
|
|
31
|
+
},
|
|
32
|
+
success: {
|
|
33
|
+
root: "bg-utility-success-100 text-utility-success-700 ring-utility-success-100",
|
|
34
|
+
addon: "text-utility-success-500",
|
|
35
|
+
addonButton: "hover:bg-utility-success-100 text-utility-success-400 hover:text-utility-success-500"
|
|
36
|
+
},
|
|
37
|
+
"gray-blue": {
|
|
38
|
+
root: "bg-utility-gray-blue-100 text-utility-gray-blue-700 ring-utility-gray-blue-100",
|
|
39
|
+
addon: "text-utility-gray-blue-500",
|
|
40
|
+
addonButton: "hover:bg-utility-gray-blue-100 text-utility-gray-blue-400 hover:text-utility-gray-blue-500"
|
|
41
|
+
},
|
|
42
|
+
"blue-light": {
|
|
43
|
+
root: "bg-utility-blue-light-100 text-utility-blue-light-700 ring-utility-blue-light-100",
|
|
44
|
+
addon: "text-utility-blue-light-500",
|
|
45
|
+
addonButton: "hover:bg-utility-blue-light-100 text-utility-blue-light-400 hover:text-utility-blue-light-500"
|
|
46
|
+
},
|
|
47
|
+
blue: {
|
|
48
|
+
root: "bg-utility-blue-100 text-utility-blue-700 ring-utility-blue-100",
|
|
49
|
+
addon: "text-utility-blue-500",
|
|
50
|
+
addonButton: "hover:bg-utility-blue-100 text-utility-blue-400 hover:text-utility-blue-500"
|
|
51
|
+
},
|
|
52
|
+
indigo: {
|
|
53
|
+
root: "bg-utility-indigo-100 text-utility-indigo-700 ring-utility-indigo-100",
|
|
54
|
+
addon: "text-utility-indigo-500",
|
|
55
|
+
addonButton: "hover:bg-utility-indigo-100 text-utility-indigo-400 hover:text-utility-indigo-500"
|
|
56
|
+
},
|
|
57
|
+
purple: {
|
|
58
|
+
root: "bg-utility-purple-100 text-utility-purple-700 ring-utility-purple-100",
|
|
59
|
+
addon: "text-utility-purple-500",
|
|
60
|
+
addonButton: "hover:bg-utility-purple-100 text-utility-purple-400 hover:text-utility-purple-500"
|
|
61
|
+
},
|
|
62
|
+
pink: {
|
|
63
|
+
root: "bg-utility-pink-100 text-utility-pink-700 ring-utility-pink-100",
|
|
64
|
+
addon: "text-utility-pink-500",
|
|
65
|
+
addonButton: "hover:bg-utility-pink-100 text-utility-pink-400 hover:text-utility-pink-500"
|
|
66
|
+
},
|
|
67
|
+
orange: {
|
|
68
|
+
root: "bg-utility-orange-100 text-utility-orange-700 ring-utility-orange-100",
|
|
69
|
+
addon: "text-utility-orange-500",
|
|
70
|
+
addonButton: "hover:bg-utility-orange-100 text-utility-orange-400 hover:text-utility-orange-500"
|
|
71
|
+
}
|
|
72
|
+
}, B = Object.fromEntries(
|
|
73
|
+
Object.entries(y).map(([e, s]) => [e, { root: "", addon: s.addon }])
|
|
74
|
+
), x = {
|
|
75
|
+
[t.pillColor]: {
|
|
76
|
+
common: "size-max flex items-center whitespace-nowrap rounded-full ring-1 ring-inset",
|
|
77
|
+
styles: y
|
|
78
|
+
},
|
|
79
|
+
[t.color]: {
|
|
80
|
+
common: "size-max flex items-center whitespace-nowrap rounded-sm ring-1 ring-inset",
|
|
81
|
+
styles: y
|
|
82
|
+
},
|
|
83
|
+
[t.modern]: {
|
|
84
|
+
common: "size-max flex items-center whitespace-nowrap rounded-sm ring-1 ring-inset ring-secondary",
|
|
85
|
+
styles: y
|
|
86
|
+
}
|
|
87
|
+
}, h = {
|
|
88
|
+
[t.pillColor]: {
|
|
89
|
+
common: "size-max flex items-center whitespace-nowrap rounded-full ring-1 ring-inset",
|
|
90
|
+
styles: y
|
|
91
|
+
},
|
|
92
|
+
[t.color]: {
|
|
93
|
+
common: "size-max flex items-center whitespace-nowrap rounded-sm ring-1 ring-inset",
|
|
94
|
+
styles: y
|
|
95
|
+
},
|
|
96
|
+
[t.modern]: {
|
|
97
|
+
common: "size-max flex items-center whitespace-nowrap rounded-sm ring-1 ring-inset bg-primary text-secondary ring-secondary",
|
|
98
|
+
styles: B
|
|
99
|
+
}
|
|
100
|
+
}, j = (e) => {
|
|
101
|
+
const { type: s = "pill-color", size: a = "sm", color: i = "gray", children: p } = e, o = x[s], l = {
|
|
102
|
+
sm: "py-0.5 px-2 text-xs font-medium",
|
|
103
|
+
md: "py-0.5 px-2 text-sm font-medium",
|
|
104
|
+
lg: "py-1 px-3 text-sm font-medium"
|
|
105
|
+
}, n = {
|
|
106
|
+
sm: "py-0.5 px-2 text-xs font-medium",
|
|
107
|
+
md: "py-0.5 px-2 text-sm font-medium",
|
|
108
|
+
lg: "py-1 px-3 text-sm font-medium rounded-lg"
|
|
109
|
+
}, r = {
|
|
110
|
+
[t.pillColor]: l,
|
|
111
|
+
[t.color]: n,
|
|
112
|
+
[t.modern]: n
|
|
113
|
+
};
|
|
114
|
+
return /* @__PURE__ */ u("span", { className: d(o.common, r[s][a], o.styles[i].root, e.className), children: p });
|
|
115
|
+
}, T = (e) => {
|
|
116
|
+
const { size: s = "sm", color: a = "gray", type: i = "pill-color", className: p, children: o } = e, l = h[i], n = {
|
|
117
|
+
sm: "gap-0.5 py-0.5 px-1 text-xs font-medium",
|
|
118
|
+
md: "gap-1 py-0.5 pl-1.5 pr-2 text-xs font-medium",
|
|
119
|
+
lg: "gap-1.5 py-0.5 pl-2 pr-2.5 text-sm font-medium"
|
|
120
|
+
}, r = {
|
|
121
|
+
sm: "gap-0.5 py-0.5 px-1 text-xs font-medium",
|
|
122
|
+
md: "gap-1 py-0.5 px-1.5 text-xs font-medium",
|
|
123
|
+
lg: "gap-1.5 py-0.5 px-2 text-sm font-medium"
|
|
124
|
+
}, m = {
|
|
125
|
+
[t.pillColor]: n,
|
|
126
|
+
[t.color]: r,
|
|
127
|
+
[t.modern]: r
|
|
128
|
+
}, g = a;
|
|
129
|
+
return /* @__PURE__ */ c("span", { className: d(l.common, m[i][s], l.styles[g].root, p), children: [
|
|
130
|
+
/* @__PURE__ */ u(w, { className: l.styles[g].addon, size: "sm" }),
|
|
131
|
+
o
|
|
132
|
+
] });
|
|
133
|
+
}, W = (e) => {
|
|
134
|
+
const {
|
|
135
|
+
size: s = "sm",
|
|
136
|
+
color: a = "gray",
|
|
137
|
+
type: i = "pill-color",
|
|
138
|
+
iconLeading: p,
|
|
139
|
+
iconTrailing: o,
|
|
140
|
+
children: l,
|
|
141
|
+
className: n
|
|
142
|
+
} = e, r = h[i], m = p ? "leading" : "trailing", g = {
|
|
143
|
+
sm: {
|
|
144
|
+
trailing: "gap-0.5 py-0.5 px-1 text-xs font-medium",
|
|
145
|
+
leading: "gap-0.5 py-0.5 px-1 text-xs font-medium"
|
|
146
|
+
},
|
|
147
|
+
md: {
|
|
148
|
+
trailing: "gap-0.5 py-0.5 pl-2 pr-1.5 text-xs font-medium",
|
|
149
|
+
leading: "gap-0.5 py-0.5 pr-2 pl-1.5 text-xs font-medium"
|
|
21
150
|
},
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
151
|
+
lg: {
|
|
152
|
+
trailing: "gap-1 py-0.5 pl-2.5 pr-2 text-sm font-medium",
|
|
153
|
+
leading: "gap-1 py-0.5 pr-2.5 pl-2 text-sm font-medium"
|
|
25
154
|
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
155
|
+
}, b = {
|
|
156
|
+
sm: {
|
|
157
|
+
trailing: "gap-0.5 py-0.5 px-1 text-xs font-medium",
|
|
158
|
+
leading: "gap-0.5 py-0.5 px-1 text-xs font-medium"
|
|
159
|
+
},
|
|
160
|
+
md: {
|
|
161
|
+
trailing: "gap-0.5 py-0.5 pl-2 pr-1.5 text-xs font-medium",
|
|
162
|
+
leading: "gap-0.5 py-0.5 pr-2 pl-1.5 text-xs font-medium"
|
|
163
|
+
},
|
|
164
|
+
lg: {
|
|
165
|
+
trailing: "gap-1 py-0.5 pl-2 pr-1.5 text-sm font-medium",
|
|
166
|
+
leading: "gap-1 py-0.5 pr-2 pl-1.5 text-sm font-medium"
|
|
167
|
+
}
|
|
168
|
+
}, z = {
|
|
169
|
+
[t.pillColor]: g,
|
|
170
|
+
[t.color]: b,
|
|
171
|
+
[t.modern]: b
|
|
172
|
+
};
|
|
173
|
+
return /* @__PURE__ */ c("span", { className: d(r.common, z[i][s][m], r.styles[a].root, n), children: [
|
|
174
|
+
p && /* @__PURE__ */ u(f, { children: p }),
|
|
175
|
+
l,
|
|
176
|
+
o && /* @__PURE__ */ u(f, { children: o })
|
|
177
|
+
] });
|
|
178
|
+
}, L = (e) => {
|
|
179
|
+
const { size: s = "sm", color: a = "gray", flag: i = "AU", type: p = "pill-color", children: o } = e, l = x[p], n = {
|
|
180
|
+
sm: "gap-0.5 py-0.5 pl-0.75 pr-2 text-xs font-medium",
|
|
181
|
+
md: "gap-1 py-0.5 pl-0.75 pr-2 text-xs font-medium",
|
|
182
|
+
lg: "gap-1.5 py-0.5 pl-1 pr-2.5 text-sm font-medium"
|
|
183
|
+
}, r = {
|
|
184
|
+
sm: "gap-0.5 py-0.5 pl-1 pr-1.5 text-xs font-medium",
|
|
185
|
+
md: "gap-1 py-0.5 pl-1 pr-1.5 text-xs font-medium",
|
|
186
|
+
lg: "gap-1.5 py-0.5 pl-1.5 pr-2 text-sm font-medium"
|
|
187
|
+
}, m = {
|
|
188
|
+
[t.pillColor]: n,
|
|
189
|
+
[t.color]: r,
|
|
190
|
+
[t.modern]: r
|
|
191
|
+
};
|
|
192
|
+
return /* @__PURE__ */ c("span", { className: d(l.common, m[p][s], l.styles[a].root), children: [
|
|
193
|
+
/* @__PURE__ */ u(
|
|
194
|
+
"img",
|
|
195
|
+
{
|
|
196
|
+
src: `https://www.untitledui.com/images/flags/${i}.svg`,
|
|
197
|
+
className: "size-4 max-w-none rounded-full",
|
|
198
|
+
alt: `${i} flag`
|
|
199
|
+
}
|
|
200
|
+
),
|
|
201
|
+
o
|
|
38
202
|
] });
|
|
39
|
-
}
|
|
40
|
-
|
|
203
|
+
}, O = (e) => {
|
|
204
|
+
const { size: s = "sm", color: a = "gray", type: i = "pill-color", imgSrc: p, children: o } = e, l = x[i], n = {
|
|
205
|
+
sm: "gap-0.5 py-0.5 pl-0.75 pr-2 text-xs font-medium",
|
|
206
|
+
md: "gap-1 py-0.5 pl-0.75 pr-2 text-xs font-medium",
|
|
207
|
+
lg: "gap-1.5 py-0.5 pl-1 pr-2.5 text-sm font-medium"
|
|
208
|
+
}, r = {
|
|
209
|
+
sm: "gap-0.5 py-0.5 pl-1 pr-1.5 text-xs font-medium",
|
|
210
|
+
md: "gap-1 py-0.5 pl-1 pr-1.5 text-xs font-medium",
|
|
211
|
+
lg: "gap-1.5 py-0.5 pl-1.5 pr-2 text-sm font-medium"
|
|
212
|
+
}, m = {
|
|
213
|
+
[t.pillColor]: n,
|
|
214
|
+
[t.color]: r,
|
|
215
|
+
[t.modern]: r
|
|
216
|
+
};
|
|
217
|
+
return /* @__PURE__ */ c("span", { className: d(l.common, m[i][s], l.styles[a].root), children: [
|
|
218
|
+
/* @__PURE__ */ u("img", { src: p, className: "size-4 max-w-none rounded-full", alt: "Badge image" }),
|
|
219
|
+
o
|
|
220
|
+
] });
|
|
221
|
+
}, D = (e) => {
|
|
222
|
+
const { size: s = "sm", color: a = "gray", type: i = "pill-color", icon: p = v, buttonLabel: o, children: l } = e, n = x[i], r = {
|
|
223
|
+
sm: "gap-0.5 py-0.5 pl-2 pr-0.75 text-xs font-medium",
|
|
224
|
+
md: "gap-0.5 py-0.5 pl-2 pr-0.75 text-xs font-medium",
|
|
225
|
+
lg: "gap-0.5 py-0.5 pl-2.5 pr-1 text-sm font-medium"
|
|
226
|
+
}, m = {
|
|
227
|
+
sm: "gap-0.5 py-0.5 pl-1.5 pr-0.75 text-xs font-medium",
|
|
228
|
+
md: "gap-0.5 py-0.5 pl-1.5 pr-0.75 text-xs font-medium",
|
|
229
|
+
lg: "gap-0.5 py-0.5 pl-2 pr-1 text-sm font-medium"
|
|
230
|
+
}, g = {
|
|
231
|
+
[t.pillColor]: r,
|
|
232
|
+
[t.color]: m,
|
|
233
|
+
[t.modern]: m
|
|
234
|
+
};
|
|
235
|
+
return /* @__PURE__ */ c("span", { className: d(n.common, g[i][s], n.styles[a].root), children: [
|
|
236
|
+
l,
|
|
237
|
+
/* @__PURE__ */ u(
|
|
238
|
+
"button",
|
|
239
|
+
{
|
|
240
|
+
type: "button",
|
|
241
|
+
"aria-label": o,
|
|
242
|
+
onClick: e.onButtonClick,
|
|
243
|
+
className: d(
|
|
244
|
+
"flex cursor-pointer items-center justify-center p-0.5 outline-focus-ring transition duration-100 ease-linear focus-visible:outline-2",
|
|
245
|
+
n.styles[a].addonButton,
|
|
246
|
+
i === "pill-color" ? "rounded-full" : "rounded-[3px]"
|
|
247
|
+
),
|
|
248
|
+
children: /* @__PURE__ */ u(p, { className: "size-3 stroke-[3px] transition-inherit-all" })
|
|
249
|
+
}
|
|
250
|
+
)
|
|
251
|
+
] });
|
|
252
|
+
}, F = (e) => {
|
|
253
|
+
const { size: s = "sm", color: a = "gray", type: i = "pill-color", icon: p } = e, o = x[i], l = {
|
|
254
|
+
sm: "p-1",
|
|
255
|
+
md: "p-1.25",
|
|
256
|
+
lg: "p-1.5"
|
|
257
|
+
}, n = {
|
|
258
|
+
sm: "p-1",
|
|
259
|
+
md: "p-1.25",
|
|
260
|
+
lg: "p-1.5"
|
|
261
|
+
}, r = {
|
|
262
|
+
[t.pillColor]: l,
|
|
263
|
+
[t.color]: n,
|
|
264
|
+
[t.modern]: n
|
|
265
|
+
};
|
|
266
|
+
return /* @__PURE__ */ u("span", { className: d(o.common, r[i][s], o.styles[a].root), children: /* @__PURE__ */ u(p, { className: d("size-3 stroke-[3px]", o.styles[a].addon) }) });
|
|
267
|
+
};
|
|
41
268
|
export {
|
|
42
|
-
|
|
269
|
+
j as Badge,
|
|
270
|
+
F as BadgeIcon,
|
|
271
|
+
D as BadgeWithButton,
|
|
272
|
+
T as BadgeWithDot,
|
|
273
|
+
L as BadgeWithFlag,
|
|
274
|
+
W as BadgeWithIcon,
|
|
275
|
+
O as BadgeWithImage,
|
|
276
|
+
y as filledColors
|
|
43
277
|
};
|