@shohojdhara/atomix 0.4.5 → 0.4.7

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.
Files changed (54) hide show
  1. package/dist/atomix.css +70 -33
  2. package/dist/atomix.css.map +1 -1
  3. package/dist/atomix.min.css +2 -2
  4. package/dist/atomix.min.css.map +1 -1
  5. package/dist/charts.d.ts +93 -109
  6. package/dist/charts.js +273 -371
  7. package/dist/charts.js.map +1 -1
  8. package/dist/core.js +183 -184
  9. package/dist/core.js.map +1 -1
  10. package/dist/forms.js +183 -184
  11. package/dist/forms.js.map +1 -1
  12. package/dist/heavy.js +183 -184
  13. package/dist/heavy.js.map +1 -1
  14. package/dist/index.d.ts +7 -51
  15. package/dist/index.esm.js +281 -470
  16. package/dist/index.esm.js.map +1 -1
  17. package/dist/index.js +287 -476
  18. package/dist/index.js.map +1 -1
  19. package/dist/index.min.js +1 -1
  20. package/dist/index.min.js.map +1 -1
  21. package/package.json +1 -1
  22. package/src/components/AtomixGlass/AtomixGlass.tsx +60 -38
  23. package/src/components/AtomixGlass/AtomixGlassContainer.tsx +6 -35
  24. package/src/components/AtomixGlass/glass-utils.ts +27 -14
  25. package/src/components/AtomixGlass/stories/Overview.stories.tsx +19 -21
  26. package/src/components/AtomixGlass/stories/Playground.stories.tsx +1162 -515
  27. package/src/components/AtomixGlass/stories/shared-components.tsx +11 -3
  28. package/src/components/Chart/BubbleChart.tsx +6 -2
  29. package/src/components/Chart/Chart.stories.tsx +108 -96
  30. package/src/components/Chart/ChartToolbar.tsx +6 -4
  31. package/src/components/Chart/ChartTooltip.tsx +5 -4
  32. package/src/components/Chart/GaugeChart.tsx +20 -12
  33. package/src/components/Chart/HeatmapChart.tsx +53 -23
  34. package/src/components/Chart/TreemapChart.tsx +44 -15
  35. package/src/components/Chart/index.ts +0 -2
  36. package/src/components/Chart/types.ts +4 -4
  37. package/src/components/Navigation/Navbar/Navbar.tsx +13 -5
  38. package/src/components/index.ts +0 -1
  39. package/src/lib/composables/index.ts +1 -2
  40. package/src/lib/composables/useAtomixGlass.ts +246 -222
  41. package/src/lib/composables/useAtomixGlassStyles.ts +46 -23
  42. package/src/lib/constants/components.ts +3 -1
  43. package/src/styles/01-settings/_settings.chart.scss +13 -13
  44. package/src/styles/06-components/_components.atomix-glass.scss +45 -20
  45. package/src/styles/06-components/_components.chart.scss +23 -5
  46. package/src/components/Chart/AnimatedChart.tsx +0 -230
  47. package/src/lib/composables/atomix-glass/useGlassBackgroundDetection.ts +0 -329
  48. package/src/lib/composables/atomix-glass/useGlassCornerRadius.ts +0 -82
  49. package/src/lib/composables/atomix-glass/useGlassMouseTracking.ts +0 -153
  50. package/src/lib/composables/atomix-glass/useGlassOverLight.ts +0 -198
  51. package/src/lib/composables/atomix-glass/useGlassState.ts +0 -112
  52. package/src/lib/composables/atomix-glass/useGlassTransforms.ts +0 -160
  53. package/src/lib/composables/glass-styles.ts +0 -302
  54. package/src/lib/composables/useGlassContainer.ts +0 -177
package/dist/atomix.css CHANGED
@@ -1898,19 +1898,22 @@ a, a:hover {
1898
1898
  position: relative;
1899
1899
  --atomix-glass-radius: var(--atomix-radius-md, 16px);
1900
1900
  --atomix-glass-transform: none;
1901
- --atomix-glass-transition: transform var(--atomix-transition-duration, 0.15s) ease-out;
1901
+ --atomix-glass-transition: transform var(--atomix-transition-duration, 0.45s)
1902
+ cubic-bezier(0.22, 1, 0.36, 1);
1902
1903
  --atomix-glass-position: absolute;
1903
1904
  --atomix-glass-container-width: 100%;
1904
1905
  --atomix-glass-container-height: 100%;
1905
1906
  --atomix-glass-border-width: var(--atomix-spacing-0-5, 0.09375rem);
1906
- --_glass-z-background: 0;
1907
- --_glass-z-filter: 1;
1908
- --_glass-z-effect: 2;
1909
- --_glass-z-hover: 3;
1910
- --_glass-z-overlay-highlight: 4;
1911
- --_glass-z-border-1: 5;
1912
- --_glass-z-border-2: 6;
1913
- --_glass-z-content: 7;
1907
+ --atomix-glass-base-z-index: 0;
1908
+ --_glass-z-background: calc(var(--atomix-glass-base-z-index) + 0);
1909
+ --_glass-z-container: calc(var(--atomix-glass-base-z-index) + 1);
1910
+ --_glass-z-filter: calc(var(--atomix-glass-base-z-index) + 1);
1911
+ --_glass-z-effect: calc(var(--atomix-glass-base-z-index) + 2);
1912
+ --_glass-z-hover: calc(var(--atomix-glass-base-z-index) + 3);
1913
+ --_glass-z-overlay-highlight: calc(var(--atomix-glass-base-z-index) + 4);
1914
+ --_glass-z-border-1: calc(var(--atomix-glass-base-z-index) + 5);
1915
+ --_glass-z-border-2: calc(var(--atomix-glass-base-z-index) + 6);
1916
+ --_glass-z-content: calc(var(--atomix-glass-base-z-index) + 7);
1914
1917
  }
