@tangible/ui 0.2.0 → 0.2.2
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/components/Card/Card.d.ts +18 -1
- package/components/Card/Card.js +41 -4
- package/components/Card/index.d.ts +1 -1
- package/components/ColorPicker/ColorArea.d.ts +24 -0
- package/components/ColorPicker/ColorArea.js +62 -0
- package/components/ColorPicker/ColorField.d.ts +59 -0
- package/components/ColorPicker/ColorField.js +88 -0
- package/components/ColorPicker/ColorPicker.d.ts +36 -0
- package/components/ColorPicker/ColorPicker.js +215 -0
- package/components/ColorPicker/ColorSlider.d.ts +20 -0
- package/components/ColorPicker/ColorSlider.js +38 -0
- package/components/ColorPicker/index.d.ts +14 -0
- package/components/ColorPicker/index.js +7 -0
- package/components/ColorPicker/labels.d.ts +42 -0
- package/components/ColorPicker/labels.js +38 -0
- package/components/ColorPicker/tracks.d.ts +4 -0
- package/components/ColorPicker/tracks.js +4 -0
- package/components/ColorPicker/usePointerDrag.d.ts +13 -0
- package/components/ColorPicker/usePointerDrag.js +34 -0
- package/components/Popover/index.d.ts +1 -1
- package/components/index.d.ts +4 -1
- package/components/index.js +1 -0
- package/icons/icons.svg +1 -0
- package/icons/manifest.json +8 -0
- package/icons/registry.d.ts +2 -0
- package/icons/registry.js +1 -0
- package/icons/system/index.d.ts +2 -0
- package/icons/system/index.js +11 -0
- package/package.json +5 -1
- package/styles/all.css +1 -1
- package/styles/all.expanded.css +327 -8
- package/styles/all.expanded.unlayered.css +327 -8
- package/styles/all.unlayered.css +1 -1
- package/styles/components/_bundle.scss +2 -0
- package/styles/components/card.scss +94 -13
- package/styles/components/color-picker.scss +378 -0
- package/tui-manifest.json +117 -10
- package/utils/color/color.d.ts +61 -0
- package/utils/color/color.js +293 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useRef } from 'react';
|
|
3
|
+
import { cx } from '../../utils/cx.js';
|
|
4
|
+
import { usePointerDrag, clamp01 } from './usePointerDrag.js';
|
|
5
|
+
/**
|
|
6
|
+
* 1D colour slider — the hue and alpha controls both use this. Pointer-draggable
|
|
7
|
+
* and keyboard-adjustable (arrows / Home / End; Shift = coarse).
|
|
8
|
+
*/
|
|
9
|
+
export function ColorSlider({ value, min = 0, max = 100, step = 1, onValueChange, track, checkerboard, 'aria-label': ariaLabel, valueText, disabled, className, }) {
|
|
10
|
+
const ref = useRef(null);
|
|
11
|
+
const pct = clamp01((value - min) / (max - min));
|
|
12
|
+
const drag = usePointerDrag((clientX) => {
|
|
13
|
+
const el = ref.current;
|
|
14
|
+
if (!el)
|
|
15
|
+
return;
|
|
16
|
+
const rect = el.getBoundingClientRect();
|
|
17
|
+
onValueChange(min + clamp01((clientX - rect.left) / rect.width) * (max - min));
|
|
18
|
+
}, disabled);
|
|
19
|
+
const handleKeyDown = (e) => {
|
|
20
|
+
if (disabled)
|
|
21
|
+
return;
|
|
22
|
+
const s = e.shiftKey ? step * 10 : step;
|
|
23
|
+
let next = value;
|
|
24
|
+
if (e.key === 'ArrowLeft' || e.key === 'ArrowDown')
|
|
25
|
+
next -= s;
|
|
26
|
+
else if (e.key === 'ArrowRight' || e.key === 'ArrowUp')
|
|
27
|
+
next += s;
|
|
28
|
+
else if (e.key === 'Home')
|
|
29
|
+
next = min;
|
|
30
|
+
else if (e.key === 'End')
|
|
31
|
+
next = max;
|
|
32
|
+
else
|
|
33
|
+
return;
|
|
34
|
+
e.preventDefault();
|
|
35
|
+
onValueChange(Math.min(max, Math.max(min, next)));
|
|
36
|
+
};
|
|
37
|
+
return (_jsxs("div", { ref: ref, className: cx('tui-color-slider', checkerboard && 'has-checkerboard', disabled && 'is-disabled', className), role: "slider", tabIndex: disabled ? -1 : 0, "aria-label": ariaLabel, "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": Math.round(value), "aria-valuetext": valueText, "aria-disabled": disabled || undefined, onKeyDown: handleKeyDown, ...drag, children: [_jsx("div", { className: "tui-color-slider__track", style: { background: track } }), _jsx("span", { className: "tui-color-slider__thumb", "aria-hidden": "true", style: { left: `${pct * 100}%` } })] }));
|
|
38
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { ColorPicker } from './ColorPicker';
|
|
2
|
+
export type { ColorPickerProps } from './ColorPicker';
|
|
3
|
+
export { ColorField } from './ColorField';
|
|
4
|
+
export type { ColorFieldProps, ColorFieldLabels } from './ColorField';
|
|
5
|
+
export type { Side as ColorFieldSide, Align as ColorFieldAlign } from '../Popover';
|
|
6
|
+
export { defaultColorPickerLabels } from './labels';
|
|
7
|
+
export type { ColorPickerLabels } from './labels';
|
|
8
|
+
export { ColorArea } from './ColorArea';
|
|
9
|
+
export type { ColorAreaProps } from './ColorArea';
|
|
10
|
+
export { ColorSlider } from './ColorSlider';
|
|
11
|
+
export type { ColorSliderProps } from './ColorSlider';
|
|
12
|
+
export { HUE_TRACK, alphaTrack } from './tracks';
|
|
13
|
+
export { parseColor, formatColor, resolveVarColor, COLOR_FORMATS, } from '../../utils/color/color';
|
|
14
|
+
export type { ColorFormat, Hsva, ParsedColor } from '../../utils/color/color';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { ColorPicker } from './ColorPicker.js';
|
|
2
|
+
export { ColorField } from './ColorField.js';
|
|
3
|
+
export { defaultColorPickerLabels } from './labels.js';
|
|
4
|
+
export { ColorArea } from './ColorArea.js';
|
|
5
|
+
export { ColorSlider } from './ColorSlider.js';
|
|
6
|
+
export { HUE_TRACK, alphaTrack } from './tracks.js';
|
|
7
|
+
export { parseColor, formatColor, resolveVarColor, COLOR_FORMATS, } from '../../utils/color/color.js';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { ColorFormat } from '../../utils/color/color';
|
|
2
|
+
/**
|
|
3
|
+
* Semantic keys for channel accessible names, shared across formats — e.g. Hue
|
|
4
|
+
* is used by hsl/hwb/oklch, Lightness by hsl/oklch. Keyed by meaning (not by
|
|
5
|
+
* channel letter) so `b` never collides (Blue in rgb vs Blackness in hwb).
|
|
6
|
+
*/
|
|
7
|
+
export type ChannelAriaKey = 'red' | 'green' | 'blue' | 'hue' | 'saturation' | 'lightness' | 'whiteness' | 'blackness' | 'chroma' | 'alpha';
|
|
8
|
+
export type ColorPickerLabels = {
|
|
9
|
+
/** Accessible name for the whole picker group. */
|
|
10
|
+
group?: string;
|
|
11
|
+
/** Accessible name for the 2D saturation/brightness area. */
|
|
12
|
+
area?: string;
|
|
13
|
+
/** Accessible name for the hue slider. */
|
|
14
|
+
hue?: string;
|
|
15
|
+
/** Accessible name for the alpha slider. */
|
|
16
|
+
alpha?: string;
|
|
17
|
+
/** Accessible name for the format selector. */
|
|
18
|
+
format?: string;
|
|
19
|
+
/** Accessible name for the single value text field (hex / var). */
|
|
20
|
+
value?: string;
|
|
21
|
+
/** Copy button label + idle tooltip. */
|
|
22
|
+
copy?: string;
|
|
23
|
+
/** Tooltip + SR announcement shown briefly after a successful copy. */
|
|
24
|
+
copied?: string;
|
|
25
|
+
/** Prefix before the variable name in the var badge. */
|
|
26
|
+
variable?: string;
|
|
27
|
+
/** Display names per format in the format selector. */
|
|
28
|
+
formats?: Partial<Record<ColorFormat, string>>;
|
|
29
|
+
/** Accessible names for each colour channel input. */
|
|
30
|
+
channels?: Partial<Record<ChannelAriaKey, string>>;
|
|
31
|
+
/** Builds the channel group's accessible name, e.g. `(l) => `${l} value``. */
|
|
32
|
+
channelGroup?: (formatLabel: string) => string;
|
|
33
|
+
/** Builds the hue slider's value text, e.g. `(d) => `${d} degrees``. */
|
|
34
|
+
hueValueText?: (degrees: number) => string;
|
|
35
|
+
/** Builds the alpha slider's value text, e.g. `(p) => `${p} percent``. */
|
|
36
|
+
alphaValueText?: (percent: number) => string;
|
|
37
|
+
/** Builds the area's value text. */
|
|
38
|
+
areaValueText?: (saturation: number, brightness: number) => string;
|
|
39
|
+
};
|
|
40
|
+
export declare const defaultColorPickerLabels: Required<ColorPickerLabels>;
|
|
41
|
+
/** Merge consumer overrides over the defaults (shallow, plus the nested maps). */
|
|
42
|
+
export declare function resolveLabels(labels?: ColorPickerLabels): Required<ColorPickerLabels>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export const defaultColorPickerLabels = {
|
|
2
|
+
group: 'Color picker',
|
|
3
|
+
area: 'Saturation and brightness',
|
|
4
|
+
hue: 'Hue',
|
|
5
|
+
alpha: 'Alpha',
|
|
6
|
+
format: 'Color format',
|
|
7
|
+
value: 'Color value',
|
|
8
|
+
copy: 'Copy color value',
|
|
9
|
+
copied: 'Copied',
|
|
10
|
+
variable: 'Variable:',
|
|
11
|
+
formats: { hex: 'Hex', rgb: 'RGB', hsl: 'HSL', hwb: 'HWB', oklch: 'OKLCH' },
|
|
12
|
+
channels: {
|
|
13
|
+
red: 'Red',
|
|
14
|
+
green: 'Green',
|
|
15
|
+
blue: 'Blue',
|
|
16
|
+
hue: 'Hue',
|
|
17
|
+
saturation: 'Saturation',
|
|
18
|
+
lightness: 'Lightness',
|
|
19
|
+
whiteness: 'Whiteness',
|
|
20
|
+
blackness: 'Blackness',
|
|
21
|
+
chroma: 'Chroma',
|
|
22
|
+
alpha: 'Alpha',
|
|
23
|
+
},
|
|
24
|
+
channelGroup: (label) => `${label} value`,
|
|
25
|
+
hueValueText: (degrees) => `${degrees} degrees`,
|
|
26
|
+
alphaValueText: (percent) => `${percent} percent`,
|
|
27
|
+
areaValueText: (saturation, brightness) => `Saturation ${saturation}%, brightness ${brightness}%`,
|
|
28
|
+
};
|
|
29
|
+
/** Merge consumer overrides over the defaults (shallow, plus the nested maps). */
|
|
30
|
+
export function resolveLabels(labels) {
|
|
31
|
+
const d = defaultColorPickerLabels;
|
|
32
|
+
return {
|
|
33
|
+
...d,
|
|
34
|
+
...labels,
|
|
35
|
+
formats: { ...d.formats, ...labels?.formats },
|
|
36
|
+
channels: { ...d.channels, ...labels?.channels },
|
|
37
|
+
};
|
|
38
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Rainbow hue track (0–360°). */
|
|
2
|
+
export declare const HUE_TRACK = "linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%)";
|
|
3
|
+
/** Alpha track: transparent → the opaque colour (rendered over the checkerboard). */
|
|
4
|
+
export declare const alphaTrack: (colorHex: string) => string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Rainbow hue track (0–360°). */
|
|
2
|
+
export const HUE_TRACK = 'linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%)';
|
|
3
|
+
/** Alpha track: transparent → the opaque colour (rendered over the checkerboard). */
|
|
4
|
+
export const alphaTrack = (colorHex) => `linear-gradient(to right, transparent, ${colorHex})`;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Pointer drag over an element. pointerdown captures the pointer and fires
|
|
4
|
+
* onMove(clientX, clientY); subsequent moves fire it too until pointerup. The
|
|
5
|
+
* consumer converts client coords to a value using its own bounding rect.
|
|
6
|
+
* Spread the returned handlers onto the draggable element.
|
|
7
|
+
*/
|
|
8
|
+
export declare function usePointerDrag(onMove: (clientX: number, clientY: number) => void, disabled?: boolean): {
|
|
9
|
+
onPointerDown: (e: React.PointerEvent) => void;
|
|
10
|
+
onPointerMove: (e: React.PointerEvent) => void;
|
|
11
|
+
onPointerUp: (e: React.PointerEvent) => void;
|
|
12
|
+
};
|
|
13
|
+
export declare const clamp01: (n: number) => number;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { useCallback, useRef } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Pointer drag over an element. pointerdown captures the pointer and fires
|
|
4
|
+
* onMove(clientX, clientY); subsequent moves fire it too until pointerup. The
|
|
5
|
+
* consumer converts client coords to a value using its own bounding rect.
|
|
6
|
+
* Spread the returned handlers onto the draggable element.
|
|
7
|
+
*/
|
|
8
|
+
export function usePointerDrag(onMove, disabled) {
|
|
9
|
+
const active = useRef(false);
|
|
10
|
+
const onPointerDown = useCallback((e) => {
|
|
11
|
+
if (disabled || e.button !== 0)
|
|
12
|
+
return;
|
|
13
|
+
e.preventDefault();
|
|
14
|
+
e.currentTarget.setPointerCapture?.(e.pointerId);
|
|
15
|
+
active.current = true;
|
|
16
|
+
onMove(e.clientX, e.clientY);
|
|
17
|
+
}, [onMove, disabled]);
|
|
18
|
+
const onPointerMove = useCallback((e) => {
|
|
19
|
+
if (!active.current)
|
|
20
|
+
return;
|
|
21
|
+
onMove(e.clientX, e.clientY);
|
|
22
|
+
}, [onMove]);
|
|
23
|
+
const onPointerUp = useCallback((e) => {
|
|
24
|
+
active.current = false;
|
|
25
|
+
try {
|
|
26
|
+
e.currentTarget.releasePointerCapture?.(e.pointerId);
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
/* pointer already released */
|
|
30
|
+
}
|
|
31
|
+
}, []);
|
|
32
|
+
return { onPointerDown, onPointerMove, onPointerUp };
|
|
33
|
+
}
|
|
34
|
+
export const clamp01 = (n) => Math.min(1, Math.max(0, n));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { Popover, PopoverTrigger, PopoverContent, usePopover } from './Popover';
|
|
2
|
-
export type { PopoverProps, PopoverTriggerProps, PopoverContentProps, } from './types';
|
|
2
|
+
export type { PopoverProps, PopoverTriggerProps, PopoverContentProps, Side, Align, } from './types';
|
package/components/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export { Checkbox } from './Checkbox';
|
|
|
9
9
|
export { Chip } from './Chip';
|
|
10
10
|
export { ChipGroup } from './ChipGroup';
|
|
11
11
|
export { Chips } from './Chips';
|
|
12
|
+
export { ColorPicker, ColorField, ColorArea, ColorSlider, defaultColorPickerLabels } from './ColorPicker';
|
|
12
13
|
export { ContentIndicator } from './ContentIndicator';
|
|
13
14
|
export { Calendar, DatePicker, DateRangePicker, defaultDateRangePresets, defaultCalendarLabels, defaultDatePickerLabels, defaultDateRangePickerLabels, } from './DatePicker';
|
|
14
15
|
export { Combobox, ComboboxContent, ComboboxOption, ComboboxGroup, ComboboxLabel, useCombobox } from './Combobox';
|
|
@@ -43,11 +44,13 @@ export { Tooltip, TooltipProvider, TooltipTrigger, TooltipContent } from './Tool
|
|
|
43
44
|
export type { AccordionProps, AccordionSingleProps, AccordionMultipleProps, AccordionItemProps, AccordionTriggerProps, AccordionPanelProps, } from './Accordion';
|
|
44
45
|
export type { AvatarProps, AvatarGroupProps, AvatarSize, AvatarShape, IndicatorPosition, } from './Avatar';
|
|
45
46
|
export type { ButtonProps } from './Button';
|
|
46
|
-
export type { CardRootProps } from './Card';
|
|
47
|
+
export type { CardRootProps, CardVariant, CardMode, CardMediaProps } from './Card';
|
|
47
48
|
export type { CheckboxProps } from './Checkbox';
|
|
48
49
|
export type { ChipProps } from './Chip';
|
|
49
50
|
export type { ChipGroupProps, ChipGroupSingleProps, ChipGroupMultipleProps } from './ChipGroup';
|
|
50
51
|
export type { ChipsProps, ChipOption } from './Chips';
|
|
52
|
+
export type { ColorPickerProps, ColorPickerLabels, ColorFieldProps, ColorFieldLabels, ColorAreaProps, ColorSliderProps } from './ColorPicker';
|
|
53
|
+
export type { ColorFormat, Hsva as ColorHsva } from './ColorPicker';
|
|
51
54
|
export type { ContentIndicatorProps } from './ContentIndicator';
|
|
52
55
|
export type { DropdownProps, DropdownTriggerProps, DropdownContentProps, DropdownItemProps, DropdownSeparatorProps, DropdownHeaderProps, } from './Dropdown';
|
|
53
56
|
export type { ComboboxProps, ComboboxContentProps, ComboboxOptionProps, ComboboxGroupProps, ComboboxLabelProps, ComboboxRegisteredOption, } from './Combobox';
|
package/components/index.js
CHANGED
|
@@ -7,6 +7,7 @@ export { Checkbox } from './Checkbox/index.js';
|
|
|
7
7
|
export { Chip } from './Chip/index.js';
|
|
8
8
|
export { ChipGroup } from './ChipGroup/index.js';
|
|
9
9
|
export { Chips } from './Chips/index.js';
|
|
10
|
+
export { ColorPicker, ColorField, ColorArea, ColorSlider, defaultColorPickerLabels } from './ColorPicker/index.js';
|
|
10
11
|
export { ContentIndicator } from './ContentIndicator/index.js';
|
|
11
12
|
export { Calendar, DatePicker, DateRangePicker, defaultDateRangePresets, defaultCalendarLabels, defaultDatePickerLabels, defaultDateRangePickerLabels, } from './DatePicker/index.js';
|
|
12
13
|
export { Combobox, ComboboxContent, ComboboxOption, ComboboxGroup, ComboboxLabel, useCombobox } from './Combobox/index.js';
|
package/icons/icons.svg
CHANGED
|
@@ -175,6 +175,7 @@
|
|
|
175
175
|
<symbol id="tui-system-download" viewBox="0 0 24 24"><path d="M5.5 9a.5.5 0 0 1 .5-.5h3V7H6a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8.75A1.75 1.75 0 0 0 18.25 7H15v1.5h3.25a.25.25 0 0 1 .25.25V18a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5z"/><path d="M12 17.004 7.002 12.56l.996-1.122 3.252 2.89V4h1.5v10.33l3.252-2.89.996 1.12z"/></symbol>
|
|
176
176
|
<symbol id="tui-system-drag" viewBox="0 0 24 24"><path d="M10 5H8v2h2zm0 6H8v2h2zm-2 6h2v2H8zm8-12h-2v2h2zm-2 6h2v2h-2zm2 6h-2v2h2z"/></symbol>
|
|
177
177
|
<symbol id="tui-system-duplicate" viewBox="0 0 24 24"><path d="M14.25 12.75H17v1.5h-2.75V17h-1.5v-2.75H10v-1.5h2.75V10h1.5z"/><path fill-rule="evenodd" d="M17 7h1a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2v-1H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2zm-2-1.5H6a.5.5 0 0 0-.5.5v9a.5.5 0 0 0 .5.5h1V9a2 2 0 0 1 2-2h6.5V6a.5.5 0 0 0-.5-.5m-6 3h9a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5H9a.5.5 0 0 1-.5-.5V9a.5.5 0 0 1 .5-.5" clip-rule="evenodd"/></symbol>
|
|
178
|
+
<symbol id="tui-system-edit-small" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M18.168 9.14 14.924 6l-7.621 7.726L6 18.136l4.527-1.251z" clip-rule="evenodd"/></symbol>
|
|
178
179
|
<symbol id="tui-system-edit" viewBox="0 0 24 24"><path d="M19.864 4.304a2 2 0 0 0-2.733.732l-.635 1.1 3.464 2 .636-1.1a2 2 0 0 0-.732-2.732m-.746 5.292-3.464-2-4.903 8.49.062 3.893 3.402-1.892zM4 5.25h9v1.5H4zm7 4H4v1.5h7zm-7 4h5v1.5H4zm5 4H4v1.5h5z"/></symbol>
|
|
179
180
|
<symbol id="tui-system-ellipsis-h" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M5 11h2v2H5zm6 0h2v2h-2zm6 0h2v2h-2z" clip-rule="evenodd"/></symbol>
|
|
180
181
|
<symbol id="tui-system-ellipsis-v" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M11 19v-2h2v2zm0-6v-2h2v2zm0-6V5h2v2z" clip-rule="evenodd"/></symbol>
|
package/icons/manifest.json
CHANGED
|
@@ -1407,6 +1407,14 @@
|
|
|
1407
1407
|
"viewBox": "0 0 24 24",
|
|
1408
1408
|
"sprite": true
|
|
1409
1409
|
},
|
|
1410
|
+
"system/edit-small": {
|
|
1411
|
+
"id": "tui-system-edit-small",
|
|
1412
|
+
"set": "system",
|
|
1413
|
+
"name": "edit-small",
|
|
1414
|
+
"file": "system/edit-small.svg",
|
|
1415
|
+
"viewBox": "0 0 24 24",
|
|
1416
|
+
"sprite": true
|
|
1417
|
+
},
|
|
1410
1418
|
"system/edit": {
|
|
1411
1419
|
"id": "tui-system-edit",
|
|
1412
1420
|
"set": "system",
|
package/icons/registry.d.ts
CHANGED
|
@@ -179,6 +179,7 @@ export type IconName =
|
|
|
179
179
|
| 'system/download'
|
|
180
180
|
| 'system/drag'
|
|
181
181
|
| 'system/duplicate'
|
|
182
|
+
| 'system/edit-small'
|
|
182
183
|
| 'system/edit'
|
|
183
184
|
| 'system/ellipsis-h'
|
|
184
185
|
| 'system/ellipsis-v'
|
|
@@ -407,6 +408,7 @@ export declare const iconRegistry: {
|
|
|
407
408
|
'system/download': IconComponent;
|
|
408
409
|
'system/drag': IconComponent;
|
|
409
410
|
'system/duplicate': IconComponent;
|
|
411
|
+
'system/edit-small': IconComponent;
|
|
410
412
|
'system/edit': IconComponent;
|
|
411
413
|
'system/ellipsis-h': IconComponent;
|
|
412
414
|
'system/ellipsis-v': IconComponent;
|
package/icons/registry.js
CHANGED
|
@@ -182,6 +182,7 @@ export const iconRegistry = {
|
|
|
182
182
|
'system/download': systemIcons['download'],
|
|
183
183
|
'system/drag': systemIcons['drag'],
|
|
184
184
|
'system/duplicate': systemIcons['duplicate'],
|
|
185
|
+
'system/edit-small': systemIcons['edit-small'],
|
|
185
186
|
'system/edit': systemIcons['edit'],
|
|
186
187
|
'system/ellipsis-h': systemIcons['ellipsis-h'],
|
|
187
188
|
'system/ellipsis-v': systemIcons['ellipsis-v'],
|
package/icons/system/index.d.ts
CHANGED
|
@@ -46,6 +46,7 @@ export declare const CustomFunction: IconComponent;
|
|
|
46
46
|
export declare const Download: IconComponent;
|
|
47
47
|
export declare const Drag: IconComponent;
|
|
48
48
|
export declare const Duplicate: IconComponent;
|
|
49
|
+
export declare const EditSmall: IconComponent;
|
|
49
50
|
export declare const Edit: IconComponent;
|
|
50
51
|
export declare const EllipsisH: IconComponent;
|
|
51
52
|
export declare const EllipsisV: IconComponent;
|
|
@@ -142,6 +143,7 @@ export declare const systemIcons: {
|
|
|
142
143
|
'download': IconComponent;
|
|
143
144
|
'drag': IconComponent;
|
|
144
145
|
'duplicate': IconComponent;
|
|
146
|
+
'edit-small': IconComponent;
|
|
145
147
|
'edit': IconComponent;
|
|
146
148
|
'ellipsis-h': IconComponent;
|
|
147
149
|
'ellipsis-v': IconComponent;
|
package/icons/system/index.js
CHANGED
|
@@ -440,6 +440,16 @@ export function Duplicate(props) {
|
|
|
440
440
|
}, props), [_c("path", {d:"M14.25 12.75H17v1.5h-2.75V17h-1.5v-2.75H10v-1.5h2.75V10h1.5z"}), _c("path", {fillRule:"evenodd",d:"M17 7h1a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2v-1H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2zm-2-1.5H6a.5.5 0 0 0-.5.5v9a.5.5 0 0 0 .5.5h1V9a2 2 0 0 1 2-2h6.5V6a.5.5 0 0 0-.5-.5m-6 3h9a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5H9a.5.5 0 0 1-.5-.5V9a.5.5 0 0 1 .5-.5",clipRule:"evenodd"})]);
|
|
441
441
|
}
|
|
442
442
|
|
|
443
|
+
export function EditSmall(props) {
|
|
444
|
+
return _c("svg", Object.assign({
|
|
445
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
446
|
+
viewBox: "0 0 24 24",
|
|
447
|
+
width: "1em",
|
|
448
|
+
height: "1em",
|
|
449
|
+
fill: "currentColor"
|
|
450
|
+
}, props), _c("path", {fillRule:"evenodd",d:"M18.168 9.14 14.924 6l-7.621 7.726L6 18.136l4.527-1.251z",clipRule:"evenodd"}));
|
|
451
|
+
}
|
|
452
|
+
|
|
443
453
|
export function Edit(props) {
|
|
444
454
|
return _c("svg", Object.assign({
|
|
445
455
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -985,6 +995,7 @@ export const systemIcons = {
|
|
|
985
995
|
'download': Download,
|
|
986
996
|
'drag': Drag,
|
|
987
997
|
'duplicate': Duplicate,
|
|
998
|
+
'edit-small': EditSmall,
|
|
988
999
|
'edit': Edit,
|
|
989
1000
|
'ellipsis-h': EllipsisH,
|
|
990
1001
|
'ellipsis-v': EllipsisV,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangible/ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Tangible Design System",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./components/index.js",
|
|
@@ -80,6 +80,10 @@
|
|
|
80
80
|
"import": "./components/Chips/index.js",
|
|
81
81
|
"types": "./components/Chips/index.d.ts"
|
|
82
82
|
},
|
|
83
|
+
"./components/ColorPicker": {
|
|
84
|
+
"import": "./components/ColorPicker/index.js",
|
|
85
|
+
"types": "./components/ColorPicker/index.d.ts"
|
|
86
|
+
},
|
|
83
87
|
"./components/Combobox": {
|
|
84
88
|
"import": "./components/Combobox/index.js",
|
|
85
89
|
"types": "./components/Combobox/index.d.ts"
|