@flipdish/ui-library 0.4.0 → 0.4.1
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/atoms/AppStoreButton/index.cjs +7 -0
- package/dist/components/atoms/AppStoreButton/index.cjs.map +1 -1
- package/dist/components/atoms/AppStoreButton/index.d.ts +7 -0
- package/dist/components/atoms/AppStoreButton/index.d.ts.map +1 -1
- package/dist/components/atoms/AppStoreButton/index.js +7 -0
- package/dist/components/atoms/AppStoreButton/index.js.map +1 -1
- package/dist/components/atoms/Avatar/index.cjs +7 -0
- package/dist/components/atoms/Avatar/index.cjs.map +1 -1
- package/dist/components/atoms/Avatar/index.d.ts +7 -0
- package/dist/components/atoms/Avatar/index.d.ts.map +1 -1
- package/dist/components/atoms/Avatar/index.js +7 -0
- package/dist/components/atoms/Avatar/index.js.map +1 -1
- package/dist/components/atoms/BackgroundPattern/index.cjs +7 -1
- package/dist/components/atoms/BackgroundPattern/index.cjs.map +1 -1
- package/dist/components/atoms/BackgroundPattern/index.d.ts +6 -0
- package/dist/components/atoms/BackgroundPattern/index.d.ts.map +1 -1
- package/dist/components/atoms/BackgroundPattern/index.js +7 -1
- package/dist/components/atoms/BackgroundPattern/index.js.map +1 -1
- package/dist/components/atoms/Badge/index.cjs +6 -0
- package/dist/components/atoms/Badge/index.cjs.map +1 -1
- package/dist/components/atoms/Badge/index.d.ts +7 -1
- package/dist/components/atoms/Badge/index.d.ts.map +1 -1
- package/dist/components/atoms/Badge/index.js +6 -0
- package/dist/components/atoms/Badge/index.js.map +1 -1
- package/dist/components/atoms/Checkbox/index.cjs +6 -0
- package/dist/components/atoms/Checkbox/index.cjs.map +1 -1
- package/dist/components/atoms/Checkbox/index.d.ts +7 -2
- package/dist/components/atoms/Checkbox/index.d.ts.map +1 -1
- package/dist/components/atoms/Checkbox/index.js +6 -0
- package/dist/components/atoms/Checkbox/index.js.map +1 -1
- package/dist/components/atoms/CloseButton/index.cjs +6 -0
- package/dist/components/atoms/CloseButton/index.cjs.map +1 -1
- package/dist/components/atoms/CloseButton/index.d.ts +7 -2
- package/dist/components/atoms/CloseButton/index.d.ts.map +1 -1
- package/dist/components/atoms/CloseButton/index.js +6 -0
- package/dist/components/atoms/CloseButton/index.js.map +1 -1
- package/dist/components/atoms/Divider/index.cjs +2 -0
- package/dist/components/atoms/Divider/index.cjs.map +1 -1
- package/dist/components/atoms/Divider/index.d.ts +3 -2
- package/dist/components/atoms/Divider/index.d.ts.map +1 -1
- package/dist/components/atoms/Divider/index.js +2 -0
- package/dist/components/atoms/Divider/index.js.map +1 -1
- package/dist/components/atoms/FeaturedIcon/index.cjs +6 -0
- package/dist/components/atoms/FeaturedIcon/index.cjs.map +1 -1
- package/dist/components/atoms/FeaturedIcon/index.d.ts +8 -3
- package/dist/components/atoms/FeaturedIcon/index.d.ts.map +1 -1
- package/dist/components/atoms/FeaturedIcon/index.js +6 -0
- package/dist/components/atoms/FeaturedIcon/index.js.map +1 -1
- package/dist/components/atoms/FileTrigger/index.cjs +2 -0
- package/dist/components/atoms/FileTrigger/index.cjs.map +1 -1
- package/dist/components/atoms/FileTrigger/index.d.ts +3 -2
- package/dist/components/atoms/FileTrigger/index.d.ts.map +1 -1
- package/dist/components/atoms/FileTrigger/index.js +2 -0
- package/dist/components/atoms/FileTrigger/index.js.map +1 -1
- package/dist/components/atoms/FlipdishLogo/index.cjs +6 -0
- package/dist/components/atoms/FlipdishLogo/index.cjs.map +1 -1
- package/dist/components/atoms/FlipdishLogo/index.d.ts +6 -0
- package/dist/components/atoms/FlipdishLogo/index.d.ts.map +1 -1
- package/dist/components/atoms/FlipdishLogo/index.js +6 -0
- package/dist/components/atoms/FlipdishLogo/index.js.map +1 -1
- package/dist/components/atoms/Illustration/index.cjs +7 -0
- package/dist/components/atoms/Illustration/index.cjs.map +1 -1
- package/dist/components/atoms/Illustration/index.d.ts +7 -0
- package/dist/components/atoms/Illustration/index.d.ts.map +1 -1
- package/dist/components/atoms/Illustration/index.js +7 -0
- package/dist/components/atoms/Illustration/index.js.map +1 -1
- package/dist/components/atoms/Input/index.cjs +8 -0
- package/dist/components/atoms/Input/index.cjs.map +1 -1
- package/dist/components/atoms/Input/index.d.ts +8 -0
- package/dist/components/atoms/Input/index.d.ts.map +1 -1
- package/dist/components/atoms/Input/index.js +8 -0
- package/dist/components/atoms/Input/index.js.map +1 -1
- package/dist/components/atoms/LoadingIndicator/index.d.ts +1 -2
- package/dist/components/atoms/LoadingIndicator/index.d.ts.map +1 -1
- package/dist/components/atoms/ProgressBar/index.cjs +2 -0
- package/dist/components/atoms/ProgressBar/index.cjs.map +1 -1
- package/dist/components/atoms/ProgressBar/index.d.ts +2 -0
- package/dist/components/atoms/ProgressBar/index.d.ts.map +1 -1
- package/dist/components/atoms/ProgressBar/index.js +2 -0
- package/dist/components/atoms/ProgressBar/index.js.map +1 -1
- package/dist/components/atoms/QRCode/index.cjs +6 -0
- package/dist/components/atoms/QRCode/index.cjs.map +1 -1
- package/dist/components/atoms/QRCode/index.d.ts +7 -2
- package/dist/components/atoms/QRCode/index.d.ts.map +1 -1
- package/dist/components/atoms/QRCode/index.js +6 -0
- package/dist/components/atoms/QRCode/index.js.map +1 -1
- package/dist/components/atoms/RadioButton/index.cjs +6 -0
- package/dist/components/atoms/RadioButton/index.cjs.map +1 -1
- package/dist/components/atoms/RadioButton/index.d.ts +7 -1
- package/dist/components/atoms/RadioButton/index.d.ts.map +1 -1
- package/dist/components/atoms/RadioButton/index.js +6 -0
- package/dist/components/atoms/RadioButton/index.js.map +1 -1
- package/dist/components/atoms/RatingBadge/index.cjs +7 -0
- package/dist/components/atoms/RatingBadge/index.cjs.map +1 -1
- package/dist/components/atoms/RatingBadge/index.d.ts +8 -2
- package/dist/components/atoms/RatingBadge/index.d.ts.map +1 -1
- package/dist/components/atoms/RatingBadge/index.js +7 -0
- package/dist/components/atoms/RatingBadge/index.js.map +1 -1
- package/dist/components/atoms/RatingStars/index.cjs +6 -0
- package/dist/components/atoms/RatingStars/index.cjs.map +1 -1
- package/dist/components/atoms/RatingStars/index.d.ts +7 -1
- package/dist/components/atoms/RatingStars/index.d.ts.map +1 -1
- package/dist/components/atoms/RatingStars/index.js +6 -0
- package/dist/components/atoms/RatingStars/index.js.map +1 -1
- package/dist/components/atoms/Slider/index.cjs +8 -0
- package/dist/components/atoms/Slider/index.cjs.map +1 -1
- package/dist/components/atoms/Slider/index.d.ts +9 -1
- package/dist/components/atoms/Slider/index.d.ts.map +1 -1
- package/dist/components/atoms/Slider/index.js +8 -0
- package/dist/components/atoms/Slider/index.js.map +1 -1
- package/dist/components/atoms/SocialButton/index.cjs +7 -0
- package/dist/components/atoms/SocialButton/index.cjs.map +1 -1
- package/dist/components/atoms/SocialButton/index.d.ts +7 -0
- package/dist/components/atoms/SocialButton/index.d.ts.map +1 -1
- package/dist/components/atoms/SocialButton/index.js +7 -0
- package/dist/components/atoms/SocialButton/index.js.map +1 -1
- package/dist/components/atoms/Toggle/index.d.ts +1 -1
- package/dist/components/atoms/Toggle/index.d.ts.map +1 -1
- package/dist/components/atoms/Tooltip/index.cjs +6 -0
- package/dist/components/atoms/Tooltip/index.cjs.map +1 -1
- package/dist/components/atoms/Tooltip/index.d.ts +7 -1
- package/dist/components/atoms/Tooltip/index.d.ts.map +1 -1
- package/dist/components/atoms/Tooltip/index.js +6 -0
- package/dist/components/atoms/Tooltip/index.js.map +1 -1
- package/dist/components/atoms/UtilityButton/index.cjs +7 -0
- package/dist/components/atoms/UtilityButton/index.cjs.map +1 -1
- package/dist/components/atoms/UtilityButton/index.d.ts +7 -0
- package/dist/components/atoms/UtilityButton/index.d.ts.map +1 -1
- package/dist/components/atoms/UtilityButton/index.js +7 -0
- package/dist/components/atoms/UtilityButton/index.js.map +1 -1
- package/dist/providers/ThemeProvider/index.cjs +16 -10
- package/dist/providers/ThemeProvider/index.cjs.map +1 -1
- package/dist/providers/ThemeProvider/index.d.ts +7 -7
- package/dist/providers/ThemeProvider/index.d.ts.map +1 -1
- package/dist/providers/ThemeProvider/index.js +16 -10
- package/dist/providers/ThemeProvider/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/atoms/RatingStars/index.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":";;;;AAMO,MAAM,eAAe,GAAG,CAAC,YAAoB,EAAE,MAAc,EAAE,SAAA,GAAoB,CAAC,KAAI;;AAE7F,IAAA,MAAM,aAAa,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,SAAS,CAAC;AAE9D,IAAA,MAAM,IAAI,GAAG,aAAa,GAAG,YAAY;IAEzC,IAAI,IAAI,IAAI,CAAC;AAAE,QAAA,OAAO,GAAG;IACzB,IAAI,IAAI,IAAI,CAAC;AAAE,QAAA,OAAO,CAAC;IAEvB,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,GAAG,CAAC;AAC/B;AAWO,MAAM,QAAQ,GAAG,CAAC,EAAE,QAAQ,GAAG,GAAG,EAAE,GAAG,KAAK,EAAiB,KAAI;AACtE,IAAA,MAAM,EAAE,GAAG,KAAK,EAAE;IAElB;;AAEE,IAAAA,IAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,EAAA,GAAK,KAAK,EAAE,SAAS,EAAE,EAAE,CAAC,wBAAwB,EAAE,KAAK,CAAC,SAAS,CAAC,aAC7HC,GAAA,CAAA,MAAA,EAAA,EACE,CAAC,EAAC,gpBAAgpB,EAClpB,SAAS,EAAC,kBAAkB,EAAA,CAC5B,EACFA,WAAG,QAAQ,EAAE,CAAA,UAAA,EAAa,EAAE,GAAG,EAAA,QAAA,EAC7BA,GAAA,CAAA,MAAA,EAAA,EACE,CAAC,EAAC,gpBAAgpB,EAClpB,IA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': 'absolute -top-2 left-1/2 -translate-x-1/2 -translate-y-full rounded-lg bg-primary px-2 py-1.5 text-xs font-semibold text-secondary shadow-lg ring-1 ring-secondary_alt',
|
|
11
11
|
});
|
|
12
|
+
/**
|
|
13
|
+
* Draggable range input for selecting a numeric value or interval. Supports a
|
|
14
|
+
* single thumb or two-thumb range mode, optional value label positions, and
|
|
15
|
+
* custom value formatters. Built on react-aria for full keyboard and screen
|
|
16
|
+
* reader support.
|
|
17
|
+
*
|
|
18
|
+
* @summary draggable range input for selecting a numeric value
|
|
19
|
+
*/
|
|
12
20
|
const Slider = ({ labelPosition = 'default', minValue = 0, maxValue = 100, labelFormatter, formatOptions, ...rest }) => {
|
|
13
21
|
// Format thumb value as percentage by default.
|
|
14
22
|
const defaultFormatOptions = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../src/components/atoms/Slider/index.tsx"],"sourcesContent":[null],"names":["sortCx","_jsxs","AriaSlider","_jsx","AriaLabel","AriaSliderTrack","_Fragment","AriaSliderThumb","cx","AriaSliderOutput"],"mappings":";;;;;;AAYA,MAAM,MAAM,GAAGA,SAAM,CAAC;AACpB,IAAA,OAAO,EAAE,QAAQ;AACjB,IAAA,MAAM,EAAE,4FAA4F;AACpG,IAAA,cAAc,EACZ,wKAAwK;AAC3K,CAAA,CAAC;
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../src/components/atoms/Slider/index.tsx"],"sourcesContent":[null],"names":["sortCx","_jsxs","AriaSlider","_jsx","AriaLabel","AriaSliderTrack","_Fragment","AriaSliderThumb","cx","AriaSliderOutput"],"mappings":";;;;;;AAYA,MAAM,MAAM,GAAGA,SAAM,CAAC;AACpB,IAAA,OAAO,EAAE,QAAQ;AACjB,IAAA,MAAM,EAAE,4FAA4F;AACpG,IAAA,cAAc,EACZ,wKAAwK;AAC3K,CAAA,CAAC;AAOF;;;;;;;AAOG;AACI,MAAM,MAAM,GAAG,CAAC,EAAE,aAAa,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AK,EAAE,KAAK,EACZ,SAAS,EAAE,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,KACxCC,KAAE,CACA,8HAA8H,EAC9H,cAAc,IAAI,+CAA+C,EACjE,UAAU,IAAI,iBAAiB,CAChC,EAAA,QAAA,EAGHL,eAACM,gCAAgB,EAAA,EAAC,SAAS,EAAED,KAAE,CAAC,mBAAmB,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC,YACxE,cAAc,GAAG,cAAc,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,GAAG,iBAAiB,CAAC,aAAa,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,EAAA,CACrF,EAAA,EAZd,KAAK,CAaM;4BAEtB,CAAC,CAAC,CAAA,EAAA,CACD;gBAEP,CAAC,EAAA,CACe,CAAA,EAAA,CACP;AAEjB;;;;"}
|
|
@@ -4,10 +4,18 @@ declare const styles: {
|
|
|
4
4
|
bottom: string;
|
|
5
5
|
'top-floating': string;
|
|
6
6
|
};
|
|
7
|
-
interface SliderProps extends AriaSliderProps {
|
|
7
|
+
export interface SliderProps extends AriaSliderProps {
|
|
8
8
|
labelPosition?: keyof typeof styles;
|
|
9
9
|
labelFormatter?: (value: number) => string;
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* Draggable range input for selecting a numeric value or interval. Supports a
|
|
13
|
+
* single thumb or two-thumb range mode, optional value label positions, and
|
|
14
|
+
* custom value formatters. Built on react-aria for full keyboard and screen
|
|
15
|
+
* reader support.
|
|
16
|
+
*
|
|
17
|
+
* @summary draggable range input for selecting a numeric value
|
|
18
|
+
*/
|
|
11
19
|
export declare const Slider: ({ labelPosition, minValue, maxValue, labelFormatter, formatOptions, ...rest }: SliderProps) => import("react").JSX.Element;
|
|
12
20
|
export {};
|
|
13
21
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Slider/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAS5E,QAAA,MAAM,MAAM;;;;CAKV,CAAC;AAEH,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Slider/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAS5E,QAAA,MAAM,MAAM;;;;CAKV,CAAC;AAEH,MAAM,WAAW,WAAY,SAAQ,eAAe;IAClD,aAAa,CAAC,EAAE,MAAM,OAAO,MAAM,CAAC;IACpC,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CAC5C;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,MAAM,GAAI,+EAAqG,WAAW,gCAmDtI,CAAC"}
|
|
@@ -7,6 +7,14 @@ const styles = sortCx({
|
|
|
7
7
|
bottom: 'absolute top-2 left-1/2 -translate-x-1/2 translate-y-full text-md font-medium text-primary',
|
|
8
8
|
'top-floating': 'absolute -top-2 left-1/2 -translate-x-1/2 -translate-y-full rounded-lg bg-primary px-2 py-1.5 text-xs font-semibold text-secondary shadow-lg ring-1 ring-secondary_alt',
|
|
9
9
|
});
|
|
10
|
+
/**
|
|
11
|
+
* Draggable range input for selecting a numeric value or interval. Supports a
|
|
12
|
+
* single thumb or two-thumb range mode, optional value label positions, and
|
|
13
|
+
* custom value formatters. Built on react-aria for full keyboard and screen
|
|
14
|
+
* reader support.
|
|
15
|
+
*
|
|
16
|
+
* @summary draggable range input for selecting a numeric value
|
|
17
|
+
*/
|
|
10
18
|
const Slider = ({ labelPosition = 'default', minValue = 0, maxValue = 100, labelFormatter, formatOptions, ...rest }) => {
|
|
11
19
|
// Format thumb value as percentage by default.
|
|
12
20
|
const defaultFormatOptions = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/atoms/Slider/index.tsx"],"sourcesContent":[null],"names":["_jsxs","AriaSlider","_jsx","AriaLabel","AriaSliderTrack","_Fragment","AriaSliderThumb","AriaSliderOutput"],"mappings":";;;;AAYA,MAAM,MAAM,GAAG,MAAM,CAAC;AACpB,IAAA,OAAO,EAAE,QAAQ;AACjB,IAAA,MAAM,EAAE,4FAA4F;AACpG,IAAA,cAAc,EACZ,wKAAwK;AAC3K,CAAA,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/atoms/Slider/index.tsx"],"sourcesContent":[null],"names":["_jsxs","AriaSlider","_jsx","AriaLabel","AriaSliderTrack","_Fragment","AriaSliderThumb","AriaSliderOutput"],"mappings":";;;;AAYA,MAAM,MAAM,GAAG,MAAM,CAAC;AACpB,IAAA,OAAO,EAAE,QAAQ;AACjB,IAAA,MAAM,EAAE,4FAA4F;AACpG,IAAA,cAAc,EACZ,wKAAwK;AAC3K,CAAA,CAAC;AAOF;;;;;;;AAOG;AACI,MAAM,MAAM,GAAG,CAAC,EAAE,aAAa,GAAG,SAAS,EAAE,QAAQ,GAAG,CAAC,EAAE,QAAQ,GAAG,GAAG,EAAE,cAAc,EAAE,aAAa,EAAE,GAAG,IAAI,EAAe,KAAI;;AAEzI,IAAA,MAAM,oBAAoB,GAA6B;AACrD,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,qBAAqB,EAAE,CAAC;KACzB;AAED,IAAA,QACEA,IAAA,CAACC,QAAU,OAAK,IAAI,EAAQ,QAAQ,EAAE,QAAQ,EAAI,aAAa,EAAE,aAAa,IAAI,oBAAoB,aACpGC,GAAA,CAACC,KAAS,KAAG,EACbD,GAAA,CAACE,WAAe,EAAA,EAAC,SAAS,EAAC,qBAAqB,YAC7C,CAAC,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,aAAa,EAAE,eAAe,EAAE,iBAAiB,EAAE,EAAE,KAAI;AAC5E,oBAAA,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM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
|
|
40
40
|
},
|
|
41
41
|
});
|
|
42
|
+
/**
|
|
43
|
+
* A sign-in button for social authentication providers. Renders a branded logo
|
|
44
|
+
* and optional label for Google, Facebook, Apple, Twitter, Figma, or Dribble.
|
|
45
|
+
* Supports button and link semantics, three display themes, and two sizes.
|
|
46
|
+
*
|
|
47
|
+
* @summary renders a branded social auth sign-in button
|
|
48
|
+
*/
|
|
42
49
|
const SocialButton = ({ size = 'lg', theme = 'brand', social, className, children, disabled, ...otherProps }) => {
|
|
43
50
|
const href = 'href' in otherProps ? otherProps.href : undefined;
|
|
44
51
|
const Component = href ? reactAriaComponents.Link : reactAriaComponents.Button;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../src/components/atoms/SocialButton/index.tsx"],"sourcesContent":[null],"names":["sortCx","AriaLink","AriaButton","GoogleLogo","FacebookLogo","AppleLogo","TwitterLogo","FigmaLogoOutlined","FigmaLogo","DribbleLogo","_jsxs","cx","_jsx"],"mappings":";;;;;;;AAQO,MAAM,MAAM,GAAGA,SAAM,CAAC;AAC3B,IAAA,MAAM,EAAE;AACN,QAAA,IAAI,EAAE,yVAAyV;AAC/V,QAAA,IAAI,EAAE,qDAAqD;AAC5D,KAAA;AAED,IAAA,KAAK,EAAE;AACL,QAAA,EAAE,EAAE;AACF,YAAA,IAAI,EAAE,gFAAgF;AACtF,YAAA,IAAI,EAAE,QAAQ;AACf,SAAA;AACD,QAAA,EAAE,EAAE;AACF,YAAA,IAAI,EAAE,gFAAgF;AACtF,YAAA,IAAI,EAAE,QAAQ;AACf,SAAA;AACF,KAAA;AAED,IAAA,MAAM,EAAE;AACN,QAAA,IAAI,EAAE;AACJ,YAAA,IAAI,EAAE,mIAAmI;AACzI,YAAA,IAAI,EAAE,yDAAyD;AAChE,SAAA;AACD,QAAA,KAAK,EAAE;AACL,YAAA,IAAI,EAAE,0KAA0K;AAChL,YAAA,IAAI,EAAE,EAAE;AACT,SAAA;AAED,QAAA,QAAQ,EAAE;AACR,YAAA,IAAI,EAAE,iMAAiM;AACvM,YAAA,IAAI,EAAE,EAAE;AACT,SAAA;AAED,QAAA,OAAO,EAAE;AACP,YAAA,IAAI,EAAE,iMAAiM;AACvM,YAAA,IAAI,EAAE,EAAE;AACT,SAAA;AACF,KAAA;AACF,CAAA;
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../src/components/atoms/SocialButton/index.tsx"],"sourcesContent":[null],"names":["sortCx","AriaLink","AriaButton","GoogleLogo","FacebookLogo","AppleLogo","TwitterLogo","FigmaLogoOutlined","FigmaLogo","DribbleLogo","_jsxs","cx","_jsx"],"mappings":";;;;;;;AAQO,MAAM,MAAM,GAAGA,SAAM,CAAC;AAC3B,IAAA,MAAM,EAAE;AACN,QAAA,IAAI,EAAE,yVAAyV;AAC/V,QAAA,IAAI,EAAE,qDAAqD;AAC5D,KAAA;AAED,IAAA,KAAK,EAAE;AACL,QAAA,EAAE,EAAE;AACF,YAAA,IAAI,EAAE,gFAAgF;AACtF,YAAA,IAAI,EAAE,QAAQ;AACf,SAAA;AACD,QAAA,EAAE,EAAE;AACF,YAAA,IAAI,EAAE,gFAAgF;AACtF,YAAA,IAAI,EAAE,QAAQ;AACf,SAAA;AACF,KAAA;AAED,IAAA,MAAM,EAAE;AACN,QAAA,IAAI,EAAE;AACJ,YAAA,IAAI,EAAE,mIAAmI;AACzI,YAAA,IAAI,EAAE,yDAAyD;AAChE,SAAA;AACD,QAAA,KAAK,EAAE;AACL,YAAA,IAAI,EAAE,0KAA0K;AAChL,YAAA,IAAI,EAAE,EAAE;AACT,SAAA;AAED,QAAA,QAAQ,EAAE;AACR,YAAA,IAAI,EAAE,iMAAiM;AACvM,YAAA,IAAI,EAAE,EAAE;AACT,SAAA;AAED,QAAA,OAAO,EAAE;AACP,YAAA,IAAI,EAAE,iMAAiM;AACvM,YAAA,IAAI,EAAE,EAAE;AACT,SAAA;AACF,KAAA;AACF,CAAA;AAoBD;;;;;;AAMG;AACI,M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48,6 +48,13 @@ interface LinkProps extends CommonProps, DetailedHTMLProps<Omit<AnchorHTMLAttrib
|
|
|
48
48
|
routerOptions?: AriaLinkProps['routerOptions'];
|
|
49
49
|
}
|
|
50
50
|
export type SocialButtonProps = ButtonProps | LinkProps;
|
|
51
|
+
/**
|
|
52
|
+
* A sign-in button for social authentication providers. Renders a branded logo
|
|
53
|
+
* and optional label for Google, Facebook, Apple, Twitter, Figma, or Dribble.
|
|
54
|
+
* Supports button and link semantics, three display themes, and two sizes.
|
|
55
|
+
*
|
|
56
|
+
* @summary renders a branded social auth sign-in button
|
|
57
|
+
*/
|
|
51
58
|
export declare const SocialButton: ({ size, theme, social, className, children, disabled, ...otherProps }: SocialButtonProps) => import("react").JSX.Element;
|
|
52
59
|
export {};
|
|
53
60
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/SocialButton/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC3F,OAAO,KAAK,EAAE,WAAW,IAAI,eAAe,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAIxG,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCjB,CAAC;AAEH,UAAU,WAAW;IACnB,MAAM,EAAE,QAAQ,GAAG,UAAU,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IAC1E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;IACnC,IAAI,CAAC,EAAE,MAAM,OAAO,MAAM,CAAC,KAAK,CAAC;CAClC;AAED,UAAU,WAAY,SAAQ,WAAW,EAAE,iBAAiB,CAAC,IAAI,CAAC,oBAAoB,CA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,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;CAChC;AAED,UAAU,SAAU,SAAQ,WAAW,EAAE,iBAAiB,CAAC,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC,EAAE,iBAAiB,CAAC;IACnI,qDAAqD;IACrD,aAAa,CAAC,EAAE,aAAa,CAAC,eAAe,CAAC,CAAC;CAChD;AAED,MAAM,MAAM,iBAAiB,GAAG,WAAW,GAAG,SAAS,CAAC;AAExD;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,GAAI,uEAAwF,iBAAiB,gCA+ErI,CAAC"}
|
|
@@ -37,6 +37,13 @@ const styles = sortCx({
|
|
|
37
37
|
},
|
|
38
38
|
},
|
|
39
39
|
});
|
|
40
|
+
/**
|
|
41
|
+
* A sign-in button for social authentication providers. Renders a branded logo
|
|
42
|
+
* and optional label for Google, Facebook, Apple, Twitter, Figma, or Dribble.
|
|
43
|
+
* Supports button and link semantics, three display themes, and two sizes.
|
|
44
|
+
*
|
|
45
|
+
* @summary renders a branded social auth sign-in button
|
|
46
|
+
*/
|
|
40
47
|
const SocialButton = ({ size = 'lg', theme = 'brand', social, className, children, disabled, ...otherProps }) => {
|
|
41
48
|
const href = 'href' in otherProps ? otherProps.href : undefined;
|
|
42
49
|
const Component = href ? Link : Button;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/atoms/SocialButton/index.tsx"],"sourcesContent":[null],"names":["AriaLink","AriaButton","_jsxs","_jsx"],"mappings":";;;;;AAQO,MAAM,MAAM,GAAG,MAAM,CAAC;AAC3B,IAAA,MAAM,EAAE;AACN,QAAA,IAAI,EAAE,yVAAyV;AAC/V,QAAA,IAAI,EAAE,qDAAqD;AAC5D,KAAA;AAED,IAAA,KAAK,EAAE;AACL,QAAA,EAAE,EAAE;AACF,YAAA,IAAI,EAAE,gFAAgF;AACtF,YAAA,IAAI,EAAE,QAAQ;AACf,SAAA;AACD,QAAA,EAAE,EAAE;AACF,YAAA,IAAI,EAAE,gFAAgF;AACtF,YAAA,IAAI,EAAE,QAAQ;AACf,SAAA;AACF,KAAA;AAED,IAAA,MAAM,EAAE;AACN,QAAA,IAAI,EAAE;AACJ,YAAA,IAAI,EAAE,mIAAmI;AACzI,YAAA,IAAI,EAAE,yDAAyD;AAChE,SAAA;AACD,QAAA,KAAK,EAAE;AACL,YAAA,IAAI,EAAE,0KAA0K;AAChL,YAAA,IAAI,EAAE,EAAE;AACT,SAAA;AAED,QAAA,QAAQ,EAAE;AACR,YAAA,IAAI,EAAE,iMAAiM;AACvM,YAAA,IAAI,EAAE,EAAE;AACT,SAAA;AAED,QAAA,OAAO,EAAE;AACP,YAAA,IAAI,EAAE,iMAAiM;AACvM,YAAA,IAAI,EAAE,EAAE;AACT,SAAA;AACF,KAAA;AACF,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/atoms/SocialButton/index.tsx"],"sourcesContent":[null],"names":["AriaLink","AriaButton","_jsxs","_jsx"],"mappings":";;;;;AAQO,MAAM,MAAM,GAAG,MAAM,CAAC;AAC3B,IAAA,MAAM,EAAE;AACN,QAAA,IAAI,EAAE,yVAAyV;AAC/V,QAAA,IAAI,EAAE,qDAAqD;AAC5D,KAAA;AAED,IAAA,KAAK,EAAE;AACL,QAAA,EAAE,EAAE;AACF,YAAA,IAAI,EAAE,gFAAgF;AACtF,YAAA,IAAI,EAAE,QAAQ;AACf,SAAA;AACD,QAAA,EAAE,EAAE;AACF,YAAA,IAAI,EAAE,gFAAgF;AACtF,YAAA,IAAI,EAAE,QAAQ;AACf,SAAA;AACF,KAAA;AAED,IAAA,MAAM,EAAE;AACN,QAAA,IAAI,EAAE;AACJ,YAAA,IAAI,EAAE,mIAAmI;AACzI,YAAA,IAAI,EAAE,yDAAyD;AAChE,SAAA;AACD,QAAA,KAAK,EAAE;AACL,YAAA,IAAI,EAAE,0KAA0K;AAChL,YAAA,IAAI,EAAE,EAAE;A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O,CAAC;qBAChE,KAAK,KAAK,OAAO,KAAK,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,UAAU,IAAI,MAAM,KAAK,OAAO,IAAI,MAAM,KAAK,SAAS,CAAC,CAAC;AACnH,oBAAA,SAAS,EAAA,CAEX,EAED,QAAQ,CAAA,EAAA,CACC;AAEhB;;;;"}
|
|
@@ -10,7 +10,7 @@ interface ToggleBaseProps {
|
|
|
10
10
|
isDisabled?: boolean;
|
|
11
11
|
}
|
|
12
12
|
export declare const ToggleBase: ({ className, isHovered, isDisabled, isFocusVisible, isSelected, slim, size }: ToggleBaseProps) => import("react").JSX.Element;
|
|
13
|
-
interface ToggleProps extends AriaSwitchProps {
|
|
13
|
+
export interface ToggleProps extends AriaSwitchProps {
|
|
14
14
|
size?: 'sm' | 'md';
|
|
15
15
|
label?: string;
|
|
16
16
|
hint?: ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Toggle/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAG5E,UAAU,eAAe;IACvB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,UAAU,GAAI,8EAAqF,eAAe,gCA0D9H,CAAC;AAiBF,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Toggle/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAG5E,UAAU,eAAe;IACvB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,UAAU,GAAI,8EAAqF,eAAe,gCA0D9H,CAAC;AAiBF,MAAM,WAAW,WAAY,SAAQ,eAAe;IAClD,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED;;;;GAIG;AACH,eAAO,MAAM,MAAM,GAAI,4DAAmE,WAAW,gCAyCpG,CAAC"}
|
|
@@ -4,6 +4,12 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
4
4
|
var cx = require('@flipdish/ui-library/utilities/cx');
|
|
5
5
|
var reactAriaComponents = require('react-aria-components');
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* Contextual label that appears on hover or keyboard focus to provide
|
|
9
|
+
* supplementary information about a trigger element.
|
|
10
|
+
*
|
|
11
|
+
* @summary contextual label shown on hover or keyboard focus
|
|
12
|
+
*/
|
|
7
13
|
const Tooltip = ({ title, description, children, arrow = false, delay = 300, closeDelay = 0, trigger, isDisabled, isOpen, defaultOpen, offset = 6, crossOffset, placement = 'top', onOpenChange, ...tooltipProps }) => {
|
|
8
14
|
const isTopOrBottomLeft = ['top left', 'top end', 'bottom left', 'bottom end'].includes(placement);
|
|
9
15
|
const isTopOrBottomRight = ['top right', 'top start', 'bottom right', 'bottom start'].includes(placement);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../src/components/atoms/Tooltip/index.tsx"],"sourcesContent":[null],"names":["_jsxs","AriaTooltipTrigger","_jsx","AriaTooltip","cx","AriaOverlayArrow","AriaButton"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../src/components/atoms/Tooltip/index.tsx"],"sourcesContent":[null],"names":["_jsxs","AriaTooltipTrigger","_jsx","AriaTooltip","cx","AriaOverlayArrow","AriaButton"],"mappings":";;;;;;AAuCA;;;;;AAKG;MACU,OAAO,GAAG,CAAC,EACtB,KAAK,EACL,WAAW,EACX,QAAQ,EACR,KAAK,GAAG,KAAK,EACb,KAAK,GAAG,GAAG,EACX,UAAU,GAAG,CAAC,EACd,OAAO,EACP,UAAU,EACV,MAAM,EACN,WAAW,EACX,MAAM,GAAG,CAAC,EACV,WAAW,EACX,SAAS,GAAG,KAAK,EACjB,YAAY,EACZ,GAAG,YAAY,EACF,KAAI;AACjB,IAAA,MAAM,iBAAiB,GAAG,CAAC,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC;AAClG,IAAA,MAAM,kBAAkB,GAAG,CAAC,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,cAAc,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC;;IAEzG,MAAM,qBAAqB,GAAG,iBAAiB,GAAG,GAAG,GAAG,kBAAkB,GAAG,EAAE,GAAG,CAAC;AAEnF,IAAA,QACEA,eAAA,CAACC,kCAAkB,IAAO,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,YAAY,EAAA,QAAA,EAAA,CAChG,QAAQ,EAETC,cAAA,CAACC,2BAAW,EAAA,EAAA,GACN,YAAY,EAChB,MAAM,E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AEjB;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import type { ButtonProps as AriaButtonProps, TooltipProps as AriaTooltipProps, TooltipTriggerComponentProps as AriaTooltipTriggerComponentProps } from 'react-aria-components';
|
|
3
|
-
interface TooltipProps extends AriaTooltipTriggerComponentProps, Omit<AriaTooltipProps, 'children'> {
|
|
3
|
+
export interface TooltipProps extends AriaTooltipTriggerComponentProps, Omit<AriaTooltipProps, 'children'> {
|
|
4
4
|
/**
|
|
5
5
|
* The title of the tooltip.
|
|
6
6
|
*/
|
|
@@ -22,6 +22,12 @@ interface TooltipProps extends AriaTooltipTriggerComponentProps, Omit<AriaToolti
|
|
|
22
22
|
*/
|
|
23
23
|
delay?: number;
|
|
24
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Contextual label that appears on hover or keyboard focus to provide
|
|
27
|
+
* supplementary information about a trigger element.
|
|
28
|
+
*
|
|
29
|
+
* @summary contextual label shown on hover or keyboard focus
|
|
30
|
+
*/
|
|
25
31
|
export declare const Tooltip: ({ title, description, children, arrow, delay, closeDelay, trigger, isDisabled, isOpen, defaultOpen, offset, crossOffset, placement, onOpenChange, ...tooltipProps }: TooltipProps) => import("react").JSX.Element;
|
|
26
32
|
interface TooltipTriggerProps extends AriaButtonProps {
|
|
27
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Tooltip/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EACV,WAAW,IAAI,eAAe,EAC9B,YAAY,IAAI,gBAAgB,EAChC,4BAA4B,IAAI,gCAAgC,EACjE,MAAM,uBAAuB,CAAC;AAQ/B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Tooltip/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EACV,WAAW,IAAI,eAAe,EAC9B,YAAY,IAAI,gBAAgB,EAChC,4BAA4B,IAAI,gCAAgC,EACjE,MAAM,uBAAuB,CAAC;AAQ/B,MAAM,WAAW,YAAa,SAAQ,gCAAgC,EAAE,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC;IACxG;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;GAKG;AACH,eAAO,MAAM,OAAO,GAAI,qKAgBrB,YAAY,gCAiDd,CAAC;AAEF,UAAU,mBAAoB,SAAQ,eAAe;CAAG;AAExD,eAAO,MAAM,cAAc,GAAI,yCAAyC,mBAAmB,gCAS1F,CAAC"}
|
|
@@ -2,6 +2,12 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { cx } from '@flipdish/ui-library/utilities/cx';
|
|
3
3
|
import { TooltipTrigger as TooltipTrigger$1, Tooltip as Tooltip$1, OverlayArrow, Button } from 'react-aria-components';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Contextual label that appears on hover or keyboard focus to provide
|
|
7
|
+
* supplementary information about a trigger element.
|
|
8
|
+
*
|
|
9
|
+
* @summary contextual label shown on hover or keyboard focus
|
|
10
|
+
*/
|
|
5
11
|
const Tooltip = ({ title, description, children, arrow = false, delay = 300, closeDelay = 0, trigger, isDisabled, isOpen, defaultOpen, offset = 6, crossOffset, placement = 'top', onOpenChange, ...tooltipProps }) => {
|
|
6
12
|
const isTopOrBottomLeft = ['top left', 'top end', 'bottom left', 'bottom end'].includes(placement);
|
|
7
13
|
const isTopOrBottomRight = ['top right', 'top start', 'bottom right', 'bottom start'].includes(placement);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/atoms/Tooltip/index.tsx"],"sourcesContent":[null],"names":["_jsxs","AriaTooltipTrigger","_jsx","AriaTooltip","AriaOverlayArrow","AriaButton"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/atoms/Tooltip/index.tsx"],"sourcesContent":[null],"names":["_jsxs","AriaTooltipTrigger","_jsx","AriaTooltip","AriaOverlayArrow","AriaButton"],"mappings":";;;;AAuCA;;;;;AAKG;MACU,OAAO,GAAG,CAAC,EACtB,KAAK,EACL,WAAW,EACX,QAAQ,EACR,KAAK,GAAG,KAAK,EACb,KAAK,GAAG,GAAG,EACX,UAAU,GAAG,CAAC,EACd,OAAO,EACP,UAAU,EACV,MAAM,EACN,WAAW,EACX,MAAM,GAAG,CAAC,EACV,WAAW,EACX,SAAS,GAAG,KAAK,EACjB,YAAY,EACZ,GAAG,YAAY,EACF,KAAI;AACjB,IAAA,MAAM,iBAAiB,GAAG,CAAC,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC;AAClG,IAAA,MAAM,kBAAkB,GAAG,CAAC,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,cAAc,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC;;IAEzG,MAAM,qBAAqB,GAAG,iBAAiB,GAAG,GAAG,GAAG,kBAAkB,GAAG,EAAE,GAAG,CAAC;AAEnF,IAAA,QACEA,IAAA,CAACC,gBAAkB,IAAO,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,YAAY,EAAA,QAAA,EAAA,CAChG,QAAQ,EAETC,GAAA,CAACC,SAAW,EAAA,EAAA,GACN,YAAY,EAChB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,WAAW,IAAI,qBA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fg-quaternary shadow-xs-skeuomorphic ring-1 ring-primary ring-inset hover:bg-primary_hover hover:text-fg-quaternary_hover disabled:shadow-xs',
|
|
12
12
|
tertiary: 'text-fg-quaternary hover:bg-primary_hover hover:text-fg-quaternary_hover',
|
|
13
13
|
};
|
|
14
|
+
/**
|
|
15
|
+
* Compact icon-only button for toolbar, table, and card actions that should not
|
|
16
|
+
* compete visually with primary calls-to-action. Renders as a `<button>` by
|
|
17
|
+
* default; pass `href` to render as an `<a>` tag.
|
|
18
|
+
*
|
|
19
|
+
* @summary compact icon-only button for secondary and tertiary toolbar actions
|
|
20
|
+
*/
|
|
14
21
|
const ButtonUtility = ({ tooltip, className, isDisabled, icon: Icon, size = 'sm', color = 'secondary', tooltipPlacement = 'top', ...otherProps }) => {
|
|
15
22
|
const href = 'href' in otherProps ? otherProps.href : undefined;
|
|
16
23
|
const Component = href ? reactAriaComponents.Link : reactAriaComponents.Button;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../src/components/atoms/UtilityButton/index.tsx"],"sourcesContent":[null],"names":["AriaLink","AriaButton","_jsxs","cx","isReactComponent","_jsx","isValidElement","Tooltip"],"mappings":";;;;;;;;;AAUO,MAAM,MAAM,GAAG;AACpB,IAAA,SAAS,EACP,8JAA8J;AAChK,IAAA,QAAQ,EAAE,0EAA0E;;
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../src/components/atoms/UtilityButton/index.tsx"],"sourcesContent":[null],"names":["AriaLink","AriaButton","_jsxs","cx","isReactComponent","_jsx","isValidElement","Tooltip"],"mappings":";;;;;;;;;AAUO,MAAM,MAAM,GAAG;AACpB,IAAA,SAAS,EACP,8JAA8J;AAChK,IAAA,QAAQ,EAAE,0EAA0E;;AA0CtF;;;;;;AAMG;AACI,MAAM,aAAa,GAAG,CAAC,EAC5B,OAAO,EACP,SAAS,EACT,UAAU,EACV,IAAI,EAAE,IAAI,EACV,IAAI,GAAG,IAAI,EACX,KAAK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GAAG,CAAC,EAAA,QAAA,EACxG,OAAO,EAAA,CACA;IAEd;AAEA,IAAA,OAAO,OAAO;AAChB;;;;;"}
|
|
@@ -39,6 +39,13 @@ interface LinkProps extends CommonProps, DetailedHTMLProps<Omit<AnchorHTMLAttrib
|
|
|
39
39
|
}
|
|
40
40
|
/** Union type of button and link props */
|
|
41
41
|
export type Props = ButtonProps | LinkProps;
|
|
42
|
+
/**
|
|
43
|
+
* Compact icon-only button for toolbar, table, and card actions that should not
|
|
44
|
+
* compete visually with primary calls-to-action. Renders as a `<button>` by
|
|
45
|
+
* default; pass `href` to render as an `<a>` tag.
|
|
46
|
+
*
|
|
47
|
+
* @summary compact icon-only button for secondary and tertiary toolbar actions
|
|
48
|
+
*/
|
|
42
49
|
export declare const ButtonUtility: ({ tooltip, className, isDisabled, icon: Icon, size, color, tooltipPlacement, ...otherProps }: Props) => import("react").JSX.Element;
|
|
43
50
|
export {};
|
|
44
51
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/UtilityButton/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE1G,OAAO,KAAK,EAAE,WAAW,IAAI,eAAe,EAAE,SAAS,IAAI,aAAa,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGnH,eAAO,MAAM,MAAM;;;CAIlB,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,qDAAqD;IACrD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,qCAAqC;IACrC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,sCAAsC;IACtC,KAAK,CAAC,EAAE,WAAW,GAAG,UAAU,CAAC;IACjC,wCAAwC;IACxC,IAAI,CAAC,EAAE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AAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,sCAAsC;IACtC,KAAK,CAAC,EAAE,WAAW,GAAG,UAAU,CAAC;IACjC,wCAAwC;IACxC,IAAI,CAAC,EAAE,EAAE,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,SAAS,CAAC;IAC9C,2DAA2D;IAC3D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mCAAmC;IACnC,gBAAgB,CAAC,EAAE,SAAS,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,WACf,SAAQ,WAAW,EACjB,iBAAiB,CAAC,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC,EAAE,iBAAiB,CAAC;IACvG,yCAAyC;IACzC,IAAI,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;CAChC;AAED;;GAEG;AACH,UAAU,SAAU,SAAQ,WAAW,EAAE,iBAAiB,CAAC,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC,EAAE,iBAAiB,CAAC;IACnI,qDAAqD;IACrD,aAAa,CAAC,EAAE,aAAa,CAAC,eAAe,CAAC,CAAC;CAChD;AAED,0CAA0C;AAC1C,MAAM,MAAM,KAAK,GAAG,WAAW,GAAG,SAAS,CAAC;AAE5C;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,GAAI,8FAS3B,KAAK,gCAuDP,CAAC"}
|
|
@@ -9,6 +9,13 @@ const styles = {
|
|
|
9
9
|
secondary: 'bg-primary text-fg-quaternary shadow-xs-skeuomorphic ring-1 ring-primary ring-inset hover:bg-primary_hover hover:text-fg-quaternary_hover disabled:shadow-xs',
|
|
10
10
|
tertiary: 'text-fg-quaternary hover:bg-primary_hover hover:text-fg-quaternary_hover',
|
|
11
11
|
};
|
|
12
|
+
/**
|
|
13
|
+
* Compact icon-only button for toolbar, table, and card actions that should not
|
|
14
|
+
* compete visually with primary calls-to-action. Renders as a `<button>` by
|
|
15
|
+
* default; pass `href` to render as an `<a>` tag.
|
|
16
|
+
*
|
|
17
|
+
* @summary compact icon-only button for secondary and tertiary toolbar actions
|
|
18
|
+
*/
|
|
12
19
|
const ButtonUtility = ({ tooltip, className, isDisabled, icon: Icon, size = 'sm', color = 'secondary', tooltipPlacement = 'top', ...otherProps }) => {
|
|
13
20
|
const href = 'href' in otherProps ? otherProps.href : undefined;
|
|
14
21
|
const Component = href ? Link : Button;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/atoms/UtilityButton/index.tsx"],"sourcesContent":[null],"names":["AriaLink","AriaButton","_jsxs","_jsx"],"mappings":";;;;;;;AAUO,MAAM,MAAM,GAAG;AACpB,IAAA,SAAS,EACP,8JAA8J;AAChK,IAAA,QAAQ,EAAE,0EAA0E;;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/atoms/UtilityButton/index.tsx"],"sourcesContent":[null],"names":["AriaLink","AriaButton","_jsxs","_jsx"],"mappings":";;;;;;;AAUO,MAAM,MAAM,GAAG;AACpB,IAAA,SAAS,EACP,8JAA8J;AAChK,IAAA,QAAQ,EAAE,0EAA0E;;AA0CtF;;;;;;AAMG;AACI,MAAM,aAAa,GAAG,CAAC,EAC5B,OAAO,EACP,SAAS,EACT,UAAU,EACV,IAAI,EAAE,IAAI,EACV,IAAI,GAAG,IAAI,EACX,KAAK,GAAG,WAAW,EACnB,gBAAgB,GAAG,KAAK,EACxB,GAAG,UAAU,EACP,KAAI;AACV,IAAA,MAAM,IAAI,GAAG,MAAM,IAAI,UAAU,GAAG,UAAU,CAAC,IAAI,GAAG,SAAS;IAC/D,MAAM,SAAS,GAAG,IAAI,GAAGA,IAAQ,GAAGC,MAAU;IAE9C,IAAI,KAAK,GAAG,EAAE;IAEd,IAAI,IAAI,EAAE;AACR,QAAA,KAAK,GAAG;AACN,YAAA,GAAG,UAAU;YAEb,IAAI,EAAE,UAAU,GAAG,SAAS,GAAG,IAAI;;;;AAKnC,YAAA,IAAI,UAAU,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;SACnE;IACH;SAAO;AACL,QAAA,KAAK,GAAG;AACN,YAAA,GAAG,UAAU;AAEb,YAAA,IAAI,EAAE,UAAU,CAAC,IAAI,IAAI,QAAQ;YACjC,UAAU;SACX;IACH;AAEA,IAAA,MAAM,OAAO,IACXC,KAAC,SAAS,EAAA,EAAA,YAAA,EACI,OAAO,EAAA,GACf,KAAK,EACT,SAAS,EAAE,EAAE,CACX,4PAA4P,EAC5P,MAAM,CAAC,KAAK,CAAC;;AAGb,QAAA,kHAAkH,EAClH,IAAI,KAAK,IAAI,GAAG,oBAAoB,GAAG,oBAAoB,EAE3D,SAAS,CACV,EAAA,QAAA,EAAA,CAEA,gBAAgB,CAAC,IAAI,CAAC,IAAIC,GAAA,CAAC,IAAI,EAAA,EAAA,WAAA,EAAA,IAAA,EAAA,CAAa,EAC5C,cAAc,CAAC,IAAI,CAAC,IAAI,IAAI,CAAA,EAAA,CACnB,CACb;IAED,IAAI,OAAO,EAAE;AACX,QAAA,QACEA,GAAA,CAAC,OAAO,EAAA,EAAC,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,KAAK,IAAI,GAAG,CAAC,GAAG,CAAC,EAAA,QAAA,EACxG,OAAO,EAAA,CACA;IAEd;AAEA,IAAA,OAAO,OAAO;AAChB;;;;"}
|
|
@@ -12,9 +12,9 @@ const useTheme = () => {
|
|
|
12
12
|
return context;
|
|
13
13
|
};
|
|
14
14
|
/**
|
|
15
|
-
* @summary app-wide light/dark/system theme provider that syncs the root
|
|
15
|
+
* @summary app-wide light/dark/system theme provider that syncs the root `data-theme` attribute
|
|
16
16
|
*/
|
|
17
|
-
const ThemeProvider = ({ children, defaultTheme = 'system', storageKey = 'ui-theme',
|
|
17
|
+
const ThemeProvider = ({ children, defaultTheme = 'system', storageKey = 'ui-theme', themeModeOverride }) => {
|
|
18
18
|
const [theme, setTheme] = React.useState(() => {
|
|
19
19
|
if (typeof window !== 'undefined') {
|
|
20
20
|
const savedTheme = localStorage.getItem(storageKey);
|
|
@@ -22,31 +22,37 @@ const ThemeProvider = ({ children, defaultTheme = 'system', storageKey = 'ui-the
|
|
|
22
22
|
}
|
|
23
23
|
return defaultTheme;
|
|
24
24
|
});
|
|
25
|
+
const activeTheme = themeModeOverride ?? theme;
|
|
25
26
|
React.useEffect(() => {
|
|
27
|
+
const resolveTheme = (value) => value === 'system' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : value;
|
|
26
28
|
const applyTheme = () => {
|
|
27
29
|
const root = window.document.documentElement;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
// The token layer + Tailwind `dark:` variant cascade on `[data-theme="dark"]`
|
|
31
|
+
// (see @flipdish/ui-tokens + src/styles.css), so drive that attribute here.
|
|
32
|
+
root.setAttribute('data-theme', resolveTheme(activeTheme));
|
|
33
|
+
// Controlled usage (e.g. Storybook) is ephemeral — don't touch persisted state.
|
|
34
|
+
if (themeModeOverride) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
if (activeTheme === 'system') {
|
|
31
38
|
localStorage.removeItem(storageKey);
|
|
32
39
|
}
|
|
33
40
|
else {
|
|
34
|
-
|
|
35
|
-
localStorage.setItem(storageKey, theme);
|
|
41
|
+
localStorage.setItem(storageKey, activeTheme);
|
|
36
42
|
}
|
|
37
43
|
};
|
|
38
44
|
applyTheme();
|
|
39
45
|
// Listen for system theme changes
|
|
40
46
|
const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
|
|
41
47
|
const handleChange = () => {
|
|
42
|
-
if (
|
|
48
|
+
if (activeTheme === 'system') {
|
|
43
49
|
applyTheme();
|
|
44
50
|
}
|
|
45
51
|
};
|
|
46
52
|
mediaQuery.addEventListener('change', handleChange);
|
|
47
53
|
return () => mediaQuery.removeEventListener('change', handleChange);
|
|
48
|
-
}, [
|
|
49
|
-
return jsxRuntime.jsx(ThemeContext.Provider, { value: { theme, setTheme }, children: children });
|
|
54
|
+
}, [activeTheme, themeModeOverride, storageKey]);
|
|
55
|
+
return jsxRuntime.jsx(ThemeContext.Provider, { value: { theme: activeTheme, setTheme }, children: children });
|
|
50
56
|
};
|
|
51
57
|
|
|
52
58
|
exports.ThemeProvider = ThemeProvider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/providers/ThemeProvider/index.tsx"],"sourcesContent":[null],"names":["createContext","useContext","useState","useEffect","_jsx"],"mappings":";;;;;AAUA,MAAM,YAAY,GAAGA,mBAAa,CAA+B,SAAS,CAAC;AAEpE,MAAM,QAAQ,GAAG,MAAuB;AAC7C,IAAA,MAAM,OAAO,GAAGC,gBAAU,CAAC,YAAY,CAAC;AAExC,IAAA,IAAI,OAAO,KAAK,SAAS,EAAE;AACzB,QAAA,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC;IACjE;AAEA,IAAA,OAAO,OAAO;AAChB;AAqBA;;AAEG;
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/providers/ThemeProvider/index.tsx"],"sourcesContent":[null],"names":["createContext","useContext","useState","useEffect","_jsx"],"mappings":";;;;;AAUA,MAAM,YAAY,GAAGA,mBAAa,CAA+B,SAAS,CAAC;AAEpE,MAAM,QAAQ,GAAG,MAAuB;AAC7C,IAAA,MAAM,OAAO,GAAGC,gBAAU,CAAC,YAAY,CAAC;AAExC,IAAA,IAAI,OAAO,KAAK,SAAS,EAAE;AACzB,QAAA,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC;IACjE;AAEA,IAAA,OAAO,OAAO;AAChB;AAqBA;;AAEG;AACI,MAAM,aAAa,GAAG,CAAC,EAAE,QAAQ,EAAE,YAAY,GAAG,QAAQ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OAAO,MAAM,UAAU,CAAC,mBAAmB,CAAC,QAAQ,EAAE,YAAY,CAAC;IACrE,CAAC,EAAE,CAAC,WAAW,EAAE,iBAAiB,EAAE,UAAU,CAAC,CAAC;AAEhD,IAAA,OAAOC,eAAC,YAAY,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,EAAA,QAAA,EAAG,QAAQ,GAAyB;AAC3G;;;;;"}
|
|
@@ -7,11 +7,6 @@ interface ThemeContextType {
|
|
|
7
7
|
export declare const useTheme: () => ThemeContextType;
|
|
8
8
|
interface ThemeProviderProps {
|
|
9
9
|
children: ReactNode;
|
|
10
|
-
/**
|
|
11
|
-
* The class to add to the root element when the theme is dark
|
|
12
|
-
* @default "dark-mode"
|
|
13
|
-
*/
|
|
14
|
-
darkModeClass?: string;
|
|
15
10
|
/**
|
|
16
11
|
* The default theme to use if no theme is stored in localStorage
|
|
17
12
|
* @default "system"
|
|
@@ -22,10 +17,15 @@ interface ThemeProviderProps {
|
|
|
22
17
|
* @default "ui-theme"
|
|
23
18
|
*/
|
|
24
19
|
storageKey?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Controlled theme override. When set, the provider mirrors this value instead of its
|
|
22
|
+
* internal state and skips localStorage persistence — useful for Storybook toolbars or tests.
|
|
23
|
+
*/
|
|
24
|
+
themeModeOverride?: 'light' | 'dark';
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
|
-
* @summary app-wide light/dark/system theme provider that syncs the root
|
|
27
|
+
* @summary app-wide light/dark/system theme provider that syncs the root `data-theme` attribute
|
|
28
28
|
*/
|
|
29
|
-
export declare const ThemeProvider: ({ children, defaultTheme, storageKey,
|
|
29
|
+
export declare const ThemeProvider: ({ children, defaultTheme, storageKey, themeModeOverride }: ThemeProviderProps) => import("react").JSX.Element;
|
|
30
30
|
export {};
|
|
31
31
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/ThemeProvider/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,KAAK,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEzC,UAAU,gBAAgB;IACxB,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAClC;AAID,eAAO,MAAM,QAAQ,QAAO,gBAQ3B,CAAC;AAEF,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/ThemeProvider/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,KAAK,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEzC,UAAU,gBAAgB;IACxB,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAClC;AAID,eAAO,MAAM,QAAQ,QAAO,gBAQ3B,CAAC;AAEF,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CACtC;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,GAAI,2DAAmF,kBAAkB,gCAkDlI,CAAC"}
|
|
@@ -10,9 +10,9 @@ const useTheme = () => {
|
|
|
10
10
|
return context;
|
|
11
11
|
};
|
|
12
12
|
/**
|
|
13
|
-
* @summary app-wide light/dark/system theme provider that syncs the root
|
|
13
|
+
* @summary app-wide light/dark/system theme provider that syncs the root `data-theme` attribute
|
|
14
14
|
*/
|
|
15
|
-
const ThemeProvider = ({ children, defaultTheme = 'system', storageKey = 'ui-theme',
|
|
15
|
+
const ThemeProvider = ({ children, defaultTheme = 'system', storageKey = 'ui-theme', themeModeOverride }) => {
|
|
16
16
|
const [theme, setTheme] = useState(() => {
|
|
17
17
|
if (typeof window !== 'undefined') {
|
|
18
18
|
const savedTheme = localStorage.getItem(storageKey);
|
|
@@ -20,31 +20,37 @@ const ThemeProvider = ({ children, defaultTheme = 'system', storageKey = 'ui-the
|
|
|
20
20
|
}
|
|
21
21
|
return defaultTheme;
|
|
22
22
|
});
|
|
23
|
+
const activeTheme = themeModeOverride ?? theme;
|
|
23
24
|
useEffect(() => {
|
|
25
|
+
const resolveTheme = (value) => value === 'system' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : value;
|
|
24
26
|
const applyTheme = () => {
|
|
25
27
|
const root = window.document.documentElement;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
// The token layer + Tailwind `dark:` variant cascade on `[data-theme="dark"]`
|
|
29
|
+
// (see @flipdish/ui-tokens + src/styles.css), so drive that attribute here.
|
|
30
|
+
root.setAttribute('data-theme', resolveTheme(activeTheme));
|
|
31
|
+
// Controlled usage (e.g. Storybook) is ephemeral — don't touch persisted state.
|
|
32
|
+
if (themeModeOverride) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
if (activeTheme === 'system') {
|
|
29
36
|
localStorage.removeItem(storageKey);
|
|
30
37
|
}
|
|
31
38
|
else {
|
|
32
|
-
|
|
33
|
-
localStorage.setItem(storageKey, theme);
|
|
39
|
+
localStorage.setItem(storageKey, activeTheme);
|
|
34
40
|
}
|
|
35
41
|
};
|
|
36
42
|
applyTheme();
|
|
37
43
|
// Listen for system theme changes
|
|
38
44
|
const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
|
|
39
45
|
const handleChange = () => {
|
|
40
|
-
if (
|
|
46
|
+
if (activeTheme === 'system') {
|
|
41
47
|
applyTheme();
|
|
42
48
|
}
|
|
43
49
|
};
|
|
44
50
|
mediaQuery.addEventListener('change', handleChange);
|
|
45
51
|
return () => mediaQuery.removeEventListener('change', handleChange);
|
|
46
|
-
}, [
|
|
47
|
-
return jsx(ThemeContext.Provider, { value: { theme, setTheme }, children: children });
|
|
52
|
+
}, [activeTheme, themeModeOverride, storageKey]);
|
|
53
|
+
return jsx(ThemeContext.Provider, { value: { theme: activeTheme, setTheme }, children: children });
|
|
48
54
|
};
|
|
49
55
|
|
|
50
56
|
export { ThemeProvider, useTheme };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/providers/ThemeProvider/index.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;AAUA,MAAM,YAAY,GAAG,aAAa,CAA+B,SAAS,CAAC;AAEpE,MAAM,QAAQ,GAAG,MAAuB;AAC7C,IAAA,MAAM,OAAO,GAAG,UAAU,CAAC,YAAY,CAAC;AAExC,IAAA,IAAI,OAAO,KAAK,SAAS,EAAE;AACzB,QAAA,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC;IACjE;AAEA,IAAA,OAAO,OAAO;AAChB;AAqBA;;AAEG;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/providers/ThemeProvider/index.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;AAUA,MAAM,YAAY,GAAG,aAAa,CAA+B,SAAS,CAAC;AAEpE,MAAM,QAAQ,GAAG,MAAuB;AAC7C,IAAA,MAAM,OAAO,GAAG,UAAU,CAAC,YAAY,CAAC;AAExC,IAAA,IAAI,OAAO,KAAK,SAAS,EAAE;AACzB,QAAA,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC;IACjE;AAEA,IAAA,OAAO,OAAO;AAChB;AAqBA;;AAEG;AACI,MAAM,aAAa,GAAG,CAAC,EAAE,QAAQ,EAA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