1915
1918
  .c-atomix-glass__hover-1, .c-atomix-glass__hover-2, .c-atomix-glass__hover-3 {
1916
1919
  position: absolute;
@@ -1936,17 +1939,17 @@ a, a:hover {
1936
1939
  background: var(--atomix-glass-hover-1-gradient, none);
1937
1940
  }
1938
1941
  .c-atomix-glass__hover-1 {
1939
- transition: opacity var(--atomix-transition-duration-fast, 0.15s) ease-out;
1942
+ transition: opacity 0.2s cubic-bezier(0.22, 1, 0.36, 1), background 0.35s cubic-bezier(0.22, 1, 0.36, 1);
1940
1943
  opacity: var(--atomix-glass-hover-1-opacity, 0);
1941
1944
  background: var(--atomix-glass-hover-1-gradient, none);
1942
1945
  }
1943
1946
  .c-atomix-glass__hover-2 {
1944
- transition: opacity var(--atomix-transition-duration-base, 0.3s) ease-out;
1947
+ transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1), background 0.45s cubic-bezier(0.22, 1, 0.36, 1);
1945
1948
  opacity: var(--atomix-glass-hover-2-opacity, 0);
1946
1949
  background: var(--atomix-glass-hover-2-gradient, none);
1947
1950
  }
1948
1951
  .c-atomix-glass__hover-3 {
1949
- transition: opacity var(--atomix-transition-duration-slow, 0.5s) ease-out;
1952
+ transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1), background 0.6s cubic-bezier(0.22, 1, 0.36, 1);
1950
1953
  opacity: var(--atomix-glass-hover-3-opacity, 0);
1951
1954
  background: var(--atomix-glass-hover-3-gradient, none);
1952
1955
  }
@@ -1969,6 +1972,8 @@ a, a:hover {
1969
1972
  transition: var(--atomix-glass-transition);
1970
1973
  mix-blend-mode: screen;
1971
1974
  z-index: var(--_glass-z-overlay-highlight);
1975
+ opacity: var(--atomix-glass-overlay-highlight-opacity, 0);
1976
+ background: var(--atomix-glass-overlay-highlight-bg, none);
1972
1977
  }
