@flipdish/ui-library 0.21.0 → 0.22.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/components/__internal__/statusIcon/statusIcon.types.d.ts +12 -0
- package/dist/components/__internal__/statusIcon/statusIcon.types.d.ts.map +1 -0
- package/dist/components/__internal__/statusIcon/statusIcon.utils.cjs +21 -0
- package/dist/components/__internal__/statusIcon/statusIcon.utils.cjs.map +1 -0
- package/dist/components/__internal__/statusIcon/statusIcon.utils.d.ts +5 -0
- package/dist/components/__internal__/statusIcon/statusIcon.utils.d.ts.map +1 -0
- package/dist/components/__internal__/statusIcon/statusIcon.utils.js +19 -0
- package/dist/components/__internal__/statusIcon/statusIcon.utils.js.map +1 -0
- package/dist/components/atoms/BackgroundPattern/components/grid-check.cjs +14 -7
- package/dist/components/atoms/BackgroundPattern/components/grid-check.cjs.map +1 -1
- package/dist/components/atoms/BackgroundPattern/components/grid-check.d.ts.map +1 -1
- package/dist/components/atoms/BackgroundPattern/components/grid-check.js +14 -7
- package/dist/components/atoms/BackgroundPattern/components/grid-check.js.map +1 -1
- package/dist/components/atoms/BackgroundPattern/index.d.ts.map +1 -1
- package/dist/components/molecules/Alert/index.cjs +3 -11
- package/dist/components/molecules/Alert/index.cjs.map +1 -1
- package/dist/components/molecules/Alert/index.d.ts +3 -2
- package/dist/components/molecules/Alert/index.d.ts.map +1 -1
- package/dist/components/molecules/Alert/index.js +3 -11
- package/dist/components/molecules/Alert/index.js.map +1 -1
- package/dist/components/molecules/Notification/index.cjs +3 -10
- package/dist/components/molecules/Notification/index.cjs.map +1 -1
- package/dist/components/molecules/Notification/index.d.ts +2 -1
- package/dist/components/molecules/Notification/index.d.ts.map +1 -1
- package/dist/components/molecules/Notification/index.js +3 -10
- package/dist/components/molecules/Notification/index.js.map +1 -1
- package/dist/components/molecules/Pagination/index.cjs +4 -4
- package/dist/components/molecules/Pagination/index.cjs.map +1 -1
- package/dist/components/molecules/Pagination/index.js +5 -5
- package/dist/components/molecules/Pagination/index.js.map +1 -1
- package/dist/components/organisms/Calendar/calendar.utils.cjs +41 -0
- package/dist/components/organisms/Calendar/calendar.utils.cjs.map +1 -1
- package/dist/components/organisms/Calendar/calendar.utils.d.ts +20 -0
- package/dist/components/organisms/Calendar/calendar.utils.d.ts.map +1 -1
- package/dist/components/organisms/Calendar/calendar.utils.js +37 -1
- package/dist/components/organisms/Calendar/calendar.utils.js.map +1 -1
- package/dist/components/organisms/Calendar/components/calendar-day-view.cjs +86 -0
- package/dist/components/organisms/Calendar/components/calendar-day-view.cjs.map +1 -0
- package/dist/components/organisms/Calendar/components/calendar-day-view.d.ts +20 -0
- package/dist/components/organisms/Calendar/components/calendar-day-view.d.ts.map +1 -0
- package/dist/components/organisms/Calendar/components/calendar-day-view.js +84 -0
- package/dist/components/organisms/Calendar/components/calendar-day-view.js.map +1 -0
- package/dist/components/organisms/Calendar/components/calendar-mobile-day-grid.cjs +21 -0
- package/dist/components/organisms/Calendar/components/calendar-mobile-day-grid.cjs.map +1 -0
- package/dist/components/organisms/Calendar/components/calendar-mobile-day-grid.d.ts +16 -0
- package/dist/components/organisms/Calendar/components/calendar-mobile-day-grid.d.ts.map +1 -0
- package/dist/components/organisms/Calendar/components/calendar-mobile-day-grid.js +19 -0
- package/dist/components/organisms/Calendar/components/calendar-mobile-day-grid.js.map +1 -0
- package/dist/components/organisms/Calendar/components/calendar-month-view.cjs +265 -0
- package/dist/components/organisms/Calendar/components/calendar-month-view.cjs.map +1 -0
- package/dist/components/organisms/Calendar/components/calendar-month-view.d.ts +18 -0
- package/dist/components/organisms/Calendar/components/calendar-month-view.d.ts.map +1 -0
- package/dist/components/organisms/Calendar/components/calendar-month-view.js +263 -0
- package/dist/components/organisms/Calendar/components/calendar-month-view.js.map +1 -0
- package/dist/components/organisms/Calendar/components/calendar-positioned-event.cjs +41 -0
- package/dist/components/organisms/Calendar/components/calendar-positioned-event.cjs.map +1 -0
- package/dist/components/organisms/Calendar/components/calendar-positioned-event.d.ts +15 -0
- package/dist/components/organisms/Calendar/components/calendar-positioned-event.d.ts.map +1 -0
- package/dist/components/organisms/Calendar/components/calendar-positioned-event.js +39 -0
- package/dist/components/organisms/Calendar/components/calendar-positioned-event.js.map +1 -0
- package/dist/components/organisms/Calendar/components/calendar-week-view-day.cjs +23 -0
- package/dist/components/organisms/Calendar/components/calendar-week-view-day.cjs.map +1 -0
- package/dist/components/organisms/Calendar/components/calendar-week-view-day.d.ts +15 -0
- package/dist/components/organisms/Calendar/components/calendar-week-view-day.d.ts.map +1 -0
- package/dist/components/organisms/Calendar/components/calendar-week-view-day.js +21 -0
- package/dist/components/organisms/Calendar/components/calendar-week-view-day.js.map +1 -0
- package/dist/components/organisms/Calendar/components/calendar-week-view.cjs +77 -0
- package/dist/components/organisms/Calendar/components/calendar-week-view.cjs.map +1 -0
- package/dist/components/organisms/Calendar/components/calendar-week-view.d.ts +20 -0
- package/dist/components/organisms/Calendar/components/calendar-week-view.d.ts.map +1 -0
- package/dist/components/organisms/Calendar/components/calendar-week-view.js +75 -0
- package/dist/components/organisms/Calendar/components/calendar-week-view.js.map +1 -0
- package/dist/components/organisms/Calendar/index.cjs +4 -504
- package/dist/components/organisms/Calendar/index.cjs.map +1 -1
- package/dist/components/organisms/Calendar/index.d.ts +1 -1
- package/dist/components/organisms/Calendar/index.d.ts.map +1 -1
- package/dist/components/organisms/Calendar/index.js +6 -506
- package/dist/components/organisms/Calendar/index.js.map +1 -1
- package/dist/components/organisms/Charts/components/activity-gauge.cjs +4 -0
- package/dist/components/organisms/Charts/components/activity-gauge.cjs.map +1 -1
- package/dist/components/organisms/Charts/components/activity-gauge.d.ts +4 -0
- package/dist/components/organisms/Charts/components/activity-gauge.d.ts.map +1 -1
- package/dist/components/organisms/Charts/components/activity-gauge.js +4 -0
- package/dist/components/organisms/Charts/components/activity-gauge.js.map +1 -1
- package/dist/components/organisms/Charts/components/bar-chart.cjs +1 -1
- package/dist/components/organisms/Charts/components/bar-chart.cjs.map +1 -1
- package/dist/components/organisms/Charts/components/bar-chart.d.ts +1 -2
- package/dist/components/organisms/Charts/components/bar-chart.d.ts.map +1 -1
- package/dist/components/organisms/Charts/components/bar-chart.js +2 -2
- package/dist/components/organisms/Charts/components/bar-chart.js.map +1 -1
- package/dist/components/organisms/Charts/components/charts-base.cjs +1 -2
- package/dist/components/organisms/Charts/components/charts-base.cjs.map +1 -1
- package/dist/components/organisms/Charts/components/charts-base.d.ts +13 -2
- package/dist/components/organisms/Charts/components/charts-base.d.ts.map +1 -1
- package/dist/components/organisms/Charts/components/charts-base.js +1 -2
- package/dist/components/organisms/Charts/components/charts-base.js.map +1 -1
- package/dist/components/organisms/Charts/components/line-chart.cjs +1 -1
- package/dist/components/organisms/Charts/components/line-chart.cjs.map +1 -1
- package/dist/components/organisms/Charts/components/line-chart.d.ts +1 -2
- package/dist/components/organisms/Charts/components/line-chart.d.ts.map +1 -1
- package/dist/components/organisms/Charts/components/line-chart.js +2 -2
- package/dist/components/organisms/Charts/components/line-chart.js.map +1 -1
- package/dist/components/organisms/Charts/components/pie-chart.cjs +5 -0
- package/dist/components/organisms/Charts/components/pie-chart.cjs.map +1 -1
- package/dist/components/organisms/Charts/components/pie-chart.d.ts +6 -2
- package/dist/components/organisms/Charts/components/pie-chart.d.ts.map +1 -1
- package/dist/components/organisms/Charts/components/pie-chart.js +5 -0
- package/dist/components/organisms/Charts/components/pie-chart.js.map +1 -1
- package/dist/components/organisms/Charts/components/radar-chart.cjs +3 -4
- package/dist/components/organisms/Charts/components/radar-chart.cjs.map +1 -1
- package/dist/components/organisms/Charts/components/radar-chart.d.ts.map +1 -1
- package/dist/components/organisms/Charts/components/radar-chart.js +3 -4
- package/dist/components/organisms/Charts/components/radar-chart.js.map +1 -1
- package/dist/components/organisms/DatePicker/components/range-calendar.cjs +1 -1
- package/dist/components/organisms/DatePicker/components/range-calendar.cjs.map +1 -1
- package/dist/components/organisms/DatePicker/components/range-calendar.js +2 -2
- package/dist/components/organisms/DatePicker/components/range-calendar.js.map +1 -1
- package/dist/components/organisms/GradientPicker/components/gradient-area.cjs +157 -0
- package/dist/components/organisms/GradientPicker/components/gradient-area.cjs.map +1 -0
- package/dist/components/organisms/GradientPicker/components/gradient-area.d.ts +17 -0
- package/dist/components/organisms/GradientPicker/components/gradient-area.d.ts.map +1 -0
- package/dist/components/organisms/GradientPicker/components/gradient-area.js +155 -0
- package/dist/components/organisms/GradientPicker/components/gradient-area.js.map +1 -0
- package/dist/components/organisms/GradientPicker/components/gradient-reverse-button.cjs +17 -0
- package/dist/components/organisms/GradientPicker/components/gradient-reverse-button.cjs.map +1 -0
- package/dist/components/organisms/GradientPicker/components/gradient-reverse-button.d.ts +3 -0
- package/dist/components/organisms/GradientPicker/components/gradient-reverse-button.d.ts.map +1 -0
- package/dist/components/organisms/GradientPicker/components/gradient-reverse-button.js +15 -0
- package/dist/components/organisms/GradientPicker/components/gradient-reverse-button.js.map +1 -0
- package/dist/components/organisms/GradientPicker/components/gradient-slider.cjs +71 -0
- package/dist/components/organisms/GradientPicker/components/gradient-slider.cjs.map +1 -0
- package/dist/components/organisms/GradientPicker/components/gradient-slider.d.ts +7 -0
- package/dist/components/organisms/GradientPicker/components/gradient-slider.d.ts.map +1 -0
- package/dist/components/organisms/GradientPicker/components/gradient-slider.js +69 -0
- package/dist/components/organisms/GradientPicker/components/gradient-slider.js.map +1 -0
- package/dist/components/organisms/GradientPicker/components/gradient-stop-list.cjs +18 -0
- package/dist/components/organisms/GradientPicker/components/gradient-stop-list.cjs.map +1 -0
- package/dist/components/organisms/GradientPicker/components/gradient-stop-list.d.ts +4 -0
- package/dist/components/organisms/GradientPicker/components/gradient-stop-list.d.ts.map +1 -0
- package/dist/components/organisms/GradientPicker/components/gradient-stop-list.js +16 -0
- package/dist/components/organisms/GradientPicker/components/gradient-stop-list.js.map +1 -0
- package/dist/components/organisms/GradientPicker/components/gradient-stop-row.cjs +49 -0
- package/dist/components/organisms/GradientPicker/components/gradient-stop-row.cjs.map +1 -0
- package/dist/components/organisms/GradientPicker/components/gradient-stop-row.d.ts +6 -0
- package/dist/components/organisms/GradientPicker/components/gradient-stop-row.d.ts.map +1 -0
- package/dist/components/organisms/GradientPicker/components/gradient-stop-row.js +47 -0
- package/dist/components/organisms/GradientPicker/components/gradient-stop-row.js.map +1 -0
- package/dist/components/organisms/GradientPicker/components/gradient-type-select.cjs +28 -0
- package/dist/components/organisms/GradientPicker/components/gradient-type-select.cjs.map +1 -0
- package/dist/components/organisms/GradientPicker/components/gradient-type-select.d.ts +3 -0
- package/dist/components/organisms/GradientPicker/components/gradient-type-select.d.ts.map +1 -0
- package/dist/components/organisms/GradientPicker/components/gradient-type-select.js +26 -0
- package/dist/components/organisms/GradientPicker/components/gradient-type-select.js.map +1 -0
- package/dist/components/organisms/GradientPicker/components/position-input.cjs +43 -0
- package/dist/components/organisms/GradientPicker/components/position-input.cjs.map +1 -0
- package/dist/components/organisms/GradientPicker/components/position-input.d.ts +6 -0
- package/dist/components/organisms/GradientPicker/components/position-input.d.ts.map +1 -0
- package/dist/components/organisms/GradientPicker/components/position-input.js +41 -0
- package/dist/components/organisms/GradientPicker/components/position-input.js.map +1 -0
- package/dist/components/organisms/GradientPicker/index.cjs +11 -327
- package/dist/components/organisms/GradientPicker/index.cjs.map +1 -1
- package/dist/components/organisms/GradientPicker/index.d.ts +7 -8
- package/dist/components/organisms/GradientPicker/index.d.ts.map +1 -1
- package/dist/components/organisms/GradientPicker/index.js +7 -323
- package/dist/components/organisms/GradientPicker/index.js.map +1 -1
- package/dist/components/organisms/HeaderNavigation/components/nav-account-card.cjs +1 -1
- package/dist/components/organisms/HeaderNavigation/components/nav-account-card.cjs.map +1 -1
- package/dist/components/organisms/HeaderNavigation/components/nav-account-card.js +2 -2
- package/dist/components/organisms/HeaderNavigation/components/nav-account-card.js.map +1 -1
- package/dist/components/organisms/HeaderNavigation/components/nav-button.cjs +1 -1
- package/dist/components/organisms/HeaderNavigation/components/nav-button.cjs.map +1 -1
- package/dist/components/organisms/HeaderNavigation/components/nav-button.d.ts.map +1 -1
- package/dist/components/organisms/HeaderNavigation/components/nav-button.js +1 -1
- package/dist/components/organisms/HeaderNavigation/components/nav-button.js.map +1 -1
- package/dist/components/organisms/SidebarNavigation/components/nav-account-card.cjs +1 -1
- package/dist/components/organisms/SidebarNavigation/components/nav-account-card.cjs.map +1 -1
- package/dist/components/organisms/SidebarNavigation/components/nav-account-card.js +2 -2
- package/dist/components/organisms/SidebarNavigation/components/nav-account-card.js.map +1 -1
- package/dist/components/organisms/SidebarNavigation/index.cjs +1 -1
- package/dist/components/organisms/SidebarNavigation/index.cjs.map +1 -1
- package/dist/components/organisms/SidebarNavigation/index.js +2 -2
- package/dist/components/organisms/SidebarNavigation/index.js.map +1 -1
- package/dist/components/organisms/VideoPlayer/hooks/useVideoPlayback.cjs +169 -0
- package/dist/components/organisms/VideoPlayer/hooks/useVideoPlayback.cjs.map +1 -0
- package/dist/components/organisms/VideoPlayer/hooks/useVideoPlayback.d.ts +34 -0
- package/dist/components/organisms/VideoPlayer/hooks/useVideoPlayback.d.ts.map +1 -0
- package/dist/components/organisms/VideoPlayer/hooks/useVideoPlayback.js +167 -0
- package/dist/components/organisms/VideoPlayer/hooks/useVideoPlayback.js.map +1 -0
- package/dist/components/organisms/VideoPlayer/hooks/useVideoVolume.cjs +75 -0
- package/dist/components/organisms/VideoPlayer/hooks/useVideoVolume.cjs.map +1 -0
- package/dist/components/organisms/VideoPlayer/hooks/useVideoVolume.d.ts +16 -0
- package/dist/components/organisms/VideoPlayer/hooks/useVideoVolume.d.ts.map +1 -0
- package/dist/components/organisms/VideoPlayer/hooks/useVideoVolume.js +73 -0
- package/dist/components/organisms/VideoPlayer/hooks/useVideoVolume.js.map +1 -0
- package/dist/components/organisms/VideoPlayer/index.cjs +9 -182
- package/dist/components/organisms/VideoPlayer/index.cjs.map +1 -1
- package/dist/components/organisms/VideoPlayer/index.d.ts.map +1 -1
- package/dist/components/organisms/VideoPlayer/index.js +10 -183
- package/dist/components/organisms/VideoPlayer/index.js.map +1 -1
- package/dist/hooks/useBreakpoints/index.cjs +4 -1
- package/dist/hooks/useBreakpoints/index.cjs.map +1 -1
- package/dist/hooks/useBreakpoints/index.d.ts +2 -0
- package/dist/hooks/useBreakpoints/index.d.ts.map +1 -1
- package/dist/hooks/useBreakpoints/index.js +4 -2
- package/dist/hooks/useBreakpoints/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var uiIcons = require('@flipdish/ui-icons');
|
|
5
|
+
var Button = require('@flipdish/ui-library/components/atoms/Button');
|
|
6
|
+
var Dropdown = require('@flipdish/ui-library/components/molecules/Dropdown');
|
|
7
|
+
var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
|
|
8
|
+
var gradientPickerContext = require('../providers/gradient-picker-context.cjs');
|
|
9
|
+
|
|
10
|
+
const GRADIENT_TYPES = [
|
|
11
|
+
{ id: 'linear', label: 'Linear' },
|
|
12
|
+
{ id: 'radial', label: 'Radial' },
|
|
13
|
+
{ id: 'angular', label: 'Angular' },
|
|
14
|
+
{ id: 'diamond', label: 'Diamond' },
|
|
15
|
+
];
|
|
16
|
+
/** Dropdown to switch between gradient types (linear, radial, angular, diamond). */
|
|
17
|
+
const GradientTypeSelect = () => {
|
|
18
|
+
const { state, actions } = gradientPickerContext.useGradientColorPicker();
|
|
19
|
+
const prefix = testIdUtils.useTestIdPrefix();
|
|
20
|
+
return (jsxRuntime.jsxs(Dropdown.Dropdown.Root, { children: [jsxRuntime.jsx(Button.Button, { size: "xs", color: "link-gray", "data-testid": prefix ? testIdUtils.joinTestId(prefix, 'type-select') : undefined, iconTrailing: (props) => jsxRuntime.jsx(uiIcons.ChevronDown, { "data-icon": "trailing", ...props, className: "size-3! stroke-[2.5px]!" }), children: GRADIENT_TYPES.find((t) => t.id === state.gradientType)?.label }), jsxRuntime.jsx(Dropdown.Dropdown.Popover, { className: "w-36", children: jsxRuntime.jsx(Dropdown.Dropdown.Menu, { selectionMode: "single", selectedKeys: [state.gradientType], onSelectionChange: (keys) => {
|
|
21
|
+
const key = [...keys][0];
|
|
22
|
+
if (key)
|
|
23
|
+
actions.setGradientType(key);
|
|
24
|
+
}, children: GRADIENT_TYPES.map((t) => (jsxRuntime.jsx(Dropdown.Dropdown.Item, { id: t.id, label: t.label }, t.id))) }) })] }));
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
exports.GradientTypeSelect = GradientTypeSelect;
|
|
28
|
+
//# sourceMappingURL=gradient-type-select.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gradient-type-select.cjs","sources":["../../../../../src/components/organisms/GradientPicker/components/gradient-type-select.tsx"],"sourcesContent":[null],"names":["useGradientColorPicker","useTestIdPrefix","_jsxs","Dropdown","_jsx","Button","joinTestId","ChevronDown"],"mappings":";;;;;;;;;AASA,MAAM,cAAc,GAA0C;AAC5D,IAAA,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;AACjC,IAAA,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;AACjC,IAAA,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;AACnC,IAAA,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;CACpC;AAED;AACO,MAAM,kBAAkB,GAAG,MAAK;IACrC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAGA,4CAAsB,EAAE;AACnD,IAAA,MAAM,MAAM,GAAGC,2BAAe,EAAE;IAEhC,QACEC,gBAACC,iBAAQ,CAAC,IAAI,EAAA,EAAA,QAAA,EAAA,CACZC,cAAA,CAACC,aAAM,EAAA,EACL,IAAI,EAAC,IAAI,EACT,KAAK,EAAC,WAAW,EAAA,aAAA,EACJ,MAAM,GAAGC,sBAAU,CAAC,MAAM,EAAE,aAAa,CAAC,GAAG,SAAS,EACnE,YAAY,EAAE,CAAC,KAAK,KAAKF,cAAA,CAACG,mBAAW,EAAA,EAAA,WAAA,EAAW,UAAU,EAAA,GAAK,KAAK,EAAE,SAAS,EAAC,yBAAyB,EAAA,CAAG,EAAA,QAAA,EAE3G,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,KAAK,CAAC,YAAY,CAAC,EAAE,KAAK,EAAA,CACxD,EAETH,cAAA,CAACD,iBAAQ,CAAC,OAAO,EAAA,EAAC,SAAS,EAAC,MAAM,EAAA,QAAA,EAChCC,eAACD,iBAAQ,CAAC,IAAI,EAAA,EACZ,aAAa,EAAC,QAAQ,EACtB,YAAY,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,EAClC,iBAAiB,EAAE,CAAC,IAAI,KAAI;wBAC1B,MAAM,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAiB;AACxC,wBAAA,IAAI,GAAG;AAAE,4BAAA,OAAO,CAAC,eAAe,CAAC,GAAG,CAAC;AACvC,oBAAA,CAAC,YAEA,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,MACpBC,cAAA,CAACD,iBAAQ,CAAC,IAAI,EAAA,EAAY,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAA,EAA9B,CAAC,CAAC,EAAE,CAA8B,CACvD,CAAC,GACY,EAAA,CACC,CAAA,EAAA,CACL;AAEpB;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gradient-type-select.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/GradientPicker/components/gradient-type-select.tsx"],"names":[],"mappings":"AAgBA,oFAAoF;AACpF,eAAO,MAAM,kBAAkB,mCA+B9B,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { ChevronDown } from '@flipdish/ui-icons';
|
|
3
|
+
import { Button } from '@flipdish/ui-library/components/atoms/Button';
|
|
4
|
+
import { Dropdown } from '@flipdish/ui-library/components/molecules/Dropdown';
|
|
5
|
+
import { useTestIdPrefix, joinTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
6
|
+
import { useGradientColorPicker } from '../providers/gradient-picker-context.js';
|
|
7
|
+
|
|
8
|
+
const GRADIENT_TYPES = [
|
|
9
|
+
{ id: 'linear', label: 'Linear' },
|
|
10
|
+
{ id: 'radial', label: 'Radial' },
|
|
11
|
+
{ id: 'angular', label: 'Angular' },
|
|
12
|
+
{ id: 'diamond', label: 'Diamond' },
|
|
13
|
+
];
|
|
14
|
+
/** Dropdown to switch between gradient types (linear, radial, angular, diamond). */
|
|
15
|
+
const GradientTypeSelect = () => {
|
|
16
|
+
const { state, actions } = useGradientColorPicker();
|
|
17
|
+
const prefix = useTestIdPrefix();
|
|
18
|
+
return (jsxs(Dropdown.Root, { children: [jsx(Button, { size: "xs", color: "link-gray", "data-testid": prefix ? joinTestId(prefix, 'type-select') : undefined, iconTrailing: (props) => jsx(ChevronDown, { "data-icon": "trailing", ...props, className: "size-3! stroke-[2.5px]!" }), children: GRADIENT_TYPES.find((t) => t.id === state.gradientType)?.label }), jsx(Dropdown.Popover, { className: "w-36", children: jsx(Dropdown.Menu, { selectionMode: "single", selectedKeys: [state.gradientType], onSelectionChange: (keys) => {
|
|
19
|
+
const key = [...keys][0];
|
|
20
|
+
if (key)
|
|
21
|
+
actions.setGradientType(key);
|
|
22
|
+
}, children: GRADIENT_TYPES.map((t) => (jsx(Dropdown.Item, { id: t.id, label: t.label }, t.id))) }) })] }));
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export { GradientTypeSelect };
|
|
26
|
+
//# sourceMappingURL=gradient-type-select.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gradient-type-select.js","sources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AAE,CAAC,IAAI,KAAI;wBAC1B,MAAM,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAiB;AACxC,wBAAA,IAAI,GAAG;AAAE,4BAAA,OAAO,CAAC,eAAe,CAAC,GAAG,CAAC;AACvC,oBAAA,CAAC,YAEA,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,MACpBA,GAAA,CAAC,QAAQ,CAAC,IAAI,EAAA,EAAY,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAA,EAA9B,CAAC,CAAC,EAAE,CAA8B,CACvD,CAAC,GACY,EAAA,CACC,CAAA,EAAA,CACL;AAEpB;;;;"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var inputCell = require('../../ColorPicker/components/input-cell.cjs');
|
|
6
|
+
|
|
7
|
+
/** Position input that displays "50%" when blurred and "50" when focused, with arrow key support. */
|
|
8
|
+
const PositionInput = ({ value: rawValue, onChange }) => {
|
|
9
|
+
const value = Math.round(rawValue);
|
|
10
|
+
const [isFocused, setIsFocused] = React.useState(false);
|
|
11
|
+
const [draft, setDraft] = React.useState('');
|
|
12
|
+
const commit = (raw) => {
|
|
13
|
+
const num = parseInt(raw, 10);
|
|
14
|
+
if (!Number.isNaN(num))
|
|
15
|
+
onChange(Math.max(0, Math.min(100, num)));
|
|
16
|
+
};
|
|
17
|
+
return (jsxRuntime.jsx(inputCell.InputCell, { className: "w-14 shrink-0 shadow-xs", children: jsxRuntime.jsx("input", { "aria-label": "Stop position", value: isFocused ? draft : `${value}%`, onChange: (e) => setDraft(e.target.value), onFocus: (e) => {
|
|
18
|
+
setIsFocused(true);
|
|
19
|
+
setDraft(`${value}`);
|
|
20
|
+
requestAnimationFrame(() => e.target.select());
|
|
21
|
+
}, onBlur: () => {
|
|
22
|
+
commit(draft);
|
|
23
|
+
setIsFocused(false);
|
|
24
|
+
}, onKeyDown: (e) => {
|
|
25
|
+
if (e.key === 'ArrowUp') {
|
|
26
|
+
e.preventDefault();
|
|
27
|
+
onChange(Math.min(100, value + 1));
|
|
28
|
+
setDraft(`${Math.min(100, value + 1)}`);
|
|
29
|
+
}
|
|
30
|
+
else if (e.key === 'ArrowDown') {
|
|
31
|
+
e.preventDefault();
|
|
32
|
+
onChange(Math.max(0, value - 1));
|
|
33
|
+
setDraft(`${Math.max(0, value - 1)}`);
|
|
34
|
+
}
|
|
35
|
+
else if (e.key === 'Enter') {
|
|
36
|
+
commit(draft);
|
|
37
|
+
e.target.blur();
|
|
38
|
+
}
|
|
39
|
+
}, className: "w-full bg-transparent px-2.5 py-2 text-sm text-primary outline-hidden" }) }));
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
exports.PositionInput = PositionInput;
|
|
43
|
+
//# sourceMappingURL=position-input.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"position-input.cjs","sources":["../../../../../src/components/organisms/GradientPicker/components/position-input.tsx"],"sourcesContent":[null],"names":["useState","_jsx","InputCell"],"mappings":";;;;;;AAKA;AACO,MAAM,aAAa,GAAG,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAsD,KAAI;IACjH,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;IAClC,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAGA,cAAQ,CAAC,KAAK,CAAC;IACjD,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAGA,cAAQ,CAAC,EAAE,CAAC;AAEtC,IAAA,MAAM,MAAM,GAAG,CAAC,GAAW,KAAI;QAC7B,MAAM,GAAG,GAAG,QAAQ,CAAC,GAAG,EAAE,EAAE,CAAC;AAC7B,QAAA,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC;AAAE,YAAA,QAA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AAA,QAAQ,CAAC,CAAA,EAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAA,CAAE,CAAC;gBACvC;AAAO,qBAAA,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,EAAE;oBAC5B,MAAM,CAAC,KAAK,CAAC;AACZ,oBAAA,CAAC,CAAC,MAA2B,CAAC,IAAI,EAAE;gBACvC;AACF,YAAA,CAAC,EACD,SAAS,EAAC,uEAAuE,EAAA,CACjF,EAAA,CACQ;AAEhB;;;;"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Position input that displays "50%" when blurred and "50" when focused, with arrow key support. */
|
|
2
|
+
export declare const PositionInput: ({ value: rawValue, onChange }: {
|
|
3
|
+
value: number;
|
|
4
|
+
onChange: (pos: number) => void;
|
|
5
|
+
}) => import("react").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=position-input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"position-input.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/GradientPicker/components/position-input.tsx"],"names":[],"mappings":"AAKA,qGAAqG;AACrG,eAAO,MAAM,aAAa,GAAI,+BAA+B;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,gCA2C9G,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { InputCell } from '../../ColorPicker/components/input-cell.js';
|
|
4
|
+
|
|
5
|
+
/** Position input that displays "50%" when blurred and "50" when focused, with arrow key support. */
|
|
6
|
+
const PositionInput = ({ value: rawValue, onChange }) => {
|
|
7
|
+
const value = Math.round(rawValue);
|
|
8
|
+
const [isFocused, setIsFocused] = useState(false);
|
|
9
|
+
const [draft, setDraft] = useState('');
|
|
10
|
+
const commit = (raw) => {
|
|
11
|
+
const num = parseInt(raw, 10);
|
|
12
|
+
if (!Number.isNaN(num))
|
|
13
|
+
onChange(Math.max(0, Math.min(100, num)));
|
|
14
|
+
};
|
|
15
|
+
return (jsx(InputCell, { className: "w-14 shrink-0 shadow-xs", children: jsx("input", { "aria-label": "Stop position", value: isFocused ? draft : `${value}%`, onChange: (e) => setDraft(e.target.value), onFocus: (e) => {
|
|
16
|
+
setIsFocused(true);
|
|
17
|
+
setDraft(`${value}`);
|
|
18
|
+
requestAnimationFrame(() => e.target.select());
|
|
19
|
+
}, onBlur: () => {
|
|
20
|
+
commit(draft);
|
|
21
|
+
setIsFocused(false);
|
|
22
|
+
}, onKeyDown: (e) => {
|
|
23
|
+
if (e.key === 'ArrowUp') {
|
|
24
|
+
e.preventDefault();
|
|
25
|
+
onChange(Math.min(100, value + 1));
|
|
26
|
+
setDraft(`${Math.min(100, value + 1)}`);
|
|
27
|
+
}
|
|
28
|
+
else if (e.key === 'ArrowDown') {
|
|
29
|
+
e.preventDefault();
|
|
30
|
+
onChange(Math.max(0, value - 1));
|
|
31
|
+
setDraft(`${Math.max(0, value - 1)}`);
|
|
32
|
+
}
|
|
33
|
+
else if (e.key === 'Enter') {
|
|
34
|
+
commit(draft);
|
|
35
|
+
e.target.blur();
|
|
36
|
+
}
|
|
37
|
+
}, className: "w-full bg-transparent px-2.5 py-2 text-sm text-primary outline-hidden" }) }));
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export { PositionInput };
|
|
41
|
+
//# sourceMappingURL=position-input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"position-input.js","sources":["../../../../../src/components/organisms/GradientPicker/components/position-input.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;AAKA;AACO,MAAM,aAAa,GAAG,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAsD,KAAI;IACjH,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,C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AAK,GAAG,CAAC,CAAC,CAAC;AAClC,oBAAA,QAAQ,CAAC,CAAA,EAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,GAAG,CAAC,CAAC,CAAA,CAAE,CAAC;gBACzC;AAAO,qBAAA,IAAI,CAAC,CAAC,GAAG,KAAK,WAAW,EAAE;oBAChC,CAAC,CAAC,cAAc,EAAE;AAClB,oBAAA,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;AAChC,oBAAA,QAAQ,CAAC,CAAA,EAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAA,CAAE,CAAC;gBACvC;AAAO,qBAAA,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,EAAE;oBAC5B,MAAM,CAAC,KAAK,CAAC;AACZ,oBAAA,CAAC,CAAC,MAA2B,CAAC,IAAI,EAAE;gBACvC;AACF,YAAA,CAAC,EACD,SAAS,EAAC,uEAAuE,EAAA,CACjF,EAAA,CACQ;AAEhB;;;;"}
|
|
@@ -1,342 +1,26 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var uiIcons = require('@flipdish/ui-icons');
|
|
5
|
-
var Button = require('@flipdish/ui-library/components/atoms/Button');
|
|
6
|
-
var UtilityButton = require('@flipdish/ui-library/components/atoms/UtilityButton');
|
|
7
|
-
var Dropdown = require('@flipdish/ui-library/components/molecules/Dropdown');
|
|
8
|
-
var cx = require('@flipdish/ui-library/utilities/cx');
|
|
9
4
|
var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
5
|
+
var gradientArea = require('./components/gradient-area.cjs');
|
|
6
|
+
var gradientReverseButton = require('./components/gradient-reverse-button.cjs');
|
|
7
|
+
var gradientSlider = require('./components/gradient-slider.cjs');
|
|
8
|
+
var gradientStopList = require('./components/gradient-stop-list.cjs');
|
|
9
|
+
var gradientTypeSelect = require('./components/gradient-type-select.cjs');
|
|
15
10
|
var gradientPickerContext = require('./providers/gradient-picker-context.cjs');
|
|
16
11
|
|
|
17
|
-
const GRADIENT_TYPES = [
|
|
18
|
-
{ id: 'linear', label: 'Linear' },
|
|
19
|
-
{ id: 'radial', label: 'Radial' },
|
|
20
|
-
{ id: 'angular', label: 'Angular' },
|
|
21
|
-
{ id: 'diamond', label: 'Diamond' },
|
|
22
|
-
];
|
|
23
|
-
/**
|
|
24
|
-
* Interactive 2D gradient area with draggable stop thumbs.
|
|
25
|
-
*
|
|
26
|
-
* The gradient is defined by an explicit 2D line (`state.gradientLine`) extended to
|
|
27
|
-
* the area edges. Stop positions (0–100%) map to points along this line via `lerp`.
|
|
28
|
-
*
|
|
29
|
-
* Endpoint drag — moves the thumb freely in 2D. The line through both endpoints
|
|
30
|
-
* is extended to the area edges via `extendLineToEdges`, and both endpoint positions
|
|
31
|
-
* are re-projected onto it. The other endpoint's 2D position is snapshotted on
|
|
32
|
-
* pointerdown so it never drifts. Inner stop positions stay unchanged.
|
|
33
|
-
*
|
|
34
|
-
* Inner stop drag — slides the stop along the current gradient line by projecting
|
|
35
|
-
* the pointer onto it.
|
|
36
|
-
*/
|
|
37
|
-
const GradientArea = () => {
|
|
38
|
-
const { state, actions } = gradientPickerContext.useGradientColorPicker();
|
|
39
|
-
const { gradientStops: stops, gradientType: type, gradientLine: line } = state;
|
|
40
|
-
const areaRef = React.useRef(null);
|
|
41
|
-
const prefix = testIdUtils.useTestIdPrefix();
|
|
42
|
-
const areaTestId = prefix ? testIdUtils.joinTestId(prefix, 'area') : undefined;
|
|
43
|
-
const sorted = [...stops].sort((a, b) => a.position - b.position);
|
|
44
|
-
const firstStop = sorted[0];
|
|
45
|
-
const lastStop = sorted[sorted.length - 1];
|
|
46
|
-
/** Map a stop's position (0–100%) to a 2D point on the gradient line. */
|
|
47
|
-
const stopPt = (position) => gradientPicker_utils.lerp(line.start, line.end, position / 100);
|
|
48
|
-
const startPt = stopPt(firstStop?.position ?? 0);
|
|
49
|
-
const endPt = stopPt(lastStop?.position ?? 100);
|
|
50
|
-
/** Drag state stored in a ref to avoid re-renders during pointer moves. */
|
|
51
|
-
const dragRef = React.useRef(null);
|
|
52
|
-
/** Start dragging an endpoint (first or last sorted stop). */
|
|
53
|
-
const handleEndpointDown = React.useCallback((e, which) => {
|
|
54
|
-
if (!areaRef.current)
|
|
55
|
-
return;
|
|
56
|
-
e.preventDefault();
|
|
57
|
-
e.stopPropagation();
|
|
58
|
-
const el = e.target;
|
|
59
|
-
el.setPointerCapture(e.pointerId);
|
|
60
|
-
el.focus();
|
|
61
|
-
const draggedStop = which === 'start' ? firstStop : lastStop;
|
|
62
|
-
const fixedStop = which === 'start' ? lastStop : firstStop;
|
|
63
|
-
if (draggedStop)
|
|
64
|
-
actions.selectStop(draggedStop.id);
|
|
65
|
-
const raw = gradientPicker_utils.pointerPt(e, areaRef.current);
|
|
66
|
-
const thumbPt = stopPt(draggedStop?.position ?? (which === 'start' ? 0 : 100));
|
|
67
|
-
const fixedPt = stopPt(fixedStop?.position ?? (which === 'start' ? 100 : 0));
|
|
68
|
-
const boundaryPos = which === 'start' ? (sorted[1]?.position ?? 100) : (sorted[sorted.length - 2]?.position ?? 0);
|
|
69
|
-
dragRef.current = {
|
|
70
|
-
kind: 'endpoint',
|
|
71
|
-
which,
|
|
72
|
-
offset: { x: raw.x - thumbPt.x, y: raw.y - thumbPt.y },
|
|
73
|
-
draggedStopId: draggedStop?.id ?? '',
|
|
74
|
-
fixedStopId: fixedStop?.id ?? '',
|
|
75
|
-
fixedPt,
|
|
76
|
-
boundaryPos,
|
|
77
|
-
};
|
|
78
|
-
},
|
|
79
|
-
// biome-ignore lint/correctness/useExhaustiveDependencies: stopPt is not a dependency of the callback
|
|
80
|
-
[actions, firstStop, lastStop, sorted, stopPt]);
|
|
81
|
-
/** Start dragging an inner (non-endpoint) stop along the gradient line. */
|
|
82
|
-
const handleInnerDown = React.useCallback((e, stopId) => {
|
|
83
|
-
if (!areaRef.current)
|
|
84
|
-
return;
|
|
85
|
-
e.preventDefault();
|
|
86
|
-
e.stopPropagation();
|
|
87
|
-
const el = e.target;
|
|
88
|
-
el.setPointerCapture(e.pointerId);
|
|
89
|
-
el.focus();
|
|
90
|
-
actions.selectStop(stopId);
|
|
91
|
-
const raw = gradientPicker_utils.pointerPt(e, areaRef.current);
|
|
92
|
-
const t = gradientPicker_utils.projectOntoLine(raw, line.start, line.end);
|
|
93
|
-
const rawPos = gradientPicker_utils.clamp(t * 100, 0, 100);
|
|
94
|
-
const stop = stops.find((s) => s.id === stopId);
|
|
95
|
-
dragRef.current = { kind: 'inner', stopId, offset: rawPos - (stop?.position ?? 50) };
|
|
96
|
-
}, [actions, stops, line]);
|
|
97
|
-
/** Handle pointer move for both endpoint and inner stop drags. */
|
|
98
|
-
const handlePointerMove = React.useCallback((e) => {
|
|
99
|
-
if (!areaRef.current || !dragRef.current)
|
|
100
|
-
return;
|
|
101
|
-
const raw = gradientPicker_utils.pointerPt(e, areaRef.current);
|
|
102
|
-
const drag = dragRef.current;
|
|
103
|
-
if (drag.kind === 'endpoint') {
|
|
104
|
-
let pt = gradientPicker_utils.clampPt({ x: raw.x - drag.offset.x, y: raw.y - drag.offset.y });
|
|
105
|
-
// Keep a minimum distance between endpoints to prevent a zero-length line
|
|
106
|
-
if (gradientPicker_utils.dist(pt, drag.fixedPt) < 5) {
|
|
107
|
-
const dx = pt.x - drag.fixedPt.x;
|
|
108
|
-
const dy = pt.y - drag.fixedPt.y;
|
|
109
|
-
const d = gradientPicker_utils.dist(pt, drag.fixedPt) || 1;
|
|
110
|
-
pt = { x: drag.fixedPt.x + (dx / d) * 5, y: drag.fixedPt.y + (dy / d) * 5 };
|
|
111
|
-
}
|
|
112
|
-
// Build an edge-extended line through the dragged point and the fixed point.
|
|
113
|
-
// Both points lie exactly on this line, so their projections are lossless.
|
|
114
|
-
const dirStart = drag.which === 'start' ? pt : drag.fixedPt;
|
|
115
|
-
const dirEnd = drag.which === 'start' ? drag.fixedPt : pt;
|
|
116
|
-
const edgeLine = gradientPicker_utils.extendLineToEdges(dirStart, dirEnd);
|
|
117
|
-
let draggedPos = gradientPicker_utils.clamp(gradientPicker_utils.projectOntoLine(pt, edgeLine.start, edgeLine.end) * 100, 0, 100);
|
|
118
|
-
const fixedPos = gradientPicker_utils.clamp(gradientPicker_utils.projectOntoLine(drag.fixedPt, edgeLine.start, edgeLine.end) * 100, 0, 100);
|
|
119
|
-
// Prevent the endpoint from crossing past the nearest inner stop
|
|
120
|
-
if (drag.which === 'start' && draggedPos > drag.boundaryPos) {
|
|
121
|
-
draggedPos = drag.boundaryPos;
|
|
122
|
-
pt = gradientPicker_utils.lerp(edgeLine.start, edgeLine.end, draggedPos / 100);
|
|
123
|
-
}
|
|
124
|
-
else if (drag.which === 'end' && draggedPos < drag.boundaryPos) {
|
|
125
|
-
draggedPos = drag.boundaryPos;
|
|
126
|
-
pt = gradientPicker_utils.lerp(edgeLine.start, edgeLine.end, draggedPos / 100);
|
|
127
|
-
}
|
|
128
|
-
actions.setLineEndpoint(edgeLine, [
|
|
129
|
-
{ id: drag.draggedStopId, position: draggedPos },
|
|
130
|
-
{ id: drag.fixedStopId, position: fixedPos },
|
|
131
|
-
]);
|
|
132
|
-
}
|
|
133
|
-
else {
|
|
134
|
-
// Project the pointer onto the gradient line and update the stop's position
|
|
135
|
-
const t = gradientPicker_utils.projectOntoLine(raw, line.start, line.end);
|
|
136
|
-
const pos = Math.round(gradientPicker_utils.clamp(t * 100 - drag.offset, 0, 100));
|
|
137
|
-
actions.moveStop(drag.stopId, pos);
|
|
138
|
-
}
|
|
139
|
-
}, [actions, line]);
|
|
140
|
-
const handlePointerUp = React.useCallback(() => {
|
|
141
|
-
dragRef.current = null;
|
|
142
|
-
}, []);
|
|
143
|
-
/** CSS gradient background remapped to align with the (possibly off-center) gradient line. */
|
|
144
|
-
const bgCSS = gradientPicker_utils.toGradientCSSFromLine(stops, type, line.start, line.end);
|
|
145
|
-
return (
|
|
146
|
-
// biome-ignore lint/a11y/useSemanticElements: this is a div that is not interactive
|
|
147
|
-
jsxRuntime.jsxs("div", { ref: areaRef, role: "group", "aria-label": "Gradient direction and stops", "data-testid": areaTestId, className: "relative aspect-square w-full rounded-lg", onPointerMove: handlePointerMove, onPointerUp: handlePointerUp, onPointerCancel: handlePointerUp, children: [jsxRuntime.jsx("div", { className: "absolute inset-0 overflow-hidden rounded-lg ring-[0.5px] ring-alpha-black/10 ring-inset", style: { background: bgCSS } }), jsxRuntime.jsx("svg", { className: "pointer-events-none absolute inset-0 size-full overflow-visible", "aria-hidden": true, children: jsxRuntime.jsx("line", { x1: `${startPt.x}%`, y1: `${startPt.y}%`, x2: `${endPt.x}%`, y2: `${endPt.y}%`, stroke: "rgba(255,255,255,0.5)", strokeWidth: "2", strokeDasharray: "3 5", strokeLinecap: "round" }) }), sorted.map((stop) => {
|
|
148
|
-
const isFirst = stop.id === firstStop?.id;
|
|
149
|
-
const isLast = stop.id === lastStop?.id && !isFirst;
|
|
150
|
-
const isEndpoint = isFirst || isLast;
|
|
151
|
-
const pt = stopPt(stop.position);
|
|
152
|
-
const which = isFirst ? 'start' : 'end';
|
|
153
|
-
return (jsxRuntime.jsx("button", { type: "button", tabIndex: 0, onPointerDown: isEndpoint ? (e) => handleEndpointDown(e, which) : (e) => handleInnerDown(e, stop.id), onFocus: () => actions.selectStop(stop.id), onKeyDown: (e) => {
|
|
154
|
-
if (e.key === 'ArrowRight' || e.key === 'ArrowUp') {
|
|
155
|
-
e.preventDefault();
|
|
156
|
-
actions.moveStop(stop.id, Math.min(100, stop.position + 1));
|
|
157
|
-
}
|
|
158
|
-
else if (e.key === 'ArrowLeft' || e.key === 'ArrowDown') {
|
|
159
|
-
e.preventDefault();
|
|
160
|
-
actions.moveStop(stop.id, Math.max(0, stop.position - 1));
|
|
161
|
-
}
|
|
162
|
-
else if ((e.key === 'Delete' || e.key === 'Backspace') && stops.length > 2) {
|
|
163
|
-
e.preventDefault();
|
|
164
|
-
actions.removeStop(stop.id);
|
|
165
|
-
}
|
|
166
|
-
}, className: cx.cx('absolute z-10 -translate-x-1/2 -translate-y-1/2 cursor-grab rounded-full border-[3px] border-white shadow-md outline-0 outline-focus-ring focus-visible:outline-2 focus-visible:outline-offset-2 active:cursor-grabbing', isEndpoint ? 'size-5' : 'size-4'), style: { left: `${pt.x}%`, top: `${pt.y}%`, background: stop.color }, "data-testid": prefix ? testIdUtils.joinTestId(prefix, `stop-${stop.id}-thumb`) : undefined, "aria-label": `Gradient stop at ${Math.round(stop.position)}%`, role: "slider", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": Math.round(stop.position) }, stop.id));
|
|
167
|
-
})] }));
|
|
168
|
-
};
|
|
169
|
-
/**
|
|
170
|
-
* Horizontal gradient slider. Stops are draggable thumbs along the track.
|
|
171
|
-
* Clicking an empty area of the track adds a new stop with an interpolated color.
|
|
172
|
-
*/
|
|
173
|
-
const GradientSlider = () => {
|
|
174
|
-
const { state, actions } = gradientPickerContext.useGradientColorPicker();
|
|
175
|
-
const trackRef = React.useRef(null);
|
|
176
|
-
const dragStopRef = React.useRef(null);
|
|
177
|
-
const sliderOffsetRef = React.useRef(0);
|
|
178
|
-
const prefix = testIdUtils.useTestIdPrefix();
|
|
179
|
-
const sliderTestId = prefix ? testIdUtils.joinTestId(prefix, 'slider') : undefined;
|
|
180
|
-
/** Convert a pointer event's X to a percentage (0–100) along the track. */
|
|
181
|
-
const getRawPos = React.useCallback((e) => {
|
|
182
|
-
if (!trackRef.current)
|
|
183
|
-
return 0;
|
|
184
|
-
const rect = trackRef.current.getBoundingClientRect();
|
|
185
|
-
return ((e.clientX - rect.left) / rect.width) * 100;
|
|
186
|
-
}, []);
|
|
187
|
-
const handlePointerMove = React.useCallback((e) => {
|
|
188
|
-
if (!dragStopRef.current)
|
|
189
|
-
return;
|
|
190
|
-
const pos = Math.round(Math.max(0, Math.min(100, getRawPos(e) - sliderOffsetRef.current)));
|
|
191
|
-
actions.moveStop(dragStopRef.current, pos);
|
|
192
|
-
}, [actions, getRawPos]);
|
|
193
|
-
const handlePointerUp = React.useCallback(() => {
|
|
194
|
-
dragStopRef.current = null;
|
|
195
|
-
sliderOffsetRef.current = 0;
|
|
196
|
-
}, []);
|
|
197
|
-
const handlePointerDown = React.useCallback((e) => {
|
|
198
|
-
if (e.target === trackRef.current) {
|
|
199
|
-
const pos = Math.round(Math.max(0, Math.min(100, getRawPos(e))));
|
|
200
|
-
actions.addStopAt(pos);
|
|
201
|
-
}
|
|
202
|
-
}, [actions, getRawPos]);
|
|
203
|
-
// biome-ignore lint/correctness/useExhaustiveDependencies: getRawPos is not a dependency of the callback
|
|
204
|
-
const handleInnerDown = React.useCallback((e, stop) => {
|
|
205
|
-
e.preventDefault();
|
|
206
|
-
const el = e.target;
|
|
207
|
-
el.setPointerCapture(e.pointerId);
|
|
208
|
-
el.focus();
|
|
209
|
-
actions.selectStop(stop.id);
|
|
210
|
-
dragStopRef.current = stop.id;
|
|
211
|
-
sliderOffsetRef.current = getRawPos(e) - stop.position;
|
|
212
|
-
}, [actions]);
|
|
213
|
-
// biome-ignore lint/correctness/useExhaustiveDependencies: getRawPos is not a dependency of the callback
|
|
214
|
-
const handleInnerKeyDown = React.useCallback((e, stop) => {
|
|
215
|
-
if (e.key === 'ArrowRight' || e.key === 'ArrowUp') {
|
|
216
|
-
e.preventDefault();
|
|
217
|
-
actions.moveStop(stop.id, Math.min(100, stop.position + 1));
|
|
218
|
-
}
|
|
219
|
-
else if (e.key === 'ArrowLeft' || e.key === 'ArrowDown') {
|
|
220
|
-
e.preventDefault();
|
|
221
|
-
actions.moveStop(stop.id, Math.max(0, stop.position - 1));
|
|
222
|
-
}
|
|
223
|
-
else if ((e.key === 'Delete' || e.key === 'Backspace') && state.gradientStops.length > 2) {
|
|
224
|
-
e.preventDefault();
|
|
225
|
-
actions.removeStop(stop.id);
|
|
226
|
-
}
|
|
227
|
-
}, [actions]);
|
|
228
|
-
return (jsxRuntime.jsx("div", { ref: trackRef, "data-testid": sliderTestId, className: "relative h-3 w-full cursor-pointer rounded-full ring-[0.5px] ring-alpha-black/10 ring-inset", style: { background: gradientPicker_utils.toGradientCSS(state.gradientStops, 'linear', 90) }, onPointerDown: handlePointerDown, onPointerMove: handlePointerMove, onPointerUp: handlePointerUp, onPointerCancel: handlePointerUp, children: state.gradientStops.map((stop) => (jsxRuntime.jsx("button", { type: "button", tabIndex: 0, onPointerDown: (e) => handleInnerDown(e, stop), onFocus: () => actions.selectStop(stop.id), onKeyDown: (e) => handleInnerKeyDown(e, stop), className: "absolute top-1/2 size-5 -translate-x-1/2 -translate-y-1/2 cursor-grab rounded-full border-[3px] border-white shadow-md outline-0 outline-focus-ring focus-visible:outline-2 focus-visible:outline-offset-2 active:cursor-grabbing", style: { left: `${stop.position}%`, background: stop.color }, "data-testid": prefix ? testIdUtils.joinTestId(prefix, `stop-${stop.id}-thumb`) : undefined, role: "slider", "aria-label": `Gradient stop at ${Math.round(stop.position)}%`, "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": Math.round(stop.position) }, stop.id))) }));
|
|
229
|
-
};
|
|
230
|
-
/** Dropdown to switch between gradient types (linear, radial, angular, diamond). */
|
|
231
|
-
const GradientTypeSelect = () => {
|
|
232
|
-
const { state, actions } = gradientPickerContext.useGradientColorPicker();
|
|
233
|
-
const prefix = testIdUtils.useTestIdPrefix();
|
|
234
|
-
return (jsxRuntime.jsxs(Dropdown.Dropdown.Root, { children: [jsxRuntime.jsx(Button.Button, { size: "xs", color: "link-gray", "data-testid": prefix ? testIdUtils.joinTestId(prefix, 'type-select') : undefined, iconTrailing: (props) => jsxRuntime.jsx(uiIcons.ChevronDown, { "data-icon": "trailing", ...props, className: "size-3! stroke-[2.5px]!" }), children: GRADIENT_TYPES.find((t) => t.id === state.gradientType)?.label }), jsxRuntime.jsx(Dropdown.Dropdown.Popover, { className: "w-36", children: jsxRuntime.jsx(Dropdown.Dropdown.Menu, { selectionMode: "single", selectedKeys: [state.gradientType], onSelectionChange: (keys) => {
|
|
235
|
-
const key = [...keys][0];
|
|
236
|
-
if (key)
|
|
237
|
-
actions.setGradientType(key);
|
|
238
|
-
}, children: GRADIENT_TYPES.map((t) => (jsxRuntime.jsx(Dropdown.Dropdown.Item, { id: t.id, label: t.label }, t.id))) }) })] }));
|
|
239
|
-
};
|
|
240
|
-
/** Position input that displays "50%" when blurred and "50" when focused, with arrow key support. */
|
|
241
|
-
const PositionInput = ({ value: rawValue, onChange }) => {
|
|
242
|
-
const value = Math.round(rawValue);
|
|
243
|
-
const [isFocused, setIsFocused] = React.useState(false);
|
|
244
|
-
const [draft, setDraft] = React.useState('');
|
|
245
|
-
const commit = (raw) => {
|
|
246
|
-
const num = parseInt(raw, 10);
|
|
247
|
-
if (!Number.isNaN(num))
|
|
248
|
-
onChange(Math.max(0, Math.min(100, num)));
|
|
249
|
-
};
|
|
250
|
-
return (jsxRuntime.jsx(inputCell.InputCell, { className: "w-14 shrink-0 shadow-xs", children: jsxRuntime.jsx("input", { "aria-label": "Stop position", value: isFocused ? draft : `${value}%`, onChange: (e) => setDraft(e.target.value), onFocus: (e) => {
|
|
251
|
-
setIsFocused(true);
|
|
252
|
-
setDraft(`${value}`);
|
|
253
|
-
requestAnimationFrame(() => e.target.select());
|
|
254
|
-
}, onBlur: () => {
|
|
255
|
-
commit(draft);
|
|
256
|
-
setIsFocused(false);
|
|
257
|
-
}, onKeyDown: (e) => {
|
|
258
|
-
if (e.key === 'ArrowUp') {
|
|
259
|
-
e.preventDefault();
|
|
260
|
-
onChange(Math.min(100, value + 1));
|
|
261
|
-
setDraft(`${Math.min(100, value + 1)}`);
|
|
262
|
-
}
|
|
263
|
-
else if (e.key === 'ArrowDown') {
|
|
264
|
-
e.preventDefault();
|
|
265
|
-
onChange(Math.max(0, value - 1));
|
|
266
|
-
setDraft(`${Math.max(0, value - 1)}`);
|
|
267
|
-
}
|
|
268
|
-
else if (e.key === 'Enter') {
|
|
269
|
-
commit(draft);
|
|
270
|
-
e.target.blur();
|
|
271
|
-
}
|
|
272
|
-
}, className: "w-full bg-transparent px-2.5 py-2 text-sm text-primary outline-hidden" }) }));
|
|
273
|
-
};
|
|
274
|
-
/** Row for a single gradient stop: position input, color field, alpha field, and remove button. */
|
|
275
|
-
const GradientStopRow = ({ stopId }) => {
|
|
276
|
-
const { state, actions } = gradientPickerContext.useGradientColorPicker();
|
|
277
|
-
const stop = state.gradientStops.find((s) => s.id === stopId);
|
|
278
|
-
const prefix = testIdUtils.useTestIdPrefix();
|
|
279
|
-
// Memoized on `stop` (not recomputed on every render): `GradientProvider` re-renders on every
|
|
280
|
-
// state change (e.g. dragging a different stop, moving the gradient line), and each such
|
|
281
|
-
// re-render was producing a brand-new `Color` object here. Since that object is passed as the
|
|
282
|
-
// controlled `value` of the color/alpha `AriaColorField`s below, a fresh reference on every
|
|
283
|
-
// render — including renders that happen while the field is focused, which happens naturally
|
|
284
|
-
// while typing since it triggers a re-render of this whole tree — reset the field's
|
|
285
|
-
// in-progress draft back to the last-committed value, so typed edits could never actually
|
|
286
|
-
// commit. The reducer only allocates a new `stop` object for the entry that actually changed
|
|
287
|
-
// (see `gradient-picker-context.tsx`), so keying off `stop` itself is equivalent to keying off
|
|
288
|
-
// its `color`/`alpha` without needing a stale/unsafe-dependency suppression.
|
|
289
|
-
const colorValue = React.useMemo(() => {
|
|
290
|
-
if (!stop)
|
|
291
|
-
return null;
|
|
292
|
-
try {
|
|
293
|
-
return reactAriaComponents.parseColor(stop.color).withChannelValue('alpha', stop.alpha / 100);
|
|
294
|
-
}
|
|
295
|
-
catch {
|
|
296
|
-
return null;
|
|
297
|
-
}
|
|
298
|
-
}, [stop]);
|
|
299
|
-
if (!stop)
|
|
300
|
-
return null;
|
|
301
|
-
const canRemove = state.gradientStops.length > 2;
|
|
302
|
-
return (
|
|
303
|
-
// biome-ignore lint/a11y/noStaticElementInteractions: this is a div that is not interactive
|
|
304
|
-
// biome-ignore lint/a11y/useKeyWithClickEvents: this is a click event
|
|
305
|
-
jsxRuntime.jsxs("div", { className: "flex items-center gap-3", "data-testid": prefix ? testIdUtils.joinTestId(prefix, `stop-${stopId}`) : undefined, onClick: () => actions.selectStop(stopId), children: [jsxRuntime.jsx(PositionInput, { value: stop.position, onChange: (pos) => actions.moveStop(stopId, pos) }), jsxRuntime.jsxs("div", { className: "flex flex-1 items-center gap-1", children: [jsxRuntime.jsxs("div", { className: "flex flex-1 shadow-xs", children: [jsxRuntime.jsx(inputCell.InputCell, { position: "first", className: "flex-1", children: jsxRuntime.jsxs(reactAriaComponents.ColorField, { "aria-label": "Stop color", value: colorValue, onChange: (c) => {
|
|
306
|
-
if (c)
|
|
307
|
-
actions.setStopColorAndAlpha(stopId, c.toString('hex'), Math.round(c.getChannelValue('alpha') * 100));
|
|
308
|
-
}, className: "flex flex-1 items-center gap-2 px-2.5 py-2", children: [jsxRuntime.jsx(reactAriaComponents.ColorSwatch, { color: colorValue || undefined, className: "size-4 shrink-0 rounded-full ring-1 ring-alpha-black/10 ring-inset", style: ({ defaultStyle }) => defaultStyle }), jsxRuntime.jsx(reactAriaComponents.Input, { onFocus: colorPicker_utils.selectAllOnFocus, className: "w-full min-w-0 bg-transparent text-sm text-primary outline-hidden" })] }) }), jsxRuntime.jsx(inputCell.InputCell, { position: "last", className: "w-14 shrink-0", children: jsxRuntime.jsx(reactAriaComponents.ColorField, { "aria-label": "Stop alpha", channel: "alpha", value: colorValue, onChange: (c) => {
|
|
309
|
-
if (c)
|
|
310
|
-
actions.setStopAlpha(stopId, Math.round(c.getChannelValue('alpha') * 100));
|
|
311
|
-
}, className: "flex w-full items-center", children: jsxRuntime.jsx(reactAriaComponents.Input, { onFocus: colorPicker_utils.selectAllOnFocus, className: "w-full min-w-0 bg-transparent px-2.5 py-2 text-sm text-primary outline-hidden" }) }) })] }), jsxRuntime.jsx(UtilityButton.ButtonUtility, { icon: uiIcons.Minus, size: "xs", color: "tertiary", isDisabled: !canRemove, tooltip: "Remove stop", onClick: (e) => {
|
|
312
|
-
e.stopPropagation();
|
|
313
|
-
actions.removeStop(stopId);
|
|
314
|
-
} })] })] }));
|
|
315
|
-
};
|
|
316
|
-
/** Editable list of gradient stops with add/remove controls. */
|
|
317
|
-
const GradientStopList = () => {
|
|
318
|
-
const { state, actions } = gradientPickerContext.useGradientColorPicker();
|
|
319
|
-
const prefix = testIdUtils.useTestIdPrefix();
|
|
320
|
-
return (jsxRuntime.jsxs("div", { className: "flex flex-col gap-3", "data-testid": prefix ? testIdUtils.joinTestId(prefix, 'stop-list') : undefined, children: [jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [jsxRuntime.jsx("p", { className: "flex-1 text-sm font-semibold text-secondary", children: "Stops" }), jsxRuntime.jsx(Button.Button, { size: "xs", color: "link-gray", iconLeading: uiIcons.Plus, onClick: () => actions.addStop(), children: "Add" })] }), jsxRuntime.jsx("div", { className: "flex flex-col gap-3", children: state.gradientStops.map((stop) => (jsxRuntime.jsx(GradientStopRow, { stopId: stop.id }, stop.id))) })] }));
|
|
321
|
-
};
|
|
322
|
-
/** Button to reverse the gradient by mirroring all stop colors. */
|
|
323
|
-
const GradientReverseButton = () => {
|
|
324
|
-
const { actions } = gradientPickerContext.useGradientColorPicker();
|
|
325
|
-
const prefix = testIdUtils.useTestIdPrefix();
|
|
326
|
-
return (jsxRuntime.jsx(UtilityButton.ButtonUtility, { icon: uiIcons.SwitchHorizontal01, size: "sm", color: "tertiary", tooltip: "Reverse gradient", "data-testid": prefix ? testIdUtils.joinTestId(prefix, 'reverse') : undefined, onClick: () => actions.reverseGradient() }));
|
|
327
|
-
};
|
|
328
12
|
/** All-in-one gradient picker layout: area, type select, slider, and stop list. */
|
|
329
13
|
const ColorPickerGradient = () => {
|
|
330
14
|
const prefix = testIdUtils.useTestIdPrefix();
|
|
331
|
-
return (jsxRuntime.jsxs("div", { className: "flex flex-col gap-4", "data-testid": prefix, children: [jsxRuntime.jsx(GradientArea, {}), jsxRuntime.jsxs("div", { className: "flex flex-col gap-3", children: [jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [jsxRuntime.jsx(GradientTypeSelect, {}), jsxRuntime.jsx(GradientReverseButton, {})] }), jsxRuntime.jsx(GradientSlider, {})] }), jsxRuntime.jsx(GradientStopList, {})] }));
|
|
15
|
+
return (jsxRuntime.jsxs("div", { className: "flex flex-col gap-4", "data-testid": prefix, children: [jsxRuntime.jsx(gradientArea.GradientArea, {}), jsxRuntime.jsxs("div", { className: "flex flex-col gap-3", children: [jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [jsxRuntime.jsx(gradientTypeSelect.GradientTypeSelect, {}), jsxRuntime.jsx(gradientReverseButton.GradientReverseButton, {})] }), jsxRuntime.jsx(gradientSlider.GradientSlider, {})] }), jsxRuntime.jsx(gradientStopList.GradientStopList, {})] }));
|
|
332
16
|
};
|
|
333
17
|
const GradientPicker = Object.assign(ColorPickerGradient, {
|
|
334
18
|
Provider: gradientPickerContext.GradientProvider,
|
|
335
|
-
Area: GradientArea,
|
|
336
|
-
Slider: GradientSlider,
|
|
337
|
-
StopList: GradientStopList,
|
|
338
|
-
TypeSelect: GradientTypeSelect,
|
|
339
|
-
Reverse: GradientReverseButton,
|
|
19
|
+
Area: gradientArea.GradientArea,
|
|
20
|
+
Slider: gradientSlider.GradientSlider,
|
|
21
|
+
StopList: gradientStopList.GradientStopList,
|
|
22
|
+
TypeSelect: gradientTypeSelect.GradientTypeSelect,
|
|
23
|
+
Reverse: gradientReverseButton.GradientReverseButton,
|
|
340
24
|
});
|
|
341
25
|
|
|
342
26
|
exports.GradientPicker = GradientPicker;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../src/components/organisms/GradientPicker/index.tsx"],"sourcesContent":[null],"names":["useGradientColorPicker","useRef","useTestIdPrefix","joinTestId","lerp","useCallback","pointerPt","projectOntoLine","clamp","clampPt","dist","extendLineToEdges","toGradientCSSFromLine","_jsxs","_jsx","cx","toGradientCSS","Dropdown","Button","ChevronDown","useState","InputCell","useMemo","parseColor","AriaColorField","AriaColorSwatch","AriaInput","selectAllOnFocus","ButtonUtility","Minus","Plus","SwitchHorizontal01","GradientProvider"],"mappings":";;;;;;;;;;;;;;;;AA4BA,MAAM,cAAc,GAA0C;AAC5D,IAAA,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;AACjC,IAAA,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;AACjC,IAAA,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;AACnC,IAAA,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;CACpC;AAED;;;;;;;;;;;;;AAaG;AACH,MAAM,YAAY,GAAG,MAAK;IACxB,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAGA,4CAAsB,EAAE;AACnD,IAAA,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,GAAG,KAAK;AAC9E,IAAA,MAAM,OAAO,GAAGC,YAAM,CAAiB,IAAI,CAAC;AAC5C,IAAA,MAAM,MAAM,GAAGC,2BAAe,EAAE;AAChC,IAAA,MAAM,UAAU,GAAG,MAAM,GAAGC,sBAAU,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS;IAElE,MAAM,MAAM,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC;AACjE,IAAA,MAAM,SAAS,GAAG,MAAM,CAAC,CAAC,CAAC;IAC3B,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;;I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,QACEW,eAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,qBAAqB,EAAA,aAAA,EAAc,MAAM,EAAA,QAAA,EAAA,CACtDC,cAAA,CAAC,YAAY,EAAA,EAAA,CAAG,EAChBD,eAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,qBAAqB,EAAA,QAAA,EAAA,CAClCA,yBAAK,SAAS,EAAC,mCAAmC,EAAA,QAAA,EAAA,CAChDC,eAAC,kBAAkB,EAAA,EAAA,CAAG,EACtBA,cAAA,CAAC,qBAAqB,KAAG,CAAA,EAAA,CACrB,EACNA,eAAC,cAAc,EAAA,EAAA,CAAG,IACd,EACNA,cAAA,CAAC,gBAAgB,EAAA,EAAA,CAAG,CAAA,EAAA,CAChB;AAEV,CAAC;AAED,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,mBAAmB,EAAE;AACxD,IAAA,QAAQ,EAAEkB,sCAAgB;AAC1B,IAAA,IAAI,EAAE,YAAY;AAClB,IAAA,MAAM,EAAE,cAAc;AACtB,IAAA,QAAQ,EAAE,gBAAgB;AAC1B,IAAA,UAAU,EAAE,kBAAkB;AAC9B,IAAA,OAAO,EAAE,qBAAqB;AAC/B,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../src/components/organisms/GradientPicker/index.tsx"],"sourcesContent":[null],"names":["useTestIdPrefix","_jsxs","_jsx","GradientArea","GradientTypeSelect","GradientReverseButton","GradientSlider","GradientStopList","GradientProvider"],"mappings":";;;;;;;;;;;AAUA;AACA,MAAM,mBAAmB,GAAG,MAAK;AAC/B,IAAA,MAAM,MAAM,GAAGA,2BAAe,EAAE;AAEhC,IAAA,QACEC,eAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,qBAAqB,EAAA,aAAA,EAAc,MAAM,EAAA,QAAA,EAAA,CACtDC,cAAA,CAACC,yBAAY,EAAA,EAAA,CAAG,EAChBF,eAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,qBAAqB,EAAA,QAAA,EAAA,CAClCA,yBAAK,SAAS,EAAC,mCAAmC,EAAA,QAAA,EAAA,CAChDC,eAACE,qCAAkB,EAAA,EAAA,CAAG,EACtBF,cAAA,CAACG,2CAAqB,KAAG,CAAA,EAAA,CACrB,EACNH,eAACI,6BAAc,EAAA,EAAA,CAAG,IACd,EACNJ,cAAA,CAACK,iCAAgB,EAAA,EAAA,CAAG,CAAA,EAAA,CAChB;AAEV,CAAC;AAED,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,mBAAmB,EAAE;AACxD,IAAA,QAAQ,EAAEC,sCAAgB;AAC1B,IAAA,IAAI,EAAEL,yBAAY;AAClB,IAAA,MAAM,EAAEG,6BAAc;AACtB,IAAA,QAAQ,EAAEC,iCAAgB;AAC1B,IAAA,UAAU,EAAEH,qCAAkB;AAC9B,IAAA,OAAO,EAAEC,2CAAqB;AAC/B,CAAA;;;;"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Reverse: () => React.JSX.Element;
|
|
1
|
+
declare const GradientPicker: (() => import("react").JSX.Element) & {
|
|
2
|
+
Provider: ({ defaultStops, defaultType, defaultAngle, onStopsChange, onTypeChange, onAngleChange, children, "data-testid": dataTestId, }: import("./providers/gradient-picker-context").GradientProviderProps) => import("react").JSX.Element;
|
|
3
|
+
Area: () => import("react").JSX.Element;
|
|
4
|
+
Slider: () => import("react").JSX.Element;
|
|
5
|
+
StopList: () => import("react").JSX.Element;
|
|
6
|
+
TypeSelect: () => import("react").JSX.Element;
|
|
7
|
+
Reverse: () => import("react").JSX.Element;
|
|
9
8
|
};
|
|
10
9
|
export { GradientPicker };
|
|
11
10
|
//# sourceMappingURL=index.d.ts.map
|