1973
1978
  .c-atomix-glass__border-1, .c-atomix-glass__border-2 {
1974
1979
  padding: var(--atomix-glass-border-width);
@@ -2011,12 +2016,15 @@ a, a:hover {
2011
2016
  position: relative;
2012
2017
  border-radius: var(--atomix-glass-radius);
2013
2018
  transition: var(--atomix-glass-transition);
2019
+ z-index: var(--_glass-z-container);
2014
2020
  }
2015
2021
  .c-atomix-glass__inner {
2016
2022
  width: var(--atomix-glass-container-width);
2017
2023
  height: var(--atomix-glass-container-height);
2018
2024
  position: relative;
2019
2025
  border-radius: var(--atomix-glass-radius);
2026
+ padding: var(--atomix-glass-container-padding);
2027
+ box-shadow: var(--atomix-glass-container-box-shadow);
2020
2028
  }
2021
2029
  .c-atomix-glass__filter {
2022
2030
  position: absolute;
@@ -2034,12 +2042,18 @@ a, a:hover {
2034
2042
  position: absolute;
2035
2043
  inset: 0;
2036
2044
  pointer-events: none;
2037
- border-radius: var(--atomix-glass-radius);
2045
+ border-radius: var(--atomix-glass-container-radius);
2046
+ -webkit-backdrop-filter: var(--atomix-glass-container-backdrop);
2047
+ backdrop-filter: var(--atomix-glass-container-backdrop);
2038
2048
  }
2039
2049
  .c-atomix-glass__filter-shadow {
2040
2050
  position: absolute;
2041
2051
  inset: var(--atomix-glass-border-width);
2042
2052
  pointer-events: none;
2053
+ border-radius: var(--atomix-glass-container-radius);
2054
+ box-shadow: var(--atomix-glass-container-shadow);
2055
+ opacity: var(--atomix-glass-container-shadow-opacity);
2056
+ background: var(--atomix-glass-container-bg);
2043
2057
  }
2044
2058
  .c-atomix-glass__content {
2045
2059
  position: relative;
@@ -2047,9 +2061,14 @@ a, a:hover {
2047
2061
  height: var(--atomix-glass-container-height);
2048
2062
  border-radius: var(--atomix-glass-radius);
2049
2063
  z-index: var(--_glass-z-content);
2064
+ text-shadow: var(--atomix-glass-container-text-shadow);
2050
2065
  }
2051
2066
  .c-atomix-glass__background-layer {
2052
- position: absolute;
2067
+ position: var(--atomix-glass-position);
2068
+ top: var(--atomix-glass-top);
2069
+ left: var(--atomix-glass-left);
2070
+ width: var(--atomix-glass-width);
2071
+ height: var(--atomix-glass-height);
2053
2072
  pointer-events: none;
2054
2073
  border-radius: var(--atomix-glass-radius);
2055
2074
  transform: var(--atomix-glass-transform);
@@ -4212,6 +4231,8 @@ a, a:hover {
4212
4231
  .c-chart__data-point {
4213
4232
  cursor: pointer;
4214
4233
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
4234
+ transform-origin: center;
4235
+ transform-box: fill-box;
4215
4236
  }
4216
4237
  .c-chart__data-point:hover {
4217
4238
  opacity: 0.8;
@@ -4259,21 +4280,23 @@ a, a:hover {
4259
4280
  opacity: 0.5;
4260
4281
  }
4261
4282
  .c-chart__treemap-node {
4262
- stroke: var(--atomix-border-color);
4263
- stroke-width: 1;
4283
+ stroke: transparent;
4284
+ stroke-width: 0;
4264
4285
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
4265
4286
  cursor: pointer;
4266
4287
  shape-rendering: geometricPrecision;
4288
+ transform-origin: center;
4289
+ transform-box: fill-box;
4267
4290
  }
4268
4291
  .c-chart__treemap-node:hover {
4269
4292
  transform: scale(1.02);
4270
4293
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
4271
- stroke-width: 1.5;
4294
+ stroke-width: 0;
4272
4295
  }
4273
4296
  .c-chart__treemap-node--hovered {
4274
4297
  transform: scale(1.02);
4275
4298
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
4276
- stroke-width: 1.5;
4299
+ stroke-width: 0;
4277
4300
  }
4278
4301
  .c-chart__treemap-node--selected {
4279
4302
  stroke: var(--atomix-primary-border-subtle);
@@ -4288,7 +4311,7 @@ a, a:hover {
4288
4311
  .c-chart__treemap-label {
4289
4312
  font-size: 0.875rem;
4290
4313
  font-weight: 500;
4291
- fill: var(--atomix-text-primary);
4314
+ fill: var(--atomix-invert-text-emphasis);
4292
4315
  text-anchor: middle;
4293
4316
  dominant-baseline: middle;
4294
4317
  pointer-events: none;
@@ -4300,13 +4323,14 @@ a, a:hover {
4300
4323
  .c-chart__funnel-segment {
4301
4324
  stroke: var(--atomix-border-color);
4302
4325
  stroke-width: 1;
4303
- transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
4326
+ transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
4304
4327
  cursor: pointer;
4305
4328
  shape-rendering: geometricPrecision;
4329
+ transform-origin: center;
4306
4330
  }
4307
4331
  .c-chart__funnel-segment:hover {
4308
- opacity: 0.9;
4309
- filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.075));
4332
+ opacity: 1;
4333
+ filter: drop-shadow(0 16px 48px rgba(0, 0, 0, 0.175)) brightness(1.1);
4310
4334
  stroke-width: 1.5;
4311
4335
  }
4312
4336
  .c-chart__funnel-segment:focus-visible {
@@ -4324,11 +4348,11 @@ a, a:hover {
4324
4348
  -webkit-user-select: none;
4325
4349
  -moz-user-select: none;
4326
4350
  user-select: none;
4327
- text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
4351
+ text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
4328
4352
  }
4329
4353
  .c-chart__funnel-conversion {
4330
- font-size: 0.75rem;
4331
- font-weight: 600;
4354
+ font-size: 0.875rem;
4355
+ font-weight: 700;
4332
4356
  fill: var(--atomix-secondary-text-emphasis);
4333
4357
  text-anchor: middle;
4334
4358
  dominant-baseline: middle;
@@ -4336,27 +4360,29 @@ a, a:hover {
4336
4360
  -webkit-user-select: none;
4337
4361
  -moz-user-select: none;
4338
4362
  user-select: none;
4339
- opacity: 0.8;
4363
+ opacity: 0.9;
4364
+ letter-spacing: 0.05em;
4365
+ text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
4340
4366
  }
4341
4367
  .c-chart__heatmap-cell {
4342
- stroke: var(--atomix-border-color);
4343
- stroke-width: 1;
4368
+ stroke: transparent;
4369
+ stroke-width: 0;
4344
4370
  rx: 0.25rem;
4345
4371
  ry: 0.25rem;
4346
4372
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
4347
4373
  cursor: pointer;
4348
4374
  shape-rendering: geometricPrecision;
4375
+ transform-origin: center;
4376
+ transform-box: fill-box;
4349
4377
  }
4350
4378
  .c-chart__heatmap-cell:hover {
4351
4379
  transform: scale(1.05);
4352
- transform-origin: center;
4353
4380
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.075));
4354
4381
  stroke-width: 2;
4355
4382
  z-index: 10;
4356
4383
  }
4357
4384
  .c-chart__heatmap-cell--hovered {
4358
4385
  transform: scale(1.05);
4359
- transform-origin: center;
4360
4386
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.075));
4361
4387
  stroke-width: 2;
4362
4388
  z-index: 10;
@@ -4369,7 +4395,7 @@ a, a:hover {
4369
4395
  .c-chart__heatmap-label {
4370
4396
  font-size: 0.75rem;
4371
4397
  font-weight: 400;
4372
- fill: var(--atomix-text-primary);
4398
+ fill: var(--atomix-invert-text-emphasis);
4373
4399
  text-anchor: middle;
4374
4400
  dominant-baseline: middle;
4375
4401
  pointer-events: none;
@@ -4497,6 +4523,8 @@ a, a:hover {
4497
4523
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
4498
4524
  cursor: pointer;
4499
4525
  shape-rendering: geometricPrecision;
4526
+ transform-origin: center;
4527
+ transform-box: fill-box;
4500
4528
  }
4501
4529
  .c-chart__area-point:hover {
4502
4530
  transform: scale(1.2);
@@ -4553,6 +4581,7 @@ a, a:hover {
4553
4581
  cursor: pointer;
4554
4582
  shape-rendering: geometricPrecision;
4555
4583
  transform-origin: center;
4584
+ transform-box: fill-box;
4556
4585
  }
4557
4586
  .c-chart__donut-slice:hover {
4558
4587
  transform: scale(1.02);
@@ -4616,6 +4645,8 @@ a, a:hover {
4616
4645
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
4617
4646
  cursor: pointer;
4618
4647
  shape-rendering: geometricPrecision;
4648
+ transform-origin: center;
4649
+ transform-box: fill-box;
4619
4650
  }
4620
4651
  .c-chart__scatter-point:hover {
4621
4652
  transform: scale(1.2);
@@ -4640,6 +4671,8 @@ a, a:hover {
4640
4671
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
4641
4672
  cursor: pointer;
4642
4673
  shape-rendering: geometricPrecision;
4674
+ transform-origin: center;
4675
+ transform-box: fill-box;
4643
4676
  }
4644
4677
  .c-chart__bubble:hover {
4645
4678
  transform: scale(1.1);
@@ -4697,6 +4730,8 @@ a, a:hover {
4697
4730
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
4698
4731
  cursor: pointer;
4699
4732
  shape-rendering: geometricPrecision;
4733
+ transform-origin: center;
4734
+ transform-box: fill-box;
4700
4735
  }
4701
4736
  .c-chart__radar-point:hover {
4702
4737
  transform: scale(1.3);
@@ -4764,6 +4799,8 @@ a, a:hover {
4764
4799
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
4765
4800
  cursor: pointer;
4766
4801
  shape-rendering: geometricPrecision;
4802
+ transform-origin: center;
4803
+ transform-box: fill-box;
4767
4804
  }
4768
4805
  .c-chart__waterfall-cumulative-point:hover {
4769
4806
  transform: scale(1.3);
@@ -4805,7 +4842,7 @@ a, a:hover {
4805
4842
  opacity: 1;
4806
4843
  }
4807
4844
  .c-chart__treemap-node {
4808
- stroke-width: 2;
4845
+ stroke-width: 0;
4809
4846
  }
4810
4847
  .c-chart__treemap-node--selected {
4811
4848
  stroke-width: 3;
@@ -4820,7 +4857,7 @@ a, a:hover {
4820
4857
  outline-width: calc(var(--atomix-border-width) * 3);
4821
4858
  }
4822
4859
  .c-chart__heatmap-cell {
4823
- stroke-width: 2;
4860
+ stroke-width: 0;
4824
4861
  }
4825
4862
  .c-chart__heatmap-cell--hovered {
4826
4863
  stroke-width: 